/* ================================================================
   IBANET STORE — css/style.css
   HTML5 + CSS3 puro (variables, Flexbox, Grid) — sin frameworks
   ================================================================ */

/* ── VARIABLES (DARK MODE BASE) ───────────────────────────────── */
:root {
  --bg:           #0a0e14;
  --bg-2:         #0f1420;
  --bg-card:      #131926;
  --bg-glass:     rgba(19, 25, 38, 0.65);
  --border:       rgba(255, 255, 255, 0.08);
  --border-h:     rgba(99, 179, 237, 0.35);
  --accent:       #4ea0f7;
  --accent-light: #7ab8ff;
  --accent-dim:   rgba(78, 160, 247, 0.12);
  --accent-glow:  rgba(78, 160, 247, 0.25);
  --white:        #f3f5f9;
  --muted:        #8590a6;
  --wa:           #25D366;
  --wa-dk:        #1ebe5e;

  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 32px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t:    0.28s var(--ease);

  --shadow-card: 0 4px 28px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow: 0 0 36px var(--accent-glow);
}

/* ── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
body.loaded { opacity: 1; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* Estado de foco visible para navegación por teclado (no se ve al hacer
   click con mouse, solo al tabular) — mejora de accesibilidad. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #283246; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── LAYOUT ───────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

/* Compensa la altura del nav fijo al saltar a una sección por anclaje */
section[id] {
  scroll-margin-top: 80px;
}

.hidden { display: none !important; }

/* ── TIPOGRAFÍA ───────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-header { margin-bottom: 44px; max-width: 560px; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-title span { color: var(--accent); }
.section-sub {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
}

.link-accent { color: var(--accent); font-weight: 600; transition: color 0.2s; }
.link-accent:hover { color: var(--accent-light); }

/* ── ANIMACIÓN DE SCROLL (controlada por JS / IntersectionObserver) ── */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  will-change: opacity, transform;
}
.reveal[data-delay="100"] { transition-delay: 0.10s; }
.reveal[data-delay="200"] { transition-delay: 0.20s; }
.reveal[data-delay="300"] { transition-delay: 0.30s; }
.reveal[data-delay="400"] { transition-delay: 0.40s; }
.reveal[data-delay="500"] { transition-delay: 0.50s; }
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto; /* libera la capa GPU una vez que terminó de animar */
}

/* Scale variant for cards */
.reveal--scale {
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal--scale.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* ── BOTONES ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-xl);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--t);
  white-space: nowrap;
}

.btn--wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 6px 22px rgba(37,211,102,0.3);
}
.btn--wa:hover {
  background: var(--wa-dk);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37,211,102,0.42);
}

.btn--ghost {
  border: 1px solid var(--border-h);
  color: var(--white);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.btn--lg { font-size: 16px; padding: 16px 36px; }

/* ── AVISO DE HORARIO junto a los CTA de WhatsApp ────────────────
   Pintado dinámicamente por pintarEstadoHorario() en main.js. */
.wa-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.wa-status__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.wa-status--online .wa-status__dot {
  background: #3ddc73;
  animation: wa-status-pulse 2s infinite;
}
.wa-status--online .wa-status__text { color: var(--white); }
@keyframes wa-status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61,220,115,0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(61,220,115,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,115,0); }
}

/* ── NAV ──────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--border-h);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.nav__wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
  height: 66px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav__logo span { color: var(--accent); font-weight: 400; }
.nav__logo-img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.nav__links a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  padding-bottom: 4px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.is-active { color: var(--white); }
.nav__links a.is-active::after { width: 100%; }

.nav__link--ext svg { opacity: 0.65; transition: opacity 0.2s, transform 0.2s; }
.nav__link--ext:hover svg { opacity: 1; transform: translate(1px, -1px); }
.nav__links .nav__link--ext {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.nav__links .nav__link--ext::after { display: none; }
.nav__mobile .nav__link--ext {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
}

.nav__right { display: flex; align-items: center; gap: 10px; }

.nav__cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  font-size: 13px;
  color: var(--muted);
  transition: var(--t);
}
.nav__cart-btn:hover { border-color: var(--border-h); color: var(--accent); }

.nav__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: var(--accent);
  color: #08111d;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

/* Animación "pop" del contador del carrito al agregar un producto.
   main.js agrega esta clase al #cartCount/#cartCount2 y la retira a los 300ms. */
.cart-bump {
  animation: cart-pop 0.3s ease;
}

@keyframes cart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--t);
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: flex;
  flex-direction: column;
  background: rgba(10,14,20,0.97);
  border-top: 1px solid var(--border);
  gap: 2px;
  /* Antes era display:none/flex a secas (corte seco). Ahora colapsa con
     max-height + opacity, que sí se puede transicionar sin JS extra ni
     tener que reestructurar el markup en un solo wrapper interno. */
  max-height: 0;
  padding-top: 0; padding-bottom: 0;
  padding-inline: clamp(20px,5vw,64px);
  border-top-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease),
              padding 0.35s var(--ease), border-top-width 0.35s var(--ease);
}
.nav__mobile.is-open {
  max-height: 560px; /* de sobra para los 6 links del menú */
  opacity: 1;
  padding-top: 12px; padding-bottom: 20px;
  border-top-width: 1px;
}
.nav__mobile a {
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, transform 0.3s var(--ease), opacity 0.3s var(--ease);
  /* Entrada escalonada: cada link aparece un poco después que el
     anterior, deslizándose desde la izquierda. main.js setea --mi en
     cada <a> (0,1,2...) para calcular el delay de cada uno. */
  opacity: 0;
  transform: translateX(-14px);
}
.nav__mobile.is-open a {
  opacity: 1;
  transform: translateX(0);
  transition-delay: calc(var(--mi, 0) * 0.05s);
}
.nav__mobile a:hover { color: var(--white); }

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 66px;
  text-align: center;
}

.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.04);
  transition: transform 14s var(--ease);
  filter: brightness(0.28) saturate(0.65);
  /* Antes corría "infinite alternate" para siempre: una imagen a pantalla
     completa animando transform sin parar, justo debajo del nav fijo con
     backdrop-filter, obligaba al navegador a recalcular ese blur en cada
     frame indefinidamente. Ahora el drift corre UNA sola vez al cargar
     y se queda quieto — se ve igual de suave pero deja de consumir GPU
     apenas termina. */
  animation: hero-drift 20s var(--ease) 1 both;
}
.hero:hover .hero__bg img { transform: scale(1.0); animation-play-state: paused; }
.hero__bg.no-img { background: linear-gradient(135deg, #0c1018 0%, #131a28 100%); }

@keyframes hero-drift {
  0%   { transform: scale(1.04) translate(0px, 0px); }
  33%  { transform: scale(1.06) translate(-8px, -4px); }
  66%  { transform: scale(1.05) translate(6px, -6px); }
  100% { transform: scale(1.04) translate(-4px, 4px); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10,14,20,0.82) 0%,
    rgba(10,14,20,0.50) 40%,
    rgba(10,14,20,0.88) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 40px clamp(24px, 8vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Hero entrance: cada hijo aparece secuencialmente con una ligera elevación.
   Pausada por defecto: si arrancara desde el parseo del HTML, en producción
   (con latencia real de red) el delay podía transcurrir mientras el body
   todavía estaba en opacity:0, perdiéndose el efecto visual por completo. */
.hero__content > * {
  animation: hero-enter 0.5s var(--ease) both;
  animation-play-state: paused;
}
body.loaded .hero__content > * {
  animation-play-state: running;
}
.hero__content > *:nth-child(1) { animation-delay: 0.08s; }
.hero__content > *:nth-child(2) { animation-delay: 0.16s; }
.hero__content > *:nth-child(3) { animation-delay: 0.24s; }
.hero__content > *:nth-child(4) { animation-delay: 0.32s; }
.hero__content > *:nth-child(5) { animation-delay: 0.40s; }

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-xl);
  background: var(--accent-dim);
  border: 1px solid var(--border-h);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}
/* Shimmer sweep over the kicker badge */
.hero__kicker::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(78,160,247,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer-sweep 3.5s 0.5s ease-in-out infinite;
  animation-play-state: paused;
}
body.loaded .hero__kicker::after {
  animation-play-state: running;
}
@keyframes shimmer-sweep {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
}

.hero__sub {
  font-size: 17px;
  color: rgba(243,245,249,0.7);
  line-height: 1.8;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  width: 100%;
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
  cursor: default;
}
.hero__trust-item:hover {
  color: var(--white);
  transform: translateY(-2px);
}
.hero__trust-item svg {
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.hero__trust-item:hover svg { transform: scale(1.2); }

/* ── FLOATING PARTICLES IN HERO ───────────────────────────────── */
.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.hero__particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: particle-rise var(--dur, 2s) var(--delay, 0s) ease-in infinite;
  animation-play-state: paused;
  will-change: transform, opacity;
}
body.loaded .hero__particle {
  animation-play-state: running;
}
@keyframes particle-rise {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(0.5); }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { opacity: 0; transform: translate3d(var(--dx, 20px), -120px, 0) scale(1.5); }
}

/* ── BENEFICIOS ───────────────────────────────────────────────── */
.benefits {
  padding-block: clamp(72px, 10vh, 110px);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.benefit-card {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--t);
  position: relative;
  overflow: hidden;
}
/* Sweep glow on hover */
.benefit-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(78,160,247,0.1) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.benefit-card:hover::after { opacity: 1; }
.benefit-card:hover {
  border-color: var(--border-h);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.benefit-card__icon {
  width: 54px; height: 54px;
  background: var(--accent-dim);
  border: 1px solid var(--border-h);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: var(--t);
}
.benefit-card:hover .benefit-card__icon {
  background: var(--accent);
  color: #08111d;
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 8px 20px rgba(78,160,247,0.35);
}

.benefit-card h3 { font-size: 18px; font-weight: 600; }
.benefit-card p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ── SOBRE NOSOTROS ───────────────────────────────────────────── */
.about {
  padding-block: clamp(72px, 10vh, 110px);
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
  max-width: 720px;
}
.about__text .section-title { margin-top: 6px; margin-bottom: 20px; }
.about__p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
  max-width: 520px;
}
.about__seals {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}
.seal {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--white);
  font-weight: 500;
}
.seal svg { color: var(--accent); flex-shrink: 0; }

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  transition: var(--t);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease);
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.stat-card__num {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}
.stat-card:hover .stat-card__num { transform: scale(1.05); }
.stat-card__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── CATÁLOGO ─────────────────────────────────────────────────── */
.catalog-section {
  padding-block: clamp(72px, 10vh, 110px);
  background: var(--bg) url('catalog_background.png') center center / cover no-repeat;
  border-top: 1px solid var(--border);
  position: relative;
}

.catalog__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: var(--r-xl);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  transition: var(--t);
}
.filter-btn:hover { border-color: var(--border-h); color: var(--white); }
.filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--border-h);
  color: var(--accent);
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.catalog__cart-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.cart-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  background: var(--accent-dim);
  border: 1px solid var(--border-h);
  border-radius: var(--r-xl);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: var(--t);
}
.cart-trigger-btn:hover {
  background: rgba(78,160,247,0.22);
  box-shadow: var(--shadow-glow);
}
.cart-trigger-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--accent);
  color: #08111d;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.catalog__cart-bar p { font-size: 14px; color: var(--muted); }

/* ── PRODUCT CARD ─────────────────────────────────────────────── */
.prod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--t), opacity 0.35s var(--ease), transform 0.35s var(--ease);
  box-shadow: var(--shadow-card);

  /* Tilt 3D (objetivo 4): main.js setea --rx/--ry en cada mousemove.
     --ty es el levantamiento en Y al hacer hover (antes era un transform
     fijo en .prod-card:hover; ahora se combina con el tilt en una sola
     propiedad transform para que no se pisen entre sí). */
  --rx: 0deg;
  --ry: 0deg;
  --ty: 0px;
  transform: perspective(1000px) translateY(var(--ty)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  position: relative; /* contexto de posicionamiento para el ::before del glow */
  will-change: transform;
}

/* Mientras el mouse se mueve dentro de la card, el tilt debe responder
   al instante (sin transición) para que no se sienta "atrasado".
   Al salir (mouseleave) main.js quita esta clase y la transición de
   .prod-card vuelve a aplicar, dando el rebote suave de regreso a 0deg. */
.prod-card.tilting {
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

/* Resplandor dinámico (objetivo 5): sigue al cursor vía --x/--y,
   inyectadas en línea por main.js sobre cada .prod-card en mousemove. */
.prod-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    var(--accent-glow) 0%,
    transparent 60%
  );
  border-radius: inherit;
}
.prod-card:hover::before { opacity: 1; }

/* Filtro de catálogo: la transición de salida es opacity + scale (suave).
   Una vez que termina, main.js (aplicarFiltro) le agrega display:none
   para sacarla del flujo del grid — así no queda un hueco vacío donde
   estaba, y las demás cards se reacomodan ocupando ese espacio. */
.prod-card.hide {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}
.prod-card:hover {
  border-color: var(--accent);
  --ty: -5px; /* el levantamiento ahora vive en la misma variable que usa el tilt 3D */
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.prod-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #0a0e15;
  overflow: hidden;
  cursor: pointer;
}
.prod-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.prod-card:hover .prod-card__img-wrap img { transform: scale(1.07); }

.prod-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 11px;
  background: var(--accent);
  color: #08111d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-xl);
}

.prod-card__thumbs {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.prod-card__thumb {
  width: 30px; height: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.prod-card__thumb:hover,
.prod-card__thumb.active { opacity: 1; border-color: var(--accent); }
.prod-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.prod-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prod-card__cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.prod-card__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}
.prod-card__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}
.prod-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.prod-card__price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.prod-card__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: var(--t);
  background: transparent;
}
.btn-icon:hover { border-color: var(--border-h); color: var(--accent); background: var(--accent-dim); }

.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 36px;
  background: var(--accent);
  color: #08111d;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  transition: var(--t);
  white-space: nowrap;
}
.btn-add:hover { background: var(--accent-light); transform: scale(1.03); }

/* WhatsApp en la tarjeta del catálogo: el CTA principal, en verde y con
   un leve glow propio para que destaque por sobre "Agregar al carrito". */
.btn-add--wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.4);
}
.btn-add--wa:hover {
  background: var(--wa-dk);
  transform: scale(1.05);
  box-shadow: 0 3px 14px rgba(37, 211, 102, 0.55);
}

/* ── CTA FINAL ────────────────────────────────────────────────── */
.cta-final {
  padding-block: clamp(80px, 12vh, 130px);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Animated ambient orbs in the CTA background.
   Mismo criterio que en el hero: un blur grande animado para siempre es
   caro. Con varias pasadas el movimiento sutil se sigue notando y después
   se asienta. */
.cta-final::before,
.cta-final::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  animation: orb-float 8s ease-in-out 6;
}
.cta-final::before {
  width: 400px; height: 400px;
  background: rgba(78,160,247,0.07);
  top: -100px; left: -100px;
  animation-duration: 9s;
}
.cta-final::after {
  width: 350px; height: 350px;
  background: rgba(37,211,102,0.05);
  bottom: -80px; right: -80px;
  animation-duration: 11s;
  animation-direction: reverse;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.97); }
}
.cta-final__inner {
  max-width: 620px;
  margin-inline: auto;
  padding-inline: clamp(24px,5vw,60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cta-final__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
}
.cta-final__title span { color: var(--accent); }
.cta-final__sub { font-size: 15px; color: var(--muted); line-height: 1.75; max-width: 440px; }
.cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.cta-final__note {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
}

/* ── FOOTER ───────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-top: 44px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 8px;
}
.footer__logo span { color: var(--accent); font-weight: 400; }
.footer__tagline { font-size: 13px; color: var(--muted); }
.footer__nav h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer__nav a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--white); }
.footer__nav a.is-current { color: var(--accent); font-weight: 600; }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 18px clamp(20px,5vw,64px);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer__credit { opacity: 0.85; }
.footer__credit a {
  color: var(--accent);
  transition: color 0.2s;
}
.footer__credit a:hover { color: var(--white); }

/* ── MODAL PRODUCTO ───────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.is-open { opacity: 1; pointer-events: all; }

.overlay--right { justify-content: flex-end; padding: 0; align-items: stretch; }

.product-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--r-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), var(--shadow-glow);
  transform: scale(0.95);
  transition: transform 0.3s var(--ease);
  position: relative;
}
.overlay.is-open .product-modal { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  z-index: 10;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(78,160,247,0.25); border-color: var(--accent); }

.modal-gallery { position: relative; background: #070a10; overflow: hidden; min-height: 300px; }
.modal-main-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease, transform 0.5s var(--ease);
}
/* Fade al cambiar de foto (ver cambiarImgModal en main.js) */
.modal-main-img.fading { opacity: 0; }
/* Zoom sutil al pasar el mouse sobre la imagen principal */
.modal-gallery:hover .modal-main-img { transform: scale(1.06); }
.modal-thumbs {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.modal-thumb {
  width: 42px; height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.modal-thumb.active { border-color: var(--accent); }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }

.modal-info {
  padding: 32px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mi-cat {
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.mi-name {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; line-height: 1.2;
}
.mi-price {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.mi-desc { font-size: 14px; color: var(--muted); line-height: 1.75; }
.mi-feats { display: flex; flex-direction: column; gap: 8px; }
.mi-feat {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(243,245,249,0.8);
}
.mi-feat::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%; flex-shrink: 0;
}
.mi-qty-row { display: flex; align-items: center; gap: 16px; }
.mi-qty-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.qty-ctrl {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden;
}
.qty-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  color: var(--white); background: transparent; transition: background 0.2s;
}
.qty-btn:hover { background: var(--accent-dim); }
.qty-val {
  width: 38px; text-align: center; font-weight: 700; font-size: 15px;
  border-inline: 1px solid var(--border); padding: 7px 0;
}
.mi-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-full {
  flex: 1; padding: 13px 18px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--t);
}
.btn-full--accent { background: var(--accent); color: #08111d; }
.btn-full--accent:hover { background: var(--accent-light); transform: translateY(-1px); }

/* Botón magnético (objetivo 6) — ver setupBotonMagnetico() en main.js.
   Transición con rebote ("overshoot") al volver a su posición de reposo: */
#btnMagnetico {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
/* Mientras el cursor lo está "atrayendo" activamente, la transición es
   más corta y lineal — así el botón sigue al mouse sin sentirse pegajoso. */
#btnMagnetico.is-magnetic {
  transition: transform 0.12s ease-out, background 0.2s;
}
/* WhatsApp como CTA principal: más alto, con glow propio y un poco más
   grande que "Agregar al carrito" — debe ser la acción que más destaque. */
.btn-full--wa {
  background: var(--wa);
  color: #fff;
  flex: 1.3; /* ocupa más espacio que btn-full--accent (flex:1) */
  padding: 15px 18px;
  font-size: 14px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
}
.btn-full--wa:hover {
  background: var(--wa-dk);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

/* ── CARRITO (DRAWER) ─────────────────────────────────────────── */
.cart-drawer {
  width: min(400px, 95vw);
  background: var(--bg-2);
  border-left: 1px solid var(--border-h);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  box-shadow: -24px 0 60px rgba(0,0,0,0.6);
}
.overlay--right.is-open .cart-drawer { transform: translateX(0); }

.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer__head h2 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
}
.cart-drawer__body {
  flex: 1; overflow-y: auto;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--muted); font-size: 14px;
  text-align: center; padding: 40px 0;
}
.cart-empty svg { opacity: 0.2; }

.cart-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.cart-item__img { width: 54px; height: 54px; border-radius: var(--r-sm); object-fit: cover; }
.cart-item__name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600; line-height: 1.25;
}
.cart-item__price { font-size: 13px; color: var(--accent); font-weight: 500; margin-top: 3px; }
.cart-item__qty { font-size: 12px; color: var(--muted); }
.cart-item__rm { color: var(--muted); transition: color 0.2s; }
.cart-item__rm:hover { color: #ef4444; }

.cart-drawer__foot {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total__label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.cart-total__val {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; color: var(--accent);
}
.btn-checkout {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px;
  background: var(--wa); color: #fff;
  border-radius: var(--r-md); font-size: 15px; font-weight: 700;
  transition: var(--t);
}
.btn-checkout:hover { background: var(--wa-dk); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37,211,102,0.35); }
.btn-clear {
  width: 100%; padding: 10px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: 13px; color: var(--muted); text-align: center; transition: var(--t);
}
.btn-clear:hover { border-color: #ef4444; color: #ef4444; }

/* ── TOASTS ───────────────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex; flex-direction: column-reverse; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--r-md);
  font-size: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  animation: toast-in 0.35s var(--ease) forwards;
  max-width: 300px;
}
.toast svg { color: var(--accent); flex-shrink: 0; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── WA FAB ───────────────────────────────────────────────────── */
.wa-fab-wrap {
  position: fixed;
  bottom: 28px; left: 28px;
  z-index: 80;
}
.wa-fab {
  position: relative;
  width: 56px; height: 56px;
  background: var(--wa);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 6px 22px rgba(37,211,102,0.45);
  transition: var(--t);
  animation: wa-pulse 2.4s infinite;
}
.wa-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(37,211,102,0.6);
  animation-play-state: paused; /* se pausa el latido mientras el mouse está encima */
}

@keyframes wa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Puntito de estado sobre el FAB — verde cuando estamos en horario de
   atención (ver wa-fab--online en main.js), gris cuando no. */
.wa-fab__dot {
  position: absolute;
  top: 1px; right: 1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--muted);
  border: 2px solid var(--bg);
  transition: background 0.3s;
}
.wa-fab--online .wa-fab__dot { background: #3ddc73; }
/* Sin gente atendiendo, no tiene sentido prometer respuesta inmediata */
.wa-fab:not(.wa-fab--online) { animation-play-state: paused; }

/* Globo de ayuda: invita a escribir, aparece una vez (ver iniciarGloboFab
   en main.js) y desaparece solo o al cerrarlo. */
.wa-fab__tip {
  position: absolute;
  left: 0; bottom: calc(100% + 12px);
  display: flex; align-items: center; gap: 8px;
  min-width: 210px; max-width: 250px;
  padding: 12px 10px 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  font-size: 13px; font-weight: 500; color: var(--white);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.wa-fab__tip.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.wa-fab__tip::after {
  content: '';
  position: absolute; left: 22px; top: 100%;
  border: 7px solid transparent;
  border-top-color: var(--bg-card);
}
.wa-fab__tip-close {
  margin-left: auto; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; line-height: 1;
  transition: color 0.2s, background 0.2s;
}
.wa-fab__tip-close:hover { color: var(--white); background: rgba(255,255,255,0.08); }

/* ── BARRA DE COMPRA RÁPIDA (MOBILE) ─────────────────────────────
   Aparece pegada abajo cuando hay productos en el carrito, para no
   obligar a abrir el drawer completo solo para finalizar el pedido.
   Solo se muestra en mobile (ver media query); en desktop ya está
   el drawer y la barra inferior del catálogo para eso. */
.cart-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 85;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-h);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.45);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}
.cart-sticky.is-visible { transform: translateY(0); }
body.has-overlay .cart-sticky.is-visible { transform: translateY(100%); }

.cart-sticky__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-sticky__count { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cart-sticky__total { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--accent); }
.cart-sticky__btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--wa); color: #fff;
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: var(--t);
}
.cart-sticky__btn:hover { background: var(--wa-dk); transform: translateY(-1px); }

/* ── RESPONSIVO ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 720px) {
  .product-modal { grid-template-columns: 1fr; max-height: 95svh; }
  .modal-gallery { min-height: 220px; max-height: 280px; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .about__stats { grid-template-columns: 1fr 1fr; }

  /* Banner / Hero en mobile: en pantallas angostas, min-height:100svh +
     object-fit:cover recortaba demasiado el ancho de la imagen. Bajamos
     el alto mínimo, fijamos un aspect-ratio razonable y suavizamos el
     "drift" (scale/translate) para que no acentúe el recorte. */
  .hero {
    min-height: auto;
    aspect-ratio: 4 / 5;
    padding-top: 90px;
    padding-bottom: 40px;
  }
  .hero__bg img {
    object-position: center 30%; /* prioriza la parte superior, donde suele estar lo importante */
    transform: scale(1.0);
    animation: none; /* el drift sutil no se aprecia en pantallas chicas y solo agrega recorte */
  }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { justify-content: center; width: 100%; }
  .cta-final__actions { flex-direction: column; width: 100%; }
  .cta-final__actions .btn { justify-content: center; width: 100%; }
  .catalog__cart-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .cart-sticky { display: flex; }
  /* Con la barra sticky visible, el FAB sube para no taparla */
  body.has-sticky-cart .wa-fab-wrap { bottom: 100px; }
  /* Objetivo táctil un poco más grande en los botones chicos de la card */
  .btn-icon, .btn-add { min-height: 40px; }
}

/* ── REDUCED MOTION ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__bg img { transition: none !important; animation: none !important; }
  .hero__brand-letter { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
  .wa-fab, .wa-status__dot { animation: none !important; }
}
/* ══════════════════════════════════════════════════════════════
   HERO TITLE — ANIMACIÓN LETRA A LETRA "BIENVENIDO A IBANET STORE"
══════════════════════════════════════════════════════════════ */

/* Línea 1: "Bienvenido a" — aparece deslizándose desde la izquierda */
.hero__title-line--top {
  display: block;
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(243,245,249,0.85);
  opacity: 0;
  transform: translateX(-40px);
  animation: slide-in-left 0.5s 0.15s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
  animation-play-state: paused;
}
/* La animación solo corre una vez que el body es visible (clase .loaded vía JS).
   Esto evita que el delay transcurra "a oscuras" mientras el body está en
   opacity:0, que es lo que pasaba en producción con la latencia real de red. */
body.loaded .hero__title-line--top {
  animation-play-state: running;
}

@keyframes slide-in-left {
  to { opacity: 1; transform: translateX(0); }
}

/* Línea 2: "IBANET STORE" — cada letra cae desde arriba con rebote */
.hero__title-line--brand {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.hero__brand-space {
  display: inline-block;
  width: 0.4em;
}

.hero__brand-letter {
  display: inline-block;
  font-size: clamp(42px, 8vw, 82px);
  font-weight: 800;
  letter-spacing: -0.01em;
  /* El color real lo define el modificador --grad o --white (ver abajo);
     este es solo un fallback por si algún letter quedara sin clase. */
  color: var(--accent);
  opacity: 0;
  transform: translateY(-60px) rotateX(90deg);
  /* letter-glow-wave corría "infinite" y antes animaba el BLUR del
     text-shadow: eso obliga al navegador a repintar el texto a mano en
     el hilo principal en cada frame (text-shadow con blur no lo puede
     componer la GPU), en 11 letras a la vez, justo mientras el resto
     de la página (imágenes, fuentes) todavía está cargando — de ahí el
     lag de los primeros segundos. Ahora el "shine" anima solo
     `filter: brightness()` sobre el brillo base (que se pinta una
     única vez y queda fijo); brightness() sí lo compone la GPU sin
     volver a pintar nada, así que el efecto se ve igual pero no cuesta
     nada de CPU mientras corre. */
  animation: letter-drop 0.45s calc(0.3s + var(--i) * 0.045s)
             cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             letter-glow-wave 2.2s calc(0.9s + var(--i) * 0.1s)
             ease-in-out 3;
  animation-play-state: paused, paused;
  cursor: default;
  perspective: 400px;
  /* Brillo base, con el color propio de cada letra (currentColor).
     Fijo: se pinta una sola vez, nunca se vuelve a recalcular. */
  text-shadow:
    0 0 8px color-mix(in srgb, currentColor 55%, transparent),
    0 0 18px color-mix(in srgb, currentColor 30%, transparent);
  transition: text-shadow 0.25s ease, filter 0.25s ease, transform 0.25s ease;
  will-change: transform, filter;
}
body.loaded .hero__brand-letter {
  animation-play-state: running, running;
}

/* Letras "IBANET": degradé azul → verde tomado del logo de referencia
   (venden_crop.png). Cada letra tiene su propio tono vía --lc, generando
   un degradé continuo letra a letra en vez de un color plano. */
.hero__brand-letter--grad {
  color: var(--lc, var(--accent));
}

/* Letras "STORE": blanco hueso, igual al tono usado en "Bienvenido a"
   y al segmento "de" del logo de referencia. */
.hero__brand-letter--white {
  color: #f3f5f9;
}

/* Hover individual: se ilumina con SU PROPIO color (currentColor), no uno
   forzado — así cada letra conserva su tono del degradé al interactuar. */
.hero__brand-letter:hover {
  filter: brightness(1.28) saturate(1.15);
  text-shadow:
    0 0 12px color-mix(in srgb, currentColor 80%, transparent),
    0 0 26px color-mix(in srgb, currentColor 50%, transparent);
  transform: translateY(-6px) scale(1.1) !important;
}

@keyframes letter-drop {
  0%   { opacity: 0; transform: translateY(-60px) rotateX(90deg) scale(0.8); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg) scale(1); }
}

/* Ola de brillo sutil que recorre las letras en cadena, desfasada por --i.
   El text-shadow queda fijo (se pinta una sola vez, ver regla base de
   .hero__brand-letter); acá solo se anima filter:brightness(), que el
   navegador compone en la GPU sin repintar el texto en cada frame —
   mismo efecto de "shine" recorriendo el logo, sin costo de CPU. */
@keyframes letter-glow-wave {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.22); }
}

/* Línea decorativa que se dibuja debajo del título */
.hero__title-underline {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-light), transparent);
  margin-top: 10px;
  transform: scaleX(0);
  transform-origin: center;
  animation: underline-grow 0.5s 0.75s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
  animation-play-state: paused;
}
body.loaded .hero__title-underline {
  animation-play-state: running;
}

@keyframes underline-grow {
  to { transform: scaleX(1); }
}

/* Reduced motion: todo estático */
@media (prefers-reduced-motion: reduce) {
  .hero__title-line--top,
  .hero__brand-letter,
  .hero__title-underline {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   NUEVAS ANIMACIONES PROFESIONALES
   1) Barra de progreso de scroll (degradé de marca azul → verde)
   2) Efecto ripple (ondas) al hacer click en botones
   3) Micro-interacción "fly to cart": un chip vuela desde el botón
      presionado hasta el ícono del carrito al agregar un producto
══════════════════════════════════════════════════════════════ */

/* ── 1) BARRA DE PROGRESO DE SCROLL ──────────────────────────────
   Fija arriba de todo, por encima del nav. El ancho lo controla
   main.js en cada scroll (transform: scaleX, más performante que
   animar width). El degradé reutiliza los mismos tonos del logo. */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg,
    #74bbf4 0%, #56c5bf 35%, #29d570 65%, #f3f5f9 100%);
  box-shadow: 0 0 12px rgba(78,160,247,0.5);
  will-change: transform;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}

/* ── 2) EFECTO RIPPLE EN BOTONES ─────────────────────────────────
   El wrap se inyecta por JS (initRippleEffect en main.js) como hijo
   absoluto del botón; así el overflow:hidden queda contenido en ese
   wrap y NO recorta el box-shadow exterior del botón real. */
.ripple-wrap {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  opacity: 0.65;
  animation: ripple-expand 0.6s ease-out forwards;
  pointer-events: none;
}
/* En botones oscuros/ghost el ripple blanco funciona bien; en botones
   con fondo ya muy claro (ninguno en este sitio) se podría oscurecer,
   pero se deja blanco translúcido por consistencia visual. */
@keyframes ripple-expand {
  to { transform: scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ripple-circle { display: none; }
}

/* ── 3) FLY TO CART ───────────────────────────────────────────────
   Chip circular que "vuela" desde el botón de agregar hasta el ícono
   del carrito, con arco y achicamiento, más un pequeño destello final
   sobre el ícono del carrito al llegar. */
.fly-to-cart {
  position: fixed;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #74bbf4, #29d570);
  box-shadow: 0 4px 14px rgba(41,213,112,0.45);
  pointer-events: none;
  will-change: transform, opacity;
}
.fly-to-cart svg { width: 55%; height: 55%; color: #08111d; }

.nav__cart-btn.cart-hit {
  animation: cart-hit-flash 0.4s ease;
}
@keyframes cart-hit-flash {
  0%   { box-shadow: 0 0 0 0 rgba(41,213,112,0.55); }
  60%  { box-shadow: 0 0 0 10px rgba(41,213,112,0); }
  100% { box-shadow: 0 0 0 0 rgba(41,213,112,0); }
}
@media (prefers-reduced-motion: reduce) {
  .fly-to-cart { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   ANIMACIONES QUE HACEN CÓMODA LA VISITA POR CELULAR
   4) Botón flotante "volver arriba" (aparece con el scroll)
   5) Feedback táctil (:active) en vez de hover "pegado" en touch
   6) Indicador de swipe en la galería de fotos del modal
══════════════════════════════════════════════════════════════ */

/* ── 4) VOLVER ARRIBA ────────────────────────────────────────────
   Oculto y corrido hacia abajo por defecto; main.js le agrega
   .is-visible recién después de cierto scroll (ver initBackToTop). */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 79; /* justo debajo del WA FAB (80) */
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-h);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
              border-color 0.2s, background 0.2s;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px) scale(1.05);
}
.back-to-top:active { transform: translateY(0) scale(0.92); }
/* Con la barra sticky del carrito visible en mobile, sube para no taparla
   (mismo criterio que ya se usa para el wa-fab-wrap). */
@media (max-width: 720px) {
  body.has-sticky-cart .back-to-top { bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.2s linear; transform: none !important; }
}

/* ── 5) FEEDBACK TÁCTIL EN DISPOSITIVOS SIN HOVER REAL ───────────
   En touch, el estado :hover queda "pegado" hasta el próximo tap en
   otro lado (la card queda brillando/levantada, la imagen con zoom).
   Acá lo neutralizamos y lo reemplazamos por un :active breve, que
   se siente como una respuesta táctil real al dedo. */
@media (hover: none) {
  .prod-card:hover {
    border-color: var(--border);
    --ty: 0px;
    box-shadow: var(--shadow-card);
  }
  .prod-card:hover::before { opacity: 0; }
  .prod-card:hover .prod-card__img-wrap img { transform: none; }
  .prod-card:active {
    transform: perspective(1000px) translateY(0) scale(0.985);
    transition: transform 0.15s ease;
  }
  .btn:active,
  .btn-add:active,
  .btn-full:active,
  .btn-icon:active,
  .btn-checkout:active,
  .qty-btn:active,
  .nav__cart-btn:active {
    transform: scale(0.93);
  }
  .hero__brand-letter:hover {
    filter: none;
    transform: none !important;
    text-shadow:
      0 0 8px color-mix(in srgb, currentColor 55%, transparent),
      0 0 18px color-mix(in srgb, currentColor 30%, transparent);
  }
}

/* ── 6) GALERÍA DEL MODAL: SWIPE EN MOBILE ───────────────────────
   Cursor de "arrastre" + una pista visual sutil la primera vez que
   se abre un producto con más de una foto en pantallas táctiles. */
@media (hover: none) {
  .modal-gallery { cursor: grab; touch-action: pan-y; }
}
.modal-gallery__hint {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(243,245,249,0.9);
  background: rgba(8,17,29,0.6);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  z-index: 3;
  opacity: 0;
  animation: swipe-hint-in 0.4s 0.5s ease forwards, swipe-hint-out 0.4s 3s ease forwards;
  pointer-events: none;
}
@keyframes swipe-hint-in  { to { opacity: 1; } }
@keyframes swipe-hint-out { to { opacity: 0; } }