/* =============================================================================
   PequeProtegido · styles.css
   Elegir bien también es proteger.

   Un solo archivo, organizado por secciones:
     1. Tokens          6. Secciones de página
     2. Reset y base    7. Comparador
     3. Utilidades      8. Recomendador
     4. Tipografía      9. Efectos
     5. Componentes    10. Responsive
                       11. Reduced-motion
   ============================================================================= */

/* =============================================================================
   1. TOKENS
   ============================================================================= */
:root {
  color-scheme: light;
  /* --- Color: petróleo profundo (confianza) + crema cálido + coral (acción) --- */
  --ink:          #12212b;
  --ink-soft:     #4d5f6b;
  --ink-mute:     #788892;
  --bg:           #faf8f5;
  --bg-warm:      #f4efe8;
  --surface:      #ffffff;
  --surface-alt:  #f7f4ef;

  --brand:        #0e5c6f;
  --brand-deep:   #083f4d;
  --brand-mid:    #157a92;
  --brand-soft:   #e4f0f2;
  --brand-tint:   #f1f8f9;

  --accent:       #ef6a35;
  --accent-deep:  #d4541f;
  --accent-soft:  #fdeade;
  --accent-ink:   #ffffff;

  --gold:         #b8912f;
  --gold-soft:    #f8efd6;

  --ok:           #1f7a52;
  --ok-soft:      #e6f4ec;
  --warn:         #9a6a12;
  --warn-soft:    #fdf2dd;
  --no:           #a33a2c;
  --no-soft:      #fbe9e6;

  --line:         #e5ded4;
  --line-soft:    #efeae2;
  --line-strong:  #d4cabb;

  /* --- Tipografía --- */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* --- Medidas --- */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --maxw: 1240px;
  --maxw-narrow: 760px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --nav-h: 68px;

  /* --- Sombras --- */
  --sh-xs: 0 1px 2px rgba(18, 33, 43, .05);
  --sh-sm: 0 2px 8px rgba(18, 33, 43, .06);
  --sh-md: 0 10px 28px -8px rgba(18, 33, 43, .14);
  --sh-lg: 0 24px 56px -16px rgba(18, 33, 43, .22);

  /* --- Easings --- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================================================
   2. RESET Y 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) + 1rem);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -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; }
table { border-collapse: collapse; width: 100%; }
input, select, textarea { font: inherit; color: inherit; }
summary { cursor: pointer; }
::selection { background: var(--brand-soft); color: var(--brand-deep); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================================
   3. UTILIDADES
   ============================================================================= */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: var(--maxw-narrow); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  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: .7rem 1.1rem; background: var(--brand); color: #fff;
  border-radius: 10px; font-weight: 600; box-shadow: var(--sh-md);
}
.skip-link:focus { top: 1rem; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2.2rem, 5vw, 3.5rem); }
.section--warm { background: var(--bg-warm); }
.section--brand { background: var(--brand-tint); }

.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.nowrap { white-space: nowrap; }

/* =============================================================================
   4. TIPOGRAFÍA
   ============================================================================= */
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.015em; font-weight: 600; }

h1 { font-family: var(--serif); font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 600; line-height: 1.05; }
h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.1vw, 1.42rem); font-weight: 650; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; font-weight: 650; }

.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .745rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: .85rem;
}
.kicker::before {
  content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}
.kicker--plain::before { display: none; }

.lead { font-size: clamp(1.03rem, 1.7vw, 1.17rem); color: var(--ink-soft); line-height: 1.7; }
.muted { color: var(--ink-mute); }
.small { font-size: .85rem; }
.tiny { font-size: .775rem; }

.section-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-head.center { margin-inline: auto; }
.section-head p { margin-top: .7rem; }

/* Texto editorial largo (guías, fichas) */
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.05rem; }
.prose h2 { margin-top: 2.6rem; }
.prose h3 { margin-top: 1.9rem; }
.prose h2 + p, .prose h3 + p { margin-top: .75rem; }
.prose p, .prose li { color: var(--ink-soft); line-height: 1.75; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-soft); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .45rem; }
.prose ul li::marker { color: var(--accent); }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: .3rem 0 .3rem 1.1rem;
  font-style: italic; color: var(--ink);
}
.prose table { font-size: .9rem; margin-top: 1.2rem; }
.prose th, .prose td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-alt); font-weight: 650; }

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

/* ---------- 5.1 Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.4rem; border-radius: 100px;
  font-weight: 620; font-size: .94rem; letter-spacing: -.005em;
  transition: transform .25s var(--ease-out), background .25s var(--ease-out),
              box-shadow .25s var(--ease-out), color .25s var(--ease-out),
              border-color .25s var(--ease-out);
  text-align: center; line-height: 1.25; cursor: pointer;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: var(--sh-sm); }
.btn-accent:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.btn-quiet { background: var(--brand-soft); color: var(--brand-deep); }
.btn-quiet:hover { background: var(--brand); color: #fff; }

.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }

/* Botón "Ver en Amazon" — el CTA monetizado */
.btn-amazon {
  background: linear-gradient(135deg, #ff9a3c, #f27121);
  color: #26170b; font-weight: 700; box-shadow: 0 4px 14px -4px rgba(242, 113, 33, .55);
}
.btn-amazon:hover {
  background: linear-gradient(135deg, #ffab57, #e8630f);
  transform: translateY(-2px); box-shadow: 0 8px 22px -6px rgba(242, 113, 33, .6);
}

/* ---------- 5.2 Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .26rem .66rem; border-radius: 100px;
  font-size: .735rem; font-weight: 650; letter-spacing: .01em;
  background: var(--brand-soft); color: var(--brand-deep);
  white-space: nowrap;
}
.badge svg { width: 1em; height: 1em; flex: none; }
.badge--accent { background: var(--accent-soft); color: var(--accent-deep); }
.badge--gold   { background: var(--gold-soft);  color: var(--gold); }
.badge--ok     { background: var(--ok-soft);    color: var(--ok); }
.badge--warn   { background: var(--warn-soft);  color: var(--warn); }
.badge--no     { background: var(--no-soft);    color: var(--no); }
.badge--plain  { background: var(--surface-alt); color: var(--ink-soft); }
.badge--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-soft); }

.badge-row { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- 5.3 Tarjetas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out),
              border-color .3s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--line-strong); }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.5rem); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

/* ---------- 5.4 Tarjeta de producto ---------- */
.p-card { display: flex; flex-direction: column; position: relative; }
.p-card-media {
  position: relative; background: var(--surface-alt);
  aspect-ratio: 4 / 3; overflow: hidden;
}
.p-card-media img {
  width: 100%; height: 100%; object-fit: contain; padding: .9rem;
  transition: transform .5s var(--ease-out);
}
.p-card:hover .p-card-media img { transform: scale(1.055); }

.p-card-flags {
  position: absolute; top: .6rem; left: .6rem; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
}
.p-card-flags .badge { box-shadow: var(--sh-xs); background: rgba(255,255,255,.94); color: var(--brand-deep); backdrop-filter: blur(6px); }
.p-card-flags .badge--gold { background: var(--gold); color: #fff; }

.p-card-body { padding: 1rem 1.05rem 1.1rem; display: flex; flex-direction: column; flex: 1; gap: .55rem; }
.p-card-brand { font-size: .725rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.p-card-name { font-size: 1.02rem; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
.p-card-name a:hover { color: var(--brand); }
.p-card-sub { font-size: .845rem; color: var(--ink-mute); line-height: 1.5; }

.p-card-specs { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .1rem; }
.p-card-specs .badge { font-size: .7rem; padding: .2rem .55rem; }

.p-card-foot { margin-top: auto; padding-top: .8rem; display: flex; flex-direction: column; gap: .6rem; }
.p-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.p-card-actions { display: grid; grid-template-columns: 1fr auto; gap: .45rem; align-items: stretch; }

/* ---------- 5.5 Precio ---------- */
.price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.price-now { font-size: 1.22rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-was { font-size: .88rem; color: var(--ink-mute); text-decoration: line-through; }
.price-off {
  font-size: .715rem; font-weight: 700; padding: .14rem .42rem;
  background: var(--no-soft); color: var(--no); border-radius: 6px;
}
.price-none { font-size: .93rem; font-weight: 600; color: var(--ink-mute); }
.price-note { font-size: .715rem; color: var(--ink-mute); line-height: 1.45; }

/* ---------- 5.6 Estrellas ---------- */
.stars { display: inline-flex; align-items: center; gap: .32rem; font-size: .83rem; color: var(--ink-soft); }
.stars-ico { display: inline-flex; gap: 1px; }
.stars-ico svg { width: 13px; height: 13px; flex: none; color: var(--gold); }
.stars-ico svg.is-empty { color: var(--line-strong); }
.stars b { color: var(--ink); font-weight: 650; }

/* ---------- 5.7 Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 900;
  background: rgba(250, 248, 245, .88);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease-out), background .3s var(--ease-out);
}
@supports (backdrop-filter: blur(14px)) {
  .nav { background: rgba(250, 248, 245, .78); backdrop-filter: blur(14px) saturate(160%); }
}
.nav.is-stuck { box-shadow: var(--sh-sm); }

.nav-inner {
  height: var(--nav-h); display: flex; align-items: center; gap: 1rem;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}

.logo { display: inline-flex; align-items: center; gap: .55rem; flex: none; }
.logo-mark { width: 31px; height: 31px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b {
  font-family: var(--serif); font-size: 1.11rem; font-weight: 600;
  letter-spacing: -.02em; color: var(--ink);
}
.logo-text span { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); font-weight: 650; margin-top: 2px; }

.nav-links { display: none; align-items: center; gap: .15rem; margin-left: auto; }
.nav-links > li { position: relative; }
.nav-links a {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .72rem; border-radius: 9px;
  font-size: .905rem; font-weight: 550; color: var(--ink-soft);
  transition: color .2s var(--ease-out), background .2s var(--ease-out);
}
.nav-links a:hover { color: var(--brand); background: var(--brand-soft); }
.nav-links a[aria-current="page"] { color: var(--brand-deep); font-weight: 650; }
.nav-links svg.caret { width: 11px; height: 11px; opacity: .55; transition: transform .25s var(--ease-out); }
.nav-links li:hover svg.caret, .nav-links li:focus-within svg.caret { transform: rotate(180deg); }

/* El CTA dentro del nav: reafirmamos color y fondo por especificidad (gotcha E.2) */
.nav-links a.nav-cta,
.nav-links a.nav-cta:hover {
  background: var(--accent); color: var(--accent-ink);
  padding: .55rem 1.05rem; font-weight: 650; box-shadow: var(--sh-xs);
}
.nav-links a.nav-cta:hover { background: var(--accent-deep); }
.nav-cta-count {
  display: none; min-width: 18px; height: 18px; padding: 0 4px;
  align-items: center; justify-content: center;
  background: #fff; color: var(--accent-deep);
  border-radius: 100px; font-size: .68rem; font-weight: 800;
}
.nav-cta.has-items .nav-cta-count { display: inline-flex; }

/* Submenú */
.nav-sub {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 5;
  min-width: 248px; padding: .5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--sh-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out), visibility .22s;
  list-style: none;
}
.nav-links li:hover > .nav-sub,
.nav-links li:focus-within > .nav-sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-sub a { display: flex; width: 100%; font-size: .875rem; padding: .48rem .6rem; }
.nav-sub a:hover { background: var(--brand-soft); }

/* Hamburguesa */
.nav-burger {
  margin-left: auto; width: 42px; height: 42px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface);
}
.nav-burger svg { width: 19px; height: 19px; }
.nav-burger:hover { border-color: var(--brand); color: var(--brand); }

/* Drawer móvil */
.drawer {
  position: fixed; inset: 0; z-index: 1000;
  visibility: hidden; pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer-veil {
  position: absolute; inset: 0; background: rgba(18, 33, 43, .42);
  opacity: 0; transition: opacity .32s var(--ease-out);
}
.drawer.is-open .drawer-veil { opacity: 1; }
.drawer-panel {
  position: absolute; inset: 0 0 0 auto; width: min(93vw, 400px);
  background: var(--bg); box-shadow: var(--sh-lg);
  transform: translateX(100%); transition: transform .38s var(--ease-out);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 1rem var(--gutter) 2.5rem;
}
.drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer-top { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); margin-bottom: .5rem; }
.drawer-close {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface);
}
.drawer-close svg { width: 17px; height: 17px; }
.drawer nav ul { list-style: none; padding: 0; }
.drawer nav > ul > li { border-bottom: 1px solid var(--line-soft); }
.drawer nav a {
  display: block; padding: .82rem .2rem; font-size: 1rem; font-weight: 600; color: var(--ink);
}
.drawer nav a:hover { color: var(--brand); }
.drawer-group-title {
  font-size: .715rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); padding: 1.15rem .2rem .4rem;
}
.drawer-sub a { font-size: .915rem !important; font-weight: 500 !important; color: var(--ink-soft) !important; padding: .5rem .2rem !important; }
.drawer-sub a:hover { color: var(--brand) !important; }
.drawer-cta { margin-top: 1.5rem; display: grid; gap: .55rem; }

/* ---------- 5.8 Footer ---------- */
.footer { background: var(--brand-deep); color: #cfe0e4; padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; }
.footer a { color: #cfe0e4; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.footer-brand .logo-text b { color: #fff; }
.footer-brand .logo-text span { color: #7fb3bd; }
.footer-tag { margin-top: .85rem; font-size: .9rem; max-width: 34ch; color: #a8c4ca; line-height: 1.65; }
.footer h4 { color: #fff; font-size: .745rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: .9rem; font-weight: 700; }
.footer ul { list-style: none; padding: 0; display: grid; gap: .5rem; font-size: .895rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-direction: column; gap: .9rem; font-size: .8rem; color: #9ab8bf;
}
.footer-legal-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }

/* Aviso de afiliados (obligatorio) */
.aviso-afiliados {
  font-size: .775rem; line-height: 1.6; color: var(--ink-mute);
  background: var(--surface-alt); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: .85rem 1rem;
}
.aviso-afiliados strong { color: var(--ink-soft); }
.footer .aviso-afiliados {
  background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.12); color: #a8c4ca;
}
.footer .aviso-afiliados strong { color: #d9e7ea; }

/* ---------- 5.9 Breadcrumbs ---------- */
.crumbs { padding-top: 1.1rem; font-size: .8rem; color: var(--ink-mute); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .32rem; }
.crumbs li { display: inline-flex; align-items: center; gap: .32rem; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.crumbs [aria-current] { color: var(--ink-soft); }

/* ---------- 5.10 Tabla de datos ---------- */
.data-table { font-size: .9rem; }
.data-table caption { text-align: left; font-size: .8rem; color: var(--ink-mute); padding-bottom: .6rem; }
.data-table th, .data-table td { padding: .66rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.data-table tbody th { font-weight: 550; color: var(--ink-soft); width: 46%; }
.data-table td { font-weight: 600; font-variant-numeric: tabular-nums; }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table .is-null { color: var(--ink-mute); font-weight: 500; }

.spec-group { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.spec-group + .spec-group { margin-top: 1rem; }
.spec-group > h3 {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--brand-deep); background: var(--brand-tint);
  padding: .72rem 1rem; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .5rem;
}
.spec-group > h3 svg { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- 5.11 Panel / aside ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.1rem, 2.4vw, 1.6rem);
}
.panel--warm { background: var(--surface-alt); }
.panel--brand { background: var(--brand-tint); border-color: var(--brand-soft); }
.panel--accent { background: var(--accent-soft); border-color: #f8d6c2; }
.panel h3 { margin-bottom: .7rem; }

.callout {
  display: flex; gap: .85rem; align-items: flex-start;
  border-radius: var(--radius-sm); padding: .95rem 1.1rem;
  background: var(--brand-tint); border: 1px solid var(--brand-soft);
  font-size: .9rem; line-height: 1.65; color: var(--ink-soft);
}
.callout svg { width: 1.2em; height: 1.2em; flex: none; margin-top: .22em; color: var(--brand); }
.callout strong { color: var(--ink); }
.callout--warn { background: var(--warn-soft); border-color: #f0dcae; }
.callout--warn svg { color: var(--warn); }
.callout--ok { background: var(--ok-soft); border-color: #c3e3d1; }
.callout--ok svg { color: var(--ok); }

/* ---------- 5.12 Pros / contras ---------- */
.pros-cons { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.pc-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--surface); }
.pc-col h3 { font-size: .93rem; display: flex; align-items: center; gap: .45rem; margin-bottom: .75rem; }
.pc-col h3 svg { width: 1.15em; height: 1.15em; flex: none; }
.pc-col ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .9rem; line-height: 1.6; color: var(--ink-soft); }
.pc-col li { display: flex; gap: .55rem; align-items: flex-start; }
.pc-col li svg { width: 1.05em; height: 1.05em; flex: none; margin-top: .3em; }
.pc-pros { background: var(--ok-soft); border-color: #c3e3d1; }
.pc-pros h3, .pc-pros li svg { color: var(--ok); }
.pc-cons { background: var(--no-soft); border-color: #f1cdc6; }
.pc-cons h3, .pc-cons li svg { color: var(--no); }

/* ---------- 5.13 Radar (valoración editorial) ---------- */
.radar-box { display: grid; gap: 1.2rem; align-items: center; grid-template-columns: 1fr; }
.radar-figure { position: relative; margin: 0; width: 100%; max-width: 330px; margin-inline: auto; }
.radar-figure svg { width: 100%; height: auto; overflow: visible; }
.radar-grid-line { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line-strong); stroke-width: 1; }
.radar-label { font-size: 9.4px; font-weight: 600; fill: var(--ink-soft); font-family: var(--sans); }
.radar-label-val { font-size: 9px; font-weight: 700; fill: var(--brand); font-family: var(--sans); }
.radar-tick { font-size: 7.6px; fill: var(--ink-mute); font-family: var(--sans); }
.radar-shape { stroke-width: 2; stroke-linejoin: round; transition: opacity .25s var(--ease-out); }
.radar-dot { stroke: #fff; stroke-width: 1.5; }

.score-list { display: grid; gap: .72rem; }
.score-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: center; }
.score-row .lbl { font-size: .86rem; color: var(--ink-soft); font-weight: 550; }
.score-row .val { font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-bar { grid-column: 1 / -1; height: 6px; background: var(--line-soft); border-radius: 100px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-mid), var(--brand)); border-radius: 100px; }
.score-row.is-null .val { color: var(--ink-mute); font-weight: 500; }

.editorial-note {
  font-size: .775rem; color: var(--ink-mute); line-height: 1.6;
  display: flex; gap: .5rem; align-items: flex-start; margin-top: 1rem;
}
.editorial-note svg { width: 1.05em; height: 1.05em; flex: none; margin-top: .24em; }

/* ---------- 5.14 Galería de ficha ---------- */
.gallery { display: grid; gap: .7rem; }
.gallery-main {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); aspect-ratio: 1 / 1; overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 1.3rem; }
/* Marcador para productos cuya imagen aún no está disponible de una fuente
   autorizada. Nunca se usa la foto de otro modelo para rellenar el hueco. */
.img-pendiente {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .5rem; text-align: center;
  padding: 1.6rem; background: var(--surface-alt); color: var(--ink-mute);
}
.img-pendiente svg { width: 42px; height: 42px; color: var(--line-strong); }
.img-pendiente strong { color: var(--ink-soft); font-size: .92rem; }
.img-pendiente .tiny { max-width: 34ch; line-height: 1.5; }
.gallery-thumbs {
  display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: thin;
  /* `overflow-x:auto` hace que overflow-y también recorte, así que dejamos
     hueco arriba y abajo para el levantamiento de la miniatura al pasar el ratón */
  padding: 4px 0 .45rem;
}
.gallery-thumbs button {
  flex: none; width: 66px; height: 66px; padding: 4px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 11px;
  transition: border-color .22s var(--ease-out), transform .22s var(--ease-out);
}
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs button:hover { border-color: var(--brand-mid); transform: translateY(-2px); }
.gallery-thumbs button.is-active { border-color: var(--brand); border-width: 2px; }

/* ---------- 5.15 Reseñas ---------- */
.reviews { display: grid; gap: .9rem; }
.review {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; background: var(--surface);
}
.review-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: .5rem; }
.review-author { font-weight: 650; font-size: .9rem; }
.review-date { font-size: .775rem; color: var(--ink-mute); }
.review-verified { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 650; color: var(--ok); }
.review-verified svg { width: 1.05em; height: 1.05em; flex: none; }
.review-title { font-weight: 650; font-size: .93rem; margin-bottom: .3rem; }
.review-text { font-size: .885rem; color: var(--ink-soft); line-height: 1.68; }
.review-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review-more { font-size: .8rem; font-weight: 650; color: var(--brand); margin-top: .4rem; }
.review-more:hover { text-decoration: underline; }

/* ---------- 5.16 Filtros ---------- */
.filters { display: grid; gap: .9rem; }
.filter-group { display: grid; gap: .5rem; }
.filter-group > span { font-size: .775rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  padding: .4rem .8rem; border-radius: 100px; font-size: .83rem; font-weight: 550;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-soft);
  transition: all .2s var(--ease-out); cursor: pointer;
}
.chip:hover { border-color: var(--brand-mid); color: var(--brand); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
select.field, input.field {
  padding: .6rem .8rem; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: .9rem; width: 100%;
}
select.field:focus, input.field:focus { border-color: var(--brand); outline: none; }

.result-count { font-size: .875rem; color: var(--ink-mute); }
.result-count b { color: var(--ink); font-weight: 650; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-mute); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 1rem; color: var(--line-strong); }

/* =============================================================================
   6. SECCIONES DE PÁGINA
   ============================================================================= */

/* ---------- 6.1 Hero de inicio ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 50% at 88% 8%, var(--brand-soft), transparent 70%),
    radial-gradient(45% 40% at 4% 92%, var(--accent-soft), transparent 70%),
    var(--bg);
  padding-block: clamp(2.4rem, 5.5vw, 4.5rem) clamp(2.6rem, 6vw, 4.8rem);
}
.hero-grid { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: center; grid-template-columns: 1fr; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-lead { font-size: clamp(1.02rem, 1.9vw, 1.19rem); color: var(--ink-soft); max-width: 46ch; line-height: 1.68; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin-top: 1.7rem; }
.hero-trust li { display: flex; align-items: center; gap: .45rem; font-size: .83rem; color: var(--ink-soft); font-weight: 550; }
.hero-trust svg { width: 1.05em; height: 1.05em; flex: none; color: var(--ok); }
.hero-note { margin-top: 1.1rem; font-size: .775rem; color: var(--ink-mute); max-width: 44ch; }

.hero-visual { position: relative; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--sh-lg);
  padding: 1.15rem; display: grid; gap: .85rem;
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.hero-card-head span { font-size: .715rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.hero-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.hero-mini article {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-alt); transition: transform .3s var(--ease-out), border-color .3s var(--ease-out);
}
.hero-mini article:hover { transform: translateY(-3px); border-color: var(--brand-mid); }
.hero-mini img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: .5rem; background: #fff; }
.hero-mini div { padding: .5rem .6rem .65rem; }
.hero-mini b { display: block; font-size: .775rem; font-weight: 650; line-height: 1.3; }
.hero-mini small { font-size: .7rem; color: var(--ink-mute); }

/* ---------- 6.2 Dos caminos (encontrar / comparar) ---------- */
.paths { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.path-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: .8rem;
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.path-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.path-card .ico {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-deep);
}
.path-card .ico svg { width: 23px; height: 23px; }
.path-card h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
.path-card p { font-size: .925rem; color: var(--ink-soft); line-height: 1.65; }
.path-card ul { list-style: none; padding: 0; display: grid; gap: .4rem; font-size: .85rem; color: var(--ink-soft); }
.path-card li { display: flex; gap: .5rem; align-items: flex-start; }
.path-card li svg { width: 1em; height: 1em; flex: none; margin-top: .33em; color: var(--brand-mid); }
.path-card .btn { margin-top: auto; align-self: flex-start; }
.path-card--accent { background: linear-gradient(170deg, var(--accent-soft), var(--surface) 65%); border-color: #f6d8c6; }
.path-card--accent .ico { background: var(--accent); color: #fff; }

/* ---------- 6.3 Rejilla de categorías ---------- */
.cat-grid { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); }
.cat-card {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .28s var(--ease-out), border-color .28s var(--ease-out), box-shadow .28s var(--ease-out);
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--brand-mid); box-shadow: var(--sh-sm); }
.cat-card .ico {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: .45rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand); flex: none;
}
.cat-card .ico svg { width: 19px; height: 19px; }
.cat-card b { font-size: .92rem; font-weight: 650; line-height: 1.3; }
.cat-card small { font-size: .775rem; color: var(--ink-mute); line-height: 1.5; }
.cat-card .n { margin-top: auto; padding-top: .5rem; font-size: .715rem; font-weight: 650; color: var(--brand); }

/* ---------- 6.4 Pasos / cómo funciona ---------- */
.steps { display: grid; gap: 1.2rem; grid-template-columns: 1fr; counter-reset: step; }
.step { display: flex; gap: .95rem; align-items: flex-start; }
.step-n {
  counter-increment: step; flex: none;
  width: 34px; height: 34px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .89rem;
}
.step-n::before { content: counter(step); }
.step h3 { font-size: 1rem; margin-bottom: .3rem; }
.step p { font-size: .885rem; color: var(--ink-soft); line-height: 1.6; }

/* ---------- 6.5 Cabecera de página interior ---------- */
.page-head { padding-block: clamp(1.6rem, 3.5vw, 2.6rem) clamp(1.4rem, 3vw, 2rem); }
.page-head h1 { margin-bottom: .8rem; }
.page-head .lead { max-width: 62ch; }
.page-head--warm { background: var(--bg-warm); border-bottom: 1px solid var(--line); }

/* ---------- 6.6 Ficha de producto ---------- */
.ficha-top { display: grid; gap: clamp(1.5rem, 3.5vw, 2.6rem); grid-template-columns: 1fr; align-items: start; }
.ficha-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); margin-bottom: .6rem; }
.ficha-brand { font-size: .775rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .45rem; }
.ficha-sub { font-size: .95rem; color: var(--ink-soft); line-height: 1.65; margin-bottom: 1rem; }
.ficha-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; }

.buy-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.1rem; display: grid; gap: .8rem;
  box-shadow: var(--sh-sm);
}
.buy-box .price-row { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.buy-box-actions { display: grid; gap: .5rem; }
.buy-box .trust { display: grid; gap: .35rem; font-size: .78rem; color: var(--ink-mute); }
.buy-box .trust li { display: flex; gap: .45rem; align-items: flex-start; }
.buy-box .trust svg { width: 1em; height: 1em; flex: none; margin-top: .3em; color: var(--brand-mid); }

.quick-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
.qf {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .75rem; background: var(--surface); display: grid; gap: .15rem;
}
.qf span { font-size: .685rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-mute); display: flex; align-items: center; gap: .3rem; }
.qf span svg { width: 1.1em; height: 1.1em; flex: none; color: var(--brand-mid); }
.qf b { font-size: .89rem; font-weight: 650; line-height: 1.35; }
.qf b.is-null { color: var(--ink-mute); font-weight: 500; }

/* Barra de rango de altura */
.range-viz { margin-top: .3rem; }
.range-bar {
  position: relative; height: 32px; border-radius: 100px;
  background: var(--surface-alt); border: 1px solid var(--line); overflow: hidden;
}
.range-fill {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--brand-mid), var(--brand));
  display: flex; align-items: center; justify-content: center;
}
.range-fill b { font-size: .73rem; font-weight: 700; color: #fff; white-space: nowrap; padding-inline: .4rem; }
.range-scale { display: flex; justify-content: space-between; font-size: .68rem; color: var(--ink-mute); margin-top: .25rem; font-variant-numeric: tabular-nums; }

/* Sticky sidebar en escritorio */
.ficha-aside { display: grid; gap: 1rem; }

/* Índice de la ficha. Ojo: en móvil este panel va ENCIMA del contenido, así que
   no debe quedarse fijo (taparía el texto al hacer scroll). Solo pega en escritorio,
   donde es una columna lateral: la regla está en la sección 10. */
.toc { position: static; }
.toc ul { list-style: none; padding: 0; display: grid; gap: .1rem; }
.toc a { display: block; padding: .4rem .6rem; border-radius: 8px; font-size: .855rem; color: var(--ink-soft); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--brand); background: var(--brand-tint); }
.toc a.is-active { color: var(--brand-deep); font-weight: 650; border-left-color: var(--accent); background: var(--brand-tint); }

/* ---------- 6.7 Guías ---------- */
.guide-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.15rem 1.2rem; }
.guide-card .tag { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.guide-card h3 { font-size: 1.04rem; line-height: 1.32; }
.guide-card p { font-size: .875rem; color: var(--ink-soft); line-height: 1.6; }
.guide-card .more { margin-top: auto; padding-top: .7rem; font-size: .82rem; font-weight: 650; color: var(--brand); display: inline-flex; align-items: center; gap: .35rem; }
.guide-card .more svg { width: 1em; height: 1em; transition: transform .25s var(--ease-out); }
.guide-card:hover .more svg { transform: translateX(3px); }

.faq { display: grid; gap: .6rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden;
}
.faq summary {
  padding: .95rem 1.1rem; font-weight: 620; font-size: .945rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(45deg); transition: transform .25s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq .faq-body { padding: .95rem 1.1rem; font-size: .9rem; color: var(--ink-soft); line-height: 1.7; }
.faq .faq-body > * + * { margin-top: .7rem; }

/* ---------- 6.8 Tabla comparativa rápida (en guías/categorías) ---------- */
.table-scroll { overflow-x: auto; overflow-y: visible; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-scroll table { min-width: 680px; font-size: .865rem; }
.table-scroll th, .table-scroll td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.table-scroll thead th { background: var(--surface-alt); font-size: .745rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); position: sticky; top: 0; }
.table-scroll tbody tr:hover { background: var(--brand-tint); }
.table-scroll td.name { white-space: normal; min-width: 180px; font-weight: 620; }
.table-scroll td.name a:hover { color: var(--brand); }

/* =============================================================================
   7. COMPARADOR
   ============================================================================= */
.cmp-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }

/* Selector de productos */
.cmp-picker { display: grid; gap: 1rem; }
.cmp-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 720px) { .cmp-slots { grid-template-columns: repeat(4, 1fr); } }

/* El badge de quitar sobresale: wrapper sin recorte (gotcha E.3) */
.slot-wrap { position: relative; overflow: visible; padding-top: 8px; padding-right: 8px; }
.slot {
  position: relative; border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface); min-height: 128px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; padding: .7rem; text-align: center; width: 100%;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.slot:hover { border-color: var(--brand-mid); background: var(--brand-tint); }
.slot.is-filled { border-style: solid; border-color: var(--line); cursor: default; }
.slot.is-filled:hover { background: var(--surface); }
.slot-img { width: 100%; height: 74px; object-fit: contain; }
.slot-name { font-size: .745rem; font-weight: 650; line-height: 1.3; }
.slot-brand { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.slot-empty-ico { width: 26px; height: 26px; color: var(--line-strong); }
.slot-empty-txt { font-size: .77rem; color: var(--ink-mute); font-weight: 550; }
.slot-remove {
  position: absolute; top: 0; right: 0; z-index: 3;
  width: 24px; height: 24px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--no); color: #fff; box-shadow: var(--sh-sm);
  border: 2px solid var(--bg);
}
.slot-remove svg { width: 10px; height: 10px; }
.slot-remove:hover { background: #8c2e22; transform: scale(1.1); }

.cmp-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.cmp-toolbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.switch { display: inline-flex; align-items: center; gap: .5rem; font-size: .855rem; font-weight: 550; color: var(--ink-soft); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 38px; height: 22px; border-radius: 100px; background: var(--line-strong);
  position: relative; transition: background .25s var(--ease-out); flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 100px; background: #fff;
  transition: transform .25s var(--ease-out); box-shadow: var(--sh-xs);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* Tabla comparativa */
.cmp-table-wrap { overflow-x: auto; overflow-y: visible; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cmp-table { font-size: .875rem; min-width: 560px; }
.cmp-table th, .cmp-table td {
  padding: .68rem .8rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.cmp-table thead th { background: var(--surface-alt); vertical-align: bottom; }
.cmp-table tbody th {
  font-weight: 550; color: var(--ink-soft); font-size: .83rem;
  position: sticky; left: 0; z-index: 2;
  background: var(--surface); min-width: 148px;
  border-right: 1px solid var(--line);
}
.cmp-table tbody tr:hover th { background: var(--brand-tint); }
.cmp-table tbody tr:hover td { background: var(--brand-tint); }
.cmp-table td { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 132px; }
.cmp-table td.is-null { color: var(--ink-mute); font-weight: 500; }
.cmp-table tr.group-row th, .cmp-table tr.group-row td {
  background: var(--brand-tint); color: var(--brand-deep);
  font-size: .745rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  border-bottom: 1px solid var(--brand-soft);
}
.cmp-table tr.group-row th { position: sticky; left: 0; z-index: 2; }
.cmp-table td.is-best { background: var(--ok-soft) !important; }
.cmp-table td.is-best::after {
  content: "\2713"; margin-left: .4rem; color: var(--ok); font-weight: 800;
}
.cmp-table.hide-same tr.is-same { display: none; }

.cmp-head-cell { display: grid; gap: .4rem; min-width: 132px; }
.cmp-head-cell img { width: 100%; max-width: 92px; height: 68px; object-fit: contain; }
.cmp-head-cell .nm { font-size: .8rem; font-weight: 650; line-height: 1.3; }
.cmp-head-cell .br { font-size: .655rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.cmp-head-cell .btn { padding: .4rem .7rem; font-size: .76rem; }

/* Radar superpuesto */
.cmp-radar-card { display: grid; gap: 1rem; }
.cmp-radar-legend { display: flex; flex-wrap: wrap; gap: .5rem .9rem; justify-content: center; }
.cmp-radar-legend li { display: inline-flex; align-items: center; gap: .4rem; font-size: .79rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.cmp-radar-legend .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.cmp-radar-legend li.is-off { opacity: .4; }

/* Barra flotante de comparación */
.cmp-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 880;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px -10px rgba(18,33,43,.2);
  transform: translateY(110%); transition: transform .35s var(--ease-out);
  padding: .65rem var(--gutter);
  padding-bottom: calc(.65rem + env(safe-area-inset-bottom, 0px));
}
.cmp-bar.is-up { transform: translateY(0); }
/* Cuando la barra está visible reservamos su altura para que no tape el pie */
.has-cmp-bar body { padding-bottom: 86px; }
.has-cmp-bar { scroll-padding-bottom: 96px; }
.cmp-bar-inner {
  max-width: var(--maxw); margin-inline: auto;
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
}
.cmp-bar-thumbs { display: flex; gap: .4rem; flex: 1; min-width: 0; }
.cmp-bar-thumbs .t {
  position: relative; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-alt); overflow: hidden;
}
.cmp-bar-thumbs .t img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.cmp-bar-txt { font-size: .83rem; color: var(--ink-soft); font-weight: 550; }
.cmp-bar-txt b { color: var(--ink); }
.cmp-bar-actions { display: flex; gap: .45rem; align-items: center; margin-left: auto; }

/* =============================================================================
   8. RECOMENDADOR
   ============================================================================= */
.quiz { max-width: 720px; margin-inline: auto; }
.quiz-progress { display: flex; gap: .3rem; margin-bottom: 1.5rem; }
.quiz-progress i { flex: 1; height: 4px; border-radius: 100px; background: var(--line); transition: background .3s var(--ease-out); }
.quiz-progress i.is-done { background: var(--brand); }
.quiz-progress i.is-now { background: var(--accent); }

.quiz-step { display: none; }
.quiz-step.is-active { display: block; animation: quizIn .4s var(--ease-out) both; }
@keyframes quizIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.quiz-q { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 600; line-height: 1.2; margin-bottom: .5rem; }
.quiz-help { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.3rem; line-height: 1.6; }

.quiz-options { display: grid; gap: .6rem; }
/* En móvil, una sola columna: con dos, los botones de respuesta quedan
   demasiado estrechos para pulsarlos con comodidad. Se reparten desde 540px. */
.quiz-options.cols-2 { grid-template-columns: 1fr; }
.opt {
  display: flex; align-items: flex-start; gap: .7rem; text-align: left;
  padding: .95rem 1.05rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: all .22s var(--ease-out); width: 100%;
}
.opt:hover { border-color: var(--brand-mid); background: var(--brand-tint); transform: translateY(-2px); }
/* Necesario: `display:flex` ganaría al display:none del atributo [hidden] */
.opt[hidden] { display: none; }
.opt.is-on { border-color: var(--brand); border-width: 2px; background: var(--brand-tint); }
.opt-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand-deep); display: inline-flex; align-items: center; justify-content: center; }
.opt-ico svg { width: 17px; height: 17px; }
.opt-txt b { display: block; font-size: .94rem; font-weight: 650; line-height: 1.35; }
.opt-txt small { display: block; font-size: .8rem; color: var(--ink-mute); line-height: 1.5; margin-top: .15rem; }

.quiz-nav { display: flex; gap: .6rem; margin-top: 1.5rem; align-items: center; }
.quiz-nav .btn-back { margin-right: auto; }

.quiz-input-row { display: grid; gap: .8rem; grid-template-columns: 1fr; }
.quiz-field label { display: block; font-size: .83rem; font-weight: 650; margin-bottom: .35rem; color: var(--ink-soft); }
.quiz-field .hint { font-size: .755rem; color: var(--ink-mute); margin-top: .3rem; }

/* Resultados */
.quiz-result-head { display: grid; gap: .8rem; margin-bottom: 1.6rem; }
.match-why { display: grid; gap: .32rem; margin-top: .6rem; }
.match-why li { display: flex; gap: .45rem; align-items: flex-start; font-size: .8rem; color: var(--ink-soft); line-height: 1.5; }
.match-why svg { width: 1em; height: 1em; flex: none; margin-top: .28em; color: var(--ok); }
.match-why li.is-warn { color: var(--warn); }
.match-why li.is-warn svg { color: var(--warn); }

.rec-rank {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  width: 27px; height: 27px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-deep); color: #fff; font-size: .78rem; font-weight: 800;
  box-shadow: var(--sh-sm);
}

/* =============================================================================
   9. EFECTOS
   ============================================================================= */
/* Por defecto visible: si main.js no llega a ejecutarse, no se oculta nada.
   Solo cuando el propio JS confirma que va a animar anade .reveal-on en <html>. */
[data-reveal] { opacity: 1; transform: none; }
.reveal-on [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal-on [data-reveal].is-revealed { opacity: 1; transform: none; }

@view-transition { navigation: auto; }

/* =============================================================================
   10. RESPONSIVE (mobile-first; 540 / 720 / 960 / 1280)
   ============================================================================= */
@media (min-width: 540px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .quiz-input-row { grid-template-columns: repeat(2, 1fr); }
  .quiz-options.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .pros-cons { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .paths { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .radar-box { grid-template-columns: 1fr 1fr; }
  .quick-facts { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-burger { display: none; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-grid { grid-template-columns: 1.08fr .92fr; }
  .ficha-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .cmp-layout { grid-template-columns: minmax(0, 1fr); }
  .ficha-body-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2.2rem; align-items: start; }
  /* Solo aquí, con el índice ya en su columna, tiene sentido que se quede fijo */
  .toc { position: sticky; top: calc(var(--nav-h) + 1rem); }
}

@media (min-width: 1280px) {
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
}

/* =============================================================================
   11. REDUCED-MOTION — solo efectos intrusivos (gotcha A.2)
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on [data-reveal] { transition-duration: .01ms; opacity: 1; transform: none; }
  .quiz-step.is-active { animation: none; }
}
