/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f5f7fb;
  --bg-2:      #eaeff8;
  --glass:     rgba(255,255,255,0.6);
  --glass-2:   rgba(255,255,255,0.35);
  --card:      #ffffff;
  --ink:       #10182b;
  --ink-soft:  #45506b;
  --ink-mute:  #707c99;
  --accent:    #2f6fed;
  --accent-2:  #ffb020;
  --good:      #1a9e5c;
  --bad:       #d3402f;
  --line:      rgba(16,24,43,0.10);
  --line-2:    rgba(16,24,43,0.16);
  --radius:    18px;
  --radius-sm: 10px;
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1180px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
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;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; font-family: var(--display); font-weight: 600; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.section { padding-block: clamp(3rem, 6vw, 6rem); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.section-head p { color: var(--ink-soft); margin-top: .6rem; font-size: 1.05rem; }
.text-mute { color: var(--ink-mute); }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(47,111,237,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(47,111,237,.6); }
.btn-comprar { background: var(--accent-2); color: #241a03; box-shadow: 0 8px 20px -8px rgba(255,176,32,.55); }
.btn-comprar:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(255,176,32,.6); }
.btn-ghost { background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(12px); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* =============================================================
   5. Nav
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease-out), border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.82);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 30px -20px rgba(16,24,43,.3);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: .9rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(255,176,32,.25); }
.nav-links { display: none; gap: 1.75rem; font-size: .95rem; font-weight: 500; }
.nav-links a { color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { display: none; }
.nav-toggle-details { position: relative; }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle-details { display: none; }
}
.nav-toggle-summary {
  display: inline-flex; align-items: center; padding: .6rem 1rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line-2); cursor: pointer; list-style: none; font-weight: 600; font-size: .9rem;
}
.nav-toggle-summary::-webkit-details-marker { display: none; }
.nav-mobile {
  position: absolute; right: 0; top: calc(100% + .6rem); z-index: 50;
  display: flex; flex-direction: column; gap: .1rem; min-width: 220px;
  padding: .6rem; border-radius: var(--radius-sm); background: #fff;
  border: 1px solid var(--line-2); box-shadow: 0 20px 40px -16px rgba(16,24,43,.28);
}
.nav-mobile a { padding: .6rem .75rem; font-weight: 500; border-radius: 8px; }
.nav-mobile a:hover { background: #eef2fb; }

/* =============================================================
   6. Hero
   ============================================================= */
.hero { position: relative; padding-block: clamp(3rem, 8vw, 7rem) clamp(2.5rem, 6vw, 5rem); overflow: clip; --mx: 50%; --my: 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,176,32,.16), transparent 65%);
  transition: background .15s linear;
}
.hero-mesh {
  position: absolute; inset: -10% -10% auto -10%; height: 140%; z-index: -1;
  background:
    radial-gradient(at 15% 20%, rgba(47,111,237,.25) 0%, transparent 55%),
    radial-gradient(at 85% 15%, rgba(255,176,32,.22) 0%, transparent 50%),
    radial-gradient(at 50% 85%, rgba(120,90,255,.16) 0%, transparent 55%);
  filter: blur(50px) saturate(140%);
  animation: meshDrift 32s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.15) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) { .hero-mesh { animation: none; } }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero-kicker { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--line-2); font-size: .85rem; font-weight: 600; margin-bottom: 1.25rem; backdrop-filter: blur(10px); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); margin-top: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; font-size: .85rem; color: var(--ink-mute); }
.hero-trust li { display: flex; align-items: center; gap: .4rem; }

.hero-calc-teaser { background: var(--glass); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.75rem; backdrop-filter: blur(20px) saturate(180%); }
.hero-calc-teaser h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.hero-calc-teaser p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.1rem; }
.hero-calc-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.chip { padding: .45rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-size: .85rem; }

/* =============================================================
   7. Glass cards / product cards
   ============================================================= */
.glass-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16,24,43,.04), 0 20px 40px -24px rgba(16,24,43,.18);
}
@supports (backdrop-filter: blur(1px)) {
  .glass-card { background: var(--glass); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
}

.grid-cats { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid-cats { grid-template-columns: repeat(4, 1fr); } }
.cat-card { padding: 1.5rem 1.25rem; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(16,24,43,.25); }
.cat-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; margin-bottom: 1rem; }
.cat-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.cat-card p { font-size: .88rem; color: var(--ink-soft); }

.grid-products { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }

.product-card { overflow: clip; display: flex; flex-direction: column; transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -24px rgba(16,24,43,.28); }
.product-card-img { aspect-ratio: 4/3; background: #eef2fb; }
.product-card-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-card-marca { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.product-card-name { font-size: 1.05rem; }
.product-card-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .1rem; }
.badge { font-size: .74rem; font-weight: 600; padding: .25rem .55rem; border-radius: 999px; background: #eef2fb; color: var(--ink-soft); }
.badge-muestra { font-size: .78rem; font-weight: 600; color: #8a5a00; background: #fff2d8; border: 1px solid #ffdf9c; padding: .4rem .7rem; border-radius: var(--radius-sm); margin: .5rem 0; display: inline-block; }
.product-card-price { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; padding-top: .5rem; }
.price-now { font-size: 1.3rem; font-weight: 700; font-family: var(--display); }
.price-before { font-size: .9rem; color: var(--ink-mute); text-decoration: line-through; }
.product-card-actions { display: flex; gap: .6rem; margin-top: .75rem; }
.product-card-actions .btn { flex: 1; padding: .65rem 1rem; font-size: .85rem; }
.score-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--ink-soft); }
.score-chip strong { color: var(--ink); font-family: var(--mono); }

/* =============================================================
   8. Ficha de producto
   ============================================================= */
.ficha { display: grid; gap: 2.5rem; padding-block: 2rem 4rem; }
@media (min-width: 960px) { .ficha { grid-template-columns: 1fr 1fr; align-items: start; } }
.ficha-galeria { position: sticky; top: 90px; }
.ficha-img-main { border-radius: var(--radius); width: 100%; background: #eef2fb; }
.ficha-marca { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; }
.ficha-nombre { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: .3rem; }
.ficha-precio { display: flex; align-items: baseline; gap: .75rem; margin-top: 1.1rem; flex-wrap: wrap; }
.ficha-precio .precio-actual { font-size: 2rem; font-family: var(--display); font-weight: 700; }
.ficha-precio .precio-antes { font-size: 1.1rem; color: var(--ink-mute); text-decoration: line-through; }
.precio-nota { width: 100%; font-size: .82rem; color: var(--ink-mute); margin-top: .2rem; }
.ficha-head .btn-comprar { margin-top: 1.4rem; font-size: 1.02rem; padding: 1rem 1.75rem; }

.ficha-radar, .ficha-specs, .ficha-editorial, .ficha-resenas { padding: 1.75rem; margin-top: 1.5rem; }
.ficha-radar h2, .ficha-specs h2, .ficha-editorial h2, .ficha-resenas h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.ficha-radar .nota, .ficha-resenas .nota { font-size: .82rem; color: var(--ink-mute); margin-top: .5rem; }
.radar-figure { display: flex; justify-content: center; padding: 1rem 0; }

table[data-specs] th, table[data-specs] td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
table[data-specs] th { color: var(--ink-soft); font-weight: 500; width: 45%; }
table[data-specs] td { font-weight: 600; }
.specs-extra { margin-top: 1rem; font-size: .88rem; }
.specs-extra summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.specs-extra dl { margin-top: .75rem; display: grid; grid-template-columns: auto 1fr; gap: .3rem .75rem; }
.specs-extra dt { color: var(--ink-mute); }

.editorial-cuerpo p { margin-bottom: 1rem; color: var(--ink-soft); }
.pros-contras { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 560px) { .pros-contras { grid-template-columns: 1fr 1fr; } }
.pros li, .contras li { padding-left: 1.4rem; position: relative; margin-bottom: .5rem; font-size: .92rem; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.contras li::before { content: "✕"; position: absolute; left: 0; color: var(--bad); font-weight: 700; }
.ideal-para, .no-ideal-para { margin-top: 1rem; font-size: .92rem; padding: .9rem 1rem; border-radius: var(--radius-sm); }
.ideal-para { background: #eafaf1; }
.no-ideal-para { background: #fdeeec; }

.aviso-afiliados { font-size: .8rem; color: var(--ink-mute); border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }

/* =============================================================
   9. Comparador
   ============================================================= */
.comparador-picker { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.pick-chip { display: flex; align-items: center; gap: .5rem; padding: .55rem .95rem .55rem .6rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-size: .9rem; font-weight: 500; transition: all .2s; }
.pick-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #eef2fb; }
.pick-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.comparador-table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.comparador-table { min-width: 640px; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.comparador-table th, table.comparador-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-size: .9rem; text-align: left; }
table.comparador-table thead th { background: #eef2fb; font-family: var(--display); position: sticky; top: 0; }
table.comparador-table th.row-label { color: var(--ink-mute); font-weight: 500; white-space: nowrap; }
table.comparador-table td.is-best { color: var(--good); font-weight: 700; }
.comparador-empty { padding: 3rem 1.5rem; text-align: center; color: var(--ink-mute); }
.comparador-radares { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center; margin-top: 2.5rem; }
.comparador-radares figure figcaption { text-align: center; font-size: .85rem; margin-top: .5rem; font-weight: 600; }

/* =============================================================
   10. Calculadora
   ============================================================= */
.calc-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .calc-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.calc-form { padding: 1.75rem; }
.calc-form h2 { font-size: 1.2rem; margin-bottom: 1.25rem; }
.calc-device { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.calc-device label { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.calc-device input[type="number"] { width: 64px; padding: .4rem .5rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); text-align: center; }
.calc-device .watt-hint { font-size: .78rem; color: var(--ink-mute); }
.calc-hours { padding: 1.25rem 0 0; }
.calc-hours label { font-size: .92rem; font-weight: 600; display: block; margin-bottom: .5rem; }
.calc-hours input[type="range"] { width: 100%; }

.calc-result { padding: 1.75rem; position: sticky; top: 90px; }
.calc-result h2 { font-size: 1.2rem; }
.calc-result-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.25rem 0; }
.calc-result-numbers div { background: #eef2fb; border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.calc-result-numbers strong { display: block; font-size: 1.5rem; font-family: var(--display); }
.calc-result-numbers span { font-size: .78rem; color: var(--ink-mute); }
.calc-recos { display: grid; gap: .9rem; margin-top: 1.25rem; }
.calc-reco { display: flex; gap: .9rem; align-items: center; padding: .9rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); }
.calc-reco img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #eef2fb; flex-shrink: 0; }
.calc-reco-medal { font-size: 1.3rem; }
.calc-reco strong { display: block; font-size: .92rem; }
.calc-reco span { font-size: .8rem; color: var(--ink-mute); }
.calc-reco .btn { margin-left: auto; padding: .5rem .9rem; font-size: .8rem; }

/* =============================================================
   11. Guías / artículos editoriales
   ============================================================= */
.article-head { max-width: 760px; margin-inline: auto; text-align: center; padding-block: 2rem 1rem; }
.article-meta { display: flex; justify-content: center; gap: 1rem; font-size: .82rem; color: var(--ink-mute); margin-top: .75rem; }
.article-body { max-width: 700px; margin-inline: auto; font-size: 1.05rem; color: var(--ink-soft); }
.article-body h2 { color: var(--ink); font-size: 1.4rem; margin-top: 2.25rem; margin-bottom: .75rem; }
.article-body p { margin-bottom: 1.1rem; }
.article-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.1rem; }
.article-body li { margin-bottom: .4rem; }
.article-body .callout { background: var(--glass); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; backdrop-filter: blur(14px); }
.faq-item { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin-top: .6rem; color: var(--ink-soft); }

/* =============================================================
   12. Legal / autoría
   ============================================================= */
.legal-body { max-width: 760px; margin-inline: auto; color: var(--ink-soft); }
.legal-body h2 { margin-top: 1.75rem; margin-bottom: .6rem; font-size: 1.15rem; color: var(--ink); }
.legal-body p, .legal-body li { margin-bottom: .75rem; }
.legal-body ul { list-style: disc; padding-left: 1.4rem; }
.autor-card { display: flex; gap: 1.25rem; align-items: center; padding: 1.5rem; margin-block: 2rem; }
.autor-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex-shrink: 0; }
.autor-card h3 { font-size: 1.05rem; }
.autor-card p { font-size: .88rem; color: var(--ink-soft); margin-top: .2rem; }

/* =============================================================
   13. Footer
   ============================================================= */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; margin-top: 4rem; background: var(--bg-2); }
.footer-grid { display: grid; gap: 2.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--ink-soft); font-size: .9rem; margin-top: .75rem; max-width: 32ch; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); margin-bottom: .85rem; }
.footer-col ul li { margin-bottom: .55rem; }
.footer-col a { font-size: .92rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-legal { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--ink-mute); line-height: 1.7; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; font-size: .8rem; color: var(--ink-mute); }

/* =============================================================
   14. Offers page
   ============================================================= */
.ofertas-banner { padding: 1.5rem 1.75rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.ofertas-banner .cat-icon { margin: 0; }

/* =============================================================
   15. Reveal animation (progressive enhancement)
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* =============================================================
   16. Responsive helpers
   ============================================================= */
@media (max-width: 719px) {
  .ficha-galeria { position: static; }
  .calc-result { position: static; }
}
