/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #fbf7f4;
  --surface: #ffffff;
  --surface-2: #f5ece8;
  --ink: #2a1a24;
  --muted: #6b5963;
  --line: #e8dad6;
  --accent: #7a2650;
  --accent-2: #9c3366;
  --accent-ink: #ffffff;
  --soft: #f3e1ea;
  --gold: #a87a2e;
  --good: #2f6b45;
  --bad: #9b3b2e;
  --offer: #b4351f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(42,26,36,.06), 0 8px 24px rgba(42,26,36,.07);
  --shadow-lg: 0 2px 4px rgba(42,26,36,.08), 0 18px 44px rgba(42,26,36,.12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --c1: #7a2650; --c2: #1f7a8c; --c3: #c47a1c; --c4: #4a6f3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1218; --surface: #261a21; --surface-2: #2f2129; --ink: #f6ebf0; --muted: #c2adb7;
    --line: #432f3a; --accent: #e08ab5; --accent-2: #eba3c6; --accent-ink: #2a1020; --soft: #3a2230;
    --gold: #d9ad63; --good: #7cc596; --bad: #ec8f80; --offer: #ff8a72;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.5), 0 18px 44px rgba(0,0,0,.45);
    --c1: #e08ab5; --c2: #5fc3d6; --c3: #f0b05a; --c4: #93c97f;
  }
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: var(--bg); z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.ico { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }

/* =============================================================
   3. Cabecera y navegación
   ============================================================= */
.demo-bar { background: var(--ink); color: var(--bg); text-align: center; font-size: .85rem; padding: .5rem var(--gutter); }
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(10px)) { .site-header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); } }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 6px 8px; background: var(--soft); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.nav-toggle { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; }
.nav-bars, .nav-bars::before, .nav-bars::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; position: relative; transition: transform .3s var(--ease-out); }
.nav-bars::before { position: absolute; top: -6px; } .nav-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-bars::after { transform: translateY(-6px) rotate(-45deg); }
.nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); display: none; padding: .5rem var(--gutter) 1rem; box-shadow: var(--shadow); }
.nav.is-open { display: block; }
.nav ul { list-style: none; padding: 0; display: grid; gap: .25rem; }
.nav a { display: flex; align-items: center; gap: .5rem; padding: .75rem .5rem; border-radius: 10px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav-links a.nav-cta, .nav a.nav-cta, .nav a.nav-cta:hover { background: var(--accent); color: var(--accent-ink); justify-content: center; }
.nav a.nav-cta[aria-current="page"] { color: var(--accent-ink); }
.cmp-count { background: var(--accent-ink); color: var(--accent); border-radius: 999px; min-width: 1.4em; height: 1.4em; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 600; padding-inline: .3em; }
.cmp-count[hidden] { display: none; }

/* =============================================================
   4. Botones y etiquetas
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.2; text-align: center; transition: transform .25s var(--ease-out), background .2s, box-shadow .25s, border-color .2s; border: 1.5px solid transparent; min-height: 44px; }
.btn-primary, .btn-buy { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-buy:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-buy { background: var(--gold); color: #fff; }
.btn-buy:hover { background: #8f6624; }
.btn-line { border-color: var(--line); background: var(--surface); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-line[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: var(--surface-2); }
.btn-ghost:hover { background: var(--soft); }
.btn-disabled { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line); cursor: not-allowed; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .5rem .9rem; font-size: .88rem; min-height: 40px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; }
.badge-offer { background: var(--offer); color: #fff; margin-left: .4rem; }
.badge-demo { position: absolute; top: .6rem; left: .6rem; background: var(--ink); color: var(--bg); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 600; color: var(--accent); }

/* =============================================================
   5. Secciones comunes
   ============================================================= */
main { min-height: 60vh; }
.block { padding-block: 2.25rem; }
.block h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 1.1rem; }
.block-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.more { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.page-h { padding-block: 1.25rem 1rem; }
.page-h h1 { font-size: clamp(1.9rem, 6vw, 3rem); max-width: 22ch; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--muted); max-width: 60ch; margin-top: .8rem; }
.lead-sm { color: var(--muted); margin-block: .8rem; }
.note { color: var(--muted); font-size: .88rem; margin-top: .9rem; }
.note a, .prose a, .aviso-afiliados a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty[hidden], [hidden] { display: none !important; }
.crumbs { padding-top: 1rem; font-size: .85rem; color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.crumbs li + li::before { content: "/"; margin-right: .3rem; opacity: .6; }
.crumbs a:hover { color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar select, .cmp-picker input { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: .6rem .8rem; min-height: 44px; }
.aviso-afiliados { font-size: .85rem; color: var(--muted); padding: 1rem; background: var(--surface-2); border-radius: var(--radius-sm); margin-block: 1.5rem; }
.aviso-mini { font-size: .8rem; color: var(--muted); margin-top: .8rem; }

/* =============================================================
   6. Hero
   ============================================================= */
.hero { background: radial-gradient(60% 80% at 85% 0%, var(--soft), transparent 70%), var(--bg); padding-block: 3rem 2rem; }
.hero h1 { font-size: clamp(2.2rem, 8.5vw, 4.4rem); max-width: 16ch; margin-block: .6rem 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* =============================================================
   7. Tarjetas y rejilla
   ============================================================= */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); min-height: 200px; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-meta { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card-title { font-size: 1.15rem; }
.card-title a:hover { color: var(--accent); }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.rating { display: inline-flex; align-items: center; gap: .3rem; font-size: .9rem; }
.rating .ico { color: var(--gold); }
.rating-n, .rating-none { color: var(--muted); font-size: .82rem; }
.score { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; background: var(--soft); color: var(--accent); padding: .1rem .6rem; border-radius: 999px; }
.score small { font-family: var(--sans); font-weight: 500; font-size: .7rem; opacity: .75; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; }
.price-now { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.price-old { color: var(--muted); font-size: .95rem; }
.price-none { color: var(--muted); font-size: .95rem; }
.price-note { font-size: .8rem; color: var(--muted); margin-top: .3rem; width: 100%; }
.cat-grid { list-style: none; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.cat-card { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .3s var(--ease-out); height: 100%; }
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.cat-n { font-size: .82rem; color: var(--muted); }
.how-grid { display: grid; gap: 1rem; }
.how-grid > div { padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.how-grid h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.how-grid p { color: var(--muted); }

/* =============================================================
   8. Ficha de producto
   ============================================================= */
.ficha-top { display: grid; gap: 1.5rem; padding-top: 1rem; }
.gal-stage { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gal-main { width: 100%; height: 100%; object-fit: cover; }
.gal-thumbs { list-style: none; padding: 0; display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.gal-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); padding: 0; background: var(--surface-2); }
.gal-thumb[aria-current="true"], .gal-thumb:hover { border-color: var(--accent); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ficha-head h1 { font-size: clamp(1.8rem, 5.5vw, 2.8rem); margin-block: .4rem .6rem; }
.ficha-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.radar-wrap { max-width: 440px; margin-inline: auto; }
.radar { width: 100%; height: auto; overflow: visible; }
.radar-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-shape { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.radar-dot { fill: var(--accent); }
.radar-label { font-size: 11.5px; fill: var(--ink); font-family: var(--sans); font-weight: 500; }
.radar-val { font-size: 11px; fill: var(--muted); font-weight: 600; }
.specs, .cmp-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
.specs th, .specs td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th[scope="row"] { color: var(--muted); font-weight: 500; width: 46%; }
.specs td { font-weight: 500; }
.spec-group th { background: var(--surface-2); font-family: var(--serif); font-size: 1rem; color: var(--accent); }
.specs-extra { margin-top: 1rem; } .specs-extra summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.4rem; } .prose p, .prose ul, .prose ol { margin-top: .9rem; } .prose li + li { margin-top: .4rem; }
.prose-page .prose, .prose-page .block { max-width: 78ch; }
.proscons { display: grid; gap: 1rem; margin-top: 1.5rem; max-width: none; }
.pc { padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.pc h3 { display: flex; align-items: center; gap: .4rem; font-size: 1.1rem; margin-bottom: .5rem; }
.pc h3 .ico { width: 1.15em; height: 1.15em; }
.pc ul { padding-left: 1.1em; } .pc li + li { margin-top: .35rem; }
.pc-pro h3 { color: var(--good); } .pc-con h3 { color: var(--bad); }
.ideal { margin-top: 1.2rem; padding: 1rem 1.2rem; background: var(--soft); border-radius: var(--radius-sm); }
.cta-row { margin-top: 1.2rem; }
.reviews { list-style: none; padding: 0; display: grid; gap: .8rem; }
.review { padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.review-h { display: flex; justify-content: space-between; gap: 1rem; }
.review-stars { color: var(--gold); font-weight: 600; }
.review-t { font-weight: 600; margin-block: .3rem; }

/* =============================================================
   9. Guía de compra
   ============================================================= */
.picks { list-style: none; padding: 0; display: grid; gap: .8rem; }
.pick { display: grid; gap: .4rem; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); justify-items: start; }
.pick-l { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 600; }
.pick-n { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.pick-n:hover { color: var(--accent); }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 600; } .faq p { margin-top: .6rem; color: var(--muted); }

/* =============================================================
   10. Comparador
   ============================================================= */
.cmp-picker { position: relative; max-width: 560px; }
.cmp-picker input { width: 100%; }
.cmp-options { list-style: none; padding: 0; margin-top: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 280px; overflow: auto; }
.cmp-options:empty { display: none; }
.cmp-options button { width: 100%; text-align: left; padding: .7rem 1rem; display: flex; justify-content: space-between; gap: 1rem; min-height: 44px; }
.cmp-options button:hover:not([disabled]) { background: var(--soft); }
.cmp-options button[disabled] { opacity: .5; cursor: default; }
.cmp-options small { color: var(--muted); }
.cmp-selected { display: flex; flex-wrap: wrap; gap: .8rem; padding: 1.2rem 0 .4rem 0; }
.slot-wrap { position: relative; width: 108px; padding-top: 8px; padding-right: 8px; }
.slot { display: block; text-align: center; }
.slot-thumb { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 3px solid var(--sc, var(--line)); background: var(--surface-2); }
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.slot-name { font-size: .78rem; margin-top: .3rem; line-height: 1.25; display: block; }
.slot-x { position: absolute; top: 0; right: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 1rem; line-height: 1; display: grid; place-items: center; box-shadow: var(--shadow); }
.cmp-result { display: grid; gap: 1.5rem; padding-bottom: 1rem; }
.cmp-radar { max-width: 520px; margin-inline: auto; width: 100%; }
.cmp-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: center; margin-top: .4rem; font-size: .88rem; }
.cmp-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; background: var(--sc); vertical-align: -1px; }
.cmp-table-wrap { overflow-x: auto; border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.cmp-table { min-width: 560px; }
.cmp-table th, .cmp-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-table thead th { vertical-align: bottom; background: var(--surface); position: sticky; top: 0; }
.cmp-table tbody th[scope="row"] { color: var(--muted); font-weight: 500; min-width: 112px; background: var(--surface); position: sticky; left: 0; }
.cmp-table tr.spec-group th { background: var(--surface-2); color: var(--accent); font-family: var(--serif); }
.cmp-table td.best { background: color-mix(in srgb, var(--good) 14%, var(--surface)); font-weight: 600; box-shadow: inset 3px 0 0 var(--good); }
.cmp-table .th-prod { display: grid; gap: .4rem; min-width: 150px; }
.cmp-table .th-prod a.nm { font-family: var(--serif); font-size: 1rem; }
.cmp-table .th-prod .dot { width: 100%; height: 4px; border-radius: 4px; background: var(--sc); }
.cmp-tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(42,26,36,.12); padding-block: .6rem; }
.cmp-tray-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cmp-tray-actions { display: flex; gap: .5rem; }

/* =============================================================
   11. Pie
   ============================================================= */
.site-footer { margin-top: 3rem; padding-block: 2rem 5.5rem; background: var(--surface-2); border-top: 1px solid var(--line); }
.site-footer .aviso-afiliados { background: transparent; padding: 0; margin: 0 0 1rem; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-bottom: 1rem; }
.footer-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: .92rem; }
.footer-copy { font-size: .82rem; color: var(--muted); }

/* =============================================================
   12. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .proscons { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .cmp-hint { display: none; }
  .cmp-table tbody th[scope="row"] { min-width: 150px; }
  .ficha-top { grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: start; }
  .gal { position: sticky; top: 88px; }
  .pick { grid-template-columns: 11rem 1fr auto auto; align-items: center; justify-items: start; gap: 1rem; }
  .cmp-result { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .nav-toggle { display: none; }
  .nav { position: static; display: block; border: 0; padding: 0; box-shadow: none; background: transparent; }
  .nav ul { display: flex; align-items: center; gap: .25rem; }
  .nav a { padding: .55rem .9rem; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding-block: 5rem 3.5rem; }
  .slot-wrap { width: 128px; }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
