/* ==========================================================================
   Casa Renovable — hoja de estilos (diseño tipo "keynote")
   Orden: 1 tokens · 2 base · 3 layout · 4 componentes · 5 páginas · 6 movimiento · 7 responsive
   Puntos de corte (mobile-first): 540 / 734 / 960 / 1280 / 1600
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #fbfbfd;
  --bg-tint: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --line: #d2d2d7;
  --black: #000000;
  --dark-1: #0a0a0c;
  --dark-2: #161618;
  --on-dark: #f5f5f7;
  --on-dark-soft: #a1a1a6;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-ink: #0066cc;
  --sun-1: #ffd166;
  --sun-2: #ff9f43;
  --sun-3: #ff5e62;
  --teal: #0b8f8a;
  --teal-soft: #dff3f1;
  --indigo: #5e5ce6;
  --rose: #e11d48;
  --good: #1a8f4c;
  --bad: #c0392b;
  --amber-soft: #fff4dc;
  --amber-ink: #8a5300;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .14);
  --radius: 28px;
  --radius-sm: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 20px;
  --maxw: 1080px;
  --maxw-wide: 1320px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000; --bg-tint: #101012; --surface: #1c1c1e; --ink: #f5f5f7; --ink-soft: #a1a1a6; --line: #3a3a3c;
  --blue-ink: #2997ff; --teal-soft: #0d3533; --amber-soft: #3a2a0e; --amber-ink: #ffd166;
  --shadow: 0 2px 12px rgba(0, 0, 0, .5); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.47; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
.icon { flex: none; }
a { color: var(--blue-ink); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font); line-height: 1.07; letter-spacing: -.03em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.25rem); margin-top: 1.4em; letter-spacing: -.035em; }
h3 { font-size: 1.3rem; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 99px; z-index: 100; }
.skip:focus { left: 8px; }
.grad { background: linear-gradient(100deg, var(--sun-1), var(--sun-2) 45%, var(--sun-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--wide { max-width: var(--maxw-wide); }
.section { padding: 64px 0; }
.section--tint { background: var(--bg-tint); }
.band { padding: 88px 0; }
.band--light { background: var(--bg-tint); }
.band--dark { background: var(--black); color: var(--on-dark); }
.band--dark h2, .band--dark h3 { color: #fff; }
.band--dark .lead, .band--dark .muted { color: var(--on-dark-soft); }
.band--dark a:not(.btn) { color: #2997ff; }
.band__head { text-align: center; margin: 0 auto 40px; max-width: 760px; }
.band__head h2 { margin-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.section-head h2 { margin-top: 0; }
.two-col { display: grid; gap: 40px; }
.two-col--center { align-items: center; }
.page-head { padding: 44px 0 36px; background: var(--bg-tint); text-align: center; }
.page-head h1 { margin: 0 auto .25em; max-width: 18ch; }
.page-head .lead { margin: 0 auto; }
.page-head .breadcrumb ol { justify-content: center; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.3; color: var(--ink-soft); max-width: 40ch; letter-spacing: -.015em; font-weight: 500; }
.page-head .lead, .band__head .lead { max-width: 52ch; }
.meta, .muted, .fineprint { color: var(--ink-soft); }
.fineprint { font-size: .8rem; line-height: 1.4; }
.eyebrow { font-size: .9rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--sun-2); margin: 0 0 .5em; }
.eyebrow--light { color: var(--sun-2); }
.visually-h3 { font-size: 1.05rem; font-weight: 700; margin: 1.2em 0 .4em; letter-spacing: -.01em; }
.list-plain { list-style: none; padding: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- 4. Componentes ---------- */
/* Aviso de afiliados superior (obligatorio en todas las páginas) */
.topbar { background: var(--bg-tint); color: var(--ink-soft); font-size: .75rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.topbar .wrap { display: flex; gap: 8px; align-items: flex-start; padding-top: 6px; padding-bottom: 6px; max-width: var(--maxw-wide); }
.topbar p { margin: 0; line-height: 1.35; }
.topbar a { color: var(--blue-ink); }
.topbar .icon { margin-top: 1px; }

/* Cabecera translúcida */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(22, 22, 24, .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: #f5f5f7; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; max-width: var(--maxw-wide); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #f5f5f7; }
.brand__mark { display: flex; align-items: center; flex: none; }
.brand__mark img { height: 40px; width: auto; max-width: none; display: block; }
.brand__word { display: flex; align-items: center; }
.brand__word img { height: 17px; width: auto; max-width: none; display: block; }
@media (max-width: 400px) { .brand { gap: 6px; } .brand__mark img { height: 34px; } .brand__word img { height: 14px; } }
.brand__name { white-space: nowrap; font-weight: 600; font-size: 1.02rem; letter-spacing: -.02em; }
.brand--foot { color: var(--ink); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: #f5f5f7; border-radius: 12px; place-items: center; cursor: pointer; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.nav a:not(.btn) { display: block; padding: 6px 11px; text-decoration: none; color: rgba(245, 245, 247, .8); font-weight: 400; font-size: .8125rem; letter-spacing: -.005em; transition: color .2s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: #fff; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav__count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; background: #fff; color: var(--blue); font-size: .7rem; font-weight: 700; }
.nav__count[hidden] { display: none; }
@media (max-width: 959px) {
  .site-header__in { flex-wrap: wrap; padding-top: 2px; padding-bottom: 2px; }
  .js .nav__toggle { display: grid; }
  .js .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 6px 0 18px; }
  .js .nav.is-open { display: flex; }
  .js .nav ul { flex-direction: column; }
  .js .nav a:not(.btn) { padding: 12px 4px; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav__cta { justify-content: center; margin-top: 10px; }
}

/* Botones: píldoras */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 26px; border-radius: 980px; border: 1.5px solid transparent; font: 500 1.0625rem var(--font); letter-spacing: -.01em; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background .2s, border-color .2s, color .2s; text-align: center; }
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.98); }
.btn--sm { min-height: 38px; padding: 8px 18px; font-size: .9rem; }
.btn--primary { background: var(--blue); color: #fff; }
.nav a.btn--primary, .btn--primary { color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--buy { background: var(--blue); color: #fff; }
.btn--buy:hover { background: var(--blue-hover); }
.btn--ghost { background: transparent; border-color: var(--blue-ink); color: var(--blue-ink); }
.btn--ghost:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--outline { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,.12); }
.btn--light { background: #fff; color: #000; }
.nav .btn--primary { min-height: 30px; padding: 5px 14px; font-size: .8rem; }
.btn-compare { display: inline-flex; align-items: center; gap: 6px; font: 500 .85rem var(--font); cursor: pointer; }
.btn-compare--float { position: absolute; top: 14px; right: 14px; z-index: 2; min-height: 34px; padding: 6px 14px; border-radius: 99px; border: 0; background: rgba(245, 245, 247, .92); color: #3a3a3c; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s, color .2s; }
.btn-compare--float:hover { background: #fff; color: #1d1d1f; }
.btn-compare[aria-pressed="true"], .btn-compare--float[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Hero de inicio */
.hero { position: relative; background: var(--black); color: var(--on-dark); padding: 72px 0 0; text-align: center; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; left: 50%; top: 52%; width: min(1100px, 130vw); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 159, 67, .34), rgba(255, 94, 98, .12) 55%, transparent 72%); z-index: -1; animation: glow 9s ease-in-out infinite alternate; }
.hero__text { max-width: 900px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(2.7rem, 9vw, 6rem); line-height: 1.02; letter-spacing: -.045em; margin-bottom: .35em; }
.lead--light { color: var(--on-dark-soft); margin-left: auto; margin-right: auto; max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin: 30px 0 0; align-items: center; }
.link-pill { color: #2997ff; text-decoration: none; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 6px; }
.link-pill:hover { text-decoration: underline; }
.hero__stage { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 56px auto 0; max-width: 1100px; padding: 0 var(--gutter); min-height: 240px; }
.stage__card { position: relative; flex: 0 1 36%; background: #fff; border-radius: 28px 28px 0 0; overflow: hidden; box-shadow: 0 -10px 60px rgba(255, 159, 67, .25); aspect-ratio: 4 / 3.2; }
.stage__card img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stage__card--mid { flex-basis: 40%; z-index: 2; aspect-ratio: 4 / 3.8; margin: 0 -2%; }
.stage__card--l { transform: translateY(18px); }
.stage__card--r { transform: translateY(18px); }
.hero__facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 32px var(--gutter); margin: 0; max-width: var(--maxw); margin-inline: auto; color: var(--on-dark-soft); font-size: .95rem; background: var(--black); position: relative; z-index: 3; }
.hero__facts b { display: block; color: #fff; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.04em; line-height: 1.05; }

/* Raíl horizontal de tarjetas (carrusel) */
.grid.rail, .rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(var(--gutter), calc((100vw - var(--maxw-wide)) / 2 + var(--gutter))) 36px; margin: 8px 0 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail > .card { flex: 0 0 min(84vw, 400px); scroll-snap-align: center; }
.rail-wrap { position: relative; }

/* Tarjetas de producto */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 28px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.section--tint .card, .band--light .card { box-shadow: none; }
.card:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-lg); }
.card__media { display: block; aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; gap: 10px; }
.card__tag { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--sun-2); }
.card__title { font-size: 1.3rem; margin: 0; line-height: 1.15; letter-spacing: -.025em; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.card__facts li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; background: var(--bg-tint); border-radius: 99px; font-size: .78rem; font-weight: 500; color: var(--ink-soft); }
.section--tint .card__facts li, .band--light .card__facts li { background: var(--bg-tint); }
.card__save { margin: 0; display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--good); }
.card__price { margin-top: auto; padding-top: 6px; }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.card__actions .btn { flex: 1 1 auto; }

/* Precios */
.price { font: 600 1.35rem var(--font); letter-spacing: -.02em; color: var(--ink); }
.price--ref { color: var(--ink-soft); }
.price--na { font-size: 1.05rem; color: var(--ink-soft); font-weight: 500; }
.price__old { margin-left: 8px; color: var(--ink-soft); font-weight: 400; }
.price__note { display: block; color: var(--ink-soft); font-size: .75rem; line-height: 1.35; font-weight: 400; }

/* Mosaico de categorías */
.tiles { display: grid; gap: 18px; margin-top: 24px; }
.tile { position: relative; display: flex; flex-direction: column; min-height: 420px; padding: 36px 30px 0; background: var(--surface); border-radius: var(--radius); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); text-align: center; }
.tile:hover { transform: scale(1.015); box-shadow: var(--shadow-lg); }
.tile h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 .2em; }
.tile p { color: var(--ink-soft); margin: 0 0 12px; }
.tile__go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; color: var(--blue-ink); margin-bottom: 18px; }
.tile__img { margin: auto -30px 0; background: #fff; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 22px 22px 0 0; }
.tile__img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .9s var(--ease); }
.tile:hover .tile__img img { transform: scale(1.06); }
.tile__icon { display: none; }
.tile--dark { background: var(--dark-2); color: #fff; }
.tile--dark p { color: var(--on-dark-soft); }
.tile--dark .tile__go { color: #2997ff; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 0; }
.pill, .tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 99px; border: 0; background: var(--bg-tint); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .92rem; transition: background .2s, color .2s; }
.section--tint .pill, .band--light .pill { background: var(--surface); }
.pill:hover, .tab:hover { background: var(--blue); color: #fff; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.tab[aria-current="page"] { background: var(--ink); color: var(--bg); }
.panel { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.band--dark .panel { background: var(--dark-2); color: #fff; box-shadow: none; }
.panel h3 { font-size: 1.05rem; }
.kv { list-style: none; margin: 0 0 12px; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.band--dark .kv li { border-color: rgba(255,255,255,.14); }
.band--dark .fineprint { color: var(--on-dark-soft); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--bg-tint); margin: 20px 0; }
.callout p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.callout--soft { background: var(--bg-tint); }
.callout--warn { background: var(--amber-soft); }
.empty-state { text-align: center; padding: 48px 20px; background: var(--bg-tint); border-radius: var(--radius); margin-bottom: 32px; }
.empty-state .icon { color: var(--sun-2); }
.empty { color: var(--ink-soft); text-align: center; padding: 40px 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .72rem; font-weight: 700; }
.badge--warn { background: var(--amber-soft); color: var(--amber-ink); }

/* Migas de pan */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0; margin: 0; font-size: .78rem; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Tablas */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); background: var(--surface); -webkit-overflow-scrolling: touch; box-shadow: var(--shadow); }
.section--tint .table-wrap { box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--bg-tint); vertical-align: top; }
tr:last-child > * { border-bottom: 0; }
thead th { background: var(--surface); color: var(--ink-soft); font-size: .78rem; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); }
.spec th[scope="row"] { width: 42%; font-weight: 400; color: var(--ink-soft); }
.spec__group th { background: var(--bg-tint); font-size: .85rem; font-weight: 700; color: var(--ink); padding-top: 18px; }
.na { color: var(--ink-soft); }
.data th[scope="row"] { font-weight: 600; }
[data-sort-col] { cursor: pointer; }
[data-sort-col]::after { content: " ↕"; opacity: .4; }
[data-sort-col][aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
[data-sort-col][aria-sort="descending"]::after { content: " ↓"; opacity: 1; }

/* Texto largo */
.prose { max-width: 680px; font-size: 1.1rem; line-height: 1.55; }
.prose--page { margin: 0 auto; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.5rem, 3vw, 2rem); }
.prose li { margin-bottom: .4em; }
.prose p, .prose li { color: var(--ink); }

/* FAQ */
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { cursor: pointer; padding: 18px 4px; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq__item summary::after { content: "+"; font-weight: 300; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); transition: transform .3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__a { padding: 0 4px 18px; color: var(--ink-soft); }

/* Formularios y calculadoras */
.calc { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin: 20px 0; }
.section--tint .calc { box-shadow: none; }
.calc__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field select, .field input { min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: 400 1.05rem var(--font); width: 100%; }
.field select:focus, .field input:focus { border-color: var(--blue); outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent); outline-offset: 0; }
.field--inline { flex-direction: row; align-items: center; }
.field--inline select { width: auto; }
.calc__out { margin-top: 22px; }
.result { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.result__big { grid-column: 1 / -1; padding: 28px; border-radius: 22px; background: var(--black); color: #fff; }
.result__big b { display: block; font: 700 clamp(2.6rem, 7vw, 4rem) var(--font); letter-spacing: -.04em; background: linear-gradient(100deg, var(--sun-1), var(--sun-2) 50%, var(--sun-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result__item { padding: 16px; border-radius: 18px; background: var(--bg-tint); }
.result__item b { display: block; font: 700 1.4rem var(--font); letter-spacing: -.02em; }
.result__item span { font-size: .8rem; color: var(--ink-soft); }
.toolbar { margin: 14px 0 0; }

/* ---------- 5. Ficha de producto ---------- */
.ficha-top { padding: 0 0 56px; background: var(--bg); text-align: center; }
.ficha-top .breadcrumb ol { justify-content: center; }
.ficha-top__grid { display: block; }
.buybox { max-width: 820px; margin: 0 auto; padding-top: 18px; }
.buybox h1 { font-size: clamp(2.2rem, 6.4vw, 4.2rem); margin-bottom: .25em; }
.buybox .lead { margin: 0 auto 18px; max-width: 38ch; }
.buybox__price { margin: 8px 0 18px; }
.buybox__price .price { font-size: 1.5rem; }
.buybox__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 14px; }
.buybox .fineprint { max-width: 56ch; margin: 0 auto 8px; }
.gallery-col { margin-top: 36px; }
.gallery { margin: 0 auto; border-radius: 36px; overflow: hidden; background: #fff; box-shadow: var(--shadow); max-width: 980px; }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #fff; transition: opacity .3s; }
.gallery__cap { padding: 8px 12px; font-size: .78rem; color: var(--ink-soft); background: var(--bg-tint); }
.gallery__thumbs { list-style: none; display: flex; justify-content: center; gap: 10px; padding: 0; margin: 18px 0 0; flex-wrap: wrap; }
.gallery__thumbs button { border: 2px solid transparent; border-radius: 14px; padding: 0; background: #fff; cursor: pointer; overflow: hidden; width: 76px; box-shadow: var(--shadow); transition: border-color .2s, transform .2s; }
.gallery__thumbs img { width: 100%; height: 56px; object-fit: contain; background: #fff; display: block; }
.gallery__thumbs button:hover, .gallery__thumbs button:focus-visible, .gallery__thumbs button.is-on { border-color: var(--blue); transform: translateY(-2px); }

/* Sub-navegación pegajosa de la ficha */
.subnav { position: sticky; top: 48px; z-index: 40; background: rgba(251, 251, 253, .8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
:root[data-theme="dark"] .subnav { background: rgba(28, 28, 30, .8); }
.subnav__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.subnav__name { font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subnav__links { display: none; gap: 22px; }
.subnav__links a { color: var(--ink-soft); font-size: .8rem; text-decoration: none; }
.subnav__links a:hover { color: var(--ink); }
.subnav__buy { display: flex; align-items: center; gap: 12px; flex: none; }
.subnav__buy .price { font-size: .95rem; }
.subnav .btn { min-height: 32px; padding: 5px 16px; font-size: .85rem; }

.radar-box { width: 100%; max-width: 520px; margin: 0 auto; }
.radar { width: 100%; height: auto; display: block; overflow: visible; }
.radar__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar__axis { stroke: var(--line); stroke-width: 1; }
.radar__label { fill: var(--ink-soft); font: 500 12px var(--font); }
.radar__shape { fill-opacity: .22; stroke-width: 2.5; stroke-linejoin: round; transform-origin: center; transform-box: fill-box; }
.js .reveal .radar__shape { transform: scale(.2); opacity: 0; transition: transform 1.3s var(--ease) .25s, opacity 1s ease .25s; }
.js .reveal.is-in .radar__shape { transform: scale(1); opacity: 1; }
.band--dark .radar__label, .hero .radar__label { fill: var(--on-dark-soft); }
.band--dark .radar__ring, .band--dark .radar__axis { stroke: rgba(255,255,255,.2); }
.radar-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 0; }
.radar-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 1.05rem; }
.checklist--pro .icon { color: var(--good); margin-top: 4px; }
.checklist--con .icon { color: var(--bad); margin-top: 4px; }
.ideal { padding: 18px 22px; background: var(--bg-tint); border-radius: var(--radius-sm); font-size: 1.1rem; }
.ficha-split h2 { margin-top: 0; }

/* Guías */
.pickgrid { display: grid; gap: 16px; margin: 16px 0 28px; }
.pickcard { padding: 28px; border-radius: var(--radius); background: var(--bg-tint); }
.pickcard h3 { margin-bottom: .3em; }
.pickcard__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Comparador */
.cmp__chooser { background: var(--bg-tint); border-radius: var(--radius); padding: 4px 22px 22px; }
.cmp__chooser summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.picklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 2px solid transparent; border-radius: 18px; cursor: pointer; transition: border-color .2s, transform .2s; }
.pick:hover { transform: translateY(-1px); }
.pick input { position: absolute; opacity: 0; }
.pick__box { width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 50%; flex: none; transition: background .2s, border-color .2s; }
.pick input:checked + .pick__box { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 4px var(--surface); }
.pick input:focus-visible + .pick__box { outline: 3px solid var(--blue); outline-offset: 2px; }
.pick:has(input:checked) { border-color: var(--blue); }
.pick:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.pick img { border-radius: 10px; object-fit: contain; background: #fff; width: 64px; height: 48px; }
.pick__txt { display: flex; flex-direction: column; line-height: 1.25; font-size: .9rem; }
.pick__txt small { color: var(--ink-soft); }
.cmp__result { margin-top: 28px; }
.cmp__radar { display: grid; gap: 24px; align-items: center; background: var(--black); color: #fff; border-radius: var(--radius); padding: 28px; margin-bottom: 28px; }
.cmp__radar .radar__label { fill: var(--on-dark-soft); }
.cmp__radar .radar__ring, .cmp__radar .radar__axis { stroke: rgba(255,255,255,.2); }
.cmp__radar .legend a { color: #fff; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.legend li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.legend i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cmp__table { table-layout: fixed; min-width: 760px; }
.cmp__table th[scope="row"] { width: 150px; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 400; color: var(--ink-soft); }
.cmp__table thead th { text-transform: none; letter-spacing: 0; font-size: .92rem; background: var(--surface); vertical-align: bottom; color: var(--ink); }
.cmp__head { display: flex; flex-direction: column; gap: 8px; }
.cmp__head img { border-radius: 14px; width: 100%; max-width: 200px; aspect-ratio: 4/3; object-fit: contain; background: #fff; }
.cmp__head a { font-weight: 700; color: var(--ink); text-decoration: none; }
.cmp__rm { align-self: flex-start; border: 0; background: none; color: var(--ink-soft); font: 400 .8rem var(--font); cursor: pointer; text-decoration: underline; padding: 2px 0; }
.cmp__table .is-best { background: var(--teal-soft); font-weight: 700; }
.cmp__table .grp th { background: var(--bg-tint); color: var(--ink); font-size: .85rem; font-weight: 700; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* Bandeja del comparador: píldora flotante */
.tray { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: rgba(29, 29, 31, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.35); padding: 10px 6px; border-radius: 26px; max-width: 900px; margin: 0 auto; }
.tray[hidden] { display: none; }
.tray__in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tray__items { display: flex; gap: 8px; flex: 1 1 100%; overflow-x: auto; }
.tray__chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: .82rem; white-space: nowrap; }
.tray__chip button { border: 0; background: rgba(255,255,255,.2); color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tray__clear { border: 0; background: none; color: #d2d2d7; text-decoration: underline; cursor: pointer; font: 400 .85rem var(--font); }
body.has-tray { padding-bottom: 120px; }

/* Pie */
.site-footer { background: var(--bg-tint); color: var(--ink-soft); padding: 48px 0 28px; font-size: .78rem; line-height: 1.5; }
.site-footer .wrap { max-width: var(--maxw-wide); }
.site-footer h2 { font: 600 .78rem var(--font); letter-spacing: 0; color: var(--ink); margin: 0 0 10px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer__grid { display: grid; gap: 28px; }
.site-footer__legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.affiliate-notice { font-style: italic; }

/* Ofertas */
.card--deal .card__body { gap: 10px; }
.deal__badge { align-self: flex-start; margin: 0; padding: 2px 12px; border-radius: 99px; background: var(--rose); color: #fff; font-weight: 700; font-size: .9rem; }

/* Estadísticas grandes */
.bignum { font-size: clamp(3.4rem, 12vw, 8rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; margin: 0 0 .15em; }

/* ---------- 6. Movimiento ---------- */
@keyframes glow { from { opacity: .75; transform: translate(-50%, -50%) scale(.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero__text > * { animation: rise 1s var(--ease) both; }
.js .hero__text > *:nth-child(2) { animation-delay: .12s; }
.js .hero__text > *:nth-child(3) { animation-delay: .24s; }
.js .hero__text > *:nth-child(4) { animation-delay: .36s; }
.js .stage__card { animation: rise 1.2s var(--ease) .45s both; }
.js .stage__card--mid { animation-delay: .6s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .hero__text > *, .js .stage__card { animation: none; opacity: 1; transform: none; transition: none; }
  .js .reveal .radar__shape { transform: none; opacity: 1; transition: none; }
  .hero::before { animation: none; }
  .card, .tile, .btn { transition: none; }
}

/* ---------- 7. Responsive ---------- */
@media (min-width: 540px) {
  :root { --gutter: 24px; }
  .pickgrid { grid-template-columns: repeat(2, 1fr); }
  .calc__grid { grid-template-columns: repeat(2, 1fr); }
  .field--wide { grid-column: 1 / -1; }
  .result { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 734px) {
  :root { --gutter: 32px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .picklist { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 84px 0; }
  .band { padding: 120px 0; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles .tile:first-child { grid-column: 1 / -1; min-height: 520px; }
  .tiles .tile:first-child .tile__img { aspect-ratio: 21 / 8; }
  .tiles--plain { grid-template-columns: repeat(2, 1fr); }
  .tiles--plain .tile:first-child { grid-column: auto; min-height: 0; }
  .hero { padding-top: 96px; }
  .subnav__links { display: flex; }
}
@media (min-width: 960px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 72px; }
  .tiles--plain { grid-template-columns: repeat(3, 1fr); }
  .pickgrid { grid-template-columns: repeat(2, 1fr); }
  .calc__grid { grid-template-columns: repeat(3, 1fr); }
  .cmp__radar { grid-template-columns: 1.3fr 1fr; padding: 40px; }
  .picklist { grid-template-columns: repeat(3, 1fr); }
  .tray { left: 50%; right: auto; width: calc(100% - 24px); transform: translateX(-50%); }
  .tray__items { flex: 1 1 auto; }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  :root { --maxw: 1160px; }
}
@media (min-width: 1600px) {
  :root { --maxw: 1240px; --maxw-wide: 1480px; }
  body { font-size: 1.125rem; }
}
@media print { .topbar, .site-header, .subnav, .tray, .site-footer .site-footer__grid { display: none; } }
.cmp__head a { overflow-wrap: anywhere; }

.price__note--warn { display: block; color: #b25000; font-weight: 500; margin-top: 2px; }


/* ---------- 8. Tema claro / oscuro ----------
   Sin atributo (o data-theme="light") = claro; data-theme="dark" = oscuro (tokens en la sección 1). */
.theme-toggle { order: 3; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .35); background: transparent; color: inherit; cursor: pointer; }
.theme-toggle:hover { background: rgba(128, 128, 128, .16); }
.theme-toggle .icon--moon { display: block; }
.theme-toggle .icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon--moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon--sun { display: block; }
.brand { order: 1; }
.nav { order: 2; }
.nav__toggle { order: 4; }
@media (max-width: 959px) { .theme-toggle { margin-left: auto; order: 2; } .nav__toggle { order: 3; } .nav { order: 5; } }
.brand .logo-on-dark { display: none; }
:root[data-theme="dark"] .brand .logo-on-dark { display: block; }
:root[data-theme="dark"] .brand .logo-on-light { display: none; }
:root:not([data-theme="dark"]) .grad { background-image: linear-gradient(90deg, #f07a00, #e5384a); }

:root:not([data-theme="dark"]) .site-header { background: rgba(255, 255, 255, .82); color: var(--ink); border-bottom: 1px solid #e5e5ea; }
:root:not([data-theme="dark"]) .brand, :root:not([data-theme="dark"]) .nav__toggle { color: var(--ink); }
:root:not([data-theme="dark"]) .nav a:not(.btn) { color: #515154; }
:root:not([data-theme="dark"]) .nav a:not(.btn):hover, :root:not([data-theme="dark"]) .nav a[aria-current="page"] { color: var(--ink); }
:root:not([data-theme="dark"]) .nav__count { background: var(--blue); color: #fff; }
:root:not([data-theme="dark"]) .hero { background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%); color: var(--ink); }
:root:not([data-theme="dark"]) .hero::before { background: radial-gradient(closest-side, rgba(255, 159, 67, .30), rgba(255, 209, 102, .14) 55%, transparent 72%); }
:root:not([data-theme="dark"]) .hero h1, :root:not([data-theme="dark"]) .hero h2 { color: var(--ink); }
:root:not([data-theme="dark"]) .hero .lead, :root:not([data-theme="dark"]) .hero .eyebrow { color: var(--ink-soft); }
:root:not([data-theme="dark"]) .hero__facts { background: #fff; color: var(--ink-soft); border-radius: 0 0 28px 28px; }
:root:not([data-theme="dark"]) .hero__facts b { color: var(--ink); }
:root:not([data-theme="dark"]) .band--dark { background: var(--bg-tint); color: var(--ink); }
:root:not([data-theme="dark"]) .band--dark h2, :root:not([data-theme="dark"]) .band--dark h3 { color: var(--ink); }
:root:not([data-theme="dark"]) .band--dark .lead, :root:not([data-theme="dark"]) .band--dark .muted, :root:not([data-theme="dark"]) .band--dark .fineprint { color: var(--ink-soft); }
:root:not([data-theme="dark"]) .band--dark a:not(.btn) { color: var(--blue-ink); }
:root:not([data-theme="dark"]) .band--dark .panel { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
:root:not([data-theme="dark"]) .band--dark .kv li { border-color: var(--line); }
:root:not([data-theme="dark"]) .band--dark .radar__label, :root:not([data-theme="dark"]) .hero .radar__label { fill: var(--ink-soft); }
:root:not([data-theme="dark"]) .band--dark .radar__ring, :root:not([data-theme="dark"]) .band--dark .radar__axis { stroke: rgba(0, 0, 0, .15); }
:root:not([data-theme="dark"]) .btn--light { background: var(--ink); color: #fff; }
