:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --text: #2b1d14;
  --muted: #7a6a5e;
  --line: #eadfd3;
  --accent: #8b4a1f;
  --accent-soft: #f4e6d8;
  --cta: #ff9900;
  --cta-text: #1a1a1a;
  --good: #2f7d4a;
  --bad: #b23b2e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120e;
    --surface: #221a14;
    --text: #f1e8df;
    --muted: #b3a294;
    --line: #3a2e25;
    --accent: #e0a46e;
    --accent-soft: #3a2a1d;
    --good: #6cc48b;
    --bad: #ef8a7d;
  }
}
:root[data-theme="dark"] {
  --bg: #17120e; --surface: #221a14; --text: #f1e8df; --muted: #b3a294;
  --line: #3a2e25; --accent: #e0a46e; --accent-soft: #3a2a1d; --good: #6cc48b; --bad: #ef8a7d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .3em 0; }
h2 { font-size: 1.45rem; margin-top: 2em; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { font-weight: 800; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.nav nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav nav a:hover { color: var(--accent); }

.hero { padding: 40px 0 8px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--accent); font-weight: 700; margin: 0; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 720px; }
.picks, .alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.pick { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.pick:hover { border-color: var(--accent); }

.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; width: fit-content; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 16px 0; }
.card-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.card h3 { margin: 6px 0 2px; font-size: 1.25rem; }
.card .muted { margin: 0; font-size: .9rem; }
.pos { color: var(--muted); }
.mini { padding-left: 1.2em; margin: 8px 0; }
.mini li::marker { color: var(--good); }

.thumb { position: relative; width: 64px; height: 64px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.thumb svg { width: 44px; height: 44px; }
.thumb span { position: absolute; bottom: 4px; right: 6px; font-size: .65rem; font-weight: 800; }

.score { font-size: 1.5rem; font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 6px 12px; text-align: center; }
.score.big { font-size: 2.2rem; }
.score small { font-size: .9rem; color: var(--muted); }

.acciones, .cta-box { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cta-box { margin: 20px 0; }
.btn { display: inline-block; background: var(--cta); color: var(--cta-text); font-weight: 700; text-decoration: none; padding: 10px 18px; border-radius: 10px; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

.tabla-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
thead th { background: var(--accent-soft); }
tr:last-child td, tr:last-child th { border-bottom: 0; }
table .btn { padding: 6px 12px; font-size: .85rem; }

.aviso { font-size: .82rem; color: var(--muted); border-left: 3px solid var(--cta); padding: 4px 12px; margin: 16px 0; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
.faq summary { font-weight: 700; cursor: pointer; }

.miga { font-size: .85rem; color: var(--muted); margin-top: 20px; }
.r-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start; margin-top: 16px; }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pros, .contras { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px 12px; }
.pros h2, .contras h2 { font-size: 1.1rem; margin-top: 1em; }
.pros h2 { color: var(--good); }
.contras h2 { color: var(--bad); }
.pros li::marker { content: "✓  "; color: var(--good); }
.contras li::marker { content: "✗  "; color: var(--bad); }
.specs { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.specs th { width: 40%; color: var(--muted); font-weight: 600; }
.veredicto { font-size: 1.1rem; font-weight: 600; background: var(--accent-soft); padding: 16px; border-radius: 12px; }
.texto { max-width: 760px; padding: 24px 0; }

.pie { margin-top: 60px; padding: 24px 0; border-top: 1px solid var(--line); background: var(--surface); font-size: .9rem; color: var(--muted); }

@media (max-width: 640px) {
  .card-head, .r-head { grid-template-columns: auto 1fr; }
  .card-head .score, .r-head .score { grid-column: 1 / -1; justify-self: start; }
  .pc { grid-template-columns: 1fr; }
  .nav nav { gap: 12px; }
}

.card-head > div, .r-head > div { min-width: 0; }
h1, h2, h3, p, li, td { overflow-wrap: anywhere; }
html, body { overflow-x: hidden; }

/* Fotos de producto (fondo blanco, como en Amazon) */
.foto { background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.foto img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.pick-img img { max-height: 150px; }
.thumb.foto img { max-height: 104px; }
.r-img img { max-height: 212px; }
.t-img img { max-height: 48px; }
.thumb.foto { width: 120px; height: 120px; padding: 8px; border-radius: 14px; }
.pick-img { height: 170px; border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.r-img { width: 240px; height: 240px; border-radius: 16px; padding: 14px; }
.t-img { width: 56px; height: 56px; border-radius: 8px; padding: 4px; flex-shrink: 0; }
.t-prod { display: flex; gap: 10px; align-items: center; }
.pick:hover .foto img, .card:hover .foto img { transform: scale(1.04); transition: transform .25s; }
@media (max-width: 640px) {
  .thumb.foto { width: 88px; height: 88px; }
  .r-head { grid-template-columns: 1fr; }
  .r-img { width: 100%; height: 260px; }
}

/* Accesibilidad */
.saltar { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 10; }
.saltar:focus { left: 8px; top: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sin-subrayado { text-decoration: none; color: inherit; }
.sin-subrayado:hover { color: var(--accent); }

/* Autor y fecha, índice */
.firma { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
.indice { font-size: .92rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.nota { background: var(--accent-soft); padding: 10px 14px; border-radius: 10px; font-size: .92rem; }

/* Ficha de producto dentro de artículos */
.ficha { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 16px 0; }
.ficha-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ficha-txt a { color: var(--text); text-decoration: none; font-size: 1.1rem; }
.ficha .thumb.foto { width: 96px; height: 96px; }
.ficha .thumb.foto img { max-height: 80px; }

/* Tarjetas de artículos */
.arts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.art { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.art:hover { border-color: var(--accent); }
.art .muted { font-size: .9rem; }
.articulo table { margin: 8px 0; }

/* Pie con columnas */
.pie-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 16px; }
.pie-cols div { display: flex; flex-direction: column; gap: 4px; }
.pie-cols strong { color: var(--text); margin-bottom: 4px; }
.pie-cols a { color: var(--muted); text-decoration: none; font-size: .88rem; }
.pie-cols a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .ficha { grid-template-columns: auto 1fr; }
  .ficha-cta { grid-column: 1 / -1; }
}

/* Quién está detrás */
.quien { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px 12px; margin-top: 2em; }
.quien h2, .quien h1 { margin-top: .8em; }
.datos { list-style: none; padding: 0; }
.datos li { padding: 4px 0; }

/* Marcador sin foto (hasta tener fotos propias o de la Creators API) */
.ph { background: linear-gradient(145deg, var(--accent-soft), var(--surface)); color: var(--accent); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ph svg { width: 34%; max-width: 90px; height: auto; }
.ph span { font-weight: 800; font-size: .9rem; letter-spacing: .02em; }
.t-img.ph span { display: none; }
.t-img.ph svg { width: 70%; }

.contacto-pie { color: var(--text); font-size: .92rem; }
