/* Motor webs de afiliados · estilos comunes.
   El color de marca (--brand) y el de acento (--accent) los inyecta cada web desde sitio.json. */
:root {
  --bg: #f7f8f6; --surface: #ffffff; --soft: #eef2ef; --line: #dfe5e0;
  --text: #17201b; --muted: #5d6b63; --amazon: #ffb703; --amazon-text: #1b1300;
  --ok: #1f8a4c; --bad: #c2410c; --star: #f59e0b;
  --radius: 14px; --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 6px 20px rgb(0 0 0 / .05);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --surface: #151d1a; --soft: #1a2420; --line: #26332e;
    --text: #e7eee9; --muted: #9aaaa1; --shadow: none;
  }
}
:root[data-theme="dark"] { --bg: #0e1412; --surface: #151d1a; --soft: #1a2420; --line: #26332e; --text: #e7eee9; --muted: #9aaaa1; --shadow: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: .2em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.1rem; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); font-size: .92rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.ico-sm { width: 1em; height: 1em; }

/* barra superior y cabecera */
.topbar { background: var(--brand); color: var(--on-brand, #fff); font-size: .85rem; }
.topbar ul { display: flex; gap: 20px; justify-content: center; list-style: none; padding: 7px 16px; margin: 0 auto; flex-wrap: wrap; }
.topbar a { color: var(--on-brand, #fff); font-weight: 600; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.15rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--on-brand, #fff); display: grid; place-items: center; font-family: var(--serif); }
.logo-img { display: block; flex: none; background: none; object-fit: cover; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav > ul { display: flex; list-style: none; gap: 4px; margin: 0; padding: 0; }
.nav > ul > li { position: relative; }
.nav > ul > li > a { white-space: nowrap; display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav > ul > li > a:hover { background: var(--soft); }
.drop { display: none; position: absolute; top: 100%; left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); list-style: none; padding: 8px; margin: 0; min-width: 290px; z-index: 50; }
.drop-wide { min-width: 340px; max-height: 70vh; overflow: auto; }
.drop a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: .92rem; }
.drop a:hover { background: var(--soft); }
.nav > ul > li > a { display: inline-flex; align-items: center; gap: 6px; }
.ico-xs { width: 14px; height: 14px; }
.nav-cmp { border-radius: 999px; padding: 9px 18px; }
.drop-h a, .drop-h span { display: block; padding: 6px 10px; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-decoration: none; }
.drop-gap { height: 1px; background: var(--line); margin: 6px 4px; }
.has-drop:hover .drop, .has-drop:focus-within .drop { display: block; }
/* botón modo claro/oscuro: luna en claro, sol en oscuro */
.tema-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer; }
.tema-btn:hover { background: var(--soft); }
.tema-btn .ico { width: 20px; height: 20px; }
.tema-sol { display: none; }
:root[data-theme="dark"] .tema-sol { display: block; } :root[data-theme="dark"] .tema-luna { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tema-sol { display: block; } :root:not([data-theme="light"]) .tema-luna { display: none; } }
:root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--text); font: inherit; cursor: pointer; }
@media (max-width: 1100px) {
  .menu-btn { display: flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; max-height: calc(100vh - 64px); overflow: auto; }
  .nav.is-open { display: flex; }
  .nav > ul { flex-direction: column; }
  .drop { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 12px; min-width: 0; max-height: none; }
}
/* Menú compacto también en pantallas anchas cuando el menú no cabe al lado del logo (lo decide app.js) */
html.nav-compacta .menu-btn { display: flex; }
html.nav-compacta .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; max-height: calc(100vh - 64px); overflow: auto; }
html.nav-compacta .nav.is-open { display: flex; }
html.nav-compacta .nav > ul { flex-direction: column; }
html.nav-compacta .drop { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 12px; min-width: 0; max-height: none; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font: 600 .95rem/1.2 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-sm { padding: 7px 12px; font-size: .88rem; }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-amazon { background: var(--amazon); color: var(--amazon-text); }
.btn-amazon:hover { filter: brightness(.95); }
.btn-primary { background: var(--brand); color: var(--on-brand, #fff); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--soft); }
.btn-icon { display: inline-grid; place-items: center; width: 42px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.btn-icon.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand, #fff); }

/* migas y cabeceras */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 14px 0 0; margin: 0; font-size: .85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.breadcrumb a { color: var(--muted); }
.page-head { padding-top: 12px; padding-bottom: 8px; }
.eyebrow, .eyebrow-sm { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--brand); margin: 0; }
.eyebrow { font-size: .8rem; }
.eyebrow-sm { font-size: .72rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 720px; }
.byline { color: var(--muted); font-size: .92rem; }

/* home */
.hero { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 10%, var(--bg)), var(--bg)); padding: 56px 0 36px; }
.display { font-family: var(--serif); font-size: clamp(2.1rem, 5.5vw, 3.6rem); max-width: 820px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.section { padding: 44px 0; }
.section-tight { padding: 20px 0; }
.container.section, .container.section-tight { padding-left: 16px; padding-right: 16px; }
.section-alt { background: var(--surface); }
.section-soft { background: var(--soft); }
.section-dark { background: color-mix(in srgb, var(--brand) 82%, #000); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.info-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.info-strip > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.info-strip h3 { margin: 0 0 4px; font-size: 1rem; }
.info-strip p { margin: 0; color: var(--muted); font-size: .93rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.steps h3 { margin: 8px 0 4px; }
.steps p { margin: 0; opacity: .88; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 800; }
.tipo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tipo-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.tipo-card:hover { border-color: var(--brand); }
.tipo-card span { color: var(--muted); font-size: .92rem; }
.tipo-card small { color: var(--brand); font-weight: 600; }
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.guide-list a { display: flex; flex-direction: column; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.guide-list a:hover { border-color: var(--brand); }
.guide-list span { color: var(--muted); font-size: .92rem; }

/* tarjetas de producto */
.grid-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font: 600 .85rem var(--font); cursor: pointer; }
.filter.is-on { background: var(--brand); color: var(--on-brand, #fff); border-color: var(--brand); }
.sort { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.card-media { position: relative; background: #fff; aspect-ratio: 1; display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.card-off { position: absolute; top: 10px; left: 10px; background: var(--bad); color: #fff; font-weight: 700; font-size: .8rem; padding: 3px 8px; border-radius: 6px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { margin: 0; font-size: 1.02rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.card-desc { margin: 0; color: var(--muted); font-size: .92rem; }
.card-price { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn-amazon { flex: 1; }
.ph { width: 100%; height: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--soft); color: var(--brand); font: 800 2rem var(--serif); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--soft); border-radius: 999px; padding: 2px 10px; font-size: .8rem; color: var(--muted); }
.score { display: inline-flex; align-items: baseline; gap: 1px; background: var(--brand); color: var(--on-brand, #fff); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.score b { font-size: 1rem; }
.score small { font-size: .72rem; opacity: .85; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.stars { --v: 0; display: inline-block; width: 5.2em; height: 1em; background: linear-gradient(90deg, var(--star) calc(var(--v) / 5 * 100%), var(--line) 0); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5l2.6 5.6 6 .7-4.5 4.1 1.2 6-5.3-3-5.3 3 1.2-6L1.4 7.8l6-.7z'/%3E%3C/svg%3E") 0 0/1.04em 1em repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.5l2.6 5.6 6 .7-4.5 4.1 1.2 6-5.3-3-5.3 3 1.2-6L1.4 7.8l6-.7z'/%3E%3C/svg%3E") 0 0/1.04em 1em repeat-x; }
.stars-num { font-weight: 700; color: var(--text); }
.price-wrap { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 1.12rem; }
.price-old { color: var(--muted); font-size: .85rem; }
.badge-off { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); font-weight: 700; font-size: .78rem; padding: 1px 6px; border-radius: 6px; }
.badge-agotado { color: var(--muted); font-weight: 600; font-size: .88rem; }

/* tabla comparativa (arriba de cada guía) */
.cmp { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 34px 72px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.cmp-n { font: 800 1.2rem var(--serif); color: var(--brand); text-align: center; }
.cmp-img { width: 72px; height: 72px; background: #fff; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.cmp-img img { object-fit: contain; width: 100%; height: 100%; }
.cmp-img .ph { font-size: 1.1rem; }
.cmp-name { font-weight: 700; color: var(--text); text-decoration: none; }
.cmp-name:hover { color: var(--brand); }
.cmp-cols { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: .88rem; }
.cmp-col small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.cmp-score { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cmp-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 150px; }
@media (max-width: 760px) {
  .cmp-row { grid-template-columns: 28px 60px minmax(0, 1fr); }
  .cmp-img { width: 60px; height: 60px; }
  .cmp-score { grid-column: 2 / 4; flex-direction: row; align-items: center; justify-content: flex-start; }
  .cmp-buy { grid-column: 1 / 4; flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; }
}

/* ranking con veredicto */
.ranking { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.rank-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rank-n { font: 800 1.5rem var(--serif); color: var(--brand); text-align: center; }
.rank-name { font-weight: 700; color: var(--text); }
.rank-main p { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }
.rank-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .rank-item { grid-template-columns: 32px minmax(0, 1fr); } .rank-side { grid-column: 1 / 3; justify-content: space-between; } }

/* guía */
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.guide-aside { position: sticky; top: 84px; }
.guide-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; }
.guide-toc summary { font-weight: 700; cursor: pointer; }
.guide-toc ol { padding-left: 18px; margin: 8px 0 0; display: grid; gap: 6px; }
.guide-toc a { color: var(--text); text-decoration: none; }
.guide-toc a:hover { color: var(--brand); }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; gap: 8px; } .guide-aside { position: static; } }
.prose { max-width: 780px; }
.guide-body.prose { max-width: none; }
.guide-body > p, .guide-body > ul, .guide-body > ol, .guide-body > h2, .guide-body > h3, .guide-body > .note { max-width: 760px; }
.prose li { margin: 4px 0; }
.note { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-left: 4px solid var(--accent); border-radius: 8px; padding: 4px 16px; margin: 20px 0; font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.md-table, .specs { border-collapse: collapse; width: 100%; font-size: .94rem; background: var(--surface); }
.md-table th, .md-table td, .specs th, .specs td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.md-table thead th { background: var(--soft); }
.specs th { font-weight: 600; width: 45%; color: var(--muted); }
.spec-group th { background: var(--soft); color: var(--text); font-weight: 700; }
.pbox { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; margin: 24px 0; background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); }
.pbox-img { background: #fff; border-radius: 10px; overflow: hidden; }
.pbox-name { font-weight: 700; margin: 4px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pbox-name a { color: var(--text); }
.pbox-desc { margin: 0 0 10px; color: var(--muted); }
.pbox-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 560px) { .pbox { grid-template-columns: 80px minmax(0, 1fr); } }
.cta-test { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; margin: 20px 0; border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.cta-test p { margin: 0; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq-plus { font-size: 1.3rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq details[open] .faq-plus { transform: rotate(45deg); }
.faq-a { padding-bottom: 8px; color: var(--muted); }

/* ficha de producto */
.product-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; margin-top: 16px; }
.product-media { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; aspect-ratio: 1; }
.product-img { object-fit: contain; width: 100%; height: 100%; padding: 24px; }
.product-info h1 { margin: 6px 0 10px; }
.product-buy { margin-top: 18px; display: grid; gap: 12px; }
.product-buy .price { font-size: 1.6rem; }
@media (max-width: 800px) { .product-top { grid-template-columns: 1fr; } }
.scores { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 28px; align-items: center; margin: 36px 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.scores .muted { grid-column: 1 / -1; margin: 0; }
.score-big { text-align: center; }
.score-big b { display: block; font: 800 3rem/1 var(--serif); color: var(--brand); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.bars li { display: grid; grid-template-columns: 120px minmax(0, 1fr) 24px; align-items: center; gap: 10px; font-size: .9rem; }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); }
@media (max-width: 560px) { .scores { grid-template-columns: 1fr; } }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .proscons { grid-template-columns: 1fr; } }
.pros, .cons { list-style: none; padding: 0; }
.pros li, .cons li { display: flex; gap: 8px; align-items: baseline; }
.pros .ico { color: var(--ok); } .cons .ico { color: var(--bad); }

/* tipo */
.tipo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.tipo-aside { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 8px; }
.tipo-aside h2 { font-size: 1.15rem; }
@media (max-width: 900px) { .tipo-layout { grid-template-columns: 1fr; } .tipo-aside { position: static; } }
.aspectos li { margin: 8px 0; }

/* comparador */
.cmp-picker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 20px; }
.cmp-picker summary { font-weight: 700; cursor: pointer; }
.cmp-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 12px; }
.cmp-pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .92rem; }
.cmp-pick small { display: block; color: var(--muted); }
.cmp-pick:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--surface); font-size: .92rem; }
.cmp-table th, .cmp-table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.cmp-table thead th { vertical-align: bottom; }
.cmp-table tbody th { color: var(--muted); font-weight: 600; width: 180px; }
.cmp-table .best { background: color-mix(in srgb, var(--ok) 14%, transparent); font-weight: 700; }
.cmp-table .cmp-head-img { width: 96px; height: 96px; background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }

/* test */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.quiz-progress { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.quiz-progress i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.quiz h2 { margin-top: 0; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 600 1rem var(--font); cursor: pointer; }
.quiz-opt:hover { border-color: var(--brand); }
.quiz-back { margin-top: 14px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }

/* transparencia, pie y bandeja del comparador */
.transparency { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 48px; padding-top: 16px; padding-bottom: 16px; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 24px; padding: 40px 0 90px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); }
.footer-h { font-weight: 700; margin: 0 0 8px; }
.footer-small { color: var(--muted); }
.footer-legal { color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / .08); }
.tray-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.tray-actions { display: flex; gap: 8px; }
.score-big b, .rank-n, .cmp-n, .step-n, .display, .logo-mark { font-variant-numeric: lining-nums; }

/* nota ponderada, test con tipo recomendado y herramientas tipo selector */
.bar-dato { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
.escala { color: var(--muted); }
.quiz-rec { border: 2px solid var(--brand); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.quiz-rec h2 { margin: .2em 0 .3em; }
.selector { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.selector p { margin: 0 0 8px; }
.sel-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.sel-group .eyebrow-sm { width: 100%; }
.sel-item { scroll-margin-top: 90px; }
.sel-item + .sel-item { border-top: 1px solid var(--line); }
.sel-item[hidden] { display: none; }

/* calculadoras (herramientas con "html" propio) */
.calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.calc-field { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.calc-field b { font-weight: 600; }
.calc-field small { color: var(--muted); }
.calc-field input, .calc-field select { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); width: 100%; min-height: 44px; }
.calc-field input:focus, .calc-field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.calc-wide { grid-column: 1 / -1; }
.calc-out { margin: 18px 0; }
.calc-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.calc-res > div { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; }
.calc-res small { display: block; color: var(--muted); font-size: .85rem; }
.calc-res b { display: block; font-size: 1.6rem; line-height: 1.2; color: var(--brand); font-variant-numeric: tabular-nums; }
.calc-res .calc-main { background: var(--brand); }
.calc-res .calc-main b, .calc-res .calc-main small { color: var(--on-brand, #fff); }
.calc-msg { margin: 14px 0 0; }
.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.calc-chips a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--soft); text-decoration: none; font-size: .9rem; }
.calc, .calc-form, .calc-field { min-width: 0; }
@media (min-width: 900px) { .logo-text { white-space: nowrap; } }
.header-in { min-width: 0; } .logo { min-width: 0; }

/* banner de cookies (solo webs con Google Analytics) */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / .08); }
.cookie-bar[hidden] { display: none; }
.cookie-in { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.cookie-in p { margin: 0; font-size: .92rem; flex: 1; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-actions .btn { min-width: 110px; }
@media (max-width: 640px) { .cookie-in { flex-direction: column; align-items: stretch; } .cookie-actions .btn { flex: 1; } }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* precios caducados (más de 24 h sin actualizar): se ocultan */
.precios-caducados .price-wrap, .precios-caducados .price, .precios-caducados .price-old, .precios-caducados .badge-off,
.precios-caducados .card-off, .precios-caducados [data-precio-txt] { display: none !important; }

/* botón fijo de compra en móvil (fichas de producto) */
.buy-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / .08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.buy-sticky[hidden] { display: none; }
.buy-sticky-in { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; }
.buy-sticky-name { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-sticky-name small { display: block; font-weight: 500; color: var(--muted); }
@media (min-width: 900px) { .buy-sticky { display: none !important; } }

/* ───────── Portada visual ───────── */
.hero-visual { padding: 40px 0 44px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
.hero-txt .lead { margin-top: 12px; }
.hero-sellos { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hero-sellos li { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.hero-sellos .ico { color: var(--brand); }
.hero-pics { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; min-height: 420px; }
.hero-pic { position: relative; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgb(0 0 0 / .12); display: grid; place-items: center; text-decoration: none; transition: transform .2s; }
.hero-pic:hover { transform: translateY(-3px); }
.hero-pic-1 { grid-row: span 2; }
.hero-pic-img { width: 100%; height: 100%; object-fit: contain; padding: 22px 18px 52px; }
.hero-pic .ph { width: 100%; height: 100%; }
.hero-pic-nota { position: absolute; top: 12px; left: 12px; background: var(--brand); color: var(--on-brand, #fff); border-radius: 10px; padding: 4px 10px; font-size: .8rem; }
.hero-pic-nota b { font-size: 1.05rem; }
.hero-pic-name { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #1d2320; font-weight: 700; font-size: .9rem; line-height: 1.25; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-pics { min-height: 0; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; gap: 10px; }
  .hero-pic-1 { grid-row: auto; }
  .hero-pic { aspect-ratio: 3 / 4; border-radius: 14px; }
  .hero-pic-img { padding: 10px 8px 40px; }
  .hero-pic-name { font-size: .75rem; left: 8px; right: 8px; bottom: 8px; }
  .hero-pic-nota { top: 8px; left: 8px; padding: 2px 7px; }
}

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.tile-media { background: #fff; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.tile-img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.tile .ph { width: 100%; height: 100%; }
.tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile-body b { font-size: 1rem; line-height: 1.25; }
.tile-body small { color: var(--muted); font-size: .82rem; }
@media (max-width: 560px) { .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .tile-body b { font-size: .9rem; } }

.podio { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 18px; margin-top: 14px; align-items: stretch; }
.podio-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.podio-1 { border: 2px solid var(--brand); }
.podio-pos { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--brand); color: var(--on-brand, #fff); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.podio-media { background: #fff; aspect-ratio: 1 / .85; display: grid; place-items: center; }
.podio-img { width: 100%; height: 100%; object-fit: contain; padding: 40px 22px 14px; }
.podio-media .ph { width: 100%; height: 100%; }
.podio-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.podio-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.podio-top h3 { margin: 0; font-size: 1.12rem; line-height: 1.25; }
.podio-top h3 a { color: var(--text); text-decoration: none; }
.podio-body p { margin: 0; color: var(--muted); font-size: .93rem; }
.podio-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.podio-actions .btn-amazon { flex: 1; }
@media (max-width: 900px) { .podio { grid-template-columns: 1fr; } .podio-media { aspect-ratio: 16 / 10; } }

.banner-test { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 18px; text-decoration: none; color: var(--on-brand, #fff);
  background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--accent))); box-shadow: 0 10px 30px rgb(0 0 0 / .12); }
.banner-ico { flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-size: 1.9rem; font-weight: 900; }
.banner-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.banner-txt b { font-size: 1.2rem; }
.banner-txt span { opacity: .9; }
.banner-test .btn { background: var(--surface); color: var(--text); }
@media (max-width: 640px) { .banner-test { flex-wrap: wrap; } .banner-test .btn { width: 100%; } }

.tool-grid, .guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.tool-card, .guide-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.tool-card:hover, .guide-card:hover { border-color: var(--brand); }
.tool-card span, .guide-card span { color: var(--muted); font-size: .9rem; }
.tool-card em { font-style: normal; color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-top: auto; }
.guide-card b { line-height: 1.3; }
.guide-card span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.h-small { font-size: 1.1rem; margin-bottom: 10px; }
.brand-row { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 600; }
.brand-chip:hover { border-color: var(--brand); }
.brand-chip small { color: var(--muted); font-weight: 500; }
/* la foto ocupa exactamente su caja (sin desbordar) */
.tile-media, .podio-media, .hero-pic { position: relative; }
.tile-img, .podio-img, .hero-pic-img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* producto sin foto propia */
.ph { font: inherit; background: linear-gradient(160deg, var(--soft), color-mix(in srgb, var(--brand) 8%, var(--soft))); }
.ph-in { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px; color: var(--muted); }
.ph-in b { color: var(--text); font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.ph-in small { font-size: .78rem; }
.ph-ico { width: 34px; height: 34px; color: var(--brand); }

/* cifras grandes en portada (p. ej. «¿Cuánto gasta al mes?») */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.cifra { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.cifra::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(var(--brand), var(--accent)); }
.cifra b { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cifra span { font-weight: 700; }
.cifra small { color: var(--muted); }

/* listas de las calculadoras (modelos recomendados y calendarios paso a paso) */
.calc-modelos { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.calc-modelos li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cal-lista { padding-left: 20px; display: grid; gap: 10px; }
.cal-lista li { padding-left: 4px; }
