/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0a0a0f;
  --bg-2: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --surface: #1e1e2a;
  --border: #2a2a3a;
  --border-accent: #3a3a50;

  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-dim: #555570;

  --accent: #00ff88;
  --accent-2: #00ccff;
  --accent-glow: rgba(0, 255, 136, 0.15);
  --accent-glow-2: rgba(0, 204, 255, 0.12);
  --accent-ink: #0a0a0f;
  --danger: #ff4466;
  --warning: #ffaa00;
  --star: #ffcc00;

  --sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Orbitron', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --max-w: 1280px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100svh;
}
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; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink);
  z-index: 9999; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.sr-only,
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.badge-offer { background: var(--danger); color: #fff; }
.badge-category { background: var(--surface); color: var(--accent); border: 1px solid var(--border); }

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-family: var(--display); font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-header h2 { margin-bottom: 0.5rem; }
.section-header .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================================
   5. Components
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s;
  cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .1s; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 60px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0,255,136,0.3), 0 0 80px rgba(0,255,136,0.15);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(0,255,136,0.08);
}

.btn-amazon {
  background: #ff9900;
  color: #111;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,153,0,0.25);
}
.btn-amazon:hover {
  background: #ffaa22;
  box-shadow: 0 8px 24px rgba(255,153,0,0.35);
}

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(10,10,15,0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: none;
  list-style: none;
  gap: 2rem;
  padding: 0;
}
@media (min-width: 720px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color .25s;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-soft);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-links a.nav-cta,
.nav-links a.nav-cta:hover {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-links a.nav-cta::after { display: none; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px; cursor: pointer;
}
@media (min-width: 720px) { .nav-toggle { display: none; } }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease-out), opacity .3s;
}
.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .5s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile a {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  transition: color .2s;
}
.nav-mobile a:hover { color: var(--accent); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,255,136,0.08), 0 8px 24px rgba(0,0,0,0.3);
  border-color: var(--accent);
}
.card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-2);
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease-soft);
}
.card:hover .card-img-wrap img { transform: scale(1.08); }
.card-body { padding: 1.25rem; }
.card-marca {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}
.card-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}
.card-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.card-stars { color: var(--star); font-size: 0.85rem; }
.card-reviews { color: var(--text-muted); font-size: 0.8rem; }
.card-price { margin-bottom: 12px; }
.card-price .price-current {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.card-price .price-before {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}
.card-price .price-note {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.card-scores {
  display: flex; gap: 4px;
  margin-bottom: 12px;
}
.card-score {
  flex: 1;
  text-align: center;
  padding: 4px 2px;
  background: var(--surface);
  border-radius: 4px;
  font-size: 0.65rem;
  line-height: 1.2;
}
.card-score strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
}

/* --- Stars --- */
.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--star);
}
.stars .star-empty { color: var(--text-dim); }

/* --- Price Display --- */
.precio-actual { font-weight: 700; color: var(--accent); }
.precio-antes { text-decoration: line-through; color: var(--text-muted); }
.precio-nota {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 90vh;
  min-height: 90svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(0,255,136,0.08), transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(0,204,255,0.06), transparent 50%),
    radial-gradient(ellipse 90% 70% at 50% 80%, rgba(100,0,255,0.04), transparent 50%),
    var(--bg);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 700px;
}
.hero-badge {
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1.25rem;
  line-height: 1.05;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 1rem;
}

/* --- Price filters --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin: 0 0 1.75rem;
}
.filter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.filter-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-accent);
}
.filter-btn.active,
.filter-btn[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card.is-filtered-out { display: none !important; }
.filter-empty {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

/* --- Product Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 540px)  { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .products-grid { grid-template-columns: repeat(3, 1fr); } }

/* --- Categories --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 720px) { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color .3s, transform .3s var(--ease-out), box-shadow .3s;
  cursor: pointer;
  text-decoration: none;
}
.cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--accent-glow);
}
.cat-card--disabled {
  opacity: 0.45;
  filter: grayscale(0.85);
  cursor: not-allowed;
  pointer-events: none;
  user-select: none;
}
.cat-card--disabled:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}
.cat-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.cat-label { font-weight: 600; font-size: 1rem; }
.cat-count { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* --- Trust / How We Choose --- */
.trust-section { background: var(--bg-2); }
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 720px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.trust-card h3 { margin-bottom: 0.75rem; }
.trust-card p { color: var(--text-muted); font-size: 0.95rem; }
.trust-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

/* --- Ficha (Product Page) --- */
.ficha { max-width: 960px; margin: 0 auto; padding-top: 80px; }
.ficha-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 720px) { .ficha-top { grid-template-columns: 1fr 1fr; } }
.ficha-galeria {
  background: var(--bg-2);
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ficha-galeria img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 1rem;
}
.ficha-head { display: flex; flex-direction: column; gap: 0.75rem; }
.ficha-marca {
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
}
.ficha-nombre { font-size: clamp(1.5rem, 3vw, 2rem); }
.ficha-rating { display: flex; align-items: center; gap: 8px; }
.ficha-precio { margin: 0.5rem 0; }
.ficha-precio .precio-actual { font-size: 1.8rem; }
.ficha-precio .precio-antes { font-size: 1.1rem; margin-left: 12px; }

.btn-comprar {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px;
  background: #ff9900;
  color: #111;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s;
  text-decoration: none;
}
.btn-comprar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,153,0,0.35);
}

/* --- Radar Chart --- */
.ficha-radar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}
.ficha-radar h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.radar-canvas {
  max-width: 350px;
  margin: 0 auto;
}
.ficha-radar .nota {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* --- Spec Table --- */
.ficha-specs {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.ficha-specs h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td {
  padding: 10px 0;
  font-size: 0.9rem;
}
.specs-table td:first-child {
  color: var(--text-muted);
  width: 45%;
}
.specs-table td:last-child { font-weight: 500; }

/* --- Editorial --- */
.ficha-editorial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.ficha-editorial h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.editorial-cuerpo p { margin-bottom: 1rem; color: var(--text-muted); line-height: 1.8; }
.pros-contras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (max-width: 540px) { .pros-contras { grid-template-columns: 1fr; } }
.pc-col h3 { font-size: 1rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 6px; }
.pc-col h3 svg { width: 1.15em; height: 1.15em; flex: none; }
.pc-col ul { list-style: none; padding: 0; }
.pc-col li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.pc-col li::before {
  content: "";
  position: absolute; left: 0; top: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.pc-col.pros li::before { background: var(--accent); }
.pc-col.contras li::before { background: var(--danger); }

.ideal-para {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* --- Reviews --- */
.ficha-resenas {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.ficha-resenas h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.resenas-resumen { color: var(--text-muted); margin-bottom: 1rem; font-style: italic; }

/* --- Comparador --- */
.comparador { padding-top: 80px; }
.comparador h1 { margin-bottom: 1rem; }
.comparador-info { color: var(--text-muted); margin-bottom: 2rem; }
.comp-radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}
.comp-slots {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding: 1rem 0;
}
.comp-slot {
  min-width: 160px;
  flex: 1;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .3s;
}
.comp-slot.has-product { border-style: solid; border-color: var(--accent); }
.comp-slot:hover { border-color: var(--accent-2); }

.comp-search {
  position: relative;
  max-width: 740px;
  margin: 0 auto 1.25rem;
}
.comp-search-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.comp-search-input::placeholder { color: var(--text-dim); }
.comp-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.comp-search-results.is-open { display: block; }
.comp-search-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.comp-search-item:last-child { border-bottom: none; }
.comp-search-item:hover { background: var(--bg-card-hover); }
.comp-search-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.comp-search-item-meta { font-size: 0.78rem; color: var(--text-muted); }
.comp-search-empty {
  padding: 12px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.comp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 740px;
  margin: 0 auto 10px;
}
.comp-count {
  font-size: 0.86rem;
  color: var(--text-muted);
}
.comp-clear {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.84rem;
}
.comp-clear:hover:not(:disabled) {
  border-color: var(--accent-2);
  background: var(--bg-card-hover);
}
.comp-clear:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comp-table-wrap { overflow-x: auto; margin-bottom: 2rem; }
.comp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.comp-table th, .comp-table td {
  padding: 10px 12px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.comp-table th {
  background: var(--bg-2);
  font-weight: 600;
  position: sticky;
  top: 0;
}
.comp-table td:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
}
.comp-table .best-value { color: var(--accent); font-weight: 700; }

/* --- Guía de Compra --- */
.guia { padding-top: 80px; }
.guia h1 { margin-bottom: 0.5rem; }
.guia-intro { color: var(--text-muted); margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.8; }
.guia-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.guia-toc h3 { margin-bottom: 0.75rem; }
.guia-toc ol { padding-left: 1.5rem; }
.guia-toc li { margin-bottom: 0.4rem; }
.guia-toc a { color: var(--accent); text-decoration: underline; }
.guia-section { margin-bottom: 2.5rem; }
.guia-section h2 { margin-bottom: 1rem; font-size: 1.5rem; }
.guia-section p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }

/* --- Footer --- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.footer-brand h3 span { color: var(--accent); }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.footer-links h4 { margin-bottom: 0.75rem; color: var(--text); }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.aviso-afiliados {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

/* =============================================================
   7. Effects & animations
   ============================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(0,204,255,0.08); }
}
[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: var(--ease-out);
}
::view-transition-old(root) { animation-name: fadeOutUp; }
::view-transition-new(root) { animation-name: fadeInUp; }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-10px); } }

/* =============================================================
   Ranking Top 10
   ============================================================= */
.ranking-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.ranking-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: stretch;
}
.ranking-rank {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  color: var(--text-dim);
  min-width: 2.5rem;
  padding-top: 1.25rem;
  text-align: center;
}
.ranking-item--gold .ranking-rank { color: #ffcc00; }
.ranking-item--silver .ranking-rank { color: #c0c0d0; }
.ranking-item--bronze .ranking-rank { color: #cd7f32; }

.ranking-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color .25s var(--ease-soft), background .25s var(--ease-soft);
}
.ranking-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}
@media (min-width: 720px) {
  .ranking-card {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}
.ranking-media {
  position: relative;
  display: block;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
}
.ranking-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}
.ranking-offer {
  position: absolute;
  top: 12px;
  right: 12px;
}
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.ranking-avg {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--accent);
}
.ranking-avg span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}
.ranking-name {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  margin: 0.15rem 0 0.5rem;
}
.ranking-name a:hover { color: var(--accent); }
.ranking-why {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0.5rem 0 1rem;
  max-width: 62ch;
}
.ranking-scores {
  margin-bottom: 1rem;
}
.ranking-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.ranking-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ranking-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}
.ranking-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) { }
@media (min-width: 720px) { }
@media (min-width: 960px) { }
@media (min-width: 1280px) { }

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-grid { animation: none; }
}
