/* =============================================================
   CafeMatch · styles.css
   Comparador premium de cafeteras · diseño editorial de especialidad
   1. Tokens   2. Reset/base   3. Utils   4. Tipografía
   5. Componentes   6. Secciones   7. Comparador   8. Ficha
   9. Efectos   10. Responsive   11. Reduced-motion
   ============================================================= */

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  --cream:      #f6f1e9;
  --paper:      #fffefb;
  --paper-2:    #f1e9dc;
  --ink:        #241811;
  --ink-soft:   #5f4d3d;
  --ink-faint:  #8a7a68;
  --line:       #e4d8c5;
  --line-soft:  #eee5d6;
  --espresso:   #241812;
  --espresso-2: #2f2018;
  --accent:     #a76a37;
  --accent-hi:  #bd7d45;
  --accent-ink: #fffdf9;
  --gold:       #c19a4d;
  --good:       #3c7a58;
  --good-bg:    #e8f1ea;
  --bad:        #b04a3a;
  --bad-bg:     #f6e7e3;

  --shadow-sm: 0 1px 2px rgba(45,28,16,.06), 0 2px 8px rgba(45,28,16,.05);
  --shadow-md: 0 4px 12px rgba(45,28,16,.09), 0 12px 34px rgba(45,28,16,.08);
  --shadow-lg: 0 10px 30px rgba(45,28,16,.13), 0 30px 70px rgba(45,28,16,.12);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --gutter: clamp(1.1rem, 4vw, 3rem);
  --maxw: 1220px;
  --nav-h: 68px;

  --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);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream:      #161009;
    --paper:      #1f1710;
    --paper-2:    #271d15;
    --ink:        #f3eadd;
    --ink-soft:   #c3b19c;
    --ink-faint:  #96856f;
    --line:       #372a1e;
    --line-soft:  #2c2117;
    --espresso:   #100b07;
    --espresso-2: #1a120c;
    --accent:     #cf9059;
    --accent-hi:  #dc9d64;
    --accent-ink: #17100a;
    --gold:       #d3ac5e;
    --good:       #5aa37c;
    --good-bg:    #1c2a22;
    --bad:        #d0715f;
    --bad-bg:     #2c1d19;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.4);
  }
}

[data-theme="dark"] {
  --cream:      #161009;
  --paper:      #1f1710;
  --paper-2:    #271d15;
  --ink:        #f3eadd;
  --ink-soft:   #c3b19c;
  --ink-faint:  #96856f;
  --line:       #372a1e;
  --line-soft:  #2c2117;
  --espresso:   #100b07;
  --espresso-2: #1a120c;
  --accent:     #cf9059;
  --accent-hi:  #dc9d64;
  --accent-ink: #17100a;
  --gold:       #d3ac5e;
  --good:       #5aa37c;
  --good-bg:    #1c2a22;
  --bad:        #d0715f;
  --bad-bg:     #2c1d19;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.4);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.018em; font-family: var(--serif); font-weight: 460; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--cream);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   3. UTILITIES
   ============================================================ */
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
.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;
}
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 650; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: .6rem; }
.section { padding-block: clamp(3.4rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.divider { height: 1px; background: var(--line); border: 0; }

/* ============================================================
   4. TIPOGRAFÍA
   ============================================================ */
h1, .h1 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); }
h2, .h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3, .h3 { font-size: clamp(1.22rem, 2vw, 1.5rem); }
h4, .h4 { font-size: 1.04rem; font-family: var(--sans); font-weight: 680; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.06rem, 1.7vw, 1.25rem); color: var(--ink-soft); line-height: 1.6; }
.prose p { margin-top: 1rem; }
.prose h2 { margin-top: 2.4rem; margin-bottom: .5rem; }
.prose h3 { margin-top: 1.8rem; margin-bottom: .3rem; }
.prose ul, .prose ol { margin: 1rem 0 1rem 1.2rem; }
.prose li { margin-top: .35rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 680; color: var(--ink); }

/* ============================================================
   5. COMPONENTES
   ============================================================ */

/* --- Botones --- */
.btn {
  --bg: var(--ink); --fg: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.4rem; border-radius: 999px;
  font-weight: 620; font-size: .95rem; letter-spacing: -0.01em;
  background: var(--bg); color: var(--fg);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .25s;
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { --bg: var(--accent); --fg: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-amazon { --bg: var(--accent); --fg: var(--accent-ink); width: 100%; padding-block: .95rem; font-size: 1rem; }
.btn-amazon:hover { background: var(--accent-hi); }
.btn-ghost {
  --bg: transparent; --fg: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn-sm { padding: .55rem 1rem; font-size: .86rem; }
.btn-block { display: flex; width: 100%; }

/* --- Chips / etiquetas --- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px;
  font-size: .76rem; font-weight: 600; letter-spacing: .01em;
  background: var(--paper-2); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.chip svg { width: 1em; height: 1em; flex: none; }
.chip-accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 26%, transparent); }
.chip-good { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.chip-deal { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); font-weight: 700; }

/* --- Rating estrellas --- */
.stars { --pct: 0%; display: inline-block; position: relative; font-size: .95rem; line-height: 1; letter-spacing: .12em; color: var(--line); }
.stars::before { content: "★★★★★"; }
.stars::after {
  content: "★★★★★"; position: absolute; inset: 0;
  width: var(--pct); overflow: hidden; color: var(--gold); white-space: nowrap;
}
.rating-row { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ink-soft); }

/* --- Puntuación / score badge --- */
.score-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 62px; height: 62px; border-radius: 16px; flex: none;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--serif); line-height: 1; box-shadow: var(--shadow-sm);
}
.score-badge b { font-size: 1.32rem; font-weight: 600; }
.score-badge span { font-size: .55rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; font-family: var(--sans); margin-top: 3px; font-weight: 600; }
.score-badge.is-lg { width: 84px; height: 84px; border-radius: 20px; }
.score-badge.is-lg b { font-size: 1.9rem; }
.verdict { font-family: var(--sans); font-weight: 640; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }

/* --- Tarjeta de producto --- */
.card-grid {
  display: grid; gap: clamp(1rem, 2.4vw, 1.7rem);
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pcard-media {
  position: relative; aspect-ratio: 4 / 3; background: #f4efe6;
  display: grid; place-items: center; padding: 1.2rem;
}
.pcard-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease-out); }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-flags { position: absolute; top: .7rem; left: .7rem; display: flex; flex-wrap: wrap; gap: .35rem; z-index: 2; }
.pcard-score { position: absolute; top: .7rem; right: .7rem; z-index: 2; box-shadow: var(--shadow-sm); }
.pcard-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.15rem 1.25rem; flex: 1; }
.pcard-brand { font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.pcard-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 480; letter-spacing: -0.01em; line-height: 1.22; }
.pcard-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: .3rem .5rem; font-size: .8rem; color: var(--ink-soft); }
.pcard-price { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; padding-top: .5rem; }
.pcard-price .now { font-size: 1.15rem; font-weight: 720; font-family: var(--sans); letter-spacing: -0.02em; }
.pcard-price .was { font-size: .85rem; color: var(--ink-faint); text-decoration: line-through; }
.pcard-actions { display: flex; gap: .5rem; position: relative; z-index: 2; }
.pcard-actions .btn { flex: 1; }
.pcard-cmp {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  padding: .3rem .1rem;
}
.pcard-cmp input { accent-color: var(--accent); width: 15px; height: 15px; }

/* --- Especificación mini (iconos) --- */
.spec-mini { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink-soft); }
.spec-mini svg { width: 1.1em; height: 1.1em; flex: none; color: var(--accent); }

/* ============================================================
   6. SECCIONES / LAYOUT GLOBAL
   ============================================================ */

/* --- Header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-stuck { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav {
  display: flex; align-items: center; gap: 1.1rem;
  height: var(--nav-h);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 500; font-size: 1.16rem; letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.brand b { font-weight: 560; }
.brand-match { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: .2rem; margin-left: auto; }
.nav-links a {
  padding: .5rem .72rem; border-radius: 9px; font-size: .9rem; font-weight: 520;
  color: var(--ink-soft); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover {
  background: var(--accent); color: var(--accent-ink); font-weight: 640;
  padding-inline: 1rem;
}
.nav-links a.nav-cta .cmp-count {
  background: var(--accent-ink); color: var(--accent);
  border-radius: 999px; padding: 0 .4rem; font-size: .74rem; font-weight: 800; margin-left: .35rem;
}
.nav-toggle, .theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  color: var(--ink-soft); transition: background .2s, color .2s;
}
.nav-toggle:hover, .theme-toggle:hover { background: var(--paper-2); color: var(--ink); }
.nav-toggle { display: none; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: block; }
}

/* --- Menú móvil --- */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 99;
  background: var(--cream);
  padding: 1.4rem var(--gutter) 2.5rem;
  display: flex; flex-direction: column; gap: .3rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
.mobile-menu a { padding: .95rem .4rem; font-size: 1.1rem; font-family: var(--serif); border-bottom: 1px solid var(--line); }
.mobile-menu a.nav-cta { color: var(--accent); }

/* --- Footer --- */
.site-footer {
  background: var(--espresso); color: color-mix(in srgb, var(--cream) 82%, transparent);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  margin-top: clamp(3rem, 8vw, 6rem);
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.6fr repeat(3, 1fr); }
.site-footer h4 { color: var(--cream); font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; opacity: .7; }
.site-footer a { display: block; padding: .28rem 0; font-size: .9rem; color: color-mix(in srgb, var(--cream) 78%, transparent); transition: color .2s; }
.site-footer a:hover { color: var(--accent-hi); }
.site-footer .brand { color: var(--cream); }
.footer-note {
  margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--cream) 16%, transparent);
  font-size: .78rem; line-height: 1.7; color: color-mix(in srgb, var(--cream) 58%, transparent);
  display: flex; flex-direction: column; gap: .5rem;
}

/* --- Aviso de afiliados (inline) --- */
.aff-disclosure {
  font-size: .8rem; line-height: 1.6; color: var(--ink-soft);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: .9rem 1.1rem;
}
.aff-disclosure strong { color: var(--ink); }

/* --- Hero home --- */
.hero { position: relative; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); overflow: hidden; }
.hero-inner { display: grid; gap: clamp(1.6rem, 4vw, 3.2rem); grid-template-columns: 1.05fr .95fr; align-items: center; }
.hero h1 { margin: .8rem 0 1rem; }
.hero .lead { max-width: 42ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.8rem; font-size: .82rem; color: var(--ink-soft); }
.hero-trust b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); font-weight: 500; }
.hero-visual { position: relative; }
.hero-visual .hero-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 1.4rem; transform: rotate(-1.4deg);
}
.hero-visual .hero-card img { border-radius: var(--r-md); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-halo {
  position: absolute; inset: -40% -20% -20% 10%;
  background: radial-gradient(45% 40% at 60% 40%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 72%);
  filter: blur(90px); pointer-events: none; z-index: -1;
}

/* --- Bloque de sección con cabecera --- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.sec-head h2 { margin-top: .5rem; }
.sec-head p { max-width: 46ch; }
.sec-link { font-weight: 620; font-size: .9rem; color: var(--accent); display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.sec-link svg { width: 1em; height: 1em; transition: transform .3s var(--ease-out); }
.sec-link:hover svg { transform: translateX(3px); }

/* --- Grid de categorías / brackets --- */
.cat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat-card {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.3rem 1.3rem 1.4rem; border-radius: var(--r-lg);
  background: var(--paper); border: 1px solid var(--line);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.cat-card .k { font-family: var(--serif); font-size: 1.16rem; }
.cat-card .d { font-size: .84rem; color: var(--ink-soft); }
.cat-card .n { margin-top: .5rem; font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }

/* --- Tira "cómo puntuamos" --- */
.method-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.method-item { padding: 1.2rem; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); }
.method-item .num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); }
.method-item h4 { margin: .3rem 0; }
.method-item p { font-size: .86rem; color: var(--ink-soft); }

/* --- FAQ --- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--serif); font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); transition: transform .3s var(--ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1.2rem; color: var(--ink-soft); max-width: 68ch; }

/* ============================================================
   7. COMPARADOR
   ============================================================ */
.cmp-picker { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem; }
.cmp-search { position: relative; }
.cmp-search input {
  width: 100%; padding: .85rem 1rem .85rem 2.6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--cream); color: var(--ink); font: inherit;
}
.cmp-search svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-faint); }
.cmp-results { margin-top: .8rem; display: flex; flex-direction: column; gap: .2rem; max-height: 320px; overflow-y: auto; }
.cmp-result {
  display: flex; align-items: center; gap: .8rem; padding: .55rem; border-radius: 10px;
  text-align: left; width: 100%; transition: background .2s;
}
.cmp-result:hover { background: var(--paper-2); }
.cmp-result img { width: 46px; height: 46px; object-fit: contain; background: #f4efe6; border-radius: 8px; flex: none; }
.cmp-result .r-name { font-size: .9rem; font-weight: 560; }
.cmp-result .r-meta { font-size: .76rem; color: var(--ink-soft); }
.cmp-result[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.cmp-slots { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.cmp-slot {
  position: relative; width: 128px; padding: .7rem; border-radius: var(--r-md);
  background: var(--paper); border: 1px dashed var(--line); text-align: center;
}
.cmp-slot.is-filled { border-style: solid; }
.cmp-slot img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: .4rem; }
.cmp-slot .s-name { font-size: .74rem; font-weight: 600; line-height: 1.2; }
.cmp-slot .s-empty { font-size: .78rem; color: var(--ink-faint); padding: 1.5rem 0; }
.cmp-remove {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 999px;
  background: var(--ink); color: var(--cream); font-size: .9rem; line-height: 22px; z-index: 3;
  box-shadow: var(--shadow-sm);
}

.cmp-table-wrap { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--r-lg); -webkit-overflow-scrolling: touch; }
table.cmp-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .88rem; }
.cmp-table th, .cmp-table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cmp-table thead th {
  position: sticky; top: 0; background: var(--paper); z-index: 2;
  border-bottom: 2px solid var(--line); vertical-align: bottom;
}
.cmp-table thead .th-prod { min-width: 180px; }
.cmp-table thead img { width: 74px; height: 74px; object-fit: contain; background: #f4efe6; border-radius: 8px; margin-bottom: .4rem; }
.cmp-table tbody th {
  position: sticky; left: 0; background: var(--paper); z-index: 1;
  font-weight: 600; color: var(--ink-soft); min-width: 150px;
}
.cmp-table .row-group td, .cmp-table .row-group th {
  background: var(--paper-2); font-family: var(--sans); font-weight: 700;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}
.cmp-table td.is-best { background: var(--good-bg); font-weight: 680; color: var(--good); }
.cmp-table td.is-best::after { content: " ●"; font-size: .7em; vertical-align: middle; }
.cmp-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }

.radar-wrap { display: grid; place-items: center; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); margin-top: 2rem; }
.radar-legend { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; justify-content: center; margin-top: 1rem; font-size: .82rem; }
.radar-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.radar-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
svg.radar text { font-family: var(--sans); fill: var(--ink-soft); }
svg.radar .grid-line { stroke: var(--line); fill: none; }
svg.radar .axis-line { stroke: var(--line); }

/* ============================================================
   8. FICHA DE PRODUCTO
   ============================================================ */
.ficha-top { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr 1fr; align-items: start; padding-top: 2rem; }
.gallery-main {
  aspect-ratio: 1; background: #f4efe6; border: 1px solid var(--line);
  border-radius: var(--r-lg); display: grid; place-items: center; padding: 1.8rem;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .7rem; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 62px; height: 62px; border-radius: 10px; padding: .3rem;
  background: #f4efe6; border: 1px solid var(--line);
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.ficha-head .brand-line { font-size: .78rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.ficha-head h1 { margin: .4rem 0 .7rem; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.ficha-head .rating-row { margin-bottom: 1rem; }
.ficha-score-line { display: flex; align-items: center; gap: 1rem; margin: 1.1rem 0; }
.ficha-price {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  margin: 1rem 0 .3rem;
}
.ficha-price .now { font-size: 1.7rem; font-weight: 760; letter-spacing: -0.02em; }
.ficha-price .was { font-size: 1rem; color: var(--ink-faint); text-decoration: line-through; }
.ficha-price .off { font-size: .8rem; font-weight: 700; color: var(--bad); background: var(--bad-bg); padding: .2rem .5rem; border-radius: 6px; }
.price-note { font-size: .76rem; color: var(--ink-faint); margin-bottom: 1rem; }
.ficha-cta { display: flex; flex-direction: column; gap: .6rem; }
.ficha-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .9rem; margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }

.ficha-section { padding-top: clamp(2.4rem, 5vw, 3.6rem); }
.ficha-section > h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 1.1rem; }

.score-bars { display: grid; gap: .55rem; }
.score-bar { display: grid; grid-template-columns: 145px 1fr 34px; align-items: center; gap: .8rem; font-size: .86rem; }
.score-bar .track { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.score-bar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.score-bar b { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.score-summary { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 1.5rem; }

table.spec-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.spec-table tr { border-bottom: 1px solid var(--line-soft); }
.spec-table th { text-align: left; padding: .7rem 1rem .7rem 0; color: var(--ink-soft); font-weight: 560; width: 44%; }
.spec-table td { padding: .7rem 0; font-weight: 520; }
.spec-table .spec-group td {
  font-family: var(--sans); font-weight: 700; font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); padding-top: 1.3rem;
}
.specs-extra { margin-top: 1rem; }
.specs-extra summary { cursor: pointer; font-weight: 620; color: var(--accent); padding: .5rem 0; }

.pros-cons { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
.pc-col { padding: 1.3rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); }
.pc-col h3 { font-family: var(--sans); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.pc-col h3 svg { width: 1.15em; height: 1.15em; flex: none; }
.pc-col.pros h3 { color: var(--good); }
.pc-col.cons h3 { color: var(--bad); }
.pc-col ul { list-style: none; display: grid; gap: .55rem; }
.pc-col li { position: relative; padding-left: 1.4rem; font-size: .9rem; }
.pc-col li::before { position: absolute; left: 0; top: .05em; font-weight: 700; }
.pc-col.pros li::before { content: "＋"; color: var(--good); }
.pc-col.cons li::before { content: "－"; color: var(--bad); }

.audience { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-top: 1.3rem; }
.audience div { padding: 1.1rem 1.2rem; border-radius: var(--r-md); background: var(--paper-2); }
.audience h4 { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.audience p { font-size: .9rem; color: var(--ink-soft); }

.reviews-summary { padding: 1.2rem; border-left: 3px solid var(--accent); background: var(--paper); border-radius: 0 var(--r-md) var(--r-md) 0; margin-bottom: 1.2rem; font-size: .95rem; }
.review-list { display: grid; gap: 1rem; }
.review {
  padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
}
.review-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); margin-bottom: .4rem; }
.review-meta .who { font-weight: 640; color: var(--ink); }
.review-verified { display: inline-flex; align-items: center; gap: .25rem; color: var(--good); font-weight: 600; }
.review-verified svg { width: 1em; height: 1em; flex: none; }
.review p { font-size: .9rem; }
.reviews-note { font-size: .76rem; color: var(--ink-faint); margin-top: .8rem; }

.similars { margin-top: 1.5rem; }

/* --- Sticky buy bar (móvil) --- */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; align-items: center; gap: .8rem;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--cream) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .35s var(--ease-out);
}
.buybar.is-visible { transform: none; }
.buybar .bb-price { font-weight: 760; font-size: 1.05rem; flex: none; }
.buybar .btn { flex: 1; }

/* ============================================================
   9. EFECTOS / REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .06s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .12s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .18s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .24s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .3s; }

.is-ready .hero h1 { animation: rise .9s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ficha-top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .pros-cons, .audience { grid-template-columns: 1fr; }
  .buybar { display: flex; }
  .ficha-quick { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .score-bar { grid-template-columns: 110px 1fr 30px; gap: .5rem; font-size: .8rem; }
  .hero-trust { gap: 1rem; }
  .cmp-slot { width: calc(50% - .4rem); }
  .score-summary { flex-direction: column; align-items: flex-start; gap: .6rem; }
}

/* ============================================================
   11. REDUCED MOTION (solo lo intrusivo)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-ready .hero h1 { animation: none; }
  .hero-halo { display: none; }
  .reveal, .reveal-stagger > * { transition-duration: .001s; }
}
