/* ============================================================
   GesundStore — Estilos Principales v3
   Mobile-first · Fullwidth carousel · Responsive completo
   Tipografía: Fraunces (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ─── Variables ────────────────────────────────────────────── */
:root {
  --verde-oscuro:  #2D5016;
  --verde-medio:   #3D6B1F;
  --verde-claro:   #5A8A35;
  --verde-suave:   #EAF2E0;
  --dorado:        #C8A84B;
  --dorado-claro:  #F0DFA0;
  --crema:         #F7F3E9;
  --crema-oscura:  #EDE7D5;
  --texto:         #1A1A1A;
  --texto-medio:   #4A4A4A;
  --texto-suave:   #7A7A7A;
  --blanco:        #FFFFFF;
  --error:         #C0392B;
  --exito:         #27AE60;

  --sombra-sm: 0 2px 8px rgba(45,80,22,0.08);
  --sombra-md: 0 6px 24px rgba(45,80,22,0.12);
  --sombra-lg: 0 16px 48px rgba(45,80,22,0.18);
  --radio:     12px;
  --trans:     0.25s ease;

  /* Breakpoints de referencia */
  --w-xs:  375px;
  --w-sm:  480px;
  --w-md:  768px;
  --w-lg:  1024px;
  --w-xl:  1280px;
}

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--crema);
  color: var(--texto);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;       /* ← evita scroll horizontal global */
}
img { max-width: 100%; display: block; }
a  { color: inherit; }
button { font-family: inherit; }

/* ─── Tipografía ───────────────────────────────────────────── */
h1, h2, h3, .playfair { font-family: 'Fraunces', serif; }

/* ─── Layout helper ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.header {
  background: var(--verde-oscuro);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding-inline: clamp(12px, 3vw, 28px);
  max-width: 1200px;
  margin-inline: auto;
}

/* Logo */
.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}
.logo:hover .logo-img { opacity: 0.85; }

/* Buscador */
.buscador-form {
  flex: 1;
  max-width: 400px;
  display: flex;
}
.buscador-input {
  flex: 1;
  padding: 9px 14px;
  border: 2px solid transparent;
  border-radius: var(--radio) 0 0 var(--radio);
  background: rgba(255,255,255,0.13);
  color: var(--blanco);
  font-size: 0.88rem;
  outline: none;
  transition: var(--trans);
  min-width: 0;
}
.buscador-input::placeholder { color: rgba(255,255,255,0.5); }
.buscador-input:focus { background: rgba(255,255,255,0.22); border-color: var(--dorado); }
.buscador-btn {
  padding: 9px 14px;
  background: var(--dorado);
  color: var(--verde-oscuro);
  border: none;
  border-radius: 0 var(--radio) var(--radio) 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--trans);
  white-space: nowrap;
}
.buscador-btn:hover { background: var(--dorado-claro); }

/* Botón buscador móvil — YA NO SE USA, se reemplazó por fila fija */
.btn-buscar-movil { display: none; }

/* Buscador expandible anterior — reemplazado */
.buscador-movil { display: none; }

/* ─── Buscador móvil: fila siempre visible bajo la topbar ─── */
.header-search-movil {
  display: none;           /* oculto en desktop */
  background: var(--verde-medio);
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.header-search-movil form {
  position: relative;
  display: flex;
  align-items: center;
}
.buscador-input-movil {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: var(--radio);
  background: rgba(255,255,255,0.15);
  color: var(--blanco);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;           /* ≥ 16px evita zoom automático en iOS */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--trans), background var(--trans);
}
.buscador-input-movil::placeholder { color: rgba(255,255,255,0.55); }
.buscador-input-movil:focus {
  border-color: var(--dorado);
  background: rgba(255,255,255,0.22);
}
/* limpiar el ícono nativo de "x" en search en WebKit */
.buscador-input-movil::-webkit-search-cancel-button { -webkit-appearance: none; }

.buscador-movil-ico {
  position: absolute;
  right: 12px;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.7;
}

/* Botón carrito */
.btn-carrito {
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: var(--blanco);
  border-radius: var(--radio);
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--trans);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-carrito:hover { background: rgba(255,255,255,0.2); border-color: var(--dorado); }
.carrito-texto { display: inline; }

.badge-carrito {
  background: var(--dorado);
  color: var(--verde-oscuro);
  border-radius: 50%;
  width: 20px; height: 20px;
  min-width: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   BARRA DE BENEFICIOS
   ═══════════════════════════════════════════════════════════ */
.beneficios-bar {
  background: var(--verde-medio);
  color: var(--blanco);
  padding: 10px 16px;
  width: 100%;
  overflow: hidden;
}
.beneficios-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
}
.beneficio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.beneficio-icono { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════
   CARRUSEL — FULLWIDTH SIN RESTRICCIONES
   ═══════════════════════════════════════════════════════════ */
.carrusel {
  /* ← Clave: ocupa 100vw sin contenedor limitante */
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #111;
  user-select: none;
  /* Altura relativa al viewport: se adapta en todos los tamaños */
  height: clamp(220px, 42vw, 560px);
}

.carrusel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.75s ease;
  pointer-events: none;
}
.carrusel-slide.activo {
  opacity: 1;
  pointer-events: all;
}

.carrusel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carrusel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.28) 50%,
    rgba(0,0,0,0.05) 100%
  );
}

.carrusel-caption {
  position: absolute;
  top: 50%;
  left: clamp(20px, 7%, 96px);
  right: 48%;
  transform: translateY(-50%);
  color: #fff;
  animation: captionIn 0.55s ease both;
}
@keyframes captionIn {
  from { opacity: 0; transform: translateY(calc(-50% + 20px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

.carrusel-titulo {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.25rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: clamp(8px, 1.5vw, 16px);
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.carrusel-subtitulo {
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  margin-bottom: clamp(12px, 2vw, 24px);
  opacity: 0.92;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.carrusel-btn {
  display: inline-block;
  background: var(--dorado);
  color: var(--verde-oscuro);
  padding: clamp(9px, 1.2vw, 13px) clamp(16px, 2vw, 28px);
  border-radius: var(--radio);
  font-weight: 700;
  font-size: clamp(0.78rem, 1.2vw, 0.95rem);
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  white-space: nowrap;
}
.carrusel-btn:hover { background: #d4b455; transform: translateY(-2px); }

/* Flechas */
.carrusel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  width: clamp(36px, 4.5vw, 50px);
  height: clamp(36px, 4.5vw, 50px);
  border-radius: 50%;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.carrusel-nav:hover { background: rgba(255,255,255,0.32); transform: translateY(-50%) scale(1.08); }
.carrusel-prev { left: clamp(8px, 2vw, 20px); }
.carrusel-next { right: clamp(8px, 2vw, 20px); }

/* Dots */
.carrusel-dots {
  position: absolute;
  bottom: clamp(10px, 2vw, 18px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.carrusel-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s;
  padding: 0;
}
.carrusel-dot.activo {
  background: var(--dorado);
  border-color: var(--dorado);
  width: 26px;
  border-radius: 5px;
}

/* ═══════════════════════════════════════════════════════════
   BOTONES GENERALES
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radio);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--trans);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primario  { background: var(--dorado); color: var(--verde-oscuro); border-color: var(--dorado); }
.btn-primario:hover  { background: #d4b455; transform: translateY(-1px); box-shadow: var(--sombra-md); }
.btn-secundario { background: transparent; color: var(--blanco); border-color: rgba(255,255,255,0.5); }
.btn-secundario:hover { background: rgba(255,255,255,0.12); border-color: var(--blanco); }
.btn-verde  { background: var(--verde-oscuro); color: var(--blanco); border-color: var(--verde-oscuro); }
.btn-verde:hover  { background: var(--verde-medio); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--verde-oscuro); border-color: var(--verde-oscuro); }
.btn-outline:hover { background: var(--verde-suave); }
.btn-sm  { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   SECCIÓN PRODUCTOS
   ═══════════════════════════════════════════════════════════ */
.seccion {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 32px);
}
.seccion-titulo { text-align: center; margin-bottom: clamp(24px, 4vw, 44px); }
.seccion-titulo h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--verde-oscuro);
  margin-bottom: 8px;
}
.seccion-titulo p { color: var(--texto-suave); font-size: 0.95rem; }

/* ─── Filtros ──────────────────────────────────────────────── */
.filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.filtro-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 2px solid var(--verde-claro);
  background: transparent;
  color: var(--verde-oscuro);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}
.filtro-btn:hover, .filtro-btn.activo {
  background: var(--verde-oscuro);
  border-color: var(--verde-oscuro);
  color: var(--blanco);
}

/* ─── Grid de productos ────────────────────────────────────── */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: clamp(14px, 2.5vw, 24px);
}

.producto-card {
  background: var(--blanco);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--sombra-sm);
  transition: transform var(--trans), box-shadow var(--trans);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--crema-oscura);
}
.producto-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-lg); }

.producto-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--verde-suave);
}
.producto-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.producto-card:hover .producto-img img { transform: scale(1.06); }

.badge-destacado {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--dorado);
  color: var(--verde-oscuro);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 50px;
}

.producto-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Multi-categoría tags */
.producto-categorias { display: flex; flex-wrap: wrap; gap: 4px; }
.producto-categoria-tag {
  font-size: 0.67rem;
  background: var(--verde-suave);
  color: var(--verde-oscuro);
  border: 1px solid rgba(45,80,22,0.18);
  border-radius: 20px;
  padding: 2px 7px;
  font-weight: 600;
  white-space: nowrap;
}

.producto-nombre {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  color: var(--texto);
  font-weight: 600;
  line-height: 1.3;
}
.producto-desc {
  font-size: 0.82rem;
  color: var(--texto-suave);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.producto-footer {
  padding: 12px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--crema-oscura);
}
.producto-precio {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--verde-oscuro);
  font-family: 'Fraunces', serif;
  white-space: nowrap;
}

.btn-agregar {
  background: var(--verde-oscuro);
  color: var(--blanco);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-family: inherit;
}
.btn-agregar:hover  { background: var(--verde-claro); }
.btn-agregar.agregado { background: var(--exito); }

/* ─── Sin resultados ───────────────────────────────────────── */
.sin-resultados {
  grid-column: 1/-1;
  text-align: center;
  padding: 56px 20px;
  color: var(--texto-suave);
}
.sin-resultados-icono { font-size: 3.5rem; margin-bottom: 14px; }

/* ═══════════════════════════════════════════════════════════
   CARRITO SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: opacity var(--trans);
}
.overlay.visible { opacity: 1; pointer-events: all; }

.carrito-sidebar {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;   /* dynamic viewport height en mobile */
  width: min(420px, 95vw);
  background: var(--blanco);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.carrito-sidebar.abierto { transform: translateX(0); }

.carrito-header {
  padding: 18px 20px;
  background: var(--verde-oscuro);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.carrito-header h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; }

.btn-cerrar-carrito {
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--blanco);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}
.btn-cerrar-carrito:hover { background: rgba(255,255,255,0.28); }

.carrito-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.carrito-vacio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--texto-suave);
  gap: 10px;
  text-align: center;
  padding: 20px;
}
.carrito-vacio-icono { font-size: 3.5rem; }

.carrito-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--crema);
  padding: 11px;
  border-radius: 10px;
  border: 1px solid var(--crema-oscura);
}
.carrito-item-info { flex: 1; min-width: 0; }
.carrito-item-nombre { font-weight: 600; font-size: 0.88rem; color: var(--texto); margin-bottom: 3px; }
.carrito-item-precio { font-size: 0.82rem; color: var(--verde-oscuro); font-weight: 600; }

.carrito-item-controles {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--verde-oscuro);
  background: transparent;
  color: var(--verde-oscuro);
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--trans);
}
.qty-btn:hover { background: var(--verde-oscuro); color: var(--blanco); }
.qty-valor { min-width: 24px; text-align: center; font-weight: 600; font-size: 0.9rem; }

.btn-eliminar-item {
  background: none; border: none;
  color: var(--error);
  cursor: pointer; font-size: 1rem;
  padding: 2px; opacity: 0.6;
  transition: var(--trans);
  flex-shrink: 0;
}
.btn-eliminar-item:hover { opacity: 1; transform: scale(1.2); }

.carrito-footer {
  padding: 16px 18px;
  border-top: 2px solid var(--crema-oscura);
  background: var(--crema);
  flex-shrink: 0;
}
.carrito-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.carrito-subtotal span:first-child { color: var(--texto-suave); }
.carrito-subtotal strong {
  font-size: 1.35rem;
  color: var(--verde-oscuro);
  font-family: 'Fraunces', serif;
}

/* ═══════════════════════════════════════════════════════════
   MODALES
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--trans);
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }

.modal {
  background: var(--blanco);
  border-radius: 18px;
  width: 100%;
  max-width: 500px;
  max-height: 92dvh;
  overflow-y: auto;
  box-shadow: var(--sombra-lg);
  transform: translateY(20px);
  transition: transform var(--trans);
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.visible .modal { transform: translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--crema-oscura);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--blanco);
  z-index: 1;
}
.modal-header h3 { font-size: 1.3rem; color: var(--verde-oscuro); }
.modal-body { padding: 22px 24px; }

/* Formulario */
.form-grupo { margin-bottom: 18px; }
.form-grupo label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--texto);
  margin-bottom: 5px;
}
.form-grupo label span { color: var(--error); }
.form-input, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--crema-oscura);
  border-radius: 10px;
  font-size: 0.93rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--texto);
  background: var(--crema);
  outline: none;
  transition: border-color var(--trans);
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--verde-claro);
  background: var(--blanco);
}
.form-textarea { resize: vertical; min-height: 80px; }

.resumen-pedido {
  background: var(--verde-suave);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(45,80,22,0.15);
}
.resumen-pedido h4 { color: var(--verde-oscuro); margin-bottom: 10px; font-size: 0.9rem; }
.resumen-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  padding: 3px 0;
  color: var(--texto-medio);
}
.resumen-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--verde-oscuro);
  font-size: 1rem;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(45,80,22,0.2);
}

/* Confirmación */
.confirmacion { text-align: center; padding: 8px; }
.confirmacion-icono { font-size: 4.5rem; margin-bottom: 14px; }
.confirmacion h3 { font-size: 1.5rem; color: var(--verde-oscuro); margin-bottom: 8px; }
.confirmacion p { color: var(--texto-suave); margin-bottom: 7px; }
.numero-pedido {
  background: var(--verde-suave);
  border: 2px solid var(--verde-oscuro);
  border-radius: 9px;
  padding: 11px 18px;
  display: inline-block;
  font-weight: 700;
  color: var(--verde-oscuro);
  font-size: 1.05rem;
  margin: 11px 0 18px;
  letter-spacing: 1px;
}

/* Botón WhatsApp */
.btn-whatsapp {
  background: #25D366;
  color: var(--blanco);
  border: none;
  border-radius: var(--radio);
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: var(--trans);
  margin-bottom: 10px;
  width: 100%;
  justify-content: center;
  font-family: inherit;
}
.btn-whatsapp:hover { background: #20BA5A; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.4); }

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px; right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--texto);
  color: var(--blanco);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 500;
  box-shadow: var(--sombra-lg);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show { transform: translateX(0); }
.toast.toast-exito { background: var(--exito); }
.toast.toast-error { background: var(--error); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  background: #1A2E0A;
  color: rgba(255,255,255,0.7);
  padding: clamp(32px, 5vw, 52px) clamp(16px, 4vw, 32px) 24px;
  margin-top: 60px;
  width: 100%;
}
.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(20px, 4vw, 44px);
  margin-bottom: 32px;
}
.footer h4 {
  color: var(--blanco);
  font-family: 'Fraunces', serif;
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.footer p, .footer a {
  font-size: 0.87rem; line-height: 1.8;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.footer a:hover { color: var(--dorado); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 5px; }
.footer-bottom {
  max-width: 1200px;
  margin-inline: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════════ */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: var(--blanco);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */

/* ── Tablet landscape / desktop pequeño (< 1024px) ──────── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}

/* ── Tablet portrait (< 768px) ──────────────────────────── */
@media (max-width: 768px) {
  /* Header */
  .buscador-form { display: none; }           /* ocultar buscador en topbar */
  .header-search-movil { display: block; }    /* mostrar fila buscador móvil */
  .carrito-texto { display: none; }           /* solo ícono en botón carrito */
  .btn-carrito { padding: 8px 10px; font-size: 1rem; }

  /* Carrusel: caption ocupa más ancho en mobile */
  .carrusel-caption {
    left: clamp(14px, 5vw, 28px);
    right: clamp(14px, 5vw, 28px);
  }

  /* Productos */
  .productos-grid { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }

  /* Filtros: scroll horizontal en mobile */
  .filtros {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filtros::-webkit-scrollbar { display: none; }
  .filtro-btn { flex-shrink: 0; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }

  /* Beneficios */
  .beneficios-inner { gap: 12px; }
  .beneficio { font-size: 0.78rem; }
}

/* ── Móvil (< 480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
  /* Header compacto */
  .header-inner { height: 58px; }
  .logo-img { height: 36px; }

  /* Carrusel */
  .carrusel { height: clamp(180px, 55vw, 280px); }
  .carrusel-nav { display: none; }   /* sin flechas en pantallas muy chicas */

  /* Productos: 2 columnas en móvil */
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .producto-body { padding: 10px 11px; gap: 4px; }
  .producto-footer { padding: 9px 11px 12px; flex-direction: column; align-items: stretch; gap: 8px; }
  .producto-precio { font-size: 1.05rem; }
  .btn-agregar { justify-content: center; width: 100%; }
  .producto-desc { -webkit-line-clamp: 2; }

  /* Modal ocupa toda la pantalla en móvil muy chico */
  .modal { border-radius: 14px 14px 0 0; max-height: 95dvh; }
  .modal-overlay { align-items: flex-end; padding: 0; }

  /* Toast */
  .toast-container { right: 0; left: 0; bottom: 0; padding: 0 0 8px; align-items: center; }
  .toast { border-radius: 8px; width: calc(100% - 32px); }

  /* Footer bottom: stack */
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Beneficios: ocultar algunos en pantallas muy chicas */
  .beneficio:nth-child(3),
  .beneficio:nth-child(4) { display: none; }
}

/* ── Móvil muy pequeño (< 360px) ────────────────────────── */
@media (max-width: 360px) {
  .productos-grid { grid-template-columns: 1fr; }
  .carrusel-titulo { font-size: 1.1rem; }
  .carrusel-subtitulo { display: none; }
}

/* ─── Select vendedora ─────────────────────────────────────── */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232D5016' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
  font-weight: 500;
  color: var(--texto);
}
.form-select option { font-weight: normal; }

/* ─── Filtro móvil: combobox ────────────────────────────────── */
.filtros-movil { display: none; }   /* oculto en desktop */

.filtro-select-movil {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 2px solid var(--verde-claro);
  border-radius: var(--radio);
  background-color: var(--blanco);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232D5016' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  -webkit-appearance: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--verde-oscuro);
  cursor: pointer;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  margin-bottom: clamp(20px, 4vw, 32px);
}
.filtro-select-movil:focus {
  border-color: var(--verde-oscuro);
  box-shadow: 0 0 0 3px rgba(45,80,22,0.12);
}

/* Mostrar combo en móvil y ocultar pills */
@media (max-width: 768px) {
  .filtros-movil { display: block; }
  .filtros        { display: none; }
}
