/* ElectroAudio SV v2 — "catálogo impreso": papel negro, una tinta violeta fluorescente,
   retícula de filetes finos. El degradado azul-rosa vive solo en el logo. */
:root {
  --bg: #0a090c;
  --bg-2: #111015;
  --panel: #131217;
  --panel-2: #1a1820;
  --line: #2b2731;
  --line-2: #3b3644;
  --text: #f0edf4;
  --muted: #a49eae;
  --dim: #6f6979;
  --neon: #b36bff;
  --neon-hi: #cf9dff;
  --neon-ink: #120a1c;
  --neon-soft: rgba(179, 107, 255, .13);
  --neon-line: rgba(179, 107, 255, .55);
  --wa: #25d366;
  --ok: #7ee2a8;
  --cyan: #22d3ee;
  --grad: linear-gradient(90deg, #22d3ee 0%, #818cf8 50%, #e940d8 100%);
  --radius: 2px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Montserrat", "Archivo", system-ui, sans-serif;
  --display: "Archivo", "Arial", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--line-2) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--neon);
}
::selection { background: var(--neon); color: var(--neon-ink); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }

/* Datos de catálogo: referencias, conteos, precios */
.ref {
  font: 600 .72rem/1 var(--font); font-variation-settings: "wdth" 112;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Botones */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; justify-content: center;
  min-height: 44px; padding: .7rem 1.25rem; border-radius: var(--radius); border: 1px solid transparent;
  font: 650 .95rem/1 var(--font); font-variation-settings: "wdth" 108; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .16s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }
/* Botón neón multicolor (degradado cian → índigo → magenta, como el logo) */
.btn-primary, .btn-wa {
  background: var(--grad); border-radius: 6px;
  color: #07060b; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; font-size: .88rem;
  box-shadow: 0 0 18px rgba(34, 211, 238, .35), 0 0 34px rgba(233, 64, 216, .25);
  transition: box-shadow .25s var(--ease), transform .16s var(--ease), filter .2s var(--ease);
}
.btn-primary:hover, .btn-wa:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 22px rgba(34, 211, 238, .55), 0 0 44px rgba(233, 64, 216, .4);
}
.btn-primary:active, .btn-wa:active { transform: scale(.97); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; border-radius: 6px; }
.btn-lg.btn-ghost { text-transform: uppercase; letter-spacing: .1em; font-size: .88rem; font-weight: 700; }
.btn-ghost:hover { border-color: var(--cyan); color: #fff; box-shadow: 0 0 14px rgba(34, 211, 238, .25); }
.btn-lg { min-height: 52px; padding: .95rem 1.6rem; font-size: 1rem; }
.btn-primary.btn-lg, .btn-wa.btn-lg { font-size: .92rem; }

/* ---------- Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 9, 12, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.logo { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.logo-wave { height: 28px; width: auto; }
.logo-icon { width: 34px; height: 34px; }
.logo-text { font: 300 1.22rem/1 var(--brand); letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.logo-text b { font-weight: 600; }
.search {
  flex: 1; display: flex; max-width: 520px; margin-left: auto; height: 44px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .18s var(--ease);
}
.search:focus-within { border-color: var(--neon); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); padding: 0 .9rem; font: inherit; outline: none; }
.search input::placeholder { color: var(--dim); }
.search button { width: 46px; background: transparent; border: 0; border-left: 1px solid var(--line-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color .18s var(--ease); }
.search button:hover { color: var(--neon-hi); }
.header-wa { min-height: 44px; padding: .55rem 1rem; }

/* ---------- Portada: titular + índice del catálogo */
.intro { border-bottom: 1px solid var(--line); }
.intro-inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem);
  align-items: stretch; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.intro-copy { display: flex; flex-direction: column; justify-content: center; }
.intro h1 {
  font: 760 clamp(2.5rem, 5.6vw, 4.75rem)/.98 var(--display);
  font-variation-settings: "wdth" 118; letter-spacing: -.025em;
  margin: 0 0 1.4rem; max-width: 14ch; text-wrap: balance;
}
.intro-lead { color: var(--muted); font-size: 1.12rem; line-height: 1.6; max-width: 50ch; margin: 0 0 2rem; }
.intro-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 2.6rem 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 1rem 2rem 0 0; margin-right: 2rem; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; margin-right: 0; }
.facts dt { font-size: .78rem; color: var(--dim); letter-spacing: .04em; text-transform: uppercase; font-variation-settings: "wdth" 110; }
.facts dd { margin: .2rem 0 0; font: 650 1.5rem/1.1 var(--font); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.facts .facts-wide dd { font-size: 1rem; font-weight: 500; padding-top: .35rem; }

.index { border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; }
.index-title {
  margin: 0; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
  font: 650 .82rem/1 var(--font); font-variation-settings: "wdth" 115; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.index-list { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; }
.index-list li { flex: 1; border-bottom: 1px solid var(--line); }
.index-list li:last-child { border-bottom: 0; }
.index-list a {
  position: relative; height: 100%; min-height: 56px; display: flex; align-items: center; gap: .9rem; padding: .8rem 1.25rem;
  transition: background-color .2s var(--ease);
}
.index-icon { width: 26px; height: 26px; color: var(--dim); flex-shrink: 0; transition: color .2s var(--ease); }
.index-icon svg { width: 100%; height: 100%; stroke-width: 2.2; }
.index-name { font: 600 1.12rem/1.2 var(--font); font-variation-settings: "wdth" 108; }
.index-lead {
  flex: 1; height: 1px; margin-top: .45em; align-self: center;
  background-image: radial-gradient(circle, var(--line-2) 1px, transparent 1.4px); background-size: 7px 3px; background-repeat: repeat-x; background-position: left center;
  position: relative; min-width: 1.5rem;
}
.index-lead::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; margin-top: -.5px; background: var(--neon); box-shadow: 0 0 8px rgba(179, 107, 255, .8);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.index-count { font: 650 1.12rem/1 var(--font); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 2ch; text-align: right; transition: color .2s var(--ease); }
.index-list a:hover, .index-list a:focus-visible { background: var(--neon-soft); }
.index-list a:hover .index-lead::after, .index-list a:focus-visible .index-lead::after { transform: scaleX(1); }
.index-list a:hover .index-icon, .index-list a:hover .index-count,
.index-list a:focus-visible .index-icon, .index-list a:focus-visible .index-count { color: var(--neon-hi); }
.index-list a:focus-visible { outline-offset: -2px; }

/* Entrada única de la portada */
@media (prefers-reduced-motion: no-preference) {
  .intro-copy[data-enter] > * { animation: rise .7s var(--ease) both; }
  .intro-copy[data-enter] > :nth-child(2) { animation-delay: .06s; }
  .intro-copy[data-enter] > :nth-child(3) { animation-delay: .12s; }
  .intro-copy[data-enter] > :nth-child(4) { animation-delay: .18s; }
  .index[data-enter] .index-list li { animation: slide .6s var(--ease) both; animation-delay: calc(.15s + var(--i) * .05s); }
  .index[data-enter] .index-list li .index-lead::after { animation: sweep .9s var(--ease) both; animation-delay: calc(.35s + var(--i) * .05s); }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes slide { from { opacity: 0; transform: translateX(-10px); } }
@keyframes sweep { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; transform-origin: left; } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- Pestañas de categorías (como separadores de catálogo) */
#catalogo { scroll-margin-top: 80px; padding-top: 2rem; }
.chips {
  display: flex; gap: 0; overflow-x: auto; margin: 0; border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; flex-shrink: 0; min-height: 48px;
  padding: 0 1.1rem; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px;
  color: var(--muted); font-weight: 550; font-size: .98rem; font-variation-settings: "wdth" 106;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.chip:hover { color: var(--text); background: var(--bg-2); }
.chip.active { color: #fff; background: var(--bg); border-color: var(--line); border-top: 2px solid var(--neon); box-shadow: inset 0 6px 10px -8px rgba(179, 107, 255, .9); }

.subchips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem 0 0; }
.subchip {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 38px; padding: 0 .9rem; border-radius: var(--radius);
  border: 1px solid var(--line-2); color: var(--muted); font-size: .92rem; font-weight: 550;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.subchip span { font-size: .8rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.subchip:hover { color: var(--text); border-color: var(--neon-line); }
.subchip.active { color: var(--neon-ink); background: var(--neon); border-color: var(--neon); }
.subchip.active span { color: var(--neon-ink); opacity: .75; }

/* ---------- Listado */
.section-title {
  font: 720 clamp(1.5rem, 2.6vw, 2rem)/1.1 var(--display); font-variation-settings: "wdth" 115; letter-spacing: -.015em;
  margin: 2.8rem 0 1.2rem; display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap;
}
.section-title small { font: 500 .92rem var(--font); letter-spacing: 0; color: var(--muted); font-variation-settings: "wdth" 100; font-variant-numeric: tabular-nums; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.list-head .section-title { margin-bottom: 1.2rem; }
.sort { display: flex; align-items: center; gap: .6rem; font-size: .92rem; }
.sort select {
  min-height: 40px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 0 2rem 0 .75rem; font: inherit; cursor: pointer;
}
.sort select:hover { border-color: var(--neon-line); }

/* Retícula de láminas: filetes compartidos, sin cajas redondeadas */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 2.5rem;
}
.card {
  position: relative; display: flex; flex-direction: column; background: var(--bg);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color .22s var(--ease);
}
.card::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--neon);
  box-shadow: 0 0 10px rgba(179, 107, 255, .7);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); z-index: 1;
}
.card:hover { background: var(--bg-2); }
.card:hover::before, .card:focus-visible::before { transform: scaleX(1); }
.card:focus-visible { outline-offset: -2px; }
.card-ref { display: flex; justify-content: space-between; gap: .75rem; padding: .9rem 1rem 0; white-space: nowrap; min-width: 0; }
.card-ref .card-cat { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card-ref .card-cat { text-align: right; }
.card-cat { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); font-weight: 550; font-variation-settings: "wdth" 110; }
.card-media { position: relative; aspect-ratio: 1; margin: .75rem 1rem 0; background: var(--bg-2); overflow: hidden; }
.card:hover .card-media { background: var(--panel-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #4c4656; transition: color .25s var(--ease), transform .5s var(--ease); }
.placeholder svg { width: 36%; height: 36%; stroke-width: 1.4; }
.card:hover .placeholder { color: var(--neon-hi); transform: scale(1.03); }
.placeholder.big { aspect-ratio: 1; }
.card.is-out .card-media, .card.is-out .price { opacity: .45; }
.badge {
  position: absolute; top: 0; left: 0; padding: .35rem .55rem; border-radius: 0;
  font: 700 .78rem/1 var(--font); font-variation-settings: "wdth" 110; font-variant-numeric: tabular-nums;
}
.badge-sale { background: var(--neon); color: var(--neon-ink); }
.badge-out { left: auto; right: 0; background: var(--panel-2); color: var(--muted); }
.card-body { padding: .9rem 1rem 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-title { margin: 0; font-size: 1.02rem; font-weight: 550; line-height: 1.3; text-wrap: pretty; }
.price-row { display: flex; align-items: baseline; gap: .6rem; margin-top: auto; flex-wrap: wrap; }
.price { font: 700 1.35rem/1 var(--font); font-variation-settings: "wdth" 112; letter-spacing: -.01em; color: #fff; font-variant-numeric: tabular-nums; }
.old-price { color: var(--dim); text-decoration: line-through; font-size: .9rem; font-variant-numeric: tabular-nums; }
.price-row.big .price { font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -.02em; }
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); border: 1px solid var(--line); margin: 1rem 0 3rem; }
.empty p { margin: 0 0 1.2rem; font-size: 1.05rem; }

/* Destacados: láminas más grandes */
.grid-featured { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-featured .card-title { font-size: 1.1rem; }
.grid-featured .price { font-size: 1.55rem; }

/* ---------- Ficha de producto */
.product-page { padding: 1.6rem 0 1rem; }
.crumbs { color: var(--muted); font-size: .92rem; margin-bottom: 1.6rem; }
.crumbs a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: color .18s var(--ease), text-decoration-color .18s var(--ease); }
.crumbs a:hover { color: var(--neon-hi); text-decoration-color: var(--neon); }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.gallery-main { position: relative; border: 1px solid var(--line); background: var(--bg-2); }
.gallery-main img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.gallery-main .placeholder svg { width: 30%; height: 30%; }
.thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.thumb { width: 76px; height: 76px; flex-shrink: 0; border: 1px solid var(--line-2); padding: 0; background: none; cursor: pointer; transition: border-color .18s var(--ease); }
.thumb:hover { border-color: var(--neon-line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border: 2px solid var(--neon); }
.product-info { padding-top: .25rem; }
.ref-lg { margin: 0 0 .9rem; font-size: .8rem; color: var(--neon-hi); }
.product-info h1 {
  font: 740 clamp(1.9rem, 3.6vw, 2.9rem)/1.04 var(--display); font-variation-settings: "wdth" 115; letter-spacing: -.02em;
  margin: 0 0 1.4rem; text-wrap: balance;
}
.product-info .price-row { padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.badge-inline { background: var(--neon); color: var(--neon-ink); font: 700 .8rem/1 var(--font); padding: .35rem .5rem; align-self: center; }
.stock { display: flex; align-items: center; gap: .55rem; font-weight: 550; margin: 1rem 0 1.4rem; font-size: .98rem; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.in { color: var(--ok); }
.stock.out { color: var(--muted); }
.btn-order { width: 100%; max-width: 420px; }
.spec { margin: 2rem 0 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec dt { color: var(--dim); }
.spec dd { margin: 0; }
.desc-title { font: 650 .82rem/1 var(--font); font-variation-settings: "wdth" 115; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 .8rem; }
.desc { color: #d6d1de; max-width: 62ch; line-height: 1.65; }

/* ---------- Pie */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.8rem 0 5.5rem; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 2.5rem; align-items: start; }
.footer-logo { width: 210px; height: auto; margin: -.4rem 0 .5rem -6px; }
.footer-grid p { margin: 0 0 .6rem; }
.footer-links { display: flex; flex-direction: column; gap: .2rem; }
.footer-links a { min-height: 36px; display: inline-flex; align-items: center; background: linear-gradient(var(--neon), var(--neon)) left 82% / 0 1px no-repeat; transition: background-size .3s var(--ease), color .18s var(--ease); }
.footer-links a:hover { color: var(--neon-hi); background-size: 100% 1px; }
.copy { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .84rem; }

.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5); transition: transform .18s var(--ease);
}
.wa-fab:hover { transform: translateY(-2px); }
.wa-fab:active { transform: scale(.95); }
.wa-fab svg { width: 30px; height: 30px; }

/* ---------- Tabletas y celulares */
@media (max-width: 960px) {
  .intro-inner, .product-layout { grid-template-columns: 1fr; }
  .grid-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: .6rem 1rem; padding: .7rem 0; min-height: 0; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .header-wa span { display: none; }
  .header-wa { margin-left: auto; padding: .5rem .75rem; }
  .logo-text { font-size: 1rem; }
  .logo-wave { height: 21px; }
  .intro-inner { padding: 2rem 0 2.2rem; gap: 2rem; }
  .intro h1 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .intro-lead { font-size: 1.02rem; }
  .intro-actions .btn { flex: 1 1 100%; }
  .facts div { padding-right: 1.2rem; margin-right: 1.2rem; }
  .facts .facts-wide { flex-basis: 100%; border-right: 0; }
  .index-list a { min-height: 52px; padding: .7rem 1rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-ref { padding: .7rem .75rem 0; }
  .card-ref .card-cat { display: none; }
  .card-media { margin: .55rem .75rem 0; }
  .card-body { padding: .7rem .75rem .9rem; }
  .card-title { font-size: .94rem; }
  .price { font-size: 1.15rem; }
  .grid-featured .price { font-size: 1.2rem; }
  .grid-featured .card-title { font-size: .94rem; }
  .spec div { grid-template-columns: 7rem 1fr; }
  .btn-order { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Paginación */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; margin: -1rem 0 3rem; }
.pager-num, .pager-btn {
  min-width: 44px; height: 44px; padding: 0 .9rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid var(--line); margin-left: -1px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.pager a:hover { color: #fff; background: var(--neon-soft); }
.pager-num.is-current { color: var(--neon-ink); background: var(--neon); border-color: var(--neon); position: relative; }
.pager-btn.is-disabled { color: var(--dim); opacity: .6; }
.pager-gap { color: var(--dim); padding: 0 .6rem; }
.admin .pager { margin: 1.2rem 0 0; }
@media (max-width: 640px) { .pager-btn { padding: 0 .7rem; } .pager-txt { display: none; } }

/* ---------- Banners de la portada (carrusel + fila) */
.promo { padding: 1.5rem 0 0; }
.promo-top { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); background: var(--bg); }
.promo-top.has-aside { grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); }
.carousel { position: relative; display: flex; flex-direction: column; min-width: 0; }
.car-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; }

/* Un banner: la imagen manda; el texto encima es opcional */
.bn { position: relative; display: block; overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 9; isolation: isolate; }
.bn-media, .bn-media img { display: block; width: 100%; height: 100%; }
.bn-media img { object-fit: cover; transition: transform .9s var(--ease), filter .4s var(--ease); }
a.bn:hover .bn-media img { transform: scale(1.015); filter: brightness(1.05); }
a.bn:focus-visible { outline-offset: -3px; }
.bn.has-text::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 9, 12, .88) 0%, rgba(10, 9, 12, .55) 42%, rgba(10, 9, 12, 0) 72%);
}
.bn-text {
  position: absolute; z-index: 1; left: 0; bottom: 0; max-width: min(34rem, 72%);
  padding: clamp(1.2rem, 3.4vw, 2.6rem); display: flex; flex-direction: column; align-items: flex-start; gap: .7rem;
}
.bn-title {
  margin: 0; font: 760 clamp(1.5rem, 3.3vw, 2.7rem)/1.02 var(--display); font-variation-settings: "wdth" 118;
  letter-spacing: -.02em; color: #fff; text-wrap: balance;
}
.bn-sub { margin: 0; color: #d9d3e2; font-size: clamp(.92rem, 1.3vw, 1.05rem); line-height: 1.5; max-width: 40ch; text-wrap: pretty; }
.bn-cta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: .3rem; padding-bottom: .3rem;
  font: 700 .8rem/1 var(--font); font-variation-settings: "wdth" 112; letter-spacing: .1em; text-transform: uppercase; color: #fff;
  border-bottom: 2px solid var(--neon);
}
.bn-cta svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
a.bn:hover .bn-cta svg { transform: translateX(4px); }

/* Barra de control: pestañas de catálogo; la activa se llena de tinta violeta mientras corre */
.car-bar { display: flex; align-items: stretch; border-top: 1px solid var(--line); min-height: 48px; }
.car-btn {
  flex: 0 0 48px; display: grid; place-items: center; background: transparent; border: 0; color: var(--muted); cursor: pointer;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.car-btn + .car-tabs, .car-tabs + .car-count, .car-count + .car-btn, .car-btn + .car-btn { border-left: 1px solid var(--line); }
.car-btn:hover { color: #fff; background: var(--neon-soft); }
.car-btn:focus-visible, .car-tab:focus-visible { outline-offset: -2px; }
.car-btn svg { width: 20px; height: 20px; }
.car-pause svg { width: 16px; height: 16px; }
.car-pause .i-play, .carousel.is-paused .car-pause .i-pause { display: none; }
.carousel.is-paused .car-pause .i-play { display: block; }
.car-tabs { flex: 1; display: flex; margin: 0; padding: 0; list-style: none; min-width: 0; }
.car-tabs li { flex: 1 1 0; min-width: 0; display: flex; }
.car-tabs li + li { border-left: 1px solid var(--line); }
.car-tab {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; padding: 0 .9rem;
  background: transparent; border: 0; color: var(--dim); cursor: pointer; text-align: left;
  font: 550 .84rem/1.2 var(--font); transition: color .18s var(--ease), background-color .18s var(--ease);
}
.car-tab:hover { color: var(--text); background: var(--bg-2); }
.car-tab[aria-current="true"] { color: #fff; }
.car-tab-num { font: 700 .74rem/1 var(--font); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; color: var(--dim); }
.car-tab[aria-current="true"] .car-tab-num { color: var(--neon-hi); }
.car-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-tab-fill {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--neon);
  transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.car-tab[aria-current="true"] .car-tab-fill { transform: scaleX(1); box-shadow: 0 0 10px rgba(179, 107, 255, .7); }
.carousel.is-running .car-tab[aria-current="true"] .car-tab-fill { animation: car-fill var(--car-time, 6s) linear both; }
.carousel.is-paused .car-tab[aria-current="true"] .car-tab-fill { animation-play-state: paused; }
@keyframes car-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.car-count { display: none; align-items: center; padding: 0 1rem; color: var(--muted); font: 600 .86rem/1 var(--font); font-variant-numeric: tabular-nums; }
.car-count b { color: #fff; }

/* Carrusel a todo el ancho: banner al centro y una imagen a cada lado */
.car-frame { --h: clamp(240px, 44vh, 420px); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); height: var(--h); }
.car-frame > .bn { height: var(--h); aspect-ratio: 16 / 9; border-inline: 1px solid var(--line); }
.wing { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--bg-2); }
.wing-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.wing-product { background: var(--bg); transition: background-color .22s var(--ease); }
.wing-product::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--neon); z-index: 1;
  box-shadow: 0 0 10px rgba(179, 107, 255, .7); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.wing-product:hover { background: var(--bg-2); }
.wing-product:hover::before, .wing-product:focus-visible::before { transform: scaleX(1); }
.wing-product:focus-visible { outline-offset: -2px; }
.wing-media { flex: 1 1 0; min-height: 0; margin: 1rem 1rem 0; overflow: hidden; background: var(--bg-2); display: grid; }
.wing-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.wing:hover img { transform: scale(1.03); }
.wing-media .placeholder svg { width: 40%; height: 40%; }
.wing-body { display: flex; flex-direction: column; gap: .35rem; padding: .8rem 1rem 1rem; }
.wing-name { font-size: .95rem; font-weight: 550; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wing-price { font: 700 1.2rem/1 var(--font); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; color: #fff; }
.wing-empty { background: var(--bg-2); }

.promo-row .bn { aspect-ratio: auto; height: clamp(190px, 30vh, 290px); }
.promo-row .bn-media img { object-fit: contain; }
.promo-row .bn::before {
  content: ""; position: absolute; inset: -60px; z-index: -1; pointer-events: none;
  background: var(--bn-img) center / cover no-repeat; filter: blur(40px) brightness(.4) saturate(1.2);
}

/* Dos destacados junto al carrusel */
.promo-aside { display: grid; border-left: 1px solid var(--line); min-width: 0; }
.promo-aside-set { display: grid; grid-template-columns: 1fr 1fr; grid-area: 1 / 1; min-width: 0; }
.promo-aside-set[hidden] { display: none; }
.promo-aside-set.is-short { grid-template-columns: 1fr; }
@media (prefers-reduced-motion: no-preference) {
  .promo-aside-set { animation: aside-in .5s var(--ease) both; }
}
@keyframes aside-in { from { opacity: 0; transform: translateY(6px); } }
.promo-aside .card { border-bottom: 0; }
.promo-aside .card:last-child { border-right: 0; }
.promo-aside .card-media { aspect-ratio: auto; flex: 1 1 0; min-height: 140px; }
.promo-aside .card-body { flex: 0 0 auto; }

/* Fila de banners debajo del carrusel */
.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.promo-row .bn { border: 1px solid var(--line); }
.promo-row.is-single { grid-template-columns: 1fr; }
.promo-row .bn-title { font-size: clamp(1.3rem, 2.2vw, 1.9rem); }
.promo + .intro .intro-inner { padding-top: clamp(2.5rem, 5vw, 4rem); }

@media (prefers-reduced-motion: no-preference) {
  .promo-top { animation: rise .7s var(--ease) both; }
}
@media (max-width: 960px) {
  .header-wa span { display: none; }
  .header-wa { padding: .5rem .75rem; }
  .car-frame { display: block; height: auto; }
  .car-frame > .bn { height: auto; border-inline: 0; }
  .car-frame > .wing { display: none; }
}
@media (max-width: 1100px) {
  .promo-top.has-aside { grid-template-columns: minmax(0, 1fr); }
  .promo-aside { border-left: 0; border-top: 1px solid var(--line); }
  .promo-aside .card-media { aspect-ratio: 1; flex: none; }
}
@media (max-width: 760px) {
  .car-tab-name { display: none; }
  .car-tab { justify-content: center; padding: 0; }
  .car-tabs { display: none; }
  .car-count { display: flex; margin-right: auto; }
  .car-bar > .car-btn:first-child { order: 0; }
}
@media (max-width: 640px) {
  .promo { padding-top: 1rem; }
  .promo-top { border-inline: 0; margin-inline: 0; width: 100%; }
  .promo-row .bn { aspect-ratio: 16 / 9; height: auto; }
  .promo-row .bn-media img { object-fit: cover; }
  .carousel.has-mobile .bn { aspect-ratio: 4 / 5; }
  .carousel.has-mobile .bn:not(.has-mobile) .bn-media img { object-fit: contain; }
  .bn-text { max-width: 100%; }
  .bn.has-text::after { background: linear-gradient(0deg, rgba(10, 9, 12, .92) 0%, rgba(10, 9, 12, .6) 45%, rgba(10, 9, 12, 0) 80%); }
  .bn-sub { display: none; }
  .carousel.has-mobile .bn-sub { display: block; }
  .promo-row { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
}
