/* =========================================================
   GameLab — Comparador de laptops gaming
   Paleta: azul marino · blanco · dorado
   ========================================================= */

:root {
  /* Azules */
  --bg: #050b1a;
  --bg-2: #0a1428;
  --bg-3: #10203d;
  --surface: #0c1830;
  --surface-2: #122448;
  --line: #1c2f52;
  --line-2: #2a4275;
  --blue: #2f6bff;
  --blue-2: #5b8cff;
  --blue-soft: rgba(47,107,255,.18);
  /* Blancos */
  --text: #f4f7ff;
  --muted: #93a4c7;
  /* Dorados */
  --gold: #f2c14e;
  --gold-2: #ffd97a;
  --gold-3: #c99a2e;
  --gold-soft: rgba(242,193,78,.16);
  --accent: var(--gold);
  --accent-2: var(--gold-2);
  --ok: #4ade80;
  --warn: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(2,8,30,.6);
  --glow-gold: 0 0 0 1px rgba(242,193,78,.35), 0 14px 40px rgba(242,193,78,.22);
  --glow-blue: 0 0 0 1px rgba(91,140,255,.35), 0 14px 40px rgba(47,107,255,.25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Rajdhani", "Inter", sans-serif;
  --topbar-h: 68px;
  --subnav-h: 52px;
  --gold-grad: linear-gradient(135deg, #ffe08a 0%, #f2c14e 45%, #d9a53a 100%);
  --blue-grad: linear-gradient(135deg, #5b8cff 0%, #2f6bff 60%, #1d4ed8 100%);
}

[data-theme="light"] {
  --bg: #f3f6fd;
  --bg-2: #ffffff;
  --bg-3: #e9eff9;
  --surface: #ffffff;
  --surface-2: #f4f7fd;
  --line: #d8e0ef;
  --line-2: #c3cfe6;
  --blue-soft: rgba(47,107,255,.12);
  --text: #0b1a3a;
  --muted: #5b6b8f;
  --gold: #c99a2e;
  --gold-2: #b3861f;
  --gold-3: #8f6a14;
  --gold-soft: rgba(201,154,46,.14);
  --shadow: 0 24px 60px rgba(11,26,58,.14);
  --glow-gold: 0 0 0 1px rgba(201,154,46,.35), 0 14px 36px rgba(201,154,46,.22);
  --gold-grad: linear-gradient(135deg, #e6b94a 0%, #c99a2e 55%, #a97f1f 100%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + var(--subnav-h) + 12px); }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1000px 500px at 85% -10%, rgba(47,107,255,.18), transparent 60%),
    radial-gradient(800px 400px at -10% 30%, rgba(242,193,78,.08), transparent 60%);
  background-attachment: fixed;
}
[data-theme="light"] body { background-image: radial-gradient(1000px 500px at 85% -10%, rgba(47,107,255,.10), transparent 60%); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: .01em; line-height: 1.1; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); text-transform: uppercase; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.container { width: min(1240px, 100% - 2rem); margin-inline: auto; }
::selection { background: var(--gold); color: #0b1a3a; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-3); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; margin-bottom: .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold-grad); border-radius: 2px; }
.grad {
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .grad { animation: none; } }

/* ---------- Botones ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid transparent; background: transparent;
  font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden;
  transition: transform .18s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--gold-grad); color: #0b1a3a; box-shadow: 0 10px 28px rgba(242,193,78,.32); }
.btn--primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s ease; }
.btn--primary:hover::after { transform: translateX(120%); }
.btn--primary:hover { box-shadow: 0 14px 36px rgba(242,193,78,.45); }
.btn--blue { background: var(--blue-grad); color: #fff; box-shadow: 0 10px 28px rgba(47,107,255,.35); }
.btn--outline { border-color: var(--gold); color: var(--gold); }
.btn--outline:hover { background: var(--gold); color: #0b1a3a; }
.btn--ghost { border-color: var(--line-2); background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--ghost.is-on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.btn--sm { padding: .55rem 1.05rem; font-size: .85rem; }
.btn--icon { padding: .6rem; border-radius: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #0b1a3a; color: var(--gold); font-size: .72rem; font-weight: 800;
}

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: rgba(5,11,26,.72); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
[data-theme="light"] .topbar { background: rgba(255,255,255,.78); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5; }
.topbar__inner { height: 100%; display: flex; align-items: center; gap: 2rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.logo svg { color: var(--gold); filter: drop-shadow(0 0 10px rgba(242,193,78,.6)); }
.logo strong { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { display: flex; gap: 1.6rem; font-weight: 600; font-size: .93rem; }
.topnav a { position: relative; color: var(--muted); transition: color .2s; padding: .3rem 0; }
.topnav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--gold-grad); border-radius: 2px; transition: width .25s; }
.topnav a:hover { color: var(--text); }
.topnav a:hover::after { width: 100%; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.search {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .9rem; height: 42px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; color: var(--muted); transition: border-color .2s, box-shadow .2s;
}
.search input { background: none; border: 0; outline: 0; width: 210px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.user { display: flex; align-items: center; gap: .55rem; padding-left: .7rem; border-left: 1px solid var(--line-2); }
.user__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-grad); color: #0b1a3a; display: grid; place-items: center; font-weight: 800; font-size: .85rem; text-transform: uppercase; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold-3); }
.user__name { font-size: .9rem; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Sub-navegación sticky ---------- */
.subnav {
  position: sticky; top: var(--topbar-h); z-index: 40; height: var(--subnav-h);
  background: rgba(10,20,40,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
[data-theme="light"] .subnav { background: rgba(255,255,255,.9); }
.subnav__inner { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.subnav__title { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.subnav__links { display: flex; gap: 1.7rem; margin-left: auto; height: 100%; overflow-x: auto; scrollbar-width: none; }
.subnav__links::-webkit-scrollbar { display: none; }
.subnav__links a {
  display: flex; align-items: center; height: 100%; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s;
}
.subnav__links a:hover, .subnav__links a.active { color: var(--gold); border-color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6.5rem) 0 3.5rem; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #0c1322 20%, transparent 75%);
}
.hero__glow {
  position: absolute; z-index: -1; right: -10%; top: -20%; width: 55vw; height: 55vw; max-width: 760px; max-height: 760px; pointer-events: none;
  background: radial-gradient(circle, rgba(47,107,255,.35), transparent 60%); filter: blur(40px); animation: pulse 8s ease-in-out infinite;
}
.hero__glow::after { content: ""; position: absolute; left: -30%; bottom: -10%; width: 60%; height: 60%; background: radial-gradient(circle, rgba(242,193,78,.28), transparent 60%); filter: blur(30px); }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .85; } }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 700; text-transform: uppercase; text-shadow: 0 10px 40px rgba(12,19,34,.35); }
[data-theme="light"] .hero h1 { text-shadow: none; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 52ch; margin-top: 1rem; }
.hero__cta { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero__stats div {
  display: flex; flex-direction: column; padding: .8rem 1.2rem; min-width: 120px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); border-radius: var(--radius-sm); backdrop-filter: blur(8px);
}
[data-theme="light"] .hero__stats div { background: #fff; }
.hero__stats strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__stats span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.hero__visual { position: relative; aspect-ratio: 5/4; }
.hero__visual::before { content: ""; position: absolute; inset: 15% 5% 5%; background: radial-gradient(ellipse at center, rgba(242,193,78,.25), transparent 65%); filter: blur(30px); }
.hero__visual .laptop-svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 40px 50px rgba(12,19,34,.65)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(-1deg); } }
.hero__orbit { position: absolute; padding: .5rem .8rem; border-radius: 12px; background: rgba(10,20,40,.85); border: 1px solid var(--line-2); font-size: .75rem; font-weight: 700; backdrop-filter: blur(10px); box-shadow: var(--shadow); animation: float 7s ease-in-out infinite; }
[data-theme="light"] .hero__orbit { background: #fff; }
.hero__orbit b { color: var(--gold); display: block; font-family: var(--font-display); font-size: 1.1rem; }
.hero__orbit--1 { left: -2%; top: 18%; animation-delay: -2s; }
.hero__orbit--2 { right: -3%; top: 8%; animation-delay: -4s; }
.hero__orbit--3 { left: 5%; bottom: 8%; animation-delay: -1s; }

/* ---------- Highlights ---------- */
.highlights { position: relative; background: var(--bg-2); border-block: 1px solid var(--line); }
.highlights::before, .highlights::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-3), transparent); opacity: .6; }
.highlights::before { top: -1px; } .highlights::after { bottom: -1px; }
.highlights__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.hl { position: relative; padding: 1.7rem 1.5rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; transition: background .25s; }
.hl:hover { background: var(--blue-soft); }
.hl:last-child { border-right: 0; }
.hl__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); font-weight: 700; }
.hl strong { font-family: var(--font-display); font-size: 1.5rem; }
.hl__sub { color: var(--muted); font-size: .85rem; }

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.section--dark { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section__tools { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Filtros ---------- */
.filters {
  display: grid; grid-template-columns: repeat(6, 1fr) auto; gap: .9rem; align-items: end;
  padding: 1.1rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); margin-bottom: 1.8rem; box-shadow: var(--shadow);
}
.filter { display: flex; flex-direction: column; gap: .4rem; }
.filter label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.filter select {
  width: 100%; height: 44px; padding: 0 2.2rem 0 .8rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); outline: 0;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; transition: border-color .2s, box-shadow .2s;
}
.filter select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.filter input[type=range] { width: 100%; height: 44px; accent-color: var(--gold); background: none; border: 0; padding: 0; }
.filter output { color: var(--gold); margin-left: .3rem; }

/* ---------- Tarjetas del catálogo ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .28s;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(160deg, rgba(242,193,78,.6), transparent 40%, transparent 60%, rgba(47,107,255,.5)); -webkit-mask: linear-gradient(#0c1322 0 0) content-box, linear-gradient(#0c1322 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card.is-selected { border-color: var(--gold); box-shadow: var(--glow-gold); }
.card__media { position: relative; aspect-ratio: 16/10; background: radial-gradient(ellipse at 50% 100%, var(--blue-soft), transparent 70%), var(--bg-3); display: grid; place-items: center; overflow: hidden; }
.card__media .laptop-svg { width: 82%; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.card:hover .laptop-svg { transform: scale(1.06) rotate(-1deg); }
.card__tag { position: absolute; top: .8rem; left: .8rem; z-index: 1; background: var(--gold-grad); color: #0b1a3a; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .32rem .65rem; border-radius: 6px; box-shadow: 0 6px 16px rgba(242,193,78,.35); }
.card__check {
  position: absolute; top: .7rem; right: .7rem; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); background: rgba(5,11,26,.5); display: grid; place-items: center; color: #fff; font-weight: 800; transition: background .2s, border-color .2s, transform .2s; backdrop-filter: blur(6px);
}
.card__check:hover { transform: scale(1.08); border-color: var(--gold); }
.card.is-selected .card__check { background: var(--gold); border-color: var(--gold); color: #0b1a3a; }
.card__body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card__brand { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); font-weight: 700; }
.card__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.card__specs { list-style: none; margin: 0; padding: 0; display: grid; gap: .32rem; font-size: .86rem; color: var(--muted); }
.card__specs li { display: flex; gap: .55rem; align-items: center; }
.card__specs li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); flex: none; }
.card__specs b { color: var(--text); font-weight: 600; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.price { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; }
.price small { font-size: .72rem; color: var(--muted); font-family: var(--font); font-weight: 600; margin-left: .25rem; }
.card__actions { display: flex; gap: .4rem; }
.empty { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---------- Comparador ---------- */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.6rem; }
.slot { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 1rem; min-height: 210px; display: flex; flex-direction: column; gap: .6rem; position: relative; transition: border-color .2s, box-shadow .2s; }
.slot:hover { border-color: var(--gold-3); }
.slot.is-filled { border-style: solid; border-color: var(--line-2); box-shadow: var(--shadow); }
.slot__media { aspect-ratio: 16/9; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 100%, var(--blue-soft), transparent 70%), var(--bg-3); border-radius: var(--radius-sm); overflow: hidden; }
.slot__media .laptop-svg { width: 70%; }
.slot__name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.slot__remove { position: absolute; top: .6rem; right: .6rem; z-index: 1; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(5,11,26,.6); color: #fff; transition: background .2s; }
.slot__remove:hover { background: var(--gold); color: #0b1a3a; }
.slot select { width: 100%; height: 42px; padding: 0 .8rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); outline: 0; }
.slot select:focus { border-color: var(--gold); }
.slot__empty { margin: auto; text-align: center; color: var(--muted); font-size: .9rem; }
.slot__empty::before { content: "+"; display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto .5rem; border-radius: 50%; border: 1px dashed var(--line-2); color: var(--gold); font-size: 1.5rem; }
.cmp-empty { text-align: center; padding: 2.2rem; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.6rem; }
.score { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.1rem; overflow: hidden; }
.score.is-best { border-color: var(--gold); box-shadow: var(--glow-gold); }
.score.is-best::before { content: "MEJOR"; position: absolute; top: 0; right: 0; background: var(--gold-grad); color: #0b1a3a; font-size: .6rem; font-weight: 800; letter-spacing: .14em; padding: .25rem .6rem; border-radius: 0 0 0 10px; }
.score__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: .6rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.score__total { font-size: 1.7rem; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar { display: grid; grid-template-columns: 92px 1fr 34px; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); margin: .38rem 0; }
.bar__track { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 99px; background: var(--gold-grad); width: 0; transition: width .8s cubic-bezier(.2,.7,.2,1); box-shadow: 0 0 10px rgba(242,193,78,.5); }
.bar__val { text-align: right; color: var(--text); font-weight: 700; }

/* Radar */
.radar-wrap { display: grid; grid-template-columns: 400px 1fr; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 1.6rem; }
.radar-wrap h3 { font-size: 1.3rem; }
.radar { width: 100%; max-width: 400px; margin-inline: auto; }
.radar .grid-line { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radar .axis { stroke: var(--line-2); stroke-width: 1; }
.radar .label { fill: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.radar .area { fill-opacity: .18; stroke-width: 2.5; stroke-linejoin: round; }
.radar-legend { display: grid; gap: .5rem; }
.radar-legend div { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.radar-legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.radar-legend p { margin: .6rem 0 0; font-size: .85rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.cmp { width: 100%; border-collapse: collapse; min-width: 720px; }
.cmp th, .cmp td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .92rem; }
.cmp thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; border-bottom: 2px solid var(--gold-3); }
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; background: var(--surface); width: 210px; color: var(--muted); font-weight: 600; z-index: 2; }
.cmp thead th:first-child { z-index: 3; background: var(--surface-2); }
.cmp tbody tr:hover td { background: var(--blue-soft); }
.cmp tbody tr:hover td:first-child { background: var(--surface-2); }
.cmp .th-model { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.cmp .th-model small { display: block; font-family: var(--font); font-size: .75rem; color: var(--gold); font-weight: 600; }
.cmp tr.group td { background: linear-gradient(90deg, var(--bg-3), var(--surface)); color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; padding: .55rem 1.1rem; }
.cmp td.best { color: var(--gold); font-weight: 700; }
.cmp td.best::after { content: " ★"; font-size: .8em; }
.cmp tr.same { opacity: .5; }
.cmp.only-diff tr.same { display: none; }

.verdict { margin-top: 1.6rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.verdict__item { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.1rem 1.1rem 1.1rem 1.3rem; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.verdict__item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold-grad); }
.verdict__item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.verdict__item span { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.verdict__item strong { display: block; font-family: var(--font-display); font-size: 1.25rem; margin-top: .25rem; }

/* ---------- Guía / FAQ ---------- */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; }
.card-info { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.5rem; transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden; }
.card-info::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.card-info:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-3); }
.card-info__icon { width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: .8rem; border-radius: 12px; background: var(--blue-soft); border: 1px solid var(--line-2); }
.card-info p { color: var(--muted); margin: .4rem 0 0; font-size: .95rem; }
.faq { display: grid; gap: .7rem; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 0 1.3rem; transition: border-color .2s; }
.faq details[open] { border-color: var(--gold-3); }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 800; transition: transform .25s; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); padding-bottom: 1rem; }
.faq code { background: var(--bg-3); color: var(--gold); padding: .1rem .4rem; border-radius: 6px; font-size: .88em; }

/* ---------- Footer ---------- */
.footer { position: relative; background: #030814; color: #b9c5e0; border-top: 1px solid var(--line); }
[data-theme="light"] .footer { background: #0b1a3a; }
.footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.footer__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer .logo { color: #fff; }
.footer__cols { display: flex; gap: 3rem; justify-content: flex-end; }
.footer__cols h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin-bottom: .7rem; font-family: var(--font); }
.footer__cols a { display: block; color: #93a4c7; font-size: .9rem; margin-bottom: .4rem; transition: color .2s, transform .2s; }
.footer__cols a:hover { color: #fff; transform: translateX(3px); }
.footer__legal { border-top: 1px solid #10203d; padding: 1rem 0; font-size: .78rem; color: #6a7ba3; }

/* ---------- Tray flotante ---------- */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: rgba(10,20,40,.9); backdrop-filter: blur(18px); border-top: 1px solid var(--gold-3); animation: slideUp .3s ease; box-shadow: 0 -20px 60px rgba(12,19,34,.4); }
[data-theme="light"] .tray { background: rgba(255,255,255,.94); }
@keyframes slideUp { from { transform: translateY(100%); } }
.tray__inner { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; }
.tray__items { display: flex; gap: .6rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tray__item { display: flex; align-items: center; gap: .5rem; padding: .35rem .7rem .35rem .4rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; font-size: .82rem; white-space: nowrap; }
.tray__item .laptop-svg { width: 34px; }
.tray__item button { border: 0; background: none; color: var(--muted); padding: 0 .2rem; }
.tray__item button:hover { color: var(--gold); }
.tray__actions { display: flex; gap: .5rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2,6,20,.75); backdrop-filter: blur(8px); }
.modal__panel { position: relative; width: min(960px, 100%); max-height: 90vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow), var(--glow-blue); animation: pop .3s cubic-bezier(.2,.7,.2,1); }
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0; } }
.modal__close { position: absolute; top: .9rem; right: .9rem; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); z-index: 2; transition: background .2s, color .2s; }
.modal__close:hover { background: var(--gold); color: #0b1a3a; }
.detail__hero { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2.2rem; align-items: center; background: radial-gradient(600px 300px at 20% 30%, var(--tint, rgba(47,107,255,.25)), transparent 70%); }
.detail__hero .laptop-svg { width: 100%; filter: drop-shadow(0 30px 40px rgba(12,19,34,.5)); }
.detail__hero h2 { text-transform: none; font-size: 2.1rem; }
.detail__hero .price { font-size: 2.1rem; }
.detail__hl { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); background: var(--surface); }
.detail__hl .hl { padding: 1.1rem; }
.detail__hl .hl strong { font-size: 1.1rem; }
.detail__specs { padding: 1.6rem 2.2rem 2.2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.5rem; }
.detail__specs h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin-bottom: .6rem; font-family: var(--font); display: flex; align-items: center; gap: .5rem; }
.detail__specs h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.detail__specs dl { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: .4rem .8rem; font-size: .9rem; }
.detail__specs dt { color: var(--muted); }
.detail__specs dd { margin: 0; }
.detail__actions { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

.laptop-svg { aspect-ratio: 5/4; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--gold-grad); color: #0b1a3a; padding: .75rem 1.3rem; border-radius: 999px; font-weight: 700; z-index: 200; box-shadow: var(--shadow); transition: opacity .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .highlights__grid { grid-template-columns: repeat(2, 1fr); }
  .hl:nth-child(2) { border-right: 0; }
  .hl:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .slots, .scores { grid-template-columns: repeat(2, 1fr); }
  .radar-wrap { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
@media (max-width: 768px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { max-width: 420px; margin-inline: auto; }
  .hero__orbit { display: none; }
  .subnav__title { display: none; }
  .subnav__links { margin-left: 0; }
  .search input { width: 110px; }
  .user__name { display: none; }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .detail__hero, .detail__specs { grid-template-columns: 1fr; padding: 1.2rem; }
  .detail__hl { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .slots, .scores { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
}

/* =========================================================
   SPA: vistas, carga dinámica y administración
   ========================================================= */

/* ---------- Barra de progreso de la API ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; opacity: 0; transition: opacity .2s; }
.progress.is-on { opacity: 1; }
.progress::after {
  content: ""; display: block; height: 100%; width: 40%; border-radius: 0 3px 3px 0;
  background: var(--gold-grad); box-shadow: 0 0 14px var(--gold);
  animation: cargarBarra 1.1s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes cargarBarra { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- Cambio de vista ---------- */
.view { animation: entrarVista .35s cubic-bezier(.2,.7,.2,1); }
@keyframes entrarVista { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

/* ---------- Buscador: indicador de consulta en curso ---------- */
.search__spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: girar .7s linear infinite; flex: none; }
.spin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: girar .7s linear infinite; vertical-align: -3px; margin-right: .4rem; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Esqueletos de carga ---------- */
.card--skeleton { pointer-events: none; border-color: var(--line); }
.card--skeleton .card__body { gap: .5rem; padding-top: 1.1rem; }
.sk { border-radius: 8px; background: linear-gradient(100deg, var(--bg-3) 30%, var(--surface-2) 50%, var(--bg-3) 70%); background-size: 240% 100%; animation: brillarSk 1.3s linear infinite; }
.sk--media { aspect-ratio: 16/10; border-radius: 0; }
.sk--line { height: 13px; width: 100%; }
@keyframes brillarSk { to { background-position: -240% 0; } }

/* ---------- Chips de filtros activos ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.chips:empty { display: none; }
.chip-f {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px;
  border: 1px solid var(--gold); background: var(--gold-soft); color: var(--gold);
  font-size: .82rem; font-weight: 600; transition: background .2s, color .2s;
}
.chip-f span { opacity: .7; font-size: .9em; }
.chip-f:hover { background: var(--gold); color: #0b1a3a; }
.chip-f--todo { border-color: var(--line-2); background: var(--surface-2); color: var(--muted); }
.chip-f--todo:hover { border-color: var(--gold); background: var(--surface-2); color: var(--gold); }

/* ---------- Scroll infinito ---------- */
.sentinel { height: 1px; }
.cargando { text-align: center; padding: 1.6rem; color: var(--muted); font-size: .9rem; }
.fin { text-align: center; padding: 1.8rem 1rem .4rem; color: var(--muted); font-size: .88rem; }
.fin b { color: var(--gold); }
.empty b { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--text); margin-bottom: .3rem; }
.empty p { margin: 0; }

/* ---------- Avisos (toast) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 200;
  padding: .75rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  box-shadow: var(--shadow); transition: opacity .3s; background: var(--gold-grad); color: #0b1a3a;
}
.toast--error { background: linear-gradient(135deg, #ff8a96, #e23b4d); color: #fff; }

/* ---------- Administración ---------- */
.admin__buscar { height: 38px; padding: 0 .9rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; outline: 0; min-width: 220px; }
.admin__buscar:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.admin-table { min-width: 720px; }
.admin-table tbody tr:hover td { background: var(--blue-soft); }
.admin-table td small { font-family: ui-monospace, monospace; font-size: .75rem; }
.admin-table .acciones { display: flex; gap: .4rem; white-space: nowrap; }
.btn--peligro:hover { border-color: #ff5a6a; color: #ff8a96; }

.modal__panel--form { max-width: 900px; }
#admForm { padding: 2rem; }
#admForm h2 { text-transform: none; font-size: 1.7rem; }
.form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; margin: 1.2rem 0; }
.campo { display: flex; flex-direction: column; gap: .3rem; grid-column: span 2; }
.campo--2 { grid-column: span 3; }
.campo--3 { grid-column: span 6; }
.campo span { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.campo input {
  height: 42px; padding: 0 .75rem; background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 10px; outline: 0; color: var(--text); font-size: .92rem; min-width: 0;
}
.campo input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.campo input[readonly] { opacity: .6; cursor: not-allowed; }
.campo input[type=color] { padding: 4px; cursor: pointer; }
.form-acciones { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; }
.detail__cargando { padding: 3rem; text-align: center; color: var(--muted); }

@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .campo, .campo--2, .campo--3 { grid-column: span 1; } .campo--3 { grid-column: span 2; } }
@media (max-width: 768px) { .admin__buscar { min-width: 0; width: 100%; } .toast { bottom: 110px; width: max-content; max-width: 90vw; } }
