/*
Theme Name: Optimalia
Theme URI: https://optimalia.example
Description: Tema de afiliación Amazon — portada + review/comparativa + archivo de categoría. Naranja Amazon #FF9900 como color de conversión.
Author: Optimalia
Version: 1.3.9
Text Domain: optimalia
--------------------------------------------------------------------
Al convertir a tema WordPress este archivo pasa a ser style.css
(la cabecera de arriba ya cumple el formato que exige WP).
*/

/* ============ Tokens ============ */
:root {
  --bg:            oklch(0.985 0.001 250);   /* #FAFAFA */
  --surface:       oklch(1 0 0);             /* #FFFFFF */
  --fg:            oklch(0.20 0.008 260);    /* #0F1111 tinta Amazon */
  --muted:         oklch(0.46 0.008 260);    /* #565959 */
  --border:        oklch(0.89 0.004 250);    /* #DDE1E3 */
  --accent:        oklch(0.77 0.160 60);     /* #FF9900 naranja Amazon */
  --accent-strong: oklch(0.70 0.150 55);     /* #E88A00 hover */
  --accent-ink:    oklch(0.28 0.030 250);    /* tinta sobre naranja */
  --navy:          oklch(0.22 0.022 255);    /* #131921 */
  --navy-2:        oklch(0.29 0.035 255);    /* #232F3E */
  --link:          oklch(0.50 0.110 245);    /* #146EB4 */
  --success:       oklch(0.52 0.095 165);    /* #067D62 */
  --danger:        oklch(0.52 0.190 20);     /* #CC0C39 solo semántico */
  --surface-alt:   oklch(0.955 0.003 250);   /* #F3F4F5 bandas */
  --font-display:  "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:     "Inter", "Segoe UI", Roboto, sans-serif;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow-sm:     0 1px 2px oklch(0.20 0.02 260 / 0.06), 0 2px 8px oklch(0.20 0.02 260 / 0.05);
  --shadow-md:     0 2px 4px oklch(0.20 0.02 260 / 0.08), 0 10px 28px oklch(0.20 0.02 260 / 0.10);
  --container:     1200px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }

/* Enlace «Saltar al contenido» — visible solo con foco de teclado */
.skip-link {
  position: absolute; left: 12px; top: -56px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 0; color: #fff; text-decoration: none; outline-offset: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); font-weight: 750; letter-spacing: -0.02em; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.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; }
.section { padding: clamp(2.5rem, 5vw, 4.25rem) 0; }
.section--alt { background: var(--surface-alt); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; max-width: 62ch; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 10px;
}
.updated { font-size: 0.8rem; color: var(--muted); }

/* ============ Botones ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 650; font-size: 0.95rem; letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 0 oklch(0.60 0.13 55), var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 1px 0 oklch(0.58 0.12 55), var(--shadow-md); }
.btn-primary:active { transform: translateY(1px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--muted); background: var(--surface-alt); }
.btn svg { flex: 0 0 auto; }
.btn-block { width: 100%; }

/* ============ Cabecera ============ */
.topbar {
  background: var(--navy-2); color: oklch(0.85 0.01 250);
  font-size: 0.75rem; text-align: center; padding: 7px 16px;
}
.topbar strong { color: var(--accent); font-weight: 650; }
/* ============ Header de 2 Niveles ============ */
/* ============ Header de 2 Niveles & Dropdown ============ */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-main-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-main-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none !important;
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }
.logo-tagline {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-left: 8px;
  text-transform: uppercase;
}
.header-search-wrap {
  flex: 1 1 480px;
  max-width: 540px;
}
.header-search {
  display: flex;
  width: 100%;
}
.header-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px 0 0 8px;
  font: inherit;
  font-size: 0.92rem;
  background: #ffffff;
  color: #0f172a;
}
.header-search button {
  width: 52px;
  height: 42px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: var(--accent);
  color: #111827;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.header-search button:hover {
  background: #f97316;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.lang-dropdown {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.lang-btn {
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.15s ease;
}
.lang-btn--active, .lang-btn:hover {
  background: #ffffff;
  color: #0f172a;
}

/* --- Nivel 2: Subnav Categorías --- */
.subnav--categories {
  background: #0a2540;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}
.subnav-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  padding-bottom: 4px;
  overflow: visible;
}
.subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.subnav-item:hover, .subnav-item--active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.subnav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.subnav-list li {
  margin: 0;
  padding: 0;
  position: relative;
}
.subnav-list a {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
  display: inline-block;
  transition: all 0.15s ease;
}
.subnav-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Dropdown "Más categorías" con puente hover y clase abierta */
.subnav-dropdown {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}
.subnav-dropdown-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.subnav-dropdown-btn:hover,
.subnav-dropdown:hover .subnav-dropdown-btn,
.subnav-dropdown--open .subnav-dropdown-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}
.dropdown-caret {
  transition: transform 0.2s ease;
}
.subnav-dropdown:hover .dropdown-caret,
.subnav-dropdown--open .dropdown-caret {
  transform: rotate(180deg);
}
.subnav-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  background: #0a2238 !important;
  min-width: 220px !important;
  border-radius: 8px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 6px !important;
  display: none !important;
  flex-direction: column !important;
  z-index: 99999 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
/* Puente invisible para que el cursor no pierda el foco entre el botón y el menú */
.subnav-dropdown-menu::before {
  content: '' !important;
  position: absolute !important;
  top: -10px !important;
  left: 0 !important;
  right: 0 !important;
  height: 10px !important;
  background: transparent !important;
}
.subnav-dropdown:hover .subnav-dropdown-menu,
.subnav-dropdown--open .subnav-dropdown-menu {
  display: flex !important;
}
.subnav-dropdown-menu li {
  width: 100% !important;
  margin: 2px 0 !important;
  display: block !important;
}
.subnav-dropdown-menu a {
  color: #ffffff !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}
.subnav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ff9800 !important;
  transform: translateX(4px);
}

/* Botón Últimas reviews destacado */
.subnav-highlight-item {
  margin-left: auto;
}
.subnav-btn-reviews {
  background: var(--accent) !important;
  color: #111827 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.subnav-btn-reviews:hover {
  background: #f97316 !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .logo-tagline { display: none; }
  .header-main-container { gap: 12px; height: 60px; }
  .header-search-wrap { flex: 1 1 auto; }
  .subnav-container { overflow-x: auto; }
}

/* ============ Hero ============ */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); overflow: hidden; }
.hero .container {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 56px);
  align-items: center; padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.hero-lead { font-size: 1.13rem; color: var(--muted); max-width: 56ch; margin-bottom: 26px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-stats { display: flex; gap: clamp(20px, 3vw, 44px); border-top: 1px solid var(--border); padding-top: 22px; flex-wrap: wrap; }
.hero-stats .stat b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 1.55rem; letter-spacing: -0.02em; font-feature-settings: "tnum";
}
.hero-stats .stat span { font-size: 0.8rem; color: var(--muted); }
.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-figure img, .hero-img-3d {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease;
}
.hero-figure img:hover {
  transform: translateY(-2px);
}
.hero-badge { display: none !important; }
.hero-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.hero-figure .ph-img { box-shadow: var(--shadow-md); }

/* ============ Barra de confianza ============ */
.trustbar { border-bottom: 1px solid var(--border); background: var(--surface); }
.trustbar .container { display: flex; justify-content: center; gap: clamp(18px, 4vw, 56px); padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.trustbar span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 550; }
.trustbar svg { color: var(--success); }

/* ============ Top picks ============ */
.picks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pick-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.pick-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pick-media { position: relative; background: #fff; border-bottom: 1px solid var(--border); aspect-ratio: 1 / 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pick-media img { width: 100%; height: 100%; object-fit: contain !important; padding: 18px; background: #fff; }
.pick-badge {
  position: absolute; left: 12px; top: 12px;
  background: var(--navy); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 6px;
}
.pick-badge--accent { background: var(--accent); color: var(--accent-ink); }
.pick-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pick-cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pick-title { font-size: 1.05rem; margin: 0; }
.pick-title a { color: var(--fg); text-decoration: none !important; }
.pick-title a:hover { color: var(--link); }
.rating { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.rating b { color: var(--fg); font-feature-settings: "tnum"; }
.stars { position: relative; display: inline-block; line-height: 0; }
.stars .stars-bg { color: oklch(0.85 0.005 250); letter-spacing: 1px; }
.stars .stars-fg { position: absolute; inset: 0; overflow: hidden; color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.pick-price { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.pick-price b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; font-feature-settings: "tnum"; }
.pick-price s { color: var(--muted); font-size: 0.9rem; }
.price-note { font-size: 0.72rem; color: var(--muted); margin-top: -6px; }
.pick-body .btn { margin-top: auto; }

/* ============ Tabla comparativa ============ */
.compare-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.compare-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 0.92rem; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.compare-table thead th {
  background: var(--navy); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
}
.compare-table tbody tr:nth-child(even) { background: var(--surface-alt); }
.compare-table tbody tr:hover { background: oklch(0.965 0.02 80); }
.compare-table .cell-product { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.compare-table .cell-product img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.compare-table .cell-product b { display: block; font-size: 0.92rem; }
.compare-table .cell-product span { font-size: 0.76rem; color: var(--muted); }
.score { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.score-bar { flex: 1; height: 8px; border-radius: 99px; background: oklch(0.92 0.004 250); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--navy-2); border-radius: 99px; }
.score b { font-feature-settings: "tnum"; font-size: 0.95rem; }
.compare-table .cell-price b { font-size: 1.05rem; font-feature-settings: "tnum"; }
.compare-table .cell-price span { display: block; font-size: 0.72rem; color: var(--muted); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.85rem; }
.table-foot { font-size: 0.75rem; color: var(--muted); margin-top: 10px; }

/* ============ Categorías ============ */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.cat-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #0f172a;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}
.cat-tile:hover {
  border-color: #ea580c;
  background: #fffaf5;
  box-shadow: 0 8px 16px -4px rgba(234, 88, 12, 0.12);
  transform: translateY(-3px);
}
.cat-tile-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.cat-tile:hover .cat-tile-icon-wrap {
  background: #ffedd5;
  border-color: #fed7aa;
}
.cat-tile svg {
  width: 26px;
  height: 26px;
  color: #0f4c75;
  stroke-width: 1.8;
  transition: color 0.2s ease;
}
.cat-tile:hover svg {
  color: #ea580c;
}
.cat-tile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.cat-tile b {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}
.cat-count-badge {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}
.cat-tile-arrow {
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.2s ease;
}
.cat-tile:hover .cat-tile-arrow {
  color: #ea580c;
  transform: translateX(4px);
}

/* ============ Artículos / reviews ============ */
.articles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.articles-grid--3 { grid-template-columns: repeat(3, 1fr); }
.article-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.article-card-media { display: block; aspect-ratio: 16 / 10; background: #f8fafc; border-bottom: 1px solid var(--border); overflow: hidden; text-align: center; }
.article-card-media img, .article-card img { width: 100%; height: 100%; object-fit: contain; padding: 10px; background: #fff; }
.article-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-body h3 { font-size: 1rem; margin: 0; }
.article-body h3 a { color: var(--fg); text-decoration: none !important; }
.article-body h3 a:hover { color: var(--link); }
.article-body p { font-size: 0.86rem; color: var(--muted); margin: 0; }
.article-meta { margin-top: auto; font-size: 0.74rem; color: var(--muted); display: flex; gap: 10px; }
.chip {
  align-self: flex-start;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  background: var(--surface-alt); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 999px; color: var(--navy-2);
}

/* ============ Metodología ============ */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 14px; right: 18px;
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem;
  color: oklch(0.82 0.008 250); letter-spacing: -0.03em; line-height: 1;
}
.step h3 { font-size: 1rem; margin-bottom: 8px; padding-right: 58px; }
.step p { font-size: 0.86rem; color: var(--muted); margin: 0; }

/* ============ Newsletter ============ */
.newsletter { background: var(--navy); color: #fff; }
.newsletter .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.newsletter h2 { color: #fff; }
.newsletter p { color: oklch(0.78 0.015 250); margin: 0; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1; min-width: 0; height: 50px; border: 0; border-radius: var(--radius-sm);
  padding: 0 16px; font: inherit;
}
.newsletter-note { font-size: 0.72rem; color: oklch(0.65 0.015 250); margin-top: 10px; }

/* ============ Footer ============ */
.site-footer { background: var(--navy); color: oklch(0.80 0.012 250); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-cols h3 { color: #fff; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-cols a { display: block; color: oklch(0.78 0.015 250); font-size: 0.86rem; padding: 4px 0; text-decoration: none !important; }
.footer-cols a:hover { color: #fff; }
.footer-brand p { font-size: 0.84rem; max-width: 34ch; }
.footer-legal { border-top: 1px solid oklch(1 0 0 / 0.12); padding: 18px 0 26px; font-size: 0.75rem; color: oklch(0.65 0.015 250); }
.footer-legal p { margin: 0 0 6px; }

/* ============ Review (plantilla de producto) ============ */
.crumbs { font-size: 0.78rem; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }
.review-head { padding: 18px 0 6px; }
.review-head h1 { max-width: 22ch; }
.review-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin: 12px 0 18px; }
.review-meta .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.78rem; }
.affiliate-note {
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.78rem; color: var(--muted); padding: 10px 14px; margin-bottom: 26px;
}
.review-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vw, 48px); align-items: start; margin-bottom: 34px; }
.review-media { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.review-media img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.verdict-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.verdict-score { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.verdict-score .num {
  font-family: var(--font-display); font-weight: 800; font-size: 3.1rem; letter-spacing: -0.03em;
  font-feature-settings: "tnum"; line-height: 1;
}
.verdict-score .num small { font-size: 1.1rem; color: var(--muted); font-weight: 650; }
.verdict-label { font-weight: 700; font-size: 0.95rem; }
.verdict-card p { font-size: 0.92rem; color: var(--muted); }
.spec-list { margin: 18px 0; border-top: 1px solid var(--border); }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.spec-list li span { color: var(--muted); }
.spec-list li b { font-weight: 600; text-align: right; }
.buy-box { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.buy-price { display: flex; align-items: baseline; gap: 12px; }
.buy-price b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; font-feature-settings: "tnum"; letter-spacing: -0.02em; }
.buy-price s { color: var(--muted); }
.buy-price .save { font-size: 0.78rem; font-weight: 700; color: var(--success); }
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 34px; font-size: 0.9rem;
}
.toc b { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: decimal; padding-left: 20px; columns: 2; column-gap: 40px; }
.toc a { color: var(--fg); }
.toc a:hover { color: var(--link); }
.review-body { max-width: 760px; }
.review-body .compare-table { min-width: 620px; }
.review-body h2 { margin-top: 40px; }
.review-body h3 { margin-top: 26px; }
.review-body p, .review-body li { color: oklch(0.32 0.01 260); }
.review-body figure { margin: 24px 0; }
.review-body figure img { border-radius: var(--radius); border: 1px solid var(--border); }
.review-body figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.scorebars { display: grid; gap: 12px; margin: 20px 0; }
.scorebar { display: grid; grid-template-columns: 150px 1fr 46px; align-items: center; gap: 14px; font-size: 0.88rem; }
.scorebar .score-bar { min-width: 0; }
.scorebar .score-bar i { background: var(--accent); }
.scorebar b { text-align: right; font-feature-settings: "tnum"; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.proscons .pc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.pc h3 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.pc ul { display: grid; gap: 10px; margin-top: 12px; }
.pc li { display: flex; gap: 10px; font-size: 0.9rem; align-items: flex-start; }
.pc li svg { flex: 0 0 auto; margin-top: 3px; }
.pc--pros li svg { color: var(--success); }
.pc--cons li svg { color: var(--danger); }
.final-cta {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); text-align: center; margin: 44px 0;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: oklch(0.78 0.015 250); max-width: 52ch; margin: 0 auto 22px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 18px;
  font-weight: 650; font-size: 0.95rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-radius: var(--radius-sm); transition: background-color 0.12s ease;
}
.faq summary:hover { background: var(--surface-alt); }
.faq details[open] summary { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.25rem; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 18px 16px; margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Barra CTA fija (review) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px oklch(0.20 0.02 260 / 0.12);
}
.sticky-cta .container { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.sticky-cta img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.sticky-cta .sticky-info { min-width: 0; flex: 1; }
.sticky-cta .sticky-info b { display: block; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .sticky-info span { font-size: 0.78rem; color: var(--muted); font-feature-settings: "tnum"; }
.sticky-close {
  background: none; border: 0; color: var(--muted); font-size: 1.2rem; padding: 8px;
  cursor: pointer; border-radius: var(--radius-sm);
  transition: color 0.12s ease, background-color 0.12s ease;
}
.sticky-close:hover { color: var(--fg); background: var(--surface-alt); }

/* ============ Placeholder de imagen (fallback) ============ */
.ph-img {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, oklch(0.95 0.004 250) 0 12px, oklch(0.965 0.004 250) 12px 24px);
  color: var(--muted); font-size: 0.8rem; font-weight: 600;
  border: 1px dashed var(--border); min-height: 180px; width: 100%;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .picks-grid { grid-template-columns: repeat(2, 1fr); }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid, .articles-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .header-search { flex-basis: 300px; }
  .main-nav--open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy-2); flex-direction: column; padding: 10px;
    border-top: 1px solid oklch(1 0 0 / 0.12); z-index: 49;
  }
  .main-nav--open a { padding: 12px 14px; }
  .subnav a { padding: 12px 12px; } /* objetivo táctil 44px */
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-figure img, .hero-img-3d {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease;
}
.hero-figure img:hover {
  transform: translateY(-2px);
}
  .review-hero { grid-template-columns: 1fr; }
  .newsletter .container { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}
@media (max-width: 640px) {
  .header-search { display: none; }
  .picks-grid { grid-template-columns: 1fr; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid, .articles-grid--3 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .scorebar { grid-template-columns: 110px 1fr 40px; }
  .sticky-cta .btn { padding: 0 14px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; } /* anclas del índice de la review */
}

/* ============ Archivo de categoría ============ */
.archive-head { padding: 20px 0 6px; }
.archive-head h1 { max-width: 24ch; margin-bottom: 10px; }
.archive-lead { color: var(--muted); max-width: 68ch; margin-bottom: 14px; }
.archive-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.archive-meta b { color: var(--fg); font-weight: 650; }
.archive-meta .sep { color: oklch(0.75 0.005 250); }
.related-cats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 22px; }
.related-cats a.chip { text-decoration: none !important; }
.related-cats a.chip:hover { border-color: var(--accent); color: var(--navy-2); }

.archive-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; padding-bottom: 44px; }

/* Sidebar de filtros */
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; position: sticky; top: 84px;
}
.filters-title { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-weight: 750; font-size: 1rem; margin-bottom: 4px; }
.filters-title a { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; }
.filter-group { border-top: 1px solid var(--border); padding: 13px 0; }
.filter-group h3 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 0.87rem; padding: 4px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--accent-strong); }
.check .count { margin-left: auto; color: var(--muted); font-size: 0.74rem; font-feature-settings: "tnum"; }
.filters-cta { border-top: 1px solid var(--border); padding-top: 14px; font-size: 0.84rem; color: var(--muted); }
.filters-cta .btn { margin-top: 10px; }
.filters-toggle { display: none; }

/* Barra de resultados */
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.results-count { font-size: 0.85rem; color: var(--muted); }
.results-count b { color: var(--fg); }
.sort-select { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: var(--muted); }
.sort-select select {
  height: 42px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 0.87rem; padding: 0 10px;
}

/* Tarjetas rankeadas */
.rank-list { display: grid; gap: 16px; }
.rank-card {
  display: grid; grid-template-columns: 64px 158px minmax(0, 1fr) 178px; gap: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; align-items: start;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.rank-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rank-card--top { box-shadow: var(--shadow-md); }
.rank-num {
  font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; letter-spacing: -0.03em;
  line-height: 1; color: oklch(0.82 0.008 260); padding-top: 2px; font-feature-settings: "tnum";
}
.rank-card--top .rank-num { color: var(--accent-strong); }
.rank-media { position: relative; display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.rank-media img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.rank-media .ph-img { aspect-ratio: 1 / 1; min-height: 0; border: 0; font-size: 0.68rem; }
.rank-media .pick-badge { left: 8px; top: 8px; font-size: 0.6rem; padding: 5px 8px; }
.rank-title { font-size: 1.06rem; margin: 2px 0 8px; }
.rank-title a { color: var(--fg); text-decoration: none !important; }
.rank-title a:hover { color: var(--link); }
.rank-specs { display: flex; flex-wrap: wrap; margin: 10px 0 12px; font-size: 0.82rem; color: var(--muted); }
.rank-specs li { display: flex; align-items: center; }
.rank-specs li + li::before { content: "·"; margin: 0 10px; color: oklch(0.75 0.005 250); }
.rank-best { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; color: oklch(0.32 0.01 260); margin: 0; }
.rank-best svg { flex: 0 0 auto; margin-top: 3px; color: var(--success); }
.rank-cta {
  display: flex; flex-direction: column; gap: 8px; align-self: stretch; justify-content: center;
  border-left: 1px solid var(--border); padding-left: 18px;
}
.rank-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rank-price b { font-family: var(--font-display); font-size: 1.32rem; font-weight: 800; letter-spacing: -0.01em; font-feature-settings: "tnum"; }
.rank-price s { color: var(--muted); font-size: 0.84rem; }
.rank-cta .price-note { margin-top: -4px; }
.rank-review { font-size: 0.82rem; text-align: center; }
.rank-body .rating { flex-wrap: wrap; row-gap: 6px; }
.rank-score { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: 6px; font-size: 0.82rem; color: var(--muted); }
.rank-score .score-bar { flex: 0 0 auto; width: 88px; }
.rank-score b { color: var(--fg); font-feature-settings: "tnum"; }

/* Paginación */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.page-link {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--fg); font-size: 0.87rem; font-weight: 600; text-decoration: none !important;
}
.page-link:hover { border-color: var(--accent); }
.page-link[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Guía SEO del archivo */
.guide-tips { display: grid; gap: 10px; margin: 14px 0 22px; }
.guide-tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.guide-tips svg { flex: 0 0 auto; margin-top: 3px; color: var(--accent-strong); }

/* ============ Responsive — archivo ============ */
@media (max-width: 1024px) {
  .archive-layout { grid-template-columns: 1fr; }
  .filters { display: none; position: static; }
  .filters--open { display: block; margin-bottom: 16px; }
  .filters-toggle { display: inline-flex; margin-bottom: 14px; }
  .rank-card { grid-template-columns: 48px 130px minmax(0, 1fr); }
  .rank-num { font-size: 2rem; }
  .rank-cta {
    grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap;
    border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px;
  }
  .rank-price { order: 1; margin-right: auto; }
  .rank-cta .btn { order: 2; }
  .rank-review { order: 3; }
  .rank-cta .price-note { order: 4; flex-basis: 100%; margin-top: 0; }
}
@media (max-width: 640px) {
  .rank-card { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .rank-num { padding-top: 0; font-size: 1.75rem; }
  .rank-media { max-width: 220px; }
  .rank-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .rank-cta .btn { width: 100%; }
  .rank-price { margin-right: 0; }
  .results-toolbar { flex-direction: column; align-items: stretch; }
  .sort-select { justify-content: space-between; }
  .sort-select select { flex: 1; min-width: 0; }
}

/* ============ Compatibilidad WordPress ============ */
/* wp_nav_menu() envuelve los <a> en ul/li: display:contents los aplana y heredan el layout flex */
.main-nav ul { display: contents; list-style: none; margin: 0; padding: 0; }
/* the_posts_pagination() emite .page-numbers: mismo aspecto que .page-link */
.pagination .page-numbers {
  min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--fg); font-size: 0.87rem; font-weight: 600; text-decoration: none !important;
}
.pagination .page-numbers:hover { border-color: var(--accent); }
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; background: transparent; }
/* Clase estándar de WP para texto solo lectores de pantalla (equivale a .sr-only) */
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* ============ Caja de Veredicto de Alto Impacto ============ */
.opt-verdict-card {
  background: linear-gradient(135deg, #0a2540 0%, #0f3d64 100%) !important;
  color: #ffffff !important;
  border-radius: 16px !important;
  padding: 30px 32px !important;
  margin: 40px 0 !important;
  box-shadow: 0 16px 36px -8px rgba(10, 37, 64, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
}
.opt-verdict-card::after {
  content: "★";
  position: absolute;
  right: -15px;
  bottom: -35px;
  font-size: 160px;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  font-weight: 900;
  line-height: 1;
}
.opt-verdict-badge {
  background: var(--accent) !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
}
.opt-verdict-title {
  color: #ffffff !important;
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  margin: 0 0 14px 0 !important;
  letter-spacing: -0.01em !important;
}
.opt-verdict-content,
.opt-verdict-content p,
.opt-verdict-card p,
.review-body .opt-verdict-card p {
  color: #f1f5f9 !important;
  font-size: 1.05rem !important;
  line-height: 1.75 !important;
}
.opt-verdict-content strong,
.opt-verdict-card strong,
.review-body .opt-verdict-card strong {
  color: #ffffff !important;
  font-weight: 750 !important;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}