/* ============================================================
   Los Calibres — base.css
   Estilos compartidos por todas las páginas
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS: MODO OSCURO (por defecto) ── */
:root {
  --bg: #0c0e13;
  --surface: #13161f;
  --surface2: #1c2030;
  --border: #252d40;
  --accent: #c9a84c;
  --accent2: #e8c97a;
  --accent3: #7b9ccc;
  --text: #e8e6e0;
  --text-soft: #94a3b8;
  --muted: #5c6480;
  --border-soft: rgba(37,45,64,0.5);
  --border-softer: rgba(37,45,64,0.4);
  --color-good: #4ade80;
  --color-neutral: #fbbf24;
  --color-bad: #f87171;
}

/* LIGHT MODE — automático por sistema */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f8f6f1;
    --surface: #ffffff;
    --surface2: #f0ede6;
    --border: #ddd8cc;
    --accent: #a67c2e;
    --accent2: #c9a84c;
    --accent3: #4a6fa5;
    --text: #1a1814;
    --text-soft: #4a4540;
    --muted: #7a7060;
    --border-soft: rgba(180,170,155,0.5);
    --border-softer: rgba(180,170,155,0.4);
    --color-good: #2d7a4f;
    --color-neutral: #9a6f00;
    --color-bad: #c0392b;
  }
}

/* LIGHT MODE — forzado por toggle */
:root[data-theme="light"] {
  --bg: #f8f6f1;
  --surface: #ffffff;
  --surface2: #f0ede6;
  --border: #ddd8cc;
  --accent: #a67c2e;
  --accent2: #c9a84c;
  --accent3: #4a6fa5;
  --text: #1a1814;
  --text-soft: #4a4540;
  --muted: #7a7060;
  --border-soft: rgba(180,170,155,0.5);
  --border-softer: rgba(180,170,155,0.4);
  --color-good: #2d7a4f;
  --color-neutral: #9a6f00;
  --color-bad: #c0392b;
}

/* DARK MODE — forzado por toggle */
:root[data-theme="dark"] {
  --bg: #0c0e13;
  --surface: #13161f;
  --surface2: #1c2030;
  --border: #252d40;
  --accent: #c9a84c;
  --accent2: #e8c97a;
  --accent3: #7b9ccc;
  --text: #e8e6e0;
  --text-soft: #94a3b8;
  --muted: #5c6480;
  --border-soft: rgba(37,45,64,0.5);
  --border-softer: rgba(37,45,64,0.4);
  --color-good: #4ade80;
  --color-neutral: #fbbf24;
  --color-bad: #f87171;
}

/* Ajuste del gradiente de fondo en light */
:root[data-theme="light"] body::before,
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) body::before }
{
  background:
    radial-gradient(ellipse 50% 30% at 80% 10%, rgba(166,124,46,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 25% at 10% 90%, rgba(74,111,165,0.04) 0%, transparent 60%);
}

/* ── TOGGLE BUTTON ── */
.theme-toggle {
  margin-left: auto;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon { font-size: 0.95rem; line-height: 1; }
.theme-toggle .label { font-size: 0.72rem; letter-spacing: 0.5px; }

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.8;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 30% at 80% 10%, rgba(201,168,76,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 25% at 10% 90%, rgba(123,156,204,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wrapper { position: relative; z-index: 1; }

/* ── TOPBAR ── */
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 24px; display: flex; justify-content: flex-end; gap: 24px; }
.topbar a { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--accent); }

/* ── NAV (calibre pages default) ── */
nav {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-sep { color: var(--border); }
.nav-current { color: var(--muted); font-size: 0.85rem; }
.nav-tagline { font-size: 0.78rem; color: var(--muted); letter-spacing: 1px; }
.nav-back { font-size: 0.85rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-back:hover { color: var(--accent); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

footer a { font-size: 0.82rem; color: var(--muted); text-decoration: none; }
footer span { font-size: 0.82rem; color: var(--muted); }
.footer-logo { font-family: 'Playfair Display', serif; font-weight: 900; color: var(--accent); font-size: 1rem; }

/* ── CALIBRE HERO ── */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 0;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img { order: -1; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-intro { color: var(--text-soft); font-size: 1rem; margin-bottom: 24px; line-height: 1.7; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.hero-img img { width: 100%; border-radius: 16px; border: 1px solid var(--border); display: block; }
.img-caption { font-size: 0.72rem; color: var(--muted); margin-top: 10px; text-align: center; line-height: 1.4; }
.img-caption a { color: var(--muted); }

/* ── TAGS ── */
.tag { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px; font-size: 0.75rem; color: var(--muted); }
.tag.highlight { background: rgba(201,168,76,0.08); border-color: rgba(201,168,76,0.2); color: var(--accent); }
.tag.warning { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.2); color: var(--color-bad); }

/* ── RATING BARS ── */
.rating-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rating-label { font-size: 0.8rem; color: var(--muted); width: 100px; flex-shrink: 0; }
.rating-track { flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.rating-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; }
.rating-score { font-size: 0.8rem; color: var(--accent); font-weight: 600; width: 28px; text-align: right; }

/* ── MAIN LAYOUT ── */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 100px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 720px) {
  .main { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* ── SPECS BOX (sidebar) ── */
.specs-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  position: sticky;
  top: 24px;
}

.specs-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}

.spec-row:last-child { border-bottom: none; }
.spec-key { font-size: 0.78rem; color: var(--muted); flex-shrink: 0; }
.spec-val { font-size: 0.82rem; color: var(--text); font-weight: 500; text-align: right; }
.spec-val.good { color: var(--accent); }
.spec-val.neutral { color: var(--text-soft); }
.spec-val.bad { color: var(--color-bad); }

/* ── VERDICT BOX ── */
.verdict-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.verdict-score {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.verdict-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: block;
}

.verdict-text {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── ARTICLE TYPOGRAPHY ── */
.article h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 14px;
  color: var(--text);
}

.article h2:first-child { margin-top: 0; }

.article h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent3);
  margin: 24px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article p { color: var(--text-soft); margin-bottom: 18px; font-size: 0.95rem; }
.article strong { color: var(--text); font-weight: 600; }

/* ── CALLOUT BOXES ── */
.highlight-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 24px 0 32px;
}

.warning-box {
  background: rgba(248,113,113,0.05);
  border: 1px solid rgba(248,113,113,0.2);
  border-left: 3px solid var(--color-bad);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 24px 0 32px;
}

.highlight-box p, .warning-box p { margin: 0; }

/* ── GRADES GRID ── */
.grades-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0 32px; }
.grade-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.grade-name { font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; font-weight: 600; }
.grade-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

/* ── COMPARE TABLE ── */
.compare-table { width: 100%; border-collapse: collapse; margin: 24px 0 32px; font-size: 0.85rem; }
.compare-table th { padding: 12px 14px; background: var(--surface2); color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table th.highlight-col { color: var(--accent); }
.compare-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); color: var(--text-soft); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .good { color: var(--accent); }
.compare-table .bad { color: var(--color-bad); }

/* ── RELOJES GRID ── */
.relojes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 20px 0 32px; }
.reloj-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; transition: border-color 0.2s; }
.reloj-card:hover { border-color: var(--accent); }
.reloj-marca { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.reloj-nombre { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.3; }
.reloj-precio { font-size: 0.8rem; color: var(--muted); }

/* ── PROS / CONS ── */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 32px; }

@media (max-width: 500px) { .pros-cons { grid-template-columns: 1fr; } }

.pros, .cons { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.pros { border-top: 2px solid var(--accent); }
.cons { border-top: 2px solid var(--color-bad); }
.pros-title { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; font-weight: 600; }
.cons-title { font-size: 0.75rem; color: var(--color-bad); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; font-weight: 600; }
.pros ul, .cons ul { list-style: none; }
.pros li, .cons li { font-size: 0.85rem; color: var(--text-soft); padding: 6px 0; padding-left: 20px; position: relative; border-bottom: 1px solid var(--border-softer); }
.pros li:last-child, .cons li:last-child { border-bottom: none; }
.pros li::before { content: '+'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.cons li::before { content: '−'; position: absolute; left: 0; color: var(--color-bad); font-weight: 700; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 600; color: var(--text); margin-bottom: 10px; font-size: 0.95rem; }
.faq-a { color: var(--text-soft); margin: 0; font-size: 0.9rem; }

/* ── AD BLOCK ── */
.ad-block { background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 20px; text-align: center; color: var(--muted); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; margin: 36px 0; }

/* ── RELATED CALIBRES ── */
.related { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--border); }
.related-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--text); transition: border-color 0.2s; display: block; }
.related-card:hover { border-color: var(--accent); }
.related-card-label { font-size: 0.68rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.related-card-title { font-size: 0.88rem; font-weight: 500; color: var(--text-soft); line-height: 1.4; }

/* ── AFFILIATE BLOCK ── */
.affiliate-block {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 36px 0;
  transition: border-color 0.2s;
}

.affiliate-block:hover { border-color: var(--accent); opacity: 0.9; }
.affiliate-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.affiliate-title { font-size: 0.95rem; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.affiliate-desc { font-size: 0.85rem; color: var(--text-soft); line-height: 1.6; margin-bottom: 12px; }
.affiliate-cta { font-size: 0.82rem; font-weight: 600; color: var(--accent); }
/* Accessibility utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
