/* ============================================================
   VAENTY — components.css
   Header, footer, buttons, product cards, cart drawer, badges
   ============================================================ */

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  border: none;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--color-blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(46,84,212,0.28);
}
.btn--primary:hover {
  background: var(--color-blue-dark);
  box-shadow: 0 10px 28px rgba(46,84,212,0.36);
  transform: translateY(-2px);
}
/* Destello que cruza el botón al pasar el cursor */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary > * { position: relative; z-index: 1; }
.btn--primary::after {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 42%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.34), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.btn--primary:hover::after { animation: btnShine 0.75s ease-out; }
@keyframes btnShine {
  from { left: -60%; opacity: 1; }
  to   { left: 125%; opacity: 0; }
}
/* Confirmación al añadir al carrito */
.btn--primary.is-added {
  background: var(--color-whatsapp);
  box-shadow: 0 8px 24px rgba(29,168,81,0.32);
  animation: btnAdded 0.45s var(--ease-out);
}
.btn--primary.is-added::after { animation: none; }
@keyframes btnAdded {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-card-border);
}
.btn--outline:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
  background: var(--color-bg-alt);
  transform: translateY(-2px);
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: 0 6px 18px rgba(29,168,81,0.22);
}
.btn--whatsapp:hover {
  background: #178A43;
  box-shadow: 0 10px 24px rgba(29,168,81,0.28);
  transform: translateY(-2px);
}

.btn--red {
  background: #8A1F2B;
  color: #fff;
  box-shadow: 0 6px 18px rgba(138,31,43,0.35);
}
.btn--red:hover {
  background: #A32835;
  box-shadow: 0 10px 26px rgba(138,31,43,0.4);
  transform: translateY(-2px);
}

.btn--blue {
  background: #2A4A8F;
  color: #fff;
  box-shadow: 0 6px 18px rgba(42,74,143,0.35);
}
.btn--blue:hover {
  background: #35599f;
  box-shadow: 0 10px 26px rgba(42,74,143,0.4);
  transform: translateY(-2px);
}

.btn--blue-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #4C56E0;
  box-shadow: 0 0 14px rgba(76,86,224,0.4);
}
.btn--blue-outline:hover {
  background: rgba(76,86,224,0.12);
  border-color: #6169E8;
  box-shadow: 0 0 20px rgba(76,86,224,0.55);
  transform: translateY(-2px);
}

/* Matches the compact, sentence-case button style from the original site */
.btn--original {
  text-transform: none;
  letter-spacing: normal;
  border-radius: var(--radius-sm);
  padding: 8px 26px;
  font-size: 15px;
}

.btn--sm { padding: 10px 20px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn--icon {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-card-border);
  color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn--icon:hover { background: #fff; border-color: var(--color-violet); color: var(--color-violet); }

/* Bare cart button — icon only, no circle background */
.cart-btn {
  position: relative;
  width: 40px; height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.cart-btn svg { width: 23px; height: 23px; }
.cart-btn:hover { color: var(--color-violet); transform: translateY(-1px); }
/* Sacudida del carrito + rebote del contador al añadir */
.cart-btn.is-bump { animation: cartNudge 0.6s var(--ease-out); }
.cart-badge.is-bump { animation: badgePop 0.6s var(--ease-out); }
@keyframes cartNudge {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  22%      { transform: translateY(-5px) rotate(-9deg); }
  50%      { transform: translateY(0) rotate(7deg); }
  78%      { transform: translateY(-2px) rotate(-3deg); }
}
@keyframes badgePop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.6); }
  100% { transform: scale(1); }
}

/* ─── Header ──────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--color-card-border);
  transition: box-shadow 0.4s var(--ease-out), background 0.4s var(--ease-out);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
/* ─── Brand wordmark ─────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.25s var(--ease-out);
}
.brand:hover { opacity: 0.82; }
.brand__img {
  height: 26px;
  width: auto;
  display: block;
  transition: filter 0.3s var(--ease-out);
}

/* ─── Header — transparent over a hero image, solid once scrolled ─── */
.header--overlay {
  /* Sticky still reserves its own space in normal flow, so a transparent
     sticky header just reveals the plain page background, not the hero
     image below it. Take it out of flow so it floats over the hero. */
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.header--overlay .brand__img { filter: brightness(0) invert(1); }
.header--overlay .nav__link { color: rgba(255,255,255,0.82); }
.header--overlay .nav__link:hover, .header--overlay .nav__link.is-active { color: #fff; }
.header--overlay .nav__link::after { background: #fff; }
.header--overlay .btn--icon { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: #fff; }
.header--overlay .btn--icon:hover { background: rgba(255,255,255,0.2); border-color: #fff; color: #fff; }
.header--overlay .cart-btn { color: #fff; }
.header--overlay .cart-btn:hover { color: rgba(255,255,255,0.75); }
.header--overlay .menu-toggle { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: #fff; }

.header--overlay.is-scrolled {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--color-card-border);
  box-shadow: 0 1px 0 rgba(23,23,31,0.04);
}
.header--overlay.is-scrolled .brand__img { filter: none; }
.header--overlay.is-scrolled .nav__link { color: var(--color-gray-light); }
.header--overlay.is-scrolled .nav__link:hover, .header--overlay.is-scrolled .nav__link.is-active { color: var(--color-text); }
.header--overlay.is-scrolled .nav__link::after { background: var(--color-gradient-neon); }
.header--overlay.is-scrolled .btn--icon { background: var(--color-bg-alt); border-color: var(--color-card-border); color: var(--color-text); }
.header--overlay.is-scrolled .btn--icon:hover { background: #fff; border-color: var(--color-violet); color: var(--color-violet); }
.header--overlay.is-scrolled .cart-btn { color: var(--color-text); }
.header--overlay.is-scrolled .cart-btn:hover { color: var(--color-violet); }
.header--overlay.is-scrolled .menu-toggle { background: var(--color-bg-alt); border-color: var(--color-card-border); color: var(--color-text); }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__link {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--color-gray-light);
  padding: 10px 16px;
  transition: color 0.25s var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--color-gradient-neon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav__link:hover, .nav__link.is-active { color: var(--color-text); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

/* Subrayado del menú: blanco al pasar por otra opción, rojo en la seleccionada. */
.header .nav__link:hover::after                     { background: #ffffff; }
.header .nav__link.is-active::after,
.header .nav__link.is-active:hover::after,
.header--overlay.is-scrolled .nav__link.is-active::after { background: #E23A4E; }
/* Con el header claro (al bajar) el blanco no se vería: se usa gris. */
.header:not(.header--overlay) .nav__link:hover:not(.is-active)::after,
.header--overlay.is-scrolled .nav__link:hover:not(.is-active)::after { background: var(--color-gray-mid); }

.header__actions { display: flex; align-items: center; gap: 10px; }

/* ─── Header WhatsApp pill (estilo llamativo) ─────────────── */
.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-whatsapp);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(29,168,81,0.32);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.wa-pill:hover {
  background: #17a34a;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(29,168,81,0.42);
}
.wa-pill__icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wa-pill__icon svg { width: 18px; height: 18px; }
@media (max-width: 1040px) {
  .wa-pill { padding: 0; width: 44px; justify-content: center; }
  .wa-pill__num { display: none; }
  .wa-pill__icon { background: transparent; width: 24px; height: 24px; }
  .wa-pill__icon svg { width: 22px; height: 22px; }
}

/* ─── Floating WhatsApp button ───────────────────────────── */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 150;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(29,168,81,0.4);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.wa-float svg { width: 30px; height: 30px; position: relative; z-index: 1; }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 16px 38px rgba(29,168,81,0.5); }
.wa-float__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--color-whatsapp);
  animation: waPulse 2.2s var(--ease-out) infinite;
}
@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(2);   opacity: 0; }
  100% { transform: scale(2);   opacity: 0; }
}
@media (max-width: 480px) {
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .wa-float svg { width: 27px; height: 27px; }
}

.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-violet);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  transform: scale(0);
  transition: transform 0.35s var(--ease-out-soft);
}
.cart-badge.is-visible { transform: scale(1); }

.menu-toggle { display: none; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav {
    position: fixed;
    /* top:0 + alto de viewport + padding-top para despejar el header. Robusto
       aunque el header (con backdrop-filter al hacer scroll) pase a ser el
       bloque contenedor del fixed: top:0 = borde superior del viewport, y el
       alto es explícito, no derivado de 'bottom'. */
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    padding: 88px 22px 28px;
    z-index: 1;
    /* Panel oscuro para que combine con el sitio; antes era casi blanco y el
       texto blanco de la nav quedaba invisible. */
    background: #0a0a12;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav.is-open { transform: translateX(0); }
  /* El panel (.nav) tiene z-index:1 y crea contexto de apilado; sin esto se
     dibujaba ENCIMA del botón X (hermano dentro de .header__inner) y no se
     podía cerrar. Se sube .header__actions por encima del panel. */
  .header__inner { position: relative; z-index: 2; }
  .header__actions { position: relative; z-index: 3; }
  /* CLAVE: en la página de producto el header es `position: sticky` y su
     `backdrop-filter` lo convertía en el bloque contenedor del `.nav` fijo.
     Al hacer scroll, el `top:0` del panel se medía desde la posición ORIGINAL
     del header (ya fuera de pantalla), así que el menú salía a medias o vacío.
     Sin blur el header deja de ser bloque contenedor y el panel se ancla al
     viewport. Se compensa con un fondo casi opaco. */
  .header,
  .header--overlay.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .header:not(.header--overlay),
  .header--overlay.is-scrolled { background: #ffffff; }
  /* Con el panel abierto los iconos del encabezado quedan sobre su fondo
     oscuro. La lupa y el botón X traen su propio círculo claro, pero la
     bolsa del carrito no: sin esto se camuflaba en negro sobre negro. */
  .header .nav.is-open ~ .header__actions .cart-btn { color: #ffffff; }
  /* Fuerza colores legibles sin importar el estado del header (overlay / scrolled) */
  .nav__link,
  .header--overlay .nav__link,
  .header--overlay.is-scrolled .nav__link {
    padding: 16px; font-size: 18px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav__link.is-active,
  .header--overlay .nav__link.is-active,
  .header--overlay.is-scrolled .nav__link.is-active { color: #E23A4E; }
  /* Hover: azul claro. Sin esto heredaba el hover oscuro del header y el
     texto se camuflaba con el panel. */
  .nav__link:hover,
  .header--overlay .nav__link:hover,
  .header--overlay.is-scrolled .nav__link:hover,
  .header--overlay.is-scrolled .nav__link.is-active:hover { color: #5B9CFF; }
  .nav__link::after { display: none; }
  .menu-toggle {
    display: flex;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-card-border);
    border-radius: 50%;
    color: var(--color-text);
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    content: '';
    display: block;
    width: 18px; height: 2px;
    background: currentColor;
    position: relative;
    transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  }
  .menu-toggle span::before { position: absolute; top: -6px; }
  .menu-toggle span::after { position: absolute; top: 6px; }
  .menu-toggle.is-open span { background: transparent; }
  .menu-toggle.is-open span::before { transform: rotate(45deg) translate(4px,4px); }
  .menu-toggle.is-open span::after { transform: rotate(-45deg) translate(4px,-4px); }
}

/* ─── Badges & pills ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.badge--gaming { background: rgba(79,58,163,0.09); color: var(--color-violet); border: 1px solid rgba(79,58,163,0.18); }
.badge--vehiculos { background: rgba(14,124,134,0.09); color: var(--color-cyan); border: 1px solid rgba(14,124,134,0.18); }
.badge--motos { background: rgba(196,120,20,0.1); color: #A85F0F; border: 1px solid rgba(196,120,20,0.2); }
.badge--gadgets { background: rgba(196,62,134,0.1); color: #B03579; border: 1px solid rgba(196,62,134,0.22); }
.badge--uncategorized { background: var(--color-bg-alt); color: var(--color-gray-light); border: 1px solid var(--color-card-border); }
.badge--sale { background: var(--color-sale); color: #fff; }
.badge--soldout { background: var(--color-bg-alt); color: var(--color-gray-mid); }

/* ─── Product card ────────────────────────────────────────── */
.product-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79,58,163,0.35);
  box-shadow: var(--shadow-card);
}
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.product-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card__name {
  display: block;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 44px;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.product-card__name:hover { color: var(--color-blue); }
.product-card__media { display: block; }
.product-card__price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.product-card__price { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--color-text); }
.product-card__price-old { font-size: 14px; color: var(--color-gray-mid); text-decoration: line-through; }

.product-card__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.product-card__actions .btn--primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.product-card__actions .btn--primary svg { width: 17px; height: 17px; }
.product-card__actions-row { display: flex; gap: 8px; }
.product-card__actions-row .btn--outline { flex: 1; }
.product-card__wa {
  flex-shrink: 0;
  width: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(29,168,81,0.1);
  border: 1px solid rgba(29,168,81,0.28);
  color: var(--color-whatsapp);
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.product-card__wa svg { width: 19px; height: 19px; }
.product-card__wa:hover { background: rgba(29,168,81,0.18); border-color: var(--color-whatsapp); transform: translateY(-2px); }

/* ─── Feature strip ───────────────────────────────────────── */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-card-border);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature {
  background: var(--color-bg-card);
  padding: 26px 20px;
  display: flex; flex-direction: column; gap: 10px;
  align-items: flex-start;
}
.feature__icon { width: 30px; height: 30px; color: var(--color-violet); }
.feature__title { font-family: var(--font-heading); font-weight: 700; font-size: 15px; color: var(--color-text); }
.feature__desc { font-size: 13.5px; color: var(--color-gray-light); }
@media (max-width: 900px) { .feature-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-strip { grid-template-columns: 1fr; } }

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--color-bg-dark);
  padding: 72px 0 28px;
}

/* Footer — variante navy, más rica y llamativa */
.footer--navy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0 0 26px;
  background: linear-gradient(180deg, #071F33 0%, #030D18 100%);
  color: #fff;
}
.footer--navy > .container { position: relative; z-index: 2; }

.footer__rgb {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; z-index: 3;
  background: linear-gradient(90deg,
    #ff2d55, #ff9500, #ffd60a, #34c759, #00c7be, #0a84ff, #5e5ce6, #bf5af2, #ff2d55);
  background-size: 300% 100%;
  animation: footerRgb 12s linear infinite;
}
@keyframes footerRgb { to { background-position: 300% 0; } }

.footer__watermark {
  position: absolute;
  left: 50%; bottom: -0.28em;
  transform: translateX(-50%);
  z-index: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(5rem, 20vw, 15rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  white-space: nowrap;
}

/* ─── CTA band (sección independiente, sobre el footer) ──── */
.cta-band {
  position: relative;
  margin-top: 32px;
  padding: 56px 0;
  background: linear-gradient(115deg, #142657 0%, #123A82 52%, #0B4653 100%);
  color: #fff;
  overflow: hidden;
  clip-path: polygon(0 26px, 100% 0, 100% 100%, 0 100%);
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-50deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 20px);
  pointer-events: none;
}
.cta-band__inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.cta-band__copy h3 { font-size: clamp(1.5rem, 3vw, 2.3rem); color: #fff; line-height: 1.1; }
.cta-band__copy p { color: rgba(255,255,255,0.85); font-size: 15px; margin-top: 8px; max-width: 520px; }
.cta-band .btn--whatsapp {
  background: #fff; color: #0c7a38;
  box-shadow: 0 14px 34px rgba(0,0,0,0.25);
}
.cta-band .btn--whatsapp:hover {
  background: #eef1ff; color: #0a5f2b;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.3);
}
@media (max-width: 600px) {
  .cta-band { padding: 40px 0; }
  .cta-band__inner { justify-content: center; text-align: center; }
  .cta-band__copy p { margin-left: auto; margin-right: auto; }
}

/* Main grid */
.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.5fr;
  gap: 44px;
  padding: 56px 24px 44px;
}
.footer__brand {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.footer__desc { color: rgba(255,255,255,0.58); font-size: 14px; max-width: 340px; margin-top: 18px; }

.brand--footer .brand__img { height: 48px; filter: brightness(0) invert(1); }
@media (max-width: 560px) { .brand--footer .brand__img { height: 40px; } }

.footer__social { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
/* Iconos decorativos: todavía no hay redes sociales, así que van sin enlace. */
.footer__social span {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.8);
}
.footer__social span svg { width: 18px; height: 18px; }

.footer__head {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 7px;
  border-bottom: 2px solid #3B82C4;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer__links a {
  color: rgba(255,255,255,0.62); font-size: 14px;
  transition: color 0.25s var(--ease-out), padding-left 0.25s var(--ease-out);
}
.footer__links a:hover { color: #fff; padding-left: 5px; }

.footer__contact { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.footer__contact li {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 14px; color: rgba(255,255,255,0.62);
  line-height: 1.45;
}
.footer__contact li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; color: #46CCD8; }
.footer__contact a { color: rgba(255,255,255,0.62); transition: color 0.25s var(--ease-out); }
.footer__contact a:hover { color: #fff; }

.footer__pay { margin-top: 22px; }
.footer__pay-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.footer__pay-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.payl {
  height: 26px; width: auto; display: block;
  opacity: 0.7;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.payl:hover { opacity: 1; transform: translateY(-2px); }
.payl[alt="Yape"], .payl[alt="Plin"] { filter: grayscale(1) brightness(1.35) contrast(0.85); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0 24px;
  padding-top: 24px;
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 4px 14px;
  color: rgba(255,255,255,0.42); font-size: 13px;
  text-align: center;
}
.footer__bottom > *:not(:first-child)::before {
  content: '|';
  margin-right: 14px;
  color: rgba(255,255,255,0.22);
}
.footer__bottom a { color: rgba(255,255,255,0.7); transition: color 0.2s var(--ease-out); }
.footer__bottom a:hover { color: #fff; }

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; gap: 32px; padding: 44px 20px 36px; }

  .footer__bottom { margin: 0 20px; }
}

.social-row { display: flex; gap: 10px; margin-top: 18px; }

/* ─── Mini footer (checkout) ─────────────────────────────── */
.footer-mini {
  position: relative;
  margin-top: 64px;
  padding: 26px 0;
  background: linear-gradient(180deg, #071F33 0%, #030D18 100%);
  color: rgba(255,255,255,0.55);
}
.footer-mini__rgb {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #ff2d55, #ff9500, #ffd60a, #34c759, #00c7be, #0a84ff, #5e5ce6, #bf5af2, #ff2d55);
  background-size: 300% 100%;
  animation: footerRgb 12s linear infinite;
}
.footer-mini .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px 26px;
}
.footer-mini__brand { display: inline-flex; }
.footer-mini__brand .brand__img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-mini__copy { font-size: 12.5px; color: rgba(255,255,255,0.45); }
.footer-mini__priv {
  font-size: 12.5px; color: rgba(255,255,255,0.6);
  transition: color 0.2s var(--ease-out);
}
.footer-mini__priv:hover { color: #fff; }
@media (min-width: 621px) {
  .footer-mini .container { padding-right: 84px; }
}
@media (max-width: 620px) {
  .footer-mini .container { flex-direction: column; text-align: center; }
}

/* ─── Newsletter ──────────────────────────────────────────── */
.newsletter-form { display: flex; gap: 10px; max-width: 420px; }
.newsletter-form input {
  flex: 1;
  background: var(--color-bg-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-pill);
  padding: 13px 20px;
  color: var(--color-text);
  font-size: 14px;
  transition: var(--transition);
}
.newsletter-form input:focus { outline: none; border-color: var(--color-violet); box-shadow: 0 0 0 3px rgba(79,58,163,0.12); }
@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* ─── Smart nav search overlay ───────────────────────────── */
#nav-search-overlay {
  position: fixed; inset: 0;
  z-index: 400;
  background: rgba(6,8,16,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14vh 20px 40px;
  overflow-y: auto;
}
#nav-search-overlay.is-open { opacity: 1; pointer-events: auto; }

#nav-search-box {
  width: min(680px, 100%);
  display: flex; align-items: center; gap: 12px;
  background: #14141f;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: translateY(-12px);
  transition: transform 0.35s var(--ease-out);
}
#nav-search-overlay.is-open #nav-search-box { transform: translateY(0); }
#nav-search-box > svg { flex-shrink: 0; color: rgba(255,255,255,0.45); }
#nav-search-input {
  /* min-width:0 es imprescindible: un <input> es un elemento flex con
     ancho intrínseco propio, así que sin esto no se encogía y empujaba
     el botón de cerrar fuera del borde redondeado del buscador. */
  flex: 1 1 0;
  min-width: 0;
  background: none; border: none; outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;   /* 16px evita que iOS haga zoom al enfocar */
  padding: 14px 0;
}
#nav-search-input::placeholder { color: rgba(255,255,255,0.4); }
#nav-search-close {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
#nav-search-close:hover { background: rgba(255,255,255,0.16); color: #fff; }
@media (max-width: 560px) {
  #nav-search-overlay { padding: 12vh 14px 32px; }
  #nav-search-box { padding: 5px 6px 5px 16px; gap: 8px; }
  #nav-search-close { width: 36px; height: 36px; }
  #nav-search-input { padding: 12px 0; }
}

#nav-search-results {
  width: min(680px, 100%);
  margin-top: 16px;
}
.nsr-hint, .nsr-empty {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  text-align: center;
  padding: 22px 12px;
}
.nsr-empty strong { color: #fff; }
.nsr-list { display: flex; flex-direction: column; gap: 8px; }
.nsr-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.nsr-item:hover { background: rgba(255,255,255,0.09); border-color: rgba(139,120,232,0.5); transform: translateX(3px); }
.nsr-item.is-best { border-color: rgba(139,120,232,0.55); background: rgba(98,72,184,0.14); }
.nsr-img {
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: 10px; object-fit: cover;
  background: rgba(255,255,255,0.06);
}
.nsr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nsr-cat {
  font-family: var(--font-heading);
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #8B78E0;
}
.nsr-name {
  font-size: 14px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nsr-price { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.85); }
.nsr-item > svg { flex-shrink: 0; color: rgba(255,255,255,0.3); }
.nsr-all {
  display: block; text-align: center;
  margin-top: 10px; padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-blue);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background 0.25s var(--ease-out);
}
.nsr-all:hover { background: var(--color-blue-dark); }
@media (max-width: 560px) {
  #nav-search-overlay { padding: 10vh 14px 30px; }
  #nav-search-box { padding-left: 18px; }
}

/* ─── Cart drawer ─────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(23,23,31,0.35);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: linear-gradient(180deg, #0E1626 0%, #070C15 100%);
  color: #fff;
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.cart-drawer__title { font-family: var(--font-heading); font-size: 20px; color: #fff; }
.cart-drawer__header .btn--icon { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: rgba(255,255,255,0.8); }
.cart-drawer__header .btn--icon:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); color: #fff; }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 18px; }
.cart-drawer__footer { padding: 20px 24px 24px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 12px; }
.cart-drawer__total-row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: #fff; }
.cart-drawer__total-row span:last-child { font-size: 23px; letter-spacing: 0.01em; }
.cart-drawer__clear {
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  font-size: 12.5px;
  padding: 6px;
  text-decoration: underline;
  transition: color 0.2s var(--ease-out);
}
.cart-drawer__clear:hover { color: var(--color-sale); }

.cart-item { position: relative; display: flex; gap: 14px; padding-right: 22px; }
/* Sin animación de entrada: el cajón vuelve a pintar todos los productos
   (innerHTML) cada vez que se cambia una cantidad o se elimina uno, así que
   la animación se repetía en toda la lista con cada cambio. */
.cart-item__img {
  flex-shrink: 0;
  width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: block;
}
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item__x {
  position: absolute; top: -2px; right: -2px;
  width: 24px; height: 24px;
  padding: 0; background: none; border: none;
  color: rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s var(--ease-out);
}
.cart-item__x svg { width: 14px; height: 14px; }
.cart-item__x:hover { color: var(--color-sale); }
.cart-item__name { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: #fff; text-decoration: none; transition: color 0.2s var(--ease-out); }
.cart-item__name:hover { color: var(--color-violet-bright); }
.cart-item__price { font-size: 13px; color: rgba(255,255,255,0.55); }
.cart-item__controls { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: var(--transition);
}
.qty-btn:hover { border-color: var(--color-violet-bright); color: var(--color-violet-bright); background: rgba(255,255,255,0.1); }

.cart-empty { padding: 60px 20px; text-align: center; color: rgba(255,255,255,0.7); }
.cart-empty p { font-size: 15px; }
/* El cajón es oscuro: el .btn--outline usa color de texto negro y se
   camuflaba. Aquí va claro. */
.cart-empty .btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.cart-empty .btn--outline:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

.btn--whatsapp-outline {
  background: rgba(29,168,81,0.08);
  color: #4ADE80;
  border: 1.5px solid rgba(29,168,81,0.55);
}
.btn--whatsapp-outline:hover {
  background: rgba(29,168,81,0.16);
  border-color: #1DA851;
  color: #fff;
  transform: translateY(-2px);
}

/* ─── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 20px);
  background: #fff;
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-card);
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  display: flex; align-items: center; gap: 10px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out-soft), opacity 0.4s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-cyan); }

/* ─── Forms (contacto/checkout) ───────────────────────────── */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-field label { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-gray-light); }
.form-field input, .form-field textarea, .form-field select {
  background: var(--color-bg-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--color-text);
  font-size: 15px;
  transition: var(--transition);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--color-violet); box-shadow: 0 0 0 3px rgba(79,58,163,0.12);
}
.form-field textarea { resize: vertical; min-height: 120px; }

/* ─── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--color-gray-light); }
.empty-state__icon { font-size: 40px; margin-bottom: 16px; }

/* ─── Respeta la preferencia de movimiento reducido ────────── */
@media (prefers-reduced-motion: reduce) {
  .btn--primary:hover::after,
  .btn--primary.is-added,
  .cart-btn.is-bump,
  .cart-badge.is-bump { animation: none; }
}
