/* ═══════════════════════════════════════════════════════════════════════════
   FRUTALIA — Hoja de Estilos Principal
   Identidad: Verde Esmeralda Orgánico | Acento Cítrico Mandarina | Blanco Natural
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── RESET Y VARIABLES ─────────────────────────────────────────────────── */
:root {
  --verde:         #15803D;
  --verde-dark:    #14532D;
  --verde-light:   #DCFCE7;
  --verde-xlight:  #F0FDF4;
  --citrico:       #EA580C;
  --citrico-dark:  #C2410C;
  --citrico-light: #FFEDD5;

  /* Aliases para máxima compatibilidad con selectores de plantilla */
  --naranja:       #EA580C;
  --naranja-dark:  #C2410C;
  --naranja-light: #FFEDD5;
  --azul:          #14532D;
  --azul-light:    #15803D;
  --azul-xlight:   #F0FDF4;
  --fondo:         #F8FAF6;
  --blanco:        #FFFFFF;
  --gris-100:      #F1F5F0;
  --gris-200:      #E2E8F0;
  --gris-400:      #94A3B8;
  --gris-600:      #475569;
  --gris-800:      #0F172A;
  --exito:         #16A34A;
  --error:         #DC2626;
  --advertencia:   #D97706;

  --radio:         10px;
  --radio-lg:      16px;
  --sombra-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --sombra:        0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --sombra-lg:     0 10px 25px rgba(20,83,45,.10), 0 4px 10px rgba(0,0,0,.04);
  --trans:         all .2s ease;

  --header-h:      120px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--fondo);
  color: var(--gris-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' on, 'tnum' on;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── TIPOGRAFÍA DE TÍTULOS Y CABECERAS (PLUS JAKARTA SANS) ──────────────── */
h1, h2, h3, h4, h5, h6,
.logo-text,
.section-title,
.hero-slide-title,
.producto-nombre,
.modal-pro-title,
.relacionados-title,
.wholesale-card-title,
.font-title {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--azul);
}
.section-subtitle { color: var(--gris-600); margin-top: 4px; font-size: .95rem; }

/* ── BOTONES ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radio);
  font-weight: 600; font-size: .9rem;
  transition: var(--trans); white-space: nowrap;
}
.btn-primary {
  background: var(--naranja); color: var(--blanco);
}
.btn-primary:hover { background: var(--naranja-dark); transform: translateY(-1px); box-shadow: var(--sombra); }
.btn-secondary {
  background: var(--gris-100); color: var(--gris-800); border: 1px solid var(--gris-200);
}
.btn-secondary:hover { background: var(--gris-200); }
/* Botón secundario para fondos oscuros/fotográficos del Hero */
.btn-outline-light {
  background: rgba(15, 23, 42, 0.7) !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}
.btn-outline-light:hover {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  text-shadow: none;
}

.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-xl { padding: 16px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.link-btn {
  color: var(--naranja); font-weight: 600; text-decoration: underline;
  background: none; border: none; padding: 0; cursor: pointer; font-size: inherit;
}
.link-btn:hover { color: var(--naranja-dark); }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.header {
  background: var(--azul);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--sombra-lg);
}

.header-top { padding: 14px 0; }

.header-top-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 20px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
}
.logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.logo-text {
  color: var(--blanco); font-weight: 800; font-size: 1.2rem;
  line-height: 1.2;
}

/* Buscador */
.search-wrapper {
  position: relative; display: flex; align-items: center;
}
.search-input {
  width: 100%; padding: 10px 44px 10px 16px;
  border-radius: 50px; border: none;
  background: rgba(255,255,255,.12);
  color: var(--blanco); font-size: .95rem;
  transition: var(--trans);
}
.search-input::placeholder { color: rgba(255,255,255,.55); }
.search-input:focus {
  outline: none; background: rgba(255,255,255,.2);
  box-shadow: 0 0 0 3px rgba(242,122,26,.5);
}
.search-btn {
  position: absolute; right: 12px;
  color: rgba(255,255,255,.7); display: flex;
}
.search-btn svg { width: 20px; height: 20px; }
.search-btn:hover { color: var(--blanco); }

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

.btn-mis-pedidos {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radio);
  transition: var(--trans);
}
.btn-mis-pedidos svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-mis-pedidos:hover { background: rgba(255,255,255,.1); color: var(--blanco); }

.btn-carrito {
  display: flex; align-items: center; gap: 8px;
  background: var(--naranja); color: var(--blanco);
  padding: 10px 16px; border-radius: var(--radio);
  font-weight: 700; font-size: .95rem; position: relative;
  transition: var(--trans);
}
.btn-carrito svg { width: 22px; height: 22px; }
.btn-carrito:hover { background: var(--naranja-dark); }
.carrito-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--error); color: var(--blanco);
  border-radius: 50%; width: 20px; height: 20px;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--azul);
}
.carrito-total { font-size: .9rem; }

/* Nav de categorías */
.header-nav {
  background: var(--azul, #1e3a8a);
  position: relative;
}
.cat-container {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 10px;
  gap: 4px;
}
.categorias-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categorias-scroll-wrapper::-webkit-scrollbar { display: none; }
.categorias-nav {
  display: flex; gap: 4px; padding: 8px 0; width: max-content;
}
.cat-btn {
  white-space: nowrap; padding: 6px 16px; border-radius: 50px;
  color: rgba(255,255,255,.75); font-size: .85rem; font-weight: 500;
  transition: var(--trans);
}
.cat-btn:hover { background: rgba(255,255,255,.12); color: var(--blanco); }
.cat-btn.active {
  background: var(--naranja); color: var(--blanco); font-weight: 700;
}
.cat-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  padding: 0;
}
.cat-arrow:hover {
  background: var(--naranja);
  border-color: var(--naranja);
  color: #ffffff;
  transform: scale(1.1);
}
.cat-arrow.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.cat-arrow svg {
  width: 14px;
  height: 14px;
}

/* Barra de subcategorías con desplazamiento suave y flechas */
.subcategorias-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}
.subcat-container {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 10px;
  gap: 6px;
}
.subcategorias-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.subcategorias-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}
.subcategorias-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.subcategorias-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.subcategorias-nav {
  display: flex; gap: 8px; padding: 10px 4px; align-items: center; width: max-content;
}
.subcat-btn {
  white-space: nowrap; padding: 5px 14px; border-radius: 99px;
  background: #ffffff; color: var(--gris-700); font-size: .8rem; font-weight: 500;
  border: 1px solid #cbd5e1; transition: var(--trans); cursor: pointer;
}
.subcat-btn:hover { background: #f1f5f9; color: var(--azul); border-color: var(--azul); }
.subcat-btn.active {
  background: var(--azul); color: var(--blanco); font-weight: 700; border-color: var(--azul);
}
.subcat-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  z-index: 2;
  padding: 0;
}
.subcat-arrow:hover {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(30, 58, 138, 0.25);
}
.subcat-arrow.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.subcat-arrow svg {
  width: 16px;
  height: 16px;
}
/* ── HERO SLIDER / CARRUSEL ─────────────────────────────────────────── */
.hero-slider-section {
  position: relative;
  overflow: hidden;
  background: var(--azul);
}

.hero-slider-track {
  position: relative;
  width: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.98);
  padding: 56px 0 52px;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

/* Temas visuales para cada banner con fotografía comercial hiperrealista */
.slide-theme-mayorista {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.82) 55%, rgba(15, 23, 42, 0.38) 100%),
              url('/assets/img/banner-mayorista.jpg') center/cover no-repeat;
}

.slide-theme-sii {
  background: linear-gradient(90deg, rgba(9, 25, 48, 0.95) 0%, rgba(9, 25, 48, 0.84) 55%, rgba(9, 25, 48, 0.38) 100%),
              url('/assets/img/banner-factura.jpg') center/cover no-repeat;
}

.slide-theme-retiro {
  background: linear-gradient(90deg, rgba(6, 44, 34, 0.94) 0%, rgba(6, 44, 34, 0.82) 55%, rgba(6, 44, 34, 0.38) 100%),
              url('/assets/img/banner-retiro.jpg') center/cover no-repeat;
}

.slide-theme-webpay {
  background: linear-gradient(90deg, rgba(20, 20, 50, 0.94) 0%, rgba(20, 20, 50, 0.82) 55%, rgba(20, 20, 50, 0.38) 100%),
              url('/assets/img/banner-despacho.jpg') center/cover no-repeat;
}

.hero-slide-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(242,122,26, 0.18);
  color: #FFB46A;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
  border: 1px solid rgba(242,122,26, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-tag.tag-sii {
  background: rgba(59, 130, 246, 0.2);
  color: #93C5FD;
  border-color: rgba(59, 130, 246, 0.4);
}

.hero-tag.tag-retiro {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.4);
}

.hero-tag.tag-webpay {
  background: rgba(244, 63, 94, 0.2);
  color: #FDA4AF;
  border-color: rgba(244, 63, 94, 0.4);
}

.hero-title {
  color: var(--blanco);
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 640px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-item svg {
  width: 20px;
  height: 20px;
  color: var(--naranja);
  flex-shrink: 0;
}

.badge-item.badge-highlight {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Flechas de control del slider */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.slider-arrow:hover {
  background: var(--naranja);
  border-color: var(--naranja);
  transform: translateY(-50%) scale(1.08);
}

.slider-arrow svg {
  width: 20px;
  height: 20px;
}

.slider-prev {
  left: 18px;
}

.slider-next {
  right: 18px;
}

/* Paginación Dots */
.slider-dots-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.slider-dot.active {
  width: 32px;
  background: var(--naranja);
  box-shadow: 0 0 8px rgba(242, 122, 26, 0.6);
}

@media (max-width: 900px) {
  .hero-slide {
    padding: 42px 0 46px;
  }
  .hero-slide-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-badges {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .badge-item {
    font-size: 0.8rem;
    padding: 8px 12px;
    white-space: normal;
  }
  .slider-arrow {
    display: none; /* En celular se navega con los dots o auto-slide */
  }
}

/* ── CATÁLOGO ─────────────────────────────────────────────────────────── */
.main { padding: 48px 0 80px; }

.catalogo-header { margin-bottom: 28px; }
.catalogo-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.catalogo-orden-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  padding: 6px 12px;
  border-radius: var(--radio);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.select-orden-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gris-600);
}
.select-orden {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--azul);
  cursor: pointer;
  outline: none;
}

/* Píldoras de subcategorías dentro del catálogo */
.catalogo-subcategorias-bar {
  margin-top: 14px;
  padding: 14px 16px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.subcat-pills-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 8px;
}
.subcat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.subcat-pill {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.subcat-pill:hover {
  background: #e2e8f0;
  color: var(--azul);
  border-color: #94a3b8;
}
.subcat-pill.active {
  background: var(--azul);
  color: #ffffff;
  border-color: var(--azul);
  box-shadow: 0 2px 6px rgba(29, 53, 87, 0.25);
}
.subcat-pill-count {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
}
.subcat-pill.active .subcat-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Loading */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 0; color: var(--gris-600);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gris-200);
  border-top-color: var(--naranja);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Grid */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Tarjeta de producto */
.producto-card {
  background: var(--blanco); border-radius: var(--radio-lg);
  box-shadow: var(--sombra-sm); border: 1px solid var(--gris-200);
  display: flex; flex-direction: column;
  transition: var(--trans); overflow: hidden;
}
.producto-card:hover {
  box-shadow: var(--sombra-lg); transform: translateY(-3px);
  border-color: var(--naranja);
}
.producto-card.sin-stock { opacity: .6; }

.producto-img-wrap {
  position: relative; aspect-ratio: 1;
  background: var(--gris-100); overflow: hidden;
}
.producto-img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 16px; transition: transform .3s ease;
}
.producto-card:hover .producto-img { transform: scale(1.04); }

.badge-stock-out {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.badge-stock-out span {
  background: var(--error); color: var(--blanco);
  font-weight: 700; font-size: .8rem; padding: 4px 10px;
  border-radius: 50px;
}

.badge-mayor {
  position: absolute; top: 10px; right: 10px;
  background: var(--naranja); color: var(--blanco);
  font-size: .7rem; font-weight: 700; padding: 3px 8px;
  border-radius: 50px;
  z-index: 2;
}

.badge-descuento-porcentaje {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.02em;
  z-index: 3;
  font-family: 'Plus Jakarta Sans', sans-serif;
  animation: pulseDescuento 2.6s ease-in-out infinite;
}
@keyframes pulseDescuento {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.producto-body {
  padding: 14px; flex: 1; display: flex; flex-direction: column;
}
.producto-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.producto-categoria {
  font-size: .72rem; font-weight: 600; color: var(--naranja);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 0;
}
.producto-marca {
  font-size: .68rem; font-weight: 700; color: #0369a1;
  background: #e0f2fe; padding: 2px 7px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.producto-img-link {
  display: block; width: 100%; height: 100%;
}
.producto-title-link {
  color: inherit; text-decoration: none; display: block; transition: color .15s ease;
}
.producto-title-link:hover {
  color: var(--naranja);
}
.producto-nombre {
  font-weight: 700; font-size: .95rem; color: var(--gris-800);
  margin-bottom: 6px; line-height: 1.3; flex: 1;
}
.producto-escalas {
  font-size: .75rem; color: var(--gris-600); margin-bottom: 10px;
  line-height: 1.5;
}
.producto-escalas strong { color: var(--azul); }

.precio-wrap-oferta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.precio-anterior-tachado {
  font-size: 0.88rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}
.producto-precio-actual {
  font-size: 1.3rem; font-weight: 800; color: var(--azul);
  margin-bottom: 2px;
}
.producto-precio-actual.text-oferta {
  color: #16a34a !important;
}
.badge-ahorro-monto {
  font-size: 0.68rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  margin-bottom: 6px;
}
.producto-precio-label { font-size: .72rem; color: var(--gris-600); margin-bottom: 12px; }

/* Botón especial Ofertas en la barra de navegación */
.cat-btn-ofertas {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  color: #c2410c !important;
  border-color: #fdba74 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.15);
}
.cat-btn-ofertas:hover, .cat-btn-ofertas.active {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

/* Modal Pro Ofertas */
.modal-precio-anterior-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.modal-precio-anterior {
  font-size: 1.05rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}
.badge-ahorro-destacado {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

/* Controles de cantidad */
.cantidad-control {
  display: flex; align-items: center; gap: 0;
  border: 2px solid var(--gris-200); border-radius: var(--radio);
  overflow: hidden;
}
.btn-qty {
  width: 36px; height: 36px; font-size: 1.1rem; font-weight: 700;
  color: var(--azul); background: var(--gris-100);
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans); flex-shrink: 0;
}
.btn-qty:hover:not(:disabled) { background: var(--naranja); color: var(--blanco); }
.btn-qty:disabled { opacity: .4; cursor: not-allowed; }
.qty-input {
  width: 44px; text-align: center; border: none;
  font-weight: 700; font-size: .95rem; color: var(--gris-800);
  background: var(--blanco); padding: 6px 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn-agregar {
  width: 100%; margin-top: 10px;
  background: var(--azul); color: var(--blanco);
  padding: 10px; border-radius: var(--radio);
  font-weight: 700; font-size: .9rem;
  transition: var(--trans); display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-agregar:hover:not(:disabled) { background: var(--azul-light); }
.btn-agregar:disabled { background: var(--gris-200); color: var(--gris-400); cursor: not-allowed; }
.btn-agregar.en-carrito { background: var(--exito); }
.btn-agregar.en-carrito:hover { background: #15803d; }

/* Empty state */
.empty-state {
  text-align: center; padding: 80px 0; color: var(--gris-600);
}
.empty-state svg { width: 60px; height: 60px; margin: 0 auto 16px; }
.empty-state p { font-size: 1.05rem; margin-bottom: 20px; }

/* ── CARRITO DRAWER ───────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.carrito-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--blanco); z-index: 300;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.carrito-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gris-200);
  background: var(--azul); color: var(--blanco);
}
.drawer-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 700;
}
.drawer-title svg { width: 22px; height: 22px; }
.btn-close-drawer {
  color: rgba(255,255,255,.7); padding: 6px; border-radius: 8px;
  transition: var(--trans); display: flex;
}
.btn-close-drawer svg { width: 22px; height: 22px; }
.btn-close-drawer:hover { background: rgba(255,255,255,.15); color: var(--blanco); }

.carrito-items {
  flex: 1; overflow-y: auto; padding: 0;
}
.carrito-vacio {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 60px 24px; text-align: center; color: var(--gris-600);
}
.carrito-vacio svg { width: 56px; height: 56px; }

/* Items lista */
.items-lista { padding: 0; }
.item-carrito {
  display: grid; grid-template-columns: 60px 1fr auto;
  gap: 12px; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--gris-100);
  transition: background .15s;
}
.item-carrito:hover { background: var(--gris-100); }
.item-img {
  width: 60px; height: 60px; object-fit: contain;
  background: var(--gris-100); border-radius: 8px; padding: 4px;
}
.item-info { min-width: 0; }
.item-nombre { font-weight: 600; font-size: .88rem; line-height: 1.3; }
.item-precio-unit { font-size: .8rem; color: var(--gris-600); }
.item-escala-badge {
  font-size: .72rem; background: var(--naranja-light);
  color: var(--naranja); border-radius: 50px; padding: 2px 8px;
  font-weight: 600; display: inline-block; margin-top: 4px;
}
.item-acciones {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.item-subtotal { font-weight: 800; font-size: .95rem; color: var(--azul); }
.item-qty-control {
  display: flex; align-items: center; gap: 4px;
}
.item-qty-btn {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--gris-100); color: var(--azul);
  font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.item-qty-btn:hover { background: var(--naranja); color: var(--blanco); }
.item-qty-num { font-weight: 700; font-size: .9rem; min-width: 20px; text-align: center; }
.item-eliminar {
  color: var(--gris-400); transition: color .2s;
  font-size: .75rem; display: flex; align-items: center; gap: 3px;
}
.item-eliminar:hover { color: var(--error); }
.item-eliminar svg { width: 14px; height: 14px; }

/* Progreso envío */
.progreso-envio {
  padding: 12px 20px;
  background: #FFF7ED;
  border-top: 1px solid rgba(242, 122, 26, 0.25);
  border-bottom: 1px solid rgba(242, 122, 26, 0.15);
  transition: all 0.3s ease;
}
.progreso-envio.completado {
  background: #F0FDF4;
  border-top-color: rgba(22, 163, 74, 0.25);
  border-bottom-color: rgba(22, 163, 74, 0.15);
}
.progreso-texto {
  font-size: 0.82rem;
  color: #C2410C;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.progreso-envio.completado .progreso-texto {
  color: #15803D;
}
.progreso-bar {
  height: 8px;
  background: #FED7AA;
  border-radius: 50px;
  overflow: hidden;
}
.progreso-envio.completado .progreso-bar {
  background: #BBF7D0;
}
.progreso-fill {
  height: 100%;
  background: linear-gradient(90deg, #F27A1A 0%, #EA580C 100%);
  border-radius: 50px;
  transition: width 0.4s ease, background 0.4s ease;
}
.progreso-envio.completado .progreso-fill {
  background: #16A34A;
}

/* Resumen carrito */
.carrito-resumen {
  padding: 20px 24px; border-top: 2px solid var(--gris-200);
  background: var(--gris-100);
}
.resumen-linea {
  display: flex; justify-content: space-between;
  font-size: .9rem; padding: 4px 0;
}
.resumen-flete { color: var(--gris-600); }
.resumen-total {
  font-weight: 800; font-size: 1.1rem; color: var(--azul);
  border-top: 1px solid var(--gris-200); margin-top: 8px; padding-top: 12px;
}
.text-muted { color: var(--gris-600); font-style: italic; font-size: .85rem; }
.carrito-resumen .btn { margin-top: 14px; }

[hidden] {
  display: none !important;
}

/* ── MODALES ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.60);
  z-index: 1200; display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto; overflow-x: hidden;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
}
.modal-overlay[hidden] {
  display: none !important;
}

.modal {
  background: var(--blanco); border-radius: var(--radio-lg);
  box-shadow: var(--sombra-lg); width: 100%;
  animation: slideUp .25s ease;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.checkout-modal { max-width: 640px; }
.pedidos-modal { max-width: 1040px !important; width: 95% !important; }
.terminos-modal { max-width: 640px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--gris-200);
  background: var(--azul); border-radius: var(--radio-lg) var(--radio-lg) 0 0;
  color: var(--blanco);
  box-sizing: border-box;
}
.modal-title { font-size: 1.2rem; font-weight: 700; }
.btn-close-modal {
  color: rgba(255,255,255,.7); padding: 6px; border-radius: 8px;
  display: flex; transition: var(--trans);
}
.btn-close-modal svg { width: 22px; height: 22px; }
.btn-close-modal:hover { background: rgba(255,255,255,.15); color: var(--blanco); }

.modal-body { padding: 28px; box-sizing: border-box; }
.modal-footer {
  padding: 16px 28px; border-top: 1px solid var(--gris-200);
  display: flex; justify-content: flex-end;
  box-sizing: border-box;
}

.modal-desc { color: var(--gris-600); margin-bottom: 20px; }

/* ── MODALES RESPONSIVE: AJUSTE PERFECTO EN IPHONE Y MÓVILES (APROVECHAR ANCHO TOTAL) ── */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 8px 6px !important;
    align-items: flex-start !important;
    overflow-x: hidden !important;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
  }
  .checkout-modal,
  .pedidos-modal,
  .terminos-modal {
    max-width: 100% !important;
    width: 100% !important;
  }
  .modal-header {
    padding: 14px 16px !important;
    border-radius: 16px 16px 0 0 !important;
  }
  .modal-title {
    font-size: 1.1rem !important;
  }
  .btn-close-modal {
    padding: 4px !important;
  }
  .modal-body {
    padding: 14px 10px !important;
    overflow-x: hidden !important;
  }
  .modal-footer {
    padding: 12px 14px !important;
  }
  .fieldset {
    padding: 12px 10px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
  }
  .fieldset-legend {
    font-size: 0.8rem !important;
    padding: 0 4px !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-top: 8px !important;
  }
  .form-group {
    width: 100% !important;
    gap: 4px !important;
  }
  .form-group label {
    font-size: 0.82rem !important;
  }
  /* REGLA VITAL PARA IPHONE / SAFARI:
     Font-size a 16px exactos evita que iOS haga auto-zoom al enfocar los inputs,
     impidiendo que el formulario se mueva o quede recortado fuera de pantalla */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
  }
  .radio-group {
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 8px !important;
    width: 100% !important;
  }
  .radio-card {
    width: 100% !important;
  }
  .radio-card-content {
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .radio-title {
    font-size: 0.88rem !important;
  }
  .radio-desc {
    font-size: 0.76rem !important;
  }
  .costo-envio-info {
    padding: 10px 12px !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .checkout-resumen {
    padding: 12px 14px !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .resumen-linea {
    font-size: 0.9rem !important;
  }
  .resumen-total {
    font-size: 1.08rem !important;
  }
  .check-label {
    font-size: 0.82rem !important;
    gap: 8px !important;
  }
  #btnPagar {
    font-size: 1.02rem !important;
    padding: 14px 16px !important;
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 10px !important;
  }
  .pago-seguro-nota {
    font-size: 0.76rem !important;
    text-align: center !important;
    line-height: 1.35 !important;
  }
  /* Ocultar botón flotante de WhatsApp mientras un modal esté activo para que no estorbe */
  body:has(.modal-overlay:not([hidden])) .whatsapp-float-wrap,
  body:has(.modal-detalle-overlay:not([hidden])) .whatsapp-float-wrap {
    display: none !important;
  }
}

/* ── MODAL PRODUCTO PRO ──────────────────────────────────────────────── */
.modal-detalle-overlay {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .modal-detalle-overlay {
    padding: 8px 6px !important;
  }
}

.modal-producto-pro {
  max-width: 820px !important;
  width: 95% !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
  box-sizing: border-box;
  min-width: 0;
}
.modal-pro-header {
  padding: 16px 24px;
}
@media (max-width: 640px) {
  .modal-producto-pro {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px !important;
  }
  .modal-pro-header {
    padding: 12px 14px !important;
  }
}
.modal-pro-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
  padding: 22px 26px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
@media (max-width: 768px) {
  .modal-pro-layout {
    grid-template-columns: 100%;
    gap: 16px;
    padding: 14px 12px;
  }
}
@media (max-width: 480px) {
  .modal-pro-layout {
    padding: 10px 8px;
    gap: 12px;
  }
}
.modal-pro-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.modal-pro-img-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .modal-pro-img-card {
    max-width: 320px;
    max-height: 320px;
    margin: 0 auto;
    align-self: center;
  }
}
@media (max-width: 480px) {
  .modal-pro-img-card {
    padding: 14px;
    max-width: 280px;
    max-height: 280px;
    margin: 0 auto;
    align-self: center;
  }
}
.modal-pro-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.modal-pro-img:hover {
  transform: scale(1.05);
}
.modal-pro-trust-badges {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}
.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
}
.trust-badge-item svg {
  width: 16px;
  height: 16px;
  color: #16a34a;
  flex-shrink: 0;
}
.modal-pro-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.modal-pro-header-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.modal-pro-breadcrumb {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal-pro-sku {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.modal-pro-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .modal-pro-title {
    font-size: 1.15rem;
  }
}
.modal-pro-brand-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.modal-pro-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 4px 11px;
  border-radius: 99px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.modal-pro-brand-pill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}
.modal-pro-pack-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 99px;
}
.modal-pro-stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #16a34a;
}
.stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.modal-pro-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 16px;
}
.modal-pro-price-hero {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
}
.modal-pro-main-price {
  font-size: 1.85rem;
  font-weight: 900;
  color: #15803d;
}
.modal-pro-price-tag {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}
.modal-pro-wholesale-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-sizing: border-box;
  overflow-x: auto;
}
.wholesale-card-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wholesale-table {
  width: 100%;
  font-size: 0.82rem;
  border-collapse: collapse;
}
.wholesale-table th {
  text-align: left;
  color: #64748b;
  padding-bottom: 4px;
  font-weight: 600;
}
.wholesale-table td {
  padding: 4px 0;
}
.wholesale-row-highlight {
  color: #15803d;
  font-weight: 700;
}
.wholesale-savings-badge {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 99px;
}
.modal-pro-action-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.modal-pro-subtotal-display {
  margin-top: 10px;
  font-size: 0.84rem;
  color: #334155;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
  width: 100%;
}
.modal-pro-share-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

/* ── PRODUCTOS RELACIONADOS Y CROSS-SELLING EN MODAL PRO ─────────── */
.modal-pro-relacionados {
  margin: 10px 24px 24px 24px;
  padding: 18px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-sizing: border-box;
  min-width: 0;
}
.relacionados-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.relacionados-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  min-width: 0;
}
.relacionados-title svg {
  color: #ea580c;
  flex-shrink: 0;
}
.relacionados-sub {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 500;
}
.relacionados-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
@media (max-width: 768px) {
  .modal-pro-relacionados {
    margin: 8px 12px 18px 12px;
    padding: 12px;
  }
  .relacionados-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .modal-pro-relacionados {
    margin: 6px 8px 14px 8px;
    padding: 10px 8px;
  }
  .relacionados-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}
.relacionado-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}
.relacionado-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.09);
  transform: translateY(-2px);
}
.relacionado-badge-pill {
  font-size: 0.65rem;
  font-weight: 800;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relacionado-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: #f8fafc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
  overflow: hidden;
}
.relacionado-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.relacionado-card:hover .relacionado-img-wrap img {
  transform: scale(1.06);
}
.relacionado-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.relacionado-cat {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.relacionado-nombre {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.relacionado-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
  flex-wrap: wrap;
}
.relacionado-precio {
  font-size: 0.82rem;
  font-weight: 800;
  color: #15803d;
  white-space: nowrap;
}
.btn-cross-add {
  background: #ea580c;
  color: #ffffff;
  border: none;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-cross-add:hover {
  background: #c2410c;
  transform: translateY(-1px);
}
.btn-cross-add.agregado-exito {
  background: #16a34a !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
  transform: scale(1.04);
}
.btn-ver-relacionado {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-ver-relacionado:hover {
  background: var(--naranja, #ea580c);
  color: #ffffff;
  border-color: var(--naranja, #ea580c);
}

/* ── ETIQUETAS SEMÁNTICAS (TAGS EN MODAL) ────────────────────────────────── */
.modal-pro-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 12px 0;
}
.tags-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.btn-tag-modal {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.btn-tag-modal:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
}

/* ── BADGE DE SUGERENCIA SEMÁNTICA EN TARJETA DE CATÁLOGO ───────────────── */
.badge-sugerencia-semantica {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 4px 0 2px 0;
  width: fit-content;
  letter-spacing: 0.01em;
}

/* ── FORMULARIOS ─────────────────────────────────────────────────────── */
.fieldset {
  border: 1px solid var(--gris-200); border-radius: var(--radio);
  padding: 20px; margin-bottom: 20px; background: var(--fondo);
}
.fieldset-legend {
  font-weight: 700; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--azul);
  padding: 0 8px; background: var(--fondo);
}

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 12px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--gris-800); }
.form-group input,
.form-group select {
  padding: 10px 14px; border: 2px solid var(--gris-200);
  border-radius: var(--radio); font-size: .9rem;
  transition: border-color .2s;
  background: var(--blanco);
}
.rut-feedback {
  font-size: .78rem;
  font-weight: 600;
  margin-top: 4px;
  display: none;
  transition: all .2s ease;
}
.rut-feedback.valido {
  color: #10B981;
  display: block;
}
.rut-feedback.invalido {
  color: #EF4444;
  display: block;
}
.form-group input:focus,
.form-group select:focus {
  outline: none; border-color: var(--naranja);
  box-shadow: 0 0 0 3px rgba(242,122,26,.15);
}
.form-group input.error,
.form-group select.error { border-color: var(--error); }

.form-group-check { margin: 16px 0; }
.check-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .88rem; cursor: pointer; line-height: 1.4;
}
.check-label input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  accent-color: var(--naranja); margin-top: 1px;
}

/* Radio cards */
.radio-group { display: flex; gap: 12px; margin-top: 12px; }
.radio-card {
  flex: 1; cursor: pointer;
}
.radio-card input[type="radio"] { display: none; }
.radio-card-content {
  padding: 12px 16px; border: 2px solid var(--gris-200);
  border-radius: var(--radio); transition: var(--trans);
  display: flex; flex-direction: column; gap: 2px;
  background: var(--blanco);
}
.radio-card:hover .radio-card-content { border-color: var(--naranja); }
.radio-card input:checked + .radio-card-content {
  border-color: var(--naranja); background: var(--naranja-light);
}
.radio-title { font-weight: 700; font-size: .9rem; }
.radio-desc { font-size: .78rem; color: var(--gris-600); }

/* Sección despacho */
.despacho-section { margin-top: 16px; }
.retiro-info {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--azul-xlight); border-radius: var(--radio);
  padding: 14px; margin-bottom: 16px; font-size: .88rem; color: var(--azul);
}
.retiro-info svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--naranja); }

.costo-envio-info {
  display: flex; align-items: center; gap: 8px;
  background: var(--naranja-light); border: 1px solid rgba(242,122,26,.3);
  border-radius: var(--radio); padding: 10px 14px; margin-top: 12px;
}
.costo-label { font-weight: 600; font-size: .88rem; color: var(--azul); }
.costo-valor { font-weight: 800; font-size: 1rem; color: var(--naranja); }

/* Resumen checkout */
.checkout-resumen {
  background: var(--azul-xlight); border-radius: var(--radio);
  padding: 16px; margin-bottom: 16px;
}

.pago-seguro-nota {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: .78rem; color: var(--gris-600);
  margin-top: 12px; text-align: center;
}
.pago-seguro-nota svg { width: 14px; height: 14px; color: var(--exito); }

/* Términos */
.terminos-body h3 { font-size: 1rem; font-weight: 700; color: var(--azul); margin: 20px 0 8px; }
.terminos-body p, .terminos-body li { font-size: .9rem; color: var(--gris-600); line-height: 1.6; }
.terminos-body ul { list-style: disc; padding-left: 20px; margin: 8px 0; }
.terminos-body h3:first-child { margin-top: 0; }

/* ── MIS PEDIDOS MODERNO & EXPANDIDO (DASHBOARD) ─────────────────────── */
.pedidos-modal { max-width: 1040px !important; width: 95% !important;
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s ease;
}

.pedidos-modal.pedidos-modal-wide {
  max-width: 960px !important;
  width: 96% !important;
}

.pedidos-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.pedidos-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
}

.pedidos-user-icon {
  width: 34px;
  height: 34px;
  background: #E0F2FE;
  color: #0284C7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cerrar-sesion {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-cerrar-sesion:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.pedidos-kpis-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pedido-kpi-pill {
  background: #F1F5F9;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

/* Tarjeta Moderna de Pedido */
.pedido-card-modern {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pedido-card-modern:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.pedido-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 12px;
}

.pedido-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pedido-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--verde-dark);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}

.pedido-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #64748B;
  flex-wrap: wrap;
}

.pedido-meta-dot {
  color: #CBD5E1;
}

.pedido-header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pedido-badge-status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pedido-badge-status.estado-completado {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.pedido-badge-status.estado-pendiente {
  background: #FEF9C3;
  color: #A16207;
  border: 1px solid #FEF08A;
}

.pedido-badge-status.estado-fallido {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.pedido-badge-despacho {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-retiro {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.badge-domicilio {
  background: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

/* Cuerpo de la Tarjeta */
.pedido-card-body {
  padding: 16px 20px;
}

.pedido-items-table {
  width: 100%;
  border-collapse: collapse;
}

.pedido-item-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}

.pedido-item-row:last-child {
  border-bottom: none;
}

.pedido-item-thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 3px;
}

.pedido-item-info {
  min-width: 0;
}

.pedido-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1E293B;
  margin: 0 0 4px;
  line-height: 1.35;
}

.pedido-item-sub {
  font-size: 0.76rem;
  color: #64748B;
  margin: 0;
}

.pedido-item-qty {
  text-align: center;
  white-space: nowrap;
}

.qty-pill {
  background: #F1F5F9;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.pedido-item-precio {
  text-align: right;
  white-space: nowrap;
}

.precio-unitario {
  font-size: 0.76rem;
  color: #94A3B8;
  display: block;
}

.precio-total {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1E293B;
}

/* Pie de la Tarjeta */
.pedido-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 16px;
}

.pedido-costos {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.costo-linea {
  font-size: 0.85rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.costo-linea strong {
  color: #1E293B;
}

.costo-linea.costo-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--verde-dark);
  padding-left: 12px;
  border-left: 2px solid #CBD5E1;
}

.costo-total-num {
  color: var(--citrico);
  font-size: 1.15rem;
}

.pedido-acciones {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-pedido-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-pedido-action.btn-pdf {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #BFDBFE;
}

.btn-pedido-action.btn-pdf:hover {
  background: #1D4ED8;
  color: #FFFFFF;
}

.btn-pedido-action.btn-repetir {
  background: #F27A1A;
  color: #FFFFFF;
}

.btn-pedido-action.btn-repetir:hover {
  background: #C45A08;
}

.btn-pedido-action.btn-whatsapp {
  background: #F0FDF4;
  color: #15803D;
  border-color: #BBF7D0;
}

.btn-pedido-action.btn-whatsapp:hover {
  background: #16A34A;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .pedidos-modal.pedidos-modal-wide {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0;
  }
  .pedido-item-row {
    grid-template-columns: 46px 1fr auto;
    gap: 10px;
  }
  .pedido-item-precio {
    grid-column: 2 / -1;
    text-align: left;
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-top: 4px;
  }
  .pedido-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .pedido-costos {
    justify-content: space-between;
  }
  .pedido-acciones {
    flex-direction: column;
  }
  .btn-pedido-action {
    width: 100%;
    justify-content: center;
  }
}

/* ── SEO HUB SECTION (Posicionamiento y Enlaces Internos Chile) ──────── */
.seo-hub-section {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  padding: 48px 0;
  margin-top: 40px;
}
.seo-hub-header {
  margin-bottom: 32px;
}
.seo-hub-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--azul);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.seo-hub-subtitle {
  font-size: 0.92rem;
  color: #64748B;
  margin: 0;
}
.seo-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 30px;
}
.seo-hub-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.seo-hub-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seo-hub-col ul li a,
.seo-hub-col ul li span {
  font-size: 0.85rem;
  color: #475569;
  text-decoration: none;
  transition: var(--trans);
  line-height: 1.4;
}
.seo-hub-col ul li a:hover {
  color: var(--naranja);
  text-decoration: underline;
}
.seo-hub-text {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radio);
  padding: 20px 24px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #475569;
}
.seo-hub-text strong {
  color: #1E293B;
}

@media (max-width: 900px) {
  .seo-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}
@media (max-width: 540px) {
  .seo-hub-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .seo-hub-section {
    padding: 32px 0;
  }
}

/* ── FOOTER ──────────────────────────────────────────────────────────── */
.footer {
  background: var(--azul); color: rgba(255,255,255,.8);
  padding-top: 48px;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
}
.footer-logo { width: 48px; height: 48px; object-fit: contain; margin-bottom: 12px; }
.footer-desc { font-size: .88rem; line-height: 1.6; max-width: 280px; }
.footer-links h4,
.footer-contacto h4 {
  color: var(--blanco); font-weight: 700; margin-bottom: 14px;
  font-size: .95rem;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links .link-btn {
  color: rgba(255,255,255,.7); font-weight: 400;
  text-decoration: none;
}
.footer-links .link-btn:hover { color: var(--naranja); }
.footer-contacto p { font-size: .88rem; margin-bottom: 6px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
}
.footer-bottom .container {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-secure {
  display: flex; align-items: center; gap: 6px;
}
.footer-secure svg { width: 14px; height: 14px; color: var(--exito); }

/* ── TOAST ───────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--gris-800); color: var(--blanco);
  padding: 12px 24px; border-radius: 50px;
  font-size: .9rem; font-weight: 600;
  box-shadow: var(--sombra-lg);
  animation: toastIn .25s ease, toastOut .3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast.toast-exito { background: var(--exito); }
.toast.toast-error { background: var(--error); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .header-top-inner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .search-wrapper { grid-column: 1 / -1; }
  .header-actions { grid-row: 1; grid-column: 2; justify-content: flex-end; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: row; flex-wrap: wrap; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .productos-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-inner { grid-template-columns: 1fr; }
  .btn-mis-pedidos span { display: none; }
  .footer-bottom .container { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 380px) {
  .productos-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BARRA SUPERIOR DE ANUNCIOS (ANNOUNCEMENT BAR)
   ═══════════════════════════════════════════════════════════════════════════ */
.announcement-bar {
  background: linear-gradient(90deg, #14532D 0%, #166534 50%, #14532D 100%);
  color: #FFFFFF;
  padding: 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 101;
  overflow: hidden;
}
.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  gap: 16px;
}
.announcement-items {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.announcement-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #E2E8F0;
  text-decoration: none;
}
.announcement-item strong {
  color: #F27A1A;
}
.announcement-item:hover {
  color: #FFFFFF;
}
.announcement-contacto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #F8FAFC;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all .2s;
  white-space: nowrap;
}
.announcement-contacto:hover {
  background: #25D366;
  color: #fff;
}
@media (max-width: 768px) {
  .announcement-items .announcement-item:not(:first-child) {
    display: none;
  }
}
@media (max-width: 640px) {
  .announcement-bar {
    padding: 7px 10px;
    padding-top: max(7px, env(safe-area-inset-top));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .announcement-inner {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    text-align: center;
    width: 100%;
  }
  .announcement-items {
    justify-content: center;
    gap: 0;
    width: 100%;
  }
  .announcement-item {
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
  }
  .announcement-contacto {
    font-size: 0.74rem;
    padding: 4px 14px;
    background: #25D366;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOTÓN FLOTANTE INTELIGENTE DE WHATSAPP
   ═══════════════════════════════════════════════════════════════════════════ */
.whatsapp-float-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 10px;
}
.whatsapp-tooltip {
  background: #FFFFFF;
  color: #1E293B;
  padding: 8px 10px 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: floatTooltip 3s ease-in-out infinite;
}
@keyframes floatTooltip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.btn-close-tooltip {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-close-tooltip:hover {
  color: #EF4444;
  background: #FEE2E2;
}
.whatsapp-btn {
  width: 62px;
  height: 62px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
  filter: drop-shadow(0 4px 14px rgba(37, 211, 102, 0.45));
}
.whatsapp-btn:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 20px rgba(37, 211, 102, 0.65));
}
.whatsapp-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
@media (max-width: 600px) {
  .whatsapp-tooltip { display: none; }
  .whatsapp-float-wrap { bottom: 18px; right: 18px; }
  .whatsapp-btn { width: 54px; height: 54px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELLOS DE CONFIANZA (TRUST BADGES)
   ═══════════════════════════════════════════════════════════════════════════ */
.trust-badges-section {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  padding: 28px 0;
}
.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.trust-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}
.trust-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.trust-badge-img {
  width: auto;
  min-width: 64px;
  max-width: 120px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-badge-img img {
  width: auto;
  max-width: 115px;
  max-height: 42px;
  display: block;
  object-fit: contain;
}
.trust-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #EFF6FF;
  color: #1D4ED8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.trust-icon-box.orange { background: #FFEDD5; color: var(--citrico); }
.trust-icon-box.green { background: #DCFCE7; color: var(--verde); }
.trust-icon-box.purple { background: #EDE9FE; color: #6366F1; }
.trust-text h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 2px;
}
.trust-text p {
  font-size: 0.78rem;
  color: #64748B;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECCIÓN PREGUNTAS FRECUENTES (FAQ ACCORDION)
   ═══════════════════════════════════════════════════════════════════════════ */
.faq-section {
  padding: 60px 0;
  background: #FFFFFF;
}
.faq-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}
.faq-tag {
  display: inline-block;
  background: var(--verde-xlight);
  color: var(--verde-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.faq-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--verde-dark);
  margin-bottom: 10px;
}
.faq-subtitle {
  font-size: 0.95rem;
  color: #64748B;
}
.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  background: #FAFAFA;
  transition: all .2s;
}
.faq-item.active {
  border-color: var(--verde);
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.08);
}
.faq-question {
  width: 100%;
  padding: 18px 22px;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  gap: 12px;
}
.faq-item.active .faq-question {
  color: var(--verde);
}
.faq-chevron {
  font-size: 1.2rem;
  color: #94A3B8;
  transition: transform .25s ease;
  flex-shrink: 0;
}
.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--verde);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 22px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.6;
}
.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 22px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTOR DE COMUNAS POR SECTORES
   ═══════════════════════════════════════════════════════════════════════════ */
.comuna-select-styled optgroup {
  font-weight: 800;
  color: var(--verde-dark);
  background: #F1F5F9;
  padding: 6px 0;
}
.comuna-select-styled option {
  padding: 6px 12px;
  color: #1E293B;
  background: #FFFFFF;
}
.btn-ver-zonas {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #F27A1A;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}
.btn-ver-zonas:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINACIÓN DEL CATÁLOGO (HOJAS)
   ═══════════════════════════════════════════════════════════════════════════ */
.catalogo-paginacion {
  margin-top: 36px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.paginacion-info {
  font-size: 0.9rem;
  color: var(--gris-600);
  font-weight: 600;
}
.paginacion-controles {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.btn-pagina {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--gris-200);
  background: var(--blanco);
  color: var(--gris-800);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
  user-select: none;
}
.btn-pagina:hover:not(:disabled):not(.active) {
  border-color: var(--naranja);
  color: var(--naranja);
  background: var(--naranja-light);
}
.btn-pagina.active {
  background: var(--naranja);
  color: #fff;
  border-color: var(--naranja);
  box-shadow: 0 2px 6px rgba(242, 122, 26, 0.35);
}
.btn-pagina:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--gris-200);
}
.btn-pagina-arrow {
  padding: 0 14px;
  font-weight: 700;
  gap: 6px;
  font-size: 0.88rem;
}
.paginacion-puntos {
  padding: 0 6px;
  color: var(--gris-400);
  font-weight: 800;
}

.producto-formato {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  margin-bottom: 2px;
  width: fit-content;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKOUT - CUPÓN DE DESCUENTO
   ═══════════════════════════════════════════════════════════════════════════ */
.checkout-cupon-box {
  margin: 14px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.checkout-cupon-box[open] {
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.btn-toggle-cupon {
  background: transparent;
  border: none;
  color: var(--primary, #15803d);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  text-align: left;
  user-select: none;
  list-style: none;
}
.btn-toggle-cupon::-webkit-details-marker {
  display: none;
}
.btn-toggle-cupon::marker {
  display: none;
}
.cupon-arrow {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: auto;
  transition: transform 0.2s ease;
  display: inline-block;
}
.checkout-cupon-box[open] .cupon-arrow {
  transform: rotate(180deg);
}
.btn-toggle-cupon:hover {
  color: #2563eb;
}
.cupon-input-wrap {
  margin-top: 10px;
}
.cupon-input-group {
  display: flex;
  gap: 8px;
}
.cupon-input-group input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cupon-input-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.btn-aplicar-cupon {
  background: var(--primary, #15803d);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}
.btn-aplicar-cupon:hover {
  background: #1e3a8a;
}
.cupon-feedback {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 6px 10px;
}
.cupon-feedback.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cupon-feedback.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.btn-quitar-cupon {
  background: none;
  border: none;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRUTALIA — AVISO DE STOCK CRÍTICO Y UNIDADES EN KILOS (KG)
   ═══════════════════════════════════════════════════════════════════════════ */
.badge-stock-critico {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
  animation: pulseCritico 2.2s infinite ease-in-out;
}

@keyframes pulseCritico {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  }
}

.alerta-stock-critico {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 6px 0 10px;
}

.producto-formato-kg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F0FDF4;
  color: #15803D;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #DCFCE7;
}

.unidad-kg-tag {
  color: #15803D;
  font-weight: 700;
}
