/* =============================================================
   DOMOTIA — hoja de estilos única
   Índice:
   1. Tokens            5. Componentes        9. Reduced-motion
   2. Reset & base      6. Secciones
   3. Utilidades        7. Páginas específicas
   4. Tipografía        8. Responsive
   ============================================================= */

/* =============================================================
   1. Tokens — cambiar aquí = re-brand del sitio entero
   ============================================================= */
:root {
  /* Marca — oscuro premium, acento plata */
  --ink:        #F3EFE6;
  --ink-soft:   #C9C3B4;
  --muted:      #8C8676;
  --line:       rgba(243, 239, 230, .12);
  --line-soft:  rgba(243, 239, 230, .07);

  --bg:         #0B0A08;
  --bg-alt:     #14120E;
  --surface:    #1B1814;
  --stage:      #EDE7D8; /* "peana" clara para fotos de producto sobre fondo oscuro */

  --primary:      #4A505C;
  --primary-ink:  #F3EFE6;
  --primary-soft: #1E2126;

  --accent:      #B8BEC9;
  --accent-ink:  #1C1F26;
  --accent-soft: #21242A;
  --accent-2:    #D7DCE3; /* estrellas / palabra destacada del hero */

  --danger:      #FF6B4A;
  --danger-soft: #2E140D;
  --ok:          #3FCB8E;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 1px 1px rgba(0,0,0,.35);
  --shadow-md: 0 8px 24px -8px rgba(0,0,0,.6), 0 2px 8px -2px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.7), 0 8px 16px -4px rgba(0,0,0,.5);

  --ease-out:   cubic-bezier(.16,1,.3,1);
  --ease-soft:  cubic-bezier(.25,.46,.45,.94);
  --ease-bounce:cubic-bezier(.34,1.56,.64,1);

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  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; }
input, select, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; font-family: var(--font-display); font-weight: 600; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  z-index: 9999; border-radius: var(--radius-sm); font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }

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

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem); flex-wrap: wrap;
}
.section-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: .3rem .7rem; border-radius: var(--radius-full);
  margin-bottom: .8rem; border: 1px solid var(--line);
}
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.section-desc { color: var(--ink-soft); max-width: 56ch; margin-top: .5rem; }
.section-link { font-weight: 600; color: var(--accent); white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; }
.section-link:hover { color: var(--accent-2); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.flow > * + * { margin-top: 1rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { transition-duration: .15s; } }

.aviso-afiliados {
  font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2rem; line-height: 1.55;
}
.aviso-afiliados a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.aviso-afiliados a:hover { color: var(--accent-2); }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
.eyebrow { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow:has(svg) { display: inline-flex; align-items: center; gap: .35em; }
.eyebrow svg { width: .95em; height: .95em; flex-shrink: 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* =============================================================
   5. Componentes
   ============================================================= */

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius-full); font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s var(--ease-out), color .2s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent, .btn-comprar { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-accent:hover, .btn-comprar:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--accent-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--accent); padding-inline: .6rem; }
.btn-ghost:hover { color: var(--accent-2); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; min-height: 44px; }
.btn-block { width: 100%; }
.btn[disabled], .btn-comprar.is-pendiente {
  background: var(--bg-alt); color: var(--muted); box-shadow: none; cursor: not-allowed; pointer-events: none;
}

/* --- Header / navegación --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,10,8,.82); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
  height: var(--nav-h);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--bg); } }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); flex-shrink: 0; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; }
.nav-links a { font-weight: 500; font-size: .95rem; color: var(--ink-soft); position: relative; padding-block: .3rem; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-search-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full); display: grid; place-items: center;
  border: 1.5px solid var(--line); color: var(--ink-soft); transition: border-color .2s, color .2s;
}
.nav-search-btn:hover { border-color: var(--ink); color: var(--ink); }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: var(--radius-full); border: 1.5px solid var(--line); place-items: center; }

/* --- Menú móvil --- */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; background: var(--bg); z-index: 90;
  padding: 1.5rem var(--gutter) 2rem; overflow-y: auto;
  transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.mobile-menu a { display: block; padding: .9rem 0; font-size: 1.15rem; font-weight: 600; border-bottom: 1px solid var(--line-soft); }

/* --- Buscador (modal) --- */
.search-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(4,3,2,.68);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 1rem 1rem;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease-out);
}
.search-overlay.is-open { opacity: 1; pointer-events: auto; }
.search-panel {
  width: min(640px, 100%); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; transform: translateY(-16px); transition: transform .25s var(--ease-out);
}
.search-overlay.is-open .search-panel { transform: none; }
.search-input-row { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.search-input-row svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
.search-input { flex: 1; border: 0; outline: 0; font-size: 1.05rem; background: transparent; }
.search-close { flex: none; font-size: .82rem; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .25rem .5rem; }
.search-results { max-height: 60vh; overflow-y: auto; padding: .5rem; }
.search-group-label { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: .8rem .8rem .3rem; }
.search-result { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: var(--radius-sm); }
.search-result:hover, .search-result:focus-visible { background: var(--bg-alt); }
.search-result-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--accent-soft); display: grid; place-items: center; flex: none; font-size: 1.1rem; }
.search-result-title { font-weight: 600; font-size: .93rem; }
.search-result-meta { font-size: .78rem; color: var(--muted); }
.search-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

/* --- Tarjetas --- */
.card {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm); transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease-out);
}
.card-hoverable:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700;
  padding: .32rem .65rem; border-radius: var(--radius-full); letter-spacing: .01em;
}
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-primary { background: var(--primary); color: var(--primary-ink); }
.badge-soft { background: var(--primary-soft); color: var(--accent); }
.badge-warn { background: var(--danger-soft); color: var(--danger); }
.badge-demo { background: #FFF3D6; color: #7A5200; border: 1px dashed #C99A2E; }
.badge-offer { background: var(--danger); color: #fff; }

/* --- Producto: card de listado --- */
.product-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.product-card-media { position: relative; aspect-ratio: 4/3; background: var(--stage); overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 1.1rem; }
.product-card-badges { position: absolute; top: .7rem; left: .7rem; right: .7rem; display: flex; justify-content: space-between; gap: .4rem; flex-wrap: wrap; }
.product-card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-card-marca { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.product-card-name { font-size: 1.02rem; line-height: 1.3; }
.product-card-name a::after { content: ""; position: absolute; inset: 0; }
.product-card-name { position: relative; }
.product-card-feature { font-size: .87rem; color: var(--ink-soft); }
.product-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-top: .5rem; }
.product-card-price { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; }
.product-card-price .old { font-family: var(--font-body); font-weight: 400; text-decoration: line-through; color: var(--muted); font-size: .82rem; margin-right: .35rem; }
.product-card-cta { position: relative; z-index: 1; }

/* --- Rating (estrellas) --- */
.rating { display: inline-flex; align-items: center; gap: .35rem; }
.rating-stars { display: inline-flex; gap: 1px; color: var(--accent-2); }
.rating-stars svg { width: 15px; height: 15px; }
.rating-count { font-size: .8rem; color: var(--muted); }

/* --- Barra de puntuación 0-10 --- */
.score-row { display: flex; align-items: center; gap: .8rem; }
.score-label { flex: 0 0 40%; font-size: .85rem; color: var(--ink-soft); }
.score-track { flex: 1; height: 8px; background: var(--bg-alt); border-radius: var(--radius-full); overflow: hidden; }
/* Ancho final va en style="width:NN%" inline (generado en build) para que se vea sin JS.
   is-animating es un estado transitorio opcional que añade JS para el efecto de crecimiento. */
.score-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: var(--radius-full); transition: width .8s var(--ease-out); }
.score-fill.is-animating { width: 0 !important; }
.score-value { flex: 0 0 2.4em; text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: .85rem; }

/* --- Radar chart --- */
.radar-wrap { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.radar-wrap canvas { max-width: 100%; }
.radar-legend { display: flex; flex-wrap: wrap; gap: .6rem 1rem; justify-content: center; font-size: .82rem; }
.radar-legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.radar-legend-dot { width: 10px; height: 10px; border-radius: var(--radius-full); flex: none; }

/* --- Tabla de especificaciones --- */
.spec-table { font-size: .92rem; }
.spec-table caption { text-align: left; font-weight: 700; font-family: var(--font-display); padding-block: .8rem .4rem; }
.spec-table tr { border-bottom: 1px solid var(--line-soft); }
.spec-table th { text-align: left; padding: .65rem .5rem; color: var(--ink-soft); font-weight: 500; width: 46%; }
.spec-table td { padding: .65rem .5rem; font-weight: 600; text-align: right; }
.spec-table td.is-null { color: var(--muted); font-weight: 400; }
.spec-table .spec-yes { color: var(--ok); }
.spec-table .spec-no { color: var(--muted); }

/* --- Pros / contras --- */
.pros-contras { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.pc-col h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin-bottom: .7rem; }
.pc-col h3 svg { width: 1.15em; height: 1.15em; flex: none; }
.pc-col.pros h3 { color: var(--ok); }
.pc-col.contras h3 { color: var(--danger); }
.pc-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.pc-col li { display: flex; gap: .55rem; font-size: .92rem; line-height: 1.45; }
.pc-col li svg { width: 1.1em; height: 1.1em; flex: none; margin-top: .15em; }
.pc-col.pros li svg { color: var(--ok); }
.pc-col.contras li svg { color: var(--danger); }

/* --- Chips de resumen de reseñas --- */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: var(--radius-full); font-size: .82rem; border: 1px solid var(--line); }
.chip svg { width: 1em; height: 1em; flex: none; }
.chip-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: #12241A; }
.chip-bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); }

/* --- Tarjeta de categoría (home) --- */
.category-card { padding: 1.6rem; display: flex; flex-direction: column; gap: .7rem; }
.category-card-emoji { font-size: 2rem; width: 3.2rem; height: 3.2rem; border-radius: var(--radius-md); background: var(--accent-soft); display: grid; place-items: center; }
.category-card-emoji svg { width: 1.8rem; height: 1.8rem; }
.category-card h3 a::after { content: ""; position: absolute; inset: 0; }
.category-card { position: relative; }
.category-card p { color: var(--ink-soft); font-size: .9rem; }
.category-card-count { font-size: .78rem; color: var(--muted); margin-top: auto; }

/* --- Best-of ribbons (home) --- */
.bestof-card { display: flex; flex-direction: column; padding: 1.4rem; gap: .8rem; }
.bestof-tag { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }
.bestof-tag svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.bestof-product { display: flex; gap: .9rem; align-items: center; }
.bestof-product img { width: 64px; height: 64px; object-fit: contain; background: var(--stage); border-radius: var(--radius-sm); padding: .4rem; flex: none; }

/* --- Solución (problema -> configuraciones) --- */
.solution-card { padding: 1.6rem; }
.solution-levels { display: grid; gap: .9rem; margin-top: 1rem; }
.solution-level { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.solution-level h4 { font-size: .95rem; display: flex; align-items: center; justify-content: space-between; }
.solution-level p { font-size: .87rem; color: var(--ink-soft); margin-top: .4rem; }
.solution-level .cats { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }

/* --- Guías --- */
.guide-card { padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; height: 100%; }
.guide-card h3 { font-size: 1.05rem; }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; }
.guide-card { position: relative; }
.guide-card p { color: var(--ink-soft); font-size: .9rem; }
.guide-meta { font-size: .78rem; color: var(--muted); margin-top: auto; }

/* --- Comparador --- */
.comparador-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.compare-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.compare-slot {
  border: 1.5px dashed var(--line); border-radius: var(--radius-lg); min-height: 220px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  padding: 1.2rem; text-align: center; position: relative;
}
.compare-slot.is-filled { border-style: solid; border-color: var(--line-soft); background: var(--surface); align-items: stretch; text-align: left; box-shadow: var(--shadow-sm); }
.compare-slot-add { color: var(--muted); font-size: .88rem; }
.compare-slot-remove {
  position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: var(--radius-full);
  background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); font-size: 1rem;
}
.compare-slot-img { width: 100%; aspect-ratio: 4/3; background: var(--stage); border-radius: var(--radius-md); overflow: hidden; margin-bottom: .7rem; }
.compare-slot-img img { width: 100%; height: 100%; object-fit: contain; padding: .8rem; }
.compare-picker { position: absolute; inset: 0; z-index: 3; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1rem; overflow-y: auto; display: none; }
.compare-picker.is-open { display: block; }
.compare-picker-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .5rem; border-radius: var(--radius-sm); }
.compare-picker-item:hover { background: var(--bg-alt); }

.compare-table-wrap { overflow-x: auto; margin-top: 2.5rem; border-radius: var(--radius-lg); border: 1px solid var(--line-soft); }
.compare-table { min-width: 640px; }
.compare-table th, .compare-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: .9rem; }
.compare-table thead th { background: var(--bg-alt); font-family: var(--font-display); position: sticky; top: 0; }
.compare-table tbody th { color: var(--ink-soft); font-weight: 500; white-space: nowrap; }
.compare-table td.is-best { background: var(--accent-soft); font-weight: 700; position: relative; }
.compare-table td.is-best::before { content: "✓"; color: var(--accent); margin-right: .35rem; }

.verdict-grid { display: grid; gap: 1rem; margin-top: 2rem; }
.verdict-card { padding: 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.verdict-card .tag { font-size: .85rem; font-weight: 700; color: var(--accent); }

/* --- Asistente --- */
.quiz-step { display: none; }
.quiz-step.is-active { display: block; }
.quiz-options { display: grid; gap: .8rem; margin-top: 1.2rem; }
@media (min-width: 768px) {
  .quiz-options { grid-template-columns: repeat(2, 1fr); }
}
.quiz-option {
  border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 1rem 1.2rem; display: flex; align-items: center; gap: .9rem;
  transition: border-color .2s, background .2s;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option-emoji { font-size: 1.4rem; }
.quiz-progress { height: 4px; background: var(--bg-alt); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 2rem; }
.quiz-progress-fill { height: 100%; background: var(--accent); transition: width .3s var(--ease-out); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 1.6rem; }

/* --- Formularios genéricos --- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; }
.field input[type=range] { width: 100%; }

/* --- Hero --- */
.hero { position: relative; padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5rem); overflow: visible; }
.hero-halo { position: absolute; inset: -30% -10% -40% -10%; z-index: -1; pointer-events: none; }
.hero-halo::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(45% 40% at 65% 25%, rgba(184,190,201,.20), transparent 70%),
              radial-gradient(35% 35% at 15% 60%, rgba(74,80,92,.16), transparent 70%);
  filter: blur(60px);
}
.hero-grid { display: grid; gap: 3rem; align-items: center; grid-template-columns: 1.1fr .9fr; }
.hero-title { max-width: 15ch; }
.hero-title .accent-word { color: var(--accent-2); background: linear-gradient(180deg, transparent 62%, var(--accent-soft) 62%); }
.hero-actions { display: flex; gap: .9rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-stats { display: flex; align-items: center; gap: 1.8rem; margin-top: 2.2rem; flex-wrap: wrap; padding: 1.2rem 1.5rem; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.hero-stat span { font-size: .8rem; color: var(--muted); }
.hero-stats-link { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em; color: var(--accent); font-weight: 600; margin-left: auto; white-space: nowrap; }
.hero-stats-link:hover { color: var(--accent-2); }
.hero-disclosure { font-size: .82rem; color: var(--muted); margin-top: 1.4rem; line-height: 1.55; max-width: 46ch; }
.hero-disclosure a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hero-disclosure a:hover { color: var(--accent-2); }
.hero-visual { position: relative; }

/* --- Isométrico decorativo (svg embebido inline) --- */
.iso-illustration { width: 100%; height: auto; }

/* --- Strip de categorías scrollable --- */
.strip-row { display: flex; flex-wrap: nowrap; gap: .9rem; overflow-x: auto; overflow-y: visible; padding-block: .3rem 1rem; scrollbar-width: thin; }
.strip-row::-webkit-scrollbar { height: 6px; }
@media (max-width: 767px) {
  .strip-row:has(.category-card) {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
}
.strip-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--radius-full); }
.strip-card { flex: 0 0 auto; }

/* --- Footer --- */
.site-footer { background: var(--primary); color: rgba(255,255,255,.82); padding-block: 3.5rem 2rem; margin-top: 5rem; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: .9rem; font-size: .88rem; max-width: 30ch; color: rgba(255,255,255,.68); }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.55); margin-bottom: .9rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.6rem; flex-wrap: wrap; }
.footer-bottom p { font-size: .78rem; color: rgba(255,255,255,.55); }
.footer-disclosure { font-size: .78rem; color: rgba(255,255,255,.55); max-width: 90ch; padding-top: 1.6rem; line-height: 1.6; }

/* --- Breadcrumbs --- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .82rem; color: var(--muted); margin-bottom: 1.4rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs span[aria-hidden] { color: var(--line); }
.breadcrumbs .current { color: var(--ink-soft); }

/* --- Empty states --- */
.empty-state { text-align: center; padding: 4rem 1.5rem; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.empty-state-emoji { font-size: 2.4rem; margin-bottom: .8rem; }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p { color: var(--ink-soft); max-width: 46ch; margin-inline: auto; }

/* --- Banner de ejemplo (fichas demo) --- */
.demo-banner {
  display: flex; align-items: center; gap: .7rem; background: #FFF3D6; border: 1px solid #E9C876; color: #5C4300;
  border-radius: var(--radius-md); padding: .9rem 1.1rem; font-size: .88rem; margin-bottom: 1.6rem;
}
.demo-banner svg { flex: none; width: 1.3em; height: 1.3em; }

/* =============================================================
   6. Secciones (home / genéricas)
   ============================================================= */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.page-head .eyebrow { margin-bottom: .6rem; }
.page-head p.lead { margin-top: .8rem; max-width: 62ch; }

/* =============================================================
   7. Páginas específicas — ficha de producto
   ============================================================= */
.ficha-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; }
.ficha-galeria-main { aspect-ratio: 1/1; background: var(--stage); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: .8rem; }
.ficha-galeria-main img { width: 100%; height: 100%; object-fit: contain; padding: 2rem; }
.ficha-thumbs { display: flex; gap: .6rem; list-style: none; }
.ficha-thumbs button { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--stage); border: 1.5px solid transparent; overflow: hidden; }
.ficha-thumbs button.is-active { border-color: var(--accent); }
.ficha-thumbs img { width: 100%; height: 100%; object-fit: contain; padding: .4rem; }

.ficha-marca { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ficha-nombre { margin-top: .3rem; }
.ficha-rating { margin-top: .8rem; }
.ficha-precio { margin-top: 1.2rem; padding: 1.1rem 1.3rem; background: var(--bg-alt); border-radius: var(--radius-md); }
.precio-actual { font-family: var(--font-mono); font-weight: 700; font-size: 1.7rem; }
.precio-antes { text-decoration: line-through; color: var(--muted); margin-left: .6rem; font-size: 1rem; }
.precio-nota { display: block; font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.ficha-head .btn-comprar { margin-top: 1.1rem; width: 100%; padding-block: 1rem; font-size: 1.02rem; }
.ficha-cta-repeat { margin-block: 2.5rem; text-align: center; }
.ficha-cta-repeat .btn { padding-inline: 2.5rem; }

.ficha-radar { margin-top: 3rem; }
.ficha-specs { margin-top: 3rem; }
.ficha-editorial { margin-top: 3rem; }
.editorial-cuerpo { color: var(--ink-soft); }
.editorial-cuerpo p + p { margin-top: 1rem; }
.ideal-para { margin-top: 1.3rem; padding: 1rem 1.2rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: .95rem; }
.ficha-resenas { margin-top: 3rem; }
.resenas-chips { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.resenas-lista { display: none; } /* sin reseñas reales aún: la sección de resumen basta */
.ficha-comparar { margin-top: 3rem; padding: 1.4rem; }
.ficha-similares { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }

.specs-extra summary { cursor: pointer; font-weight: 600; padding: .8rem 0; }

/* =============================================================
   7b. Categoría / listado
   ============================================================= */
.category-hero { padding-block: 2.5rem 1.5rem; }
.filters-bar { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.6rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-md); }
.filters-bar select { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.filters-count { font-size: .85rem; color: var(--muted); margin-left: auto; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .ficha-grid { grid-template-columns: 1fr; gap: 2rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .compare-slots { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .nav-actions .btn-primary { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .pros-contras { grid-template-columns: 1fr; }
  .ficha-similares { grid-template-columns: 1fr; }
  .verdict-grid { grid-template-columns: 1fr; }
  .compare-slots { grid-template-columns: 1fr 1fr; }
  .section { padding-block: 2.5rem; }
  .hero { padding-block: 2rem 1.5rem; }
  .hero-grid { gap: 1.5rem; }
  .hero-visual { display: none; }
  .hero-actions { margin-top: 1.3rem; }
  .hero-stats { margin-top: 1.4rem; gap: 1.3rem; }
  .hero-disclosure { margin-top: 1.1rem; max-width: none; }

  /* Cards de ranking (mejores-*.html): fila -> columna para que "Ver ficha" no quede fuera del viewport */
  article.card[class="card"] {
    flex-direction: column;
    text-align: center;
  }
  article.card[class="card"] > div:nth-child(3),
  article.card[class="card"] > a:last-child {
    align-self: stretch;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem 1rem;
    padding: 1rem 1.2rem;
  }

  .hero-stats-link {
    grid-column: 1 / -1;
    margin-left: 0;
    margin-top: .2rem;
  }
}

@media (min-width: 1024px) { .nav-burger, .mobile-menu { display: none; } }

@media (min-width: 540px) and (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}

/* =============================================================
   9. Reduced-motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: opacity .15s linear; transform: none !important; }
  .score-fill { transition: none; }
}
