/**
 * Ferretería y Tlapalería El Águila - Villahermosa, Tabasco
 * Estilos Visuales Modernos, Comerciales y de Alta Conversión
 */

:root {
  --primary-navy: #0c1c2e;
  --navy-light: #162a42;
  --navy-dark: #07101b;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-gold-light: #fef3c7;
  --emerald-green: #10b981;
  --emerald-dark: #059669;
  --emerald-light: #d1fae5;
  --whatsapp-green: #25d366;
  --whatsapp-dark: #128c7e;
  --bg-slate: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-slate);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Barra Superior de Avisos
   ========================================================================== */
.top-notice-bar {
  background: var(--navy-dark);
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 7px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-notice-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.top-notice-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
}

.top-notice-links a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* ==========================================================================
   Cabecera Principal (Sticky Header)
   ========================================================================== */
.main-header {
  background: var(--primary-navy);
  color: #ffffff;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge-logo {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--primary-navy);
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease;
}

.brand-badge-logo:hover {
  transform: scale(1.05);
}

.brand-block .store-title {
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #ffffff;
  display: block;
  text-transform: uppercase;
}

.brand-block .store-subtitle {
  font-size: 0.76rem;
  color: #94a3b8;
  display: block;
}

/* Selector de Sucursales de Villahermosa */
.branch-selector-block {
  display: flex;
  flex-direction: column;
  background: var(--navy-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: border-color 0.2s;
}

.branch-selector-block:hover {
  border-color: var(--accent-gold);
}

.branch-selector-block label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.branch-select {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 0.84rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.branch-select option {
  background: var(--primary-navy);
  color: #ffffff;
}

/* Campo de Búsqueda Dominante */
.search-wrapper {
  flex: 1;
  min-width: 260px;
  max-width: 580px;
  position: relative;
}

.search-input-field {
  width: 100%;
  padding: 10px 42px 10px 16px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.15);
  font-size: 0.92rem;
  background: #ffffff;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-input-field:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

/* Acciones en Cabecera */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-branches {
  background: var(--navy-light);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-header-branches:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-gold);
}

.btn-quote-cart {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--primary-navy);
  border: none;
  padding: 9px 16px;
  font-weight: 800;
  font-size: 0.88rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-quote-cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.cart-pill {
  background: var(--primary-navy);
  color: #ffffff;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

/* ==========================================================================
   Sección Hero Visual y Comercial
   ========================================================================== */
.hero-showcase {
  position: relative;
  background: linear-gradient(135deg, rgba(12, 28, 46, 0.92) 0%, rgba(7, 16, 27, 0.88) 100%),
              url('../images/hero-storefront.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 48px 20px 40px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: inset 0 -10px 30px rgba(0, 0, 0, 0.3);
}

.hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.hero-landmarks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

.landmark-pill {
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--accent-gold);
  padding: 8px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.landmark-pill strong {
  color: #ffffff;
}

.landmark-pill em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 600;
}

.hero-banner-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-banner-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 158, 11, 0.35);
  background: #0f172a;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 520px;
}

.hero-banner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.25), 0 0 0 2px var(--accent-gold);
}

.hero-banner-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.hero-banner-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(12, 28, 46, 0.9);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid var(--accent-gold);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.hero-banner-caption {
  padding: 12px 16px;
  background: rgba(12, 28, 46, 0.96);
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-banner-caption span {
  font-weight: 800;
  font-size: 0.92rem;
  color: #ffffff;
}

.hero-banner-caption small {
  font-size: 0.76rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.18;
  max-width: 820px;
  color: #ffffff;
}

.hero-title span {
  color: var(--accent-gold);
}

.hero-description {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 760px;
  line-height: 1.5;
}

.hero-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--primary-navy);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-hero-whatsapp {
  background: var(--whatsapp-green);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease;
}

.btn-hero-whatsapp:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-2px);
}

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Barra de Confianza y Garantías (Trust Badges)
   ========================================================================== */
.trust-badges-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.trust-badges-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-gold-light);
  color: var(--accent-gold-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.trust-text h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.trust-text p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Cuadrícula de Categorías Visuales con Fotos Reales
   ========================================================================== */
.categories-visual-section {
  max-width: 1440px;
  margin: 28px auto 8px;
  padding: 0 20px;
  width: 100%;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}

.section-header-row h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary-navy);
}

.section-header-row p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.categories-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.category-banner-card {
  position: relative;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border-color);
}

.category-banner-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.category-banner-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-banner-card:hover img {
  transform: scale(1.06);
}

.category-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 28, 46, 0.2) 0%, rgba(12, 28, 46, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #ffffff;
}

.category-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.category-banner-desc {
  font-size: 0.78rem;
  color: #e2e8f0;
}

/* ==========================================================================
   Contenedor Principal de Catálogo y Facetas
   ========================================================================== */
.main-layout {
  max-width: 1440px;
  margin: 24px auto;
  padding: 0 20px;
  display: flex;
  gap: 24px;
  flex: 1;
  width: 100%;
}

/* Barra Lateral Facetada */
.sidebar-facets {
  width: 270px;
  flex-shrink: 0;
}

.facet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.facet-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.facet-heading {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--primary-navy);
  font-weight: 800;
  letter-spacing: 0.6px;
}

.btn-reset-filter {
  font-size: 0.74rem;
  color: var(--accent-gold-hover);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.btn-reset-filter:hover {
  text-decoration: underline;
}

.facet-list {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
}

.facet-item {
  padding: 7px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  transition: background 0.15s ease;
  font-size: 0.85rem;
}

.facet-item:hover {
  background: #f1f5f9;
}

.facet-item.active {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}

.facet-count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Banner de Cotización WhatsApp en Sidebar */
.sidebar-cta-banner {
  background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.sidebar-cta-banner h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.sidebar-cta-banner p {
  font-size: 0.78rem;
  color: #e2e8f0;
  margin-bottom: 12px;
}

.btn-sidebar-wa {
  background: var(--whatsapp-green);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Área de Catálogo de Productos
   ========================================================================== */
.catalog-content {
  flex: 1;
  min-width: 0;
}

.catalog-meta-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.meta-stats {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.meta-active-badge {
  background: var(--emerald-light);
  color: var(--emerald-dark);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  margin-left: 8px;
}

.catalog-sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.catalog-sort-select {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  outline: none;
}

/* Cuadrícula de Fichas de Producto Comerciales y Estéticas */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

/* Contenedor de Imagen de Producto */
.product-image-container {
  position: relative;
  width: 100%;
  height: 180px;
  background: #f1f5f9;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-thumb-img {
  transform: scale(1.06);
}

.card-badge-stock {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--emerald-dark);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
}

.stock-pulsing-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald-green);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.card-badge-feature {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-navy);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Cuerpo de la Tarjeta */
.product-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-brand-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.brand-name-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-navy);
  letter-spacing: 0.4px;
}

.sku-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.product-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.35;
}

.product-description {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Chips de Parámetros Técnicos */
.specs-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.spec-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.72rem;
  color: #334155;
}

.spec-chip strong {
  color: var(--primary-navy);
  font-weight: 700;
}

/* Barra Inferior y Botón de Cotización */
.product-card-footer {
  padding: 12px 14px;
  background: #fafbfc;
  border-top: 1px solid var(--border-color);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.price-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--emerald-dark);
}

.unit-val {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.card-actions-bar {
  display: flex;
  gap: 8px;
}

.stepper-container {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
}

.stepper-btn {
  background: #f1f5f9;
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 34px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.stepper-btn:hover {
  background: #e2e8f0;
}

.qty-input {
  width: 36px;
  height: 34px;
  border: none;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}

.btn-add-to-quote {
  flex: 1;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--primary-navy);
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-add-to-quote:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-add-to-quote.added {
  background: var(--emerald-green);
  color: #ffffff;
}

/* ==========================================================================
   Controles de Paginación y Carga de Artículos
   ========================================================================== */
.pagination-wrapper {
  margin: 36px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.btn-load-more {
  background: linear-gradient(135deg, #0f4c9c 0%, #0c1c2e 100%);
  color: #ffffff;
  border: 2px solid var(--accent-gold);
  padding: 13px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 76, 156, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-load-more:hover {
  background: linear-gradient(135deg, #1d64c2 0%, #0f4c9c 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.pagination-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

/* ==========================================================================
   Sección Destacada de las 2 Sucursales en Villahermosa
   ========================================================================== */
.branches-showcase-section {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 44px 20px;
  margin-top: 40px;
}

.branches-section-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.branches-grid-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.branch-feature-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.branch-feature-card:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-lg);
}

.branch-feature-card.selected-branch {
  border-color: var(--accent-gold);
  background: #fffdfa;
  box-shadow: 0 0 0 1px var(--accent-gold);
}

.branch-type-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: 10px;
  width: fit-content;
}

.pill-matriz {
  background: #fef3c7;
  color: #92400e;
}

.pill-sucursal {
  background: #e0f2fe;
  color: #0369a1;
}

.branch-feature-card h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.branch-address-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.branch-hours-text {
  font-size: 0.8rem;
  color: #334155;
  margin-bottom: 18px;
  font-weight: 600;
}

.branch-buttons-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-branch-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
}

.btn-branch-phone {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-branch-phone:hover {
  background: #cbd5e1;
}

.btn-branch-wa {
  background: var(--whatsapp-green);
  color: #ffffff;
}

.btn-branch-wa:hover {
  background: var(--whatsapp-dark);
}

.btn-branch-select-store {
  width: 100%;
  margin-top: 8px;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
}

.btn-branch-select-store:hover {
  background: var(--navy-light);
}

/* ==========================================================================
   Cajón Deslizable de Presupuesto (WhatsApp Drawer)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 46, 0.65);
  backdrop-filter: blur(3px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.quote-drawer {
  position: fixed;
  right: -480px;
  top: 0;
  width: 460px;
  max-width: 95vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: var(--shadow-xl);
  transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 300;
  display: flex;
  flex-direction: column;
}

.quote-drawer.active {
  right: 0;
}

.drawer-header {
  background: var(--primary-navy);
  color: #ffffff;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--accent-gold);
}

.drawer-header h2 {
  font-size: 1.15rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-drawer {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.drawer-branch-selector-container {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 12px 16px;
}

.drawer-branch-selector-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-branch-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 440px) {
  .drawer-branch-options-grid {
    grid-template-columns: 1fr;
  }
}

.drawer-branch-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.drawer-branch-card:hover {
  border-color: var(--accent-gold);
}

.drawer-branch-card.active {
  border-color: var(--accent-gold);
  background: #fffdf5;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.branch-card-radio-indicator {
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-branch-card.active .branch-card-radio-indicator {
  border-color: var(--accent-gold);
  background: var(--accent-gold);
}

.drawer-branch-card.active .branch-card-radio-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
}

.branch-card-details {
  flex: 1;
  min-width: 0;
}

.branch-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.branch-card-address {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-card-wa {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--whatsapp-green);
  margin-top: 3px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-row {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  align-items: center;
}

.cart-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-sku {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cart-item-price {
  font-size: 0.82rem;
  color: var(--emerald-dark);
  font-weight: 700;
}

.cart-item-qty {
  width: 48px;
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
}

.btn-remove-item {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 4px;
}

/* Formulario del Presupuesto */
.quote-customer-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Footer del Drawer */
.drawer-footer {
  padding: 18px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.total-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.total-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.total-amount {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--emerald-dark);
}

.footer-disclaimer {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-whatsapp-dispatch {
  width: 100%;
  background: var(--whatsapp-green);
  color: #ffffff;
  border: none;
  padding: 13px;
  font-size: 0.98rem;
  font-weight: 900;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-whatsapp-dispatch:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-1px);
}

/* ==========================================================================
   Botón Flotante de WhatsApp
   ========================================================================== */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--whatsapp-green);
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  z-index: 200;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.65);
}

.floating-tooltip {
  position: absolute;
  right: 70px;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
}

.floating-whatsapp-btn:hover .floating-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   Footer Institucional
   ========================================================================== */
.main-footer {
  background: var(--navy-dark);
  color: #94a3b8;
  padding: 40px 20px 20px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.footer-col p {
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-bottom-bar {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
}

/* ==========================================================================
   Barra de Navegación Inferior Móvil (Mobile Bottom Nav)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-navy);
  border-top: 2px solid var(--accent-gold);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  z-index: 250;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
}

.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  position: relative;
  min-width: 58px;
}

.mobile-bottom-nav .nav-item:active {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-bottom-nav .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 3px;
  position: relative;
}

.mobile-nav-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  background: var(--accent-gold);
  color: var(--primary-navy);
  font-size: 0.65rem;
  font-weight: 900;
  border-radius: var(--radius-full);
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

.nav-wa-highlight {
  color: var(--whatsapp-green) !important;
}

/* ==========================================================================
   Responsividad Móvil Refinada (Smartphone & Tablet)
   ========================================================================== */
@media (max-width: 992px) {
  .main-layout {
    flex-direction: column;
  }

  .sidebar-facets {
    width: 100%;
  }

  .facet-list {
    max-height: 180px;
  }

  .hero-title {
    font-size: 1.9rem;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 74px; /* Espacio reservado para la barra fija inferior */
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .floating-whatsapp-btn {
    bottom: 84px;
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }

  .trust-badges-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .categories-visual-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-banner-card {
    height: 125px;
  }

  .category-banner-title {
    font-size: 0.92rem;
  }

  .category-banner-desc {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .top-notice-bar {
    display: none; /* Simplificar cabecera en móvil */
  }

  .main-header {
    padding: 8px 12px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .brand-wrapper {
    justify-content: space-between;
    width: 100%;
  }

  .brand-badge-logo {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .brand-block .store-title {
    font-size: 1.05rem;
  }

  .brand-block .store-subtitle {
    font-size: 0.68rem;
  }

  .branch-selector-block {
    padding: 4px 8px;
  }

  .branch-select {
    font-size: 0.78rem;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .search-input-field {
    padding: 8px 36px 8px 14px;
    font-size: 16px; /* Evita que Safari en iOS haga zoom automático */
  }

  .header-actions {
    display: none; /* Se manejan desde la barra fija inferior en móvil */
  }

  .hero-showcase {
    padding: 28px 14px 24px;
  }

  .hero-title {
    font-size: 1.55rem;
    line-height: 1.22;
  }

  .hero-description {
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 8px;
  }

  .btn-hero-primary,
  .btn-hero-whatsapp,
  .btn-hero-outline {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.88rem;
  }

  .trust-badges-bar {
    padding: 12px 14px;
  }

  .trust-badges-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trust-badge-item {
    gap: 10px;
  }

  .trust-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .categories-visual-section {
    padding: 0 14px;
    margin-top: 20px;
  }

  .main-layout {
    padding: 0 14px;
    margin-top: 14px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-image-container {
    height: 190px;
  }

  .product-title {
    font-size: 0.94rem;
  }

  .price-val {
    font-size: 1.25rem;
  }

  .stepper-btn {
    width: 36px;
    height: 38px;
  }

  .qty-input {
    width: 44px;
    height: 38px;
    font-size: 16px; /* Evita auto-zoom en iOS */
  }

  .btn-add-to-quote {
    padding: 10px;
    font-size: 0.88rem;
  }

  .quote-drawer {
    width: 100vw;
  }

  .form-input {
    font-size: 16px; /* Evita auto-zoom en iOS */
  }

  .branches-showcase-section {
    padding: 30px 14px;
  }

  .branches-grid-three {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

