/* =============================================================================
   EscapeCorrecto — styles.css
   Comparativas de escapes de moto · diseño premium, claro por defecto,
   tema oscuro por token, mobile-first.
   Secciones:
     1. Tokens         5. Componentes      9. Comparador
     2. Reset & base   6. Cabecera/nav    10. Ficha de producto
     3. Utilidades     7. Secciones home  11. Guias / articulo
     4. Tipografia     8. Rejillas/cards  12. Responsive + reduced-motion
   ============================================================================= */

/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  color-scheme: dark;

  --bg: #0b0c0f;
  --bg-deep: #08090c;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --surface-3: #22262f;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);

  --text: #e9ebef;
  --muted: #969ca8;
  --faint: #6c7380;

  --accent: #ff6a2b;
  --accent-2: #ffa25c;
  --accent-soft: rgba(255, 106, 43, 0.14);
  --accent-ink: #1a0c03;
  /* --accent-text: version de --accent para TEXTO/iconos/lineas de dato (nunca
     para fondos). En oscuro es igual a --accent (ya tiene contraste de sobra);
     en claro se redefine mas oscura porque el naranja vivo sobre blanco no
     llega al contraste minimo para texto (AA). */
  --accent-text: var(--accent);

  --good: #37cf8b;
  --good-soft: rgba(55, 207, 139, 0.14);
  --warn: #ffce5c;
  --bad: #ff6058;
  --bad-soft: rgba(255, 96, 88, 0.13);

  --radius-xs: 8px;
  --radius-sm: 11px;
  --radius: 15px;
  --radius-lg: 24px;
  --pill: 999px;

  --shadow-sm: 0 2px 10px -4px rgba(0, 0, 0, 0.5);
  --shadow: 0 16px 44px -18px rgba(0, 0, 0, 0.62);
  --shadow-glow: 0 0 0 1px var(--line), 0 20px 60px -24px rgba(255, 106, 43, 0.35);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Consolas", monospace;

  --maxw: 1200px;
  --maxw-narrow: 760px;
  --gutter: clamp(1rem, 4.2vw, 2.6rem);
  --header-h: 66px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f5f5f2;
  --bg-deep: #ecece8;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --surface-3: #ececeb;
  --line: rgba(15, 18, 26, 0.12);
  --line-strong: rgba(15, 18, 26, 0.24);

  --text: #15181e;
  --muted: #59606d;
  --faint: #6b7280;

  --accent-soft: rgba(255, 106, 43, 0.12);
  --accent-ink: #1a0c03;
  --accent-text: #c2410c;
  --good-soft: rgba(29, 165, 105, 0.14);
  --good: #15803d;
  --warn: #b8860b;
  --bad: #c8332c;
  --bad-soft: rgba(214, 59, 51, 0.1);

  --shadow-sm: 0 2px 10px -5px rgba(20, 22, 40, 0.22);
  --shadow: 0 18px 44px -22px rgba(20, 22, 40, 0.28);
  --shadow-glow: 0 0 0 1px var(--line), 0 20px 55px -26px rgba(255, 106, 43, 0.4);
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
body::before {
  /* halo de calor sutil, no intrusivo */
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 60vh;
  background: radial-gradient(60% 60% at 70% 0%, var(--accent-soft), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 5px;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* =============================================================
   3. UTILIDADES
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: var(--maxw-narrow); }
.section { position: relative; z-index: 1; padding-block: clamp(3rem, 8vw, 6rem); }
.section.tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: 0.6rem 1rem; background: var(--accent); color: var(--accent-ink);
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.text-muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); }
.stack > * + * { margin-top: 1rem; }

/* =============================================================
   4. TIPOGRAFIA
   ============================================================= */
h1, .h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); overflow-wrap: break-word; }
h2, .h2 { font-size: clamp(1.55rem, 3.6vw, 2.35rem); }
h3, .h3 { font-size: clamp(1.18rem, 2.2vw, 1.45rem); }
h4 { font-size: 1.02rem; }
.section-head { max-width: 62ch; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
/* Titulos de pagina dentro de secciones: mas contenidos que el h1 del hero */
.section-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.section-head h2 { margin-top: 0.6rem; }
.section-head p { margin-top: 0.7rem; color: var(--muted); }

/* =============================================================
   5. COMPONENTES
   ============================================================= */

/* --- Botones --- */
.btn {
  --_bg: var(--surface-2);
  --_fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.3rem;
  border-radius: var(--pill);
  background: var(--_bg);
  color: var(--_fg);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border: 1px solid var(--line-strong);
  transition: transform 0.35s var(--ease-out), background 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  --_bg: linear-gradient(180deg, var(--accent-2), var(--accent));
  --_fg: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 10px 26px -10px rgba(255, 106, 43, 0.6);
}
.btn-primary:hover { box-shadow: 0 16px 34px -10px rgba(255, 106, 43, 0.72); }
.btn-ghost { --_bg: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { --_bg: var(--surface-2); border-color: var(--accent); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1rem; }

/* --- Chips / etiquetas --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.chip svg { width: 0.95em; height: 0.95em; flex: none; }
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.chip-good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.chip-bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.chip-ejemplo {
  background: repeating-linear-gradient(-45deg, var(--warn) 0 8px, transparent 8px 16px);
  color: var(--text);
  border: 1px solid var(--warn);
  backdrop-filter: blur(2px);
}
:root[data-theme="light"] .chip-ejemplo { background: rgba(255, 206, 92, 0.28); }

/* --- Estrellas --- */
.stars { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; color: var(--muted); }
.stars-ico {
  --_pct: 0%;
  position: relative;
  display: inline-block;
  font-family: var(--sans);
  letter-spacing: 2px;
  color: var(--line-strong);
}
.stars-ico::before { content: "★★★★★"; }
.stars-ico::after {
  content: "★★★★★";
  position: absolute;
  inset: 0;
  width: var(--_pct);
  overflow: hidden;
  color: var(--warn);
}

/* --- Precio --- */
.precio { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.precio-actual { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.precio-antes { color: var(--faint); text-decoration: line-through; font-size: 0.95rem; }
.precio-nota { width: 100%; font-size: 0.76rem; color: var(--faint); }
.precio-off {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
}

/* --- Barras de puntuacion (heat meter) --- */
.scorebar { display: grid; gap: 0.55rem; }
.scorebar-row { display: grid; grid-template-columns: 8.5rem 1fr 2rem; align-items: center; gap: 0.7rem; }
.scorebar-row .lbl { font-size: 0.82rem; color: var(--muted); }
.scorebar-row .track {
  height: 8px;
  border-radius: var(--pill);
  background: var(--surface-3);
  overflow: hidden;
}
.scorebar-row .fill {
  height: 100%;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: calc(var(--v, 0) * 10%);
  transition: width 0.9s var(--ease-out);
}
.scorebar-row .val { font-family: var(--mono); font-size: 0.85rem; text-align: right; color: var(--text); }

/* --- Radar (SVG generado por el build; JS lo anima) --- */
.radar-wrap { display: flex; justify-content: center; }
.radar {
  width: 100%;
  max-width: 340px;
  height: auto;
  overflow: visible;
}
.radar .grid-line { stroke: var(--line); fill: none; }
.radar .axis-line { stroke: var(--line); }
.radar .axis-label { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.radar .poly {
  fill: var(--accent-soft);
  stroke: var(--accent-text);
  stroke-width: 2;
  stroke-linejoin: round;
}
.radar .dot { fill: var(--accent-text); }
.radar-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 0.9rem; font-size: 0.8rem; }
.radar-legend span { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.radar-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* --- Aviso de afiliados --- */
.aviso-afiliados {
  font-size: 0.8rem;
  color: var(--faint);
  line-height: 1.6;
  border-left: 2px solid var(--line-strong);
  padding-left: 0.9rem;
}

/* --- Breadcrumb --- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.45rem; font-size: 0.82rem; color: var(--faint); margin-bottom: 1.4rem; }
.breadcrumb a:hover { color: var(--accent-text); }
.breadcrumb span.sep { color: var(--line-strong); }

/* --- Callout / nota --- */
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.callout strong { color: var(--text); }

/* =============================================================
   6. CABECERA / NAV
   ============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
@supports (backdrop-filter: blur(12px)) {
  .site-header { backdrop-filter: blur(14px) saturate(160%); background: color-mix(in srgb, var(--bg) 66%, transparent); }
}
.site-header.is-stuck {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 9px;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand b { color: var(--accent-text); }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.is-active { color: var(--text); }
.nav-links a.nav-cta,
.nav-links a.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.nav-actions { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* menu movil */
.nav-drawer {
  position: fixed;
  inset: var(--header-h) 0 0 auto;
  width: min(84vw, 340px);
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: 1.4rem var(--gutter) 2rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out);
  z-index: 99;
  overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  color: var(--text);
}
.nav-scrim {
  position: fixed; inset: 0; z-index: 98;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.nav-scrim.is-open { opacity: 1; pointer-events: auto; }

/* buscador de cabecera */
.search-scrim {
  position: fixed; inset: 0; z-index: 98;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.search-scrim.is-open { opacity: 1; pointer-events: auto; }
.search-panel {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.search-panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.search-panel__inner { padding-block: 1.2rem 1.6rem; }
.search-box {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 0.6rem 0.8rem; background: var(--surface-2);
}
.search-box svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.search-box input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font: inherit; font-size: 0.98rem; color: var(--text);
}
.search-box input::placeholder { color: var(--faint); }
.search-box .icon-btn { border: none; }
.search-results { margin-top: 1rem; display: grid; gap: 1.2rem; }
.search-results:empty { margin-top: 0; }
.search-group h4 {
  font-family: var(--display); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.5rem;
}
.search-result {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.4rem; border-radius: 10px; color: var(--text);
}
.search-result:hover, .search-result:focus-visible { background: var(--surface-3); }
.search-result img { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: var(--surface-2); flex: none; }
.search-result__name { font-size: 0.9rem; line-height: 1.3; }
.search-result__meta { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 0.1rem; }
.search-empty { color: var(--muted); font-size: 0.88rem; padding: 0.4rem; }

/* =============================================================
   7. SECCIONES HOME
   ============================================================= */
.hero {
  position: relative; z-index: 1; overflow: hidden;
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
}
.hero::after {
  /* textura sutil tipo lineas de un escape / cordon de soldadura -- 100%
     generada, sin fotos ni video, para no fingir material que no tenemos */
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, color-mix(in srgb, var(--accent) 10%, transparent) 0 2px, transparent 2px 38px),
    repeating-linear-gradient(115deg, color-mix(in srgb, var(--accent) 5%, transparent) 0 1px, transparent 1px 13px);
  -webkit-mask-image: radial-gradient(130% 95% at 78% 8%, #000 25%, transparent 72%);
  mask-image: radial-gradient(130% 95% at 78% 8%, #000 25%, transparent 72%);
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero h1 { margin-top: 1rem; }
.hero h1 .accent { color: var(--accent-text); }
.hero p.lead { margin-top: 1.1rem; max-width: 46ch; }
.hero-cta { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-stats { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1.8rem; }
.hero-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-stat .n { font-family: var(--display); font-size: 1.6rem; font-weight: 600; line-height: 1; color: var(--accent-text); }
.hero-stat .l { font-size: 0.82rem; color: var(--faint); }
.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.hero-visual .radar { max-width: 100%; }
.hero-visual .tag-float {
  position: absolute;
  top: -0.85rem; left: 1.4rem; right: 1.4rem;
  display: flex;
}
.hero-visual .tag-float .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }


/* cinta de marcas en movimiento */
.brand-ticker {
  position: relative; z-index: 1; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand-ticker__track {
  display: flex; width: max-content; gap: 3rem;
  padding-block: 0.9rem;
  animation: brandTicker 30s linear infinite;
}
.brand-ticker__track span {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  color: var(--muted); white-space: nowrap; opacity: 0.8;
}
@keyframes brandTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-ticker__track { animation: none; }
}

.trust-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust-cell { background: var(--surface); padding: 1.3rem; }
.trust-cell h4 { display: flex; gap: 0.5rem; align-items: center; }
.trust-cell h4 svg { width: 1.1em; height: 1.1em; color: var(--accent-text); flex: none; }
.trust-cell p { margin-top: 0.4rem; font-size: 0.86rem; color: var(--muted); }

/* categorias entrada */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.cat-card {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.cat-card .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.cat-card .ico svg { width: 20px; height: 20px; }
.cat-card h3 { font-size: 1.05rem; }
.cat-card p { font-size: 0.83rem; color: var(--muted); }
.cat-card .more { margin-top: auto; font-size: 0.8rem; color: var(--accent-text); font-weight: 600; }

/* =============================================================
   8. REJILLAS / CARDS DE PRODUCTO
   ============================================================= */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.3rem;
}
.prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.prod-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-glow); }
.prod-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: radial-gradient(80% 80% at 50% 30%, var(--surface-3), var(--surface));
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.prod-card__media img, .prod-card__media svg { width: 88%; height: 88%; object-fit: contain; }
.prod-card__badges { position: absolute; top: 0.7rem; left: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem; max-width: 82%; }
.prod-card__fav { position: absolute; top: 0.7rem; right: 0.7rem; }
.prod-card__body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.prod-card__brand { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.prod-card__name { font-size: 1.05rem; line-height: 1.25; }
.prod-card__name a::after { content: ""; position: absolute; inset: 0; }
.prod-card__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.prod-card__verdict { font-size: 0.85rem; color: var(--muted); }
.prod-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.7rem; padding-top: 0.5rem; }
.prod-card__cta { position: relative; z-index: 2; }
.compare-toggle { margin-top: 0.4rem; }
[data-add-compare].is-added {
  border-color: var(--accent); color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.prod-card .mini-scores { display: flex; gap: 0.3rem; }
.prod-card .mini-scores i {
  width: 6px; border-radius: 3px; background: var(--accent);
  height: calc(6px + var(--v, 0) * 2.4px);
  opacity: 0.85;
  align-self: flex-end;
}

/* tira de similares */
.similares-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 1rem; overflow-x: auto; overflow-y: visible; padding-bottom: 0.6rem; scroll-snap-type: x mandatory; }
.similares-row > * { scroll-snap-align: start; }

/* =============================================================
   9. COMPARADOR
   ============================================================= */
.cmp-intro { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; }
.cmp-picker { position: relative; flex: 1; min-width: 260px; }
.cmp-picker input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.cmp-picker input:focus { border-color: var(--accent); outline: none; }
.cmp-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 20;
  max-height: 300px;
  overflow-y: auto;
}
.cmp-results button {
  display: flex; width: 100%; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.cmp-results button:hover { background: var(--surface-2); }
.cmp-results button:disabled { opacity: 0.4; cursor: not-allowed; }
.cmp-results .thumb { width: 34px; height: 34px; flex: none; border-radius: 7px; background: var(--surface-3); object-fit: contain; }
.cmp-results .t { font-size: 0.88rem; }
.cmp-results .s { font-size: 0.74rem; color: var(--faint); }
.cmp-results-note { padding: 0.7rem 0.9rem; font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--line); }

/* aviso flotante (toast) */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; z-index: 200;
  transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg);
  padding: 0.75rem 1.15rem; border-radius: var(--pill);
  font-size: 0.85rem; font-weight: 600; text-align: center;
  max-width: min(90vw, 420px);
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.cmp-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.cmp-radar-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-block: 1.6rem; }
.cmp-radar-panel .radar { max-width: 420px; }
.cmp-radar-overlay .poly { fill: none; stroke-width: 2; }

.cmp-scroll { overflow-x: auto; overflow-y: visible; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp-table thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  z-index: 5;
}
.cmp-table tbody th {
  position: sticky; left: 0;
  background: var(--surface);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--muted);
  z-index: 4;
  min-width: 150px;
}
.cmp-table td { font-size: 0.9rem; }
.cmp-table td.is-best { color: var(--good); font-weight: 700; }
.cmp-table td.is-best::after { content: " ✓"; }
.cmp-col-head { display: flex; flex-direction: column; gap: 0.55rem; min-width: 170px; }
.cmp-col-head .thumb { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--surface-3); border-radius: var(--radius-xs); }
.cmp-col-head .nm { font-family: var(--display); font-size: 0.95rem; line-height: 1.2; }
.cmp-col-head .rm { align-self: flex-start; font-size: 0.75rem; color: var(--faint); }
.cmp-col-head .rm:hover { color: var(--bad); }

/* =============================================================
   10. FICHA DE PRODUCTO
   ============================================================= */
.ficha-top { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.ficha-gallery { position: relative; }
.ficha-gallery__main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: radial-gradient(80% 80% at 50% 25%, var(--surface-3), var(--surface));
  display: grid; place-items: center;
  overflow: hidden;
}
.ficha-gallery__main img, .ficha-gallery__main svg { width: 90%; height: 90%; object-fit: contain; }
.ficha-thumbs { display: flex; gap: 0.6rem; margin-top: 0.7rem; flex-wrap: wrap; }
.ficha-thumbs button {
  width: 68px; height: 54px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--surface-3);
  overflow: hidden;
  transition: border-color 0.2s;
}
.ficha-thumbs button.is-active { border-color: var(--accent); }
.ficha-thumbs img, .ficha-thumbs svg { width: 100%; height: 100%; object-fit: contain; }

.ficha-head .brandline { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.ficha-head h1 { margin-top: 0.5rem; }
.ficha-head .rating-row { margin-top: 0.8rem; display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.ficha-head .chips-row { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ficha-buybox {
  margin-top: 1.4rem;
  padding: 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.ficha-buybox .btn { margin-top: 0.9rem; }
.ficha-buybox .microcopy { margin-top: 0.7rem; font-size: 0.76rem; color: var(--faint); text-align: center; }

/* barra de compra flotante (movil) */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(110%);
  transition: transform 0.3s var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.sticky-buy.is-visible { transform: translateY(0); }
.sticky-buy__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding-block: 0.65rem;
}
.sticky-buy__info { min-width: 0; }
.sticky-buy__info strong { display: block; font-family: var(--display); font-size: 1.02rem; }
.sticky-buy__info span {
  display: block; font-size: 0.72rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sticky-buy .btn { flex: none; }
@media (min-width: 900px) { .sticky-buy { display: none; } }

.ficha-section { margin-top: clamp(2.4rem, 6vw, 3.6rem); }
.ficha-section > h2 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; }
.ficha-section > h2 svg { width: 1.05em; height: 1.05em; color: var(--accent-text); flex: none; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table caption { text-align: left; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); padding: 1rem 0 0.5rem; }
.spec-table th, .spec-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; text-align: left; }
.spec-table th { font-weight: 500; color: var(--muted); width: 46%; }
.spec-table td { font-family: var(--mono); font-size: 0.86rem; }
.spec-extra { margin-top: 1rem; }
.spec-extra summary { cursor: pointer; font-size: 0.88rem; color: var(--accent-text); font-weight: 600; }
.spec-extra table { width: 100%; margin-top: 0.7rem; border-collapse: collapse; }
.spec-extra td { padding: 0.5rem 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.84rem; }

.editorial { max-width: 68ch; }
.editorial p { margin-top: 0.9rem; color: var(--muted); }
.editorial p:first-child { margin-top: 0; }

.proscons { display: grid; gap: 1rem; margin-top: 1.4rem; }
.proscons .col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.15rem 1.25rem; }
.proscons h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.proscons h3 svg { width: 1.15em; height: 1.15em; flex: none; }
.proscons .pros h3 { color: var(--good); }
.proscons .contras h3 { color: var(--bad); }
.proscons ul { list-style: none; margin-top: 0.7rem; display: grid; gap: 0.5rem; }
.proscons li { position: relative; padding-left: 1.3rem; font-size: 0.88rem; color: var(--muted); }
.proscons li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; border-radius: 2px; }
.proscons .pros li::before { background: var(--good); }
.proscons .contras li::before { background: var(--bad); }
.ideal-para { margin-top: 1.3rem; padding: 1rem 1.15rem; background: var(--accent-soft); border-radius: var(--radius-sm); font-size: 0.95rem; }
.ideal-para strong { color: var(--accent-text); }

.reviews { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.15rem; }
.review .rhead { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; }
.review .rhead .who { font-weight: 600; }
.review p { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.reviews-note { margin-top: 0.8rem; font-size: 0.76rem; color: var(--faint); }

/* =============================================================
   11. GUIAS / ARTICULO
   ============================================================= */
.article { max-width: 72ch; margin-inline: auto; }
.article h2 { margin-top: 2.4rem; }
.article h3 { margin-top: 1.6rem; }
.article p { margin-top: 1rem; color: var(--muted); }
.article ul, .article ol { margin-top: 1rem; padding-left: 1.3rem; color: var(--muted); }
.article li { margin-top: 0.4rem; }
.article .pick {
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.3rem;
}
.article .pick .rank { font-family: var(--mono); font-size: 0.76rem; color: var(--accent-text); letter-spacing: 0.1em; }
.article .pick h3 { margin-top: 0.3rem; }
.article .pick .why { margin-top: 0.5rem; font-size: 0.9rem; }
.faq { margin-top: 1rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--display); }
.faq details p { margin-top: 0.6rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin-top: 1.4rem; }
.toc p { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.5rem; }
.toc a { display: block; padding: 0.3rem 0; font-size: 0.9rem; color: var(--muted); }
.toc a:hover { color: var(--accent-text); }

/* filtros de categoria */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1.6rem; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.filter-bar label { font-size: 0.78rem; color: var(--faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.filter-bar select {
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-size: 0.85rem;
}
.filter-bar .count { margin-left: auto; font-size: 0.82rem; color: var(--muted); }

/* Faceted filter panel with explanations */
.filter-panel { margin-bottom: 1.8rem; padding: 1.1rem 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.filter-panel .fp-head { font-family: var(--mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.11em; color: var(--faint); margin-bottom: 1rem; display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.filter-panel .fp-head .count { color: var(--accent-text); }
.fp-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem 1.4rem; }
.fgroup { display: flex; flex-direction: column; gap: 0.4rem; }
.fgroup .fg-t { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.fgroup select { padding: 0.55rem 0.7rem; border-radius: var(--radius-xs); background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 0.86rem; width: 100%; color: var(--text); }
.fgroup .fg-h { font-size: 0.78rem; line-height: 1.45; color: var(--muted); margin: 0; }
.fgroup .fg-h:empty { display: none; }

/* "¿No sabes cuál elegir?" helper */
.chooser-help { margin-bottom: 1.6rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); }
.chooser-help h3 { font-size: 1rem; margin: 0 0 0.7rem; }
.chooser-help ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.chooser-help li { font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.chooser-help li b { color: var(--text); font-weight: 600; }

/* Model picker on the home */
.picker-card {
  margin-top: 2rem;
  padding: 1.3rem 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.picker-card__label {
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--faint); margin-bottom: 0.9rem;
}
.model-picker { display: grid; gap: 0.7rem; }
.model-picker select {
  padding: 0.85rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--line-strong); font-size: 1rem; color: var(--text); width: 100%;
}
.model-picker select:disabled { opacity: 0.5; }
.model-picker .btn { width: 100%; padding-block: 1rem; font-size: 1rem; }
@media (min-width: 620px) {
  .model-picker { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
  .model-picker .btn { width: auto; }
}

/* Model lists grouped by brand */
.by-brand .brand-row-title { font-family: var(--mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--accent-text); margin: 1.8rem 0 0.7rem; }
.by-brand .brand-row-title:first-child { margin-top: 0; }
.by-brand .cat-grid { margin-bottom: 0.4rem; }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--bg-deep); margin-top: clamp(3rem, 8vw, 6rem); }
.footer-grid { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
.footer-brand p { margin-top: 0.8rem; font-size: 0.86rem; color: var(--muted); max-width: 38ch; }
.footer-col h4 { font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.8rem; }
.footer-col a { display: block; padding: 0.3rem 0; font-size: 0.88rem; color: var(--muted); }
.footer-col a:hover { color: var(--accent-text); }
.footer-legal { border-top: 1px solid var(--line); padding-block: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.78rem; color: var(--faint); }
.footer-disclosure { padding-bottom: 1.6rem; }

/* =============================================================
   REVEAL (no intrusivo)
   ============================================================= */
/* La entrada es SOLO un adorno: el estado en reposo siempre es visible.
   Sin fill-mode ni opacity:0 de base, asi que si la animacion no llega a
   ejecutarse (pestaña en 2º plano, sin compositar) el contenido se ve igual. */
.reveal { opacity: 1; transform: none; }
.js .reveal { animation: revealUp 0.6s var(--ease-out) 0.05s; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

/* =============================================================
   12. RESPONSIVE
   ============================================================= */
@media (min-width: 720px) {
  .proscons { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .ficha-buybox .btn { max-width: none; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .hero-grid.hero-grid--solo { grid-template-columns: 1fr; max-width: 62ch; }
  .ficha-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ficha-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
  .ficha-aside { position: sticky; top: calc(var(--header-h) + 1.2rem); }
}
@media (max-width: 899px) {
  .nav-links, .nav-actions .icon-btn.theme-only-desktop { display: none; }
  .nav-toggle { display: grid; }
}
@media (min-width: 1100px) {
  .spec-columns { columns: 2; column-gap: 2.5rem; }
  .spec-columns > * { break-inside: avoid; }
}

/* =============================================================
   REDUCED MOTION — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; animation: none; }
  body::before { opacity: 0.4; }
  .scorebar-row .fill { transition: none; }
}
