/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #EEF0F4;
  --text: #14171F;
  --text-muted: #5B6472;
  --border: #E2E5EC;

  --accent: #5B4FE0;
  --accent-dark: #4238B8;
  --accent-soft: #E8E7FC;
  --gold: #C9902E;
  --green: #2BAE66;
  --red: #C1401F;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 48px -26px rgba(20, 23, 31, 0.18);
  --shadow-sm: 0 10px 24px -16px rgba(20, 23, 31, 0.18);

  --display: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1117; --surface: #171A22; --surface-2: #1E222D;
    --text: #EDEFF4; --text-muted: #9AA1B0; --border: #2B2F3B;
    --accent: #8B82FF; --accent-dark: #ACA6FF; --accent-soft: #24213F;
    --gold: #E0B04E;
    --shadow: 0 24px 48px -26px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 10px 24px -16px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --bg: #0F1117; --surface: #171A22; --surface-2: #1E222D;
  --text: #EDEFF4; --text-muted: #9AA1B0; --border: #2B2F3B;
  --accent: #8B82FF; --accent-dark: #ACA6FF; --accent-soft: #24213F;
  --gold: #E0B04E;
  --shadow: 0 24px 48px -26px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 10px 24px -16px rgba(0, 0, 0, 0.5);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: 1080px; margin-inline: auto; padding-inline: 1.4rem; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--accent); color: #fff; z-index: 9999; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.table-scroll { overflow-x: auto; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =============================================================
   4. Header / nav
   ============================================================= */
.site-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.site-header-row { display: flex; align-items: center; justify-content: space-between; padding-block: .9rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.logo strong { color: var(--accent); }
.site-nav { display: flex; gap: 1.5rem; font-size: .88rem; font-weight: 600; color: var(--text-muted); }
.site-nav a:hover { color: var(--accent); }
@media (max-width: 720px) { .site-nav { display: none; } }

/* =============================================================
   5. Buttons / badges
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem; padding: .8rem 1.5rem; transition: background .15s var(--ease-out), transform .15s var(--ease-out); cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }

.product-badge { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-dark); background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; margin-bottom: .5rem; }
.product-badge--top { background: var(--accent); color: #fff; }

/* =============================================================
   6. Disclosure banner
   ============================================================= */
.disclosure { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .85rem; color: var(--text-muted); margin-block: 1.4rem 2rem; }
.disclosure span { font-size: 1rem; }
.disclosure--footer { margin: 0 0 1.4rem; background: transparent; border: none; padding: 0; }

/* =============================================================
   7. Hero
   ============================================================= */
.hero { padding-block: 3.4rem 1.6rem; text-align: center; max-width: 780px; margin-inline: auto; }
.hero--sm { padding-block: 2.2rem 1rem; max-width: 900px; }
.hero-eyebrow { display: inline-block; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); background: var(--accent-soft); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); margin-bottom: 1rem; }
.hero--sm h1 { font-size: clamp(1.7rem, 3.8vw, 2.3rem); }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 62ch; margin-inline: auto; }
.hero-ctas { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }

.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 2.4rem; }
.trust-item { background: var(--surface); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem; }
.trust-item strong { font-size: .92rem; }
.trust-item span { font-size: .8rem; color: var(--text-muted); }

/* =============================================================
   8. Sections shared
   ============================================================= */
section h2 { font-size: clamp(1.4rem, 3.2vw, 1.8rem); margin-bottom: .5rem; }
.section-sub { color: var(--text-muted); font-size: .92rem; margin-bottom: 1.4rem; max-width: 65ch; }
.destacados, .top-ventas, .categorias, .guia-strip, .comparador-picker, .comparador-result, .guide-content, .faq { padding-block: 2rem; }
.breadcrumb { padding-block: 1.2rem 0; font-size: .82rem; color: var(--text-muted); }
.breadcrumb a { color: var(--accent-dark); font-weight: 600; }

/* =============================================================
   9. Product cards / grid
   ============================================================= */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.product-mini-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.product-mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pmc-media { display: block; background: var(--surface-2); aspect-ratio: 1.3; overflow: hidden; }
.pmc-media img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.pmc-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.pmc-body h3 { font-size: 1.02rem; line-height: 1.3; }
.pmc-body h3 a:hover { color: var(--accent-dark); }
.pmc-meta { display: flex; flex-direction: column; gap: .3rem; font-size: .84rem; }
.pmc-meta .rating { color: var(--gold); font-weight: 700; font-size: .8rem; }
.pmc-body .btn { margin-top: auto; }

.price { font-size: 1.1rem; font-weight: 700; color: var(--accent-dark); }
.price-strike { font-size: .85rem; color: var(--text-muted); text-decoration: line-through; }
.price-badge { display: inline-block; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; margin-left: .3rem; }
.rating-count { color: var(--text-muted); font-weight: 500; font-family: var(--sans); }

/* =============================================================
   10. Category grid
   ============================================================= */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.category-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); transition: border-color .15s var(--ease-out), transform .15s var(--ease-out); display: flex; flex-direction: column; gap: .4rem; }
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.category-card h3 { font-size: 1.02rem; }
.category-card p { font-size: .85rem; color: var(--text-muted); }
.category-count { font-family: var(--mono); font-size: .74rem; color: var(--accent-dark); margin-top: .3rem; }

.guide-card { display: block; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); max-width: 480px; }
.guide-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.guide-card p { color: var(--accent-dark); font-size: .88rem; font-weight: 600; }

/* =============================================================
   11. Ad slot
   ============================================================= */
.ad-slot { display: flex; align-items: center; justify-content: center; min-height: 90px; border: 1.5px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; background: var(--surface-2); margin-block: 2rem; }

/* =============================================================
   12. Ficha de producto
   ============================================================= */
.ficha { padding-block: 1.4rem 3rem; }
.ficha-top { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 2.4rem; margin-bottom: 2.6rem; }
@media (max-width: 860px) { .ficha-top { grid-template-columns: minmax(0, 1fr); } }

.gallery-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 1.4rem; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .8rem; overflow-x: auto; padding-bottom: .3rem; }
.gallery-thumb { flex: 0 0 60px; width: 60px; height: 60px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--surface); overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: .3rem; }
.gallery-thumb.is-active { border-color: var(--accent); }

.ficha-header { display: flex; flex-direction: column; gap: .5rem; }
.ficha-header h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
.ficha-brand { color: var(--text-muted); font-size: .92rem; margin-top: -.2rem; }
.ficha-rating { color: var(--gold); font-size: .92rem; }
.ficha-rating strong { color: var(--text); font-family: var(--sans); }
.ficha-price { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-block: .3rem .2rem; }
.ficha-price .price { font-size: 1.6rem; }
.price-date { font-size: .74rem; color: var(--text-muted); }
.ficha-desc { color: var(--text-muted); font-size: .95rem; max-width: 56ch; }
.ficha-header .btn { align-self: flex-start; }

.ficha-section { padding-block: 1.8rem; border-top: 1px solid var(--border); }
.ficha-section h2 { margin-bottom: .5rem; }
.ficha-section .btn { margin-top: 1rem; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th, .spec-table td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.spec-table th { width: 42%; color: var(--text-muted); font-weight: 600; background: var(--surface-2); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.specs-extra-details { margin-top: 1rem; }
.specs-extra-details summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); font-size: .88rem; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1rem; }
.pros h3, .cons h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem; font-family: var(--sans); }
.pros h3 { color: var(--green); }
.cons h3 { color: var(--red); }
.pros li, .cons li { font-size: .9rem; color: var(--text-muted); padding-left: 1.1rem; position: relative; margin-bottom: .4rem; }
.pros li::before { content: "+"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.cons li::before { content: "–"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.ideal-para { background: var(--accent-soft); border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .9rem; color: var(--text); }
@media (max-width: 620px) { .pros-cons { grid-template-columns: 1fr; } }

.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.review-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.review-stars { color: var(--gold); font-size: .8rem; }
.review-title { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.review-text { color: var(--text-muted); font-size: .86rem; line-height: 1.55; margin-bottom: .5rem; }
.review-source { font-size: .72rem; color: var(--text-muted); font-family: var(--mono); }

.ficha-cta-final { text-align: center; background: var(--surface-2); border-radius: var(--radius); padding: 2rem 1.5rem; margin-top: 2rem; }
.ficha-cta-final h2 { margin-bottom: 1rem; }

/* =============================================================
   13. Radar chart
   ============================================================= */
.radar-wrap { display: flex; flex-direction: column; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.radar-chart { width: 100%; max-width: 360px; height: auto; }
.radar-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-axis { stroke: var(--border); stroke-width: 1; }
.radar-label { font-family: var(--sans); font-size: 11px; fill: var(--text-muted); font-weight: 600; }
.radar-legend { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; font-size: .82rem; color: var(--text-muted); }
.radar-legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.radar-legend-item i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* =============================================================
   14. Comparador
   ============================================================= */
.compare-checks { display: flex; flex-wrap: wrap; gap: .8rem; }
.compare-check { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .9rem .6rem .6rem; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s var(--ease-out); }
.compare-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.compare-check img { width: 34px; height: 34px; object-fit: contain; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.compare-check span { font-size: .86rem; font-weight: 600; }
.comparador-empty { color: var(--text-muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 1.6rem; text-align: center; }

.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .88rem; margin-top: 1.6rem; }
.compare-table th, .compare-table td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.compare-table thead th { background: var(--surface-2); vertical-align: top; }
.compare-table thead th a { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }
.compare-table thead th img { width: 56px; height: 56px; object-fit: contain; background: var(--surface); border-radius: 10px; padding: 4px; }
.compare-table thead th span { font-size: .84rem; font-weight: 700; }
.compare-table tbody th { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.compare-table td { text-align: center; }
.compare-table td.is-best { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; border-radius: 6px; }
.compare-cta-row td { padding-top: 1rem; }

/* =============================================================
   15. FAQ / guide content
   ============================================================= */
.guide-content { max-width: 760px; }
.guide-content p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.7; }
.guide-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.2rem 1.3rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.guide-item h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.guide-item p { color: var(--text-muted); font-size: .9rem; }
.empty-state { color: var(--text-muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 2rem; text-align: center; }

.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .7rem; box-shadow: var(--shadow-sm); }
.faq-item summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; font-size: .95rem; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 1.2rem 1.1rem; color: var(--text-muted); font-size: .9rem; }

.about-list { display: flex; flex-direction: column; gap: .5rem; list-style: disc; padding-left: 1.2rem; }
.about-list li { color: var(--text-muted); font-size: .92rem; }

/* =============================================================
   16. Footer
   ============================================================= */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding-block: 2.2rem; margin-top: 1.5rem; }
.footer-content { display: flex; flex-direction: column; gap: 1.2rem; }
.footer-links { display: flex; gap: 1.1rem; font-size: .85rem; font-weight: 600; color: var(--text-muted); flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: .8rem; color: var(--text-muted); }

/* =============================================================
   17. Responsive tweaks
   ============================================================= */
@media (max-width: 540px) {
  .container { padding-inline: 1rem; }
  .ficha-price .price { font-size: 1.3rem; }
}
