/* =============================================================
   GearCompare — hoja de estilos única
   1. Tokens  2. Reset  3. Utilidades  4. Tipografía  5. Componentes
   6. Secciones  7. Efectos  8. Responsive  9. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:           #0a0b12;
  --bg-elevated:  #12141f;
  --bg-card:      #161925;
  --bg-card-hover:#1b1f2e;
  --border:       rgba(255,255,255,.09);
  --border-strong:rgba(255,255,255,.16);
  --text:         #eef0f7;
  --text-dim:     #a7acc0;
  --text-faint:   #6d7288;
  --accent:       #7c5cff;
  --accent-2:     #22d3ee;
  --accent-ink:   #0a0b12;
  --good:         #34d399;
  --bad:          #fb7185;
  --warn:         #fbbf24;
  --gradient-brand: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --shadow-sm: 0 4px 16px rgba(0,0,0,.3);
  --gutter: clamp(1.1rem, 4vw, 2.4rem);
  --maxw: 1320px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

[data-theme="light"] {
  --bg:           #f6f5fb;
  --bg-elevated:  #ffffff;
  --bg-card:      #ffffff;
  --bg-card-hover:#f0eef9;
  --border:       rgba(20,20,40,.10);
  --border-strong:rgba(20,20,40,.18);
  --text:         #16172a;
  --text-dim:     #4c5069;
  --text-faint:   #83879c;
  --accent-ink:   #ffffff;
  --shadow: 0 12px 40px rgba(30,20,60,.12);
  --shadow-sm: 0 4px 16px rgba(30,20,60,.08);
}

/* =============================================================
   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 {
  background: var(--bg);
  color: var(--text);
  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;
  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; font-family: var(--serif); font-weight: 600; }
ul, ol { padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem;
  background: var(--accent); color: #fff; z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-head { max-width: 62ch; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-head p { color: var(--text-dim); margin-top: .7rem; font-size: 1.05rem; }
.grid { display: grid; gap: 1.4rem; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.badge {
  display: inline-flex; align-items: center; gap: .4em; padding: .3em .8em; border-radius: 999px;
  font-size: .78rem; font-weight: 700; font-family: var(--mono); letter-spacing: .02em;
  background: rgba(124,92,255,.14); color: var(--accent-2); border: 1px solid rgba(124,92,255,.3);
}
.badge.badge-deal { background: rgba(52,211,153,.14); color: var(--good); border-color: rgba(52,211,153,.3); }
.divider { height: 1px; background: var(--border); border: 0; margin-block: 3rem; }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-dim); max-width: 60ch; }
.prose p { margin-bottom: 1.1em; color: var(--text-dim); }
.prose p:first-child::first-letter { color: var(--accent-2); }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

/* =============================================================
   5. Componentes
   ============================================================= */

/* --- Nav --- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: .9rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--gradient-brand);
  display: grid; place-items: center; color: #fff; font-family: var(--sans); font-weight: 800; font-size: .95rem;
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; padding: 0; }
.nav-links a { font-size: .95rem; color: var(--text-dim); transition: color .2s var(--ease-out); font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover {
  color: var(--accent-ink); background: var(--gradient-brand); padding: .55em 1.1em; border-radius: 999px; font-weight: 700;
}
.nav-toggle { display: none; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); display: grid; place-items: center;
  color: var(--text-dim); transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 17px; height: 17px; flex: none; }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; font-weight: 700; font-size: .96rem;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s var(--ease-out), opacity .2s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 8px 26px rgba(124,92,255,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,92,255,.45); }
.btn-ghost { background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg-card-hover); }
.btn-block { width: 100%; }
.btn-sm { padding: .6em 1.1em; font-size: .85rem; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* --- Tarjeta de producto --- */
.product-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.product-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.product-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-elevated); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-card .cat { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.product-card h3 { font-size: 1.08rem; line-height: 1.3; }
.product-card .rating { display: flex; align-items: center; gap: .4em; font-size: .85rem; color: var(--text-dim); }
.product-card .rating strong { color: var(--warn); }
.product-card .price-row { display: flex; align-items: baseline; gap: .5em; margin-top: auto; padding-top: .4rem; }
.price-now { font-size: 1.35rem; font-weight: 800; font-family: var(--mono); }
.price-was { font-size: .85rem; color: var(--text-faint); text-decoration: line-through; }
.product-card .card-actions { display: flex; gap: .55rem; margin-top: .5rem; }
.overhang-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
}

/* --- Chips / filtros --- */
.chip-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip {
  padding: .5em 1.05em; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-card); font-size: .87rem; font-weight: 600; color: var(--text-dim);
  transition: all .2s var(--ease-out);
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { background: var(--gradient-brand); color: #fff; border-color: transparent; }

/* --- Spec table --- */
.spec-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.spec-table { min-width: 100%; font-size: .93rem; }
.spec-table caption { text-align: left; padding: 1rem 1.1rem .3rem; font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.spec-table tr { border-top: 1px solid var(--border); }
.spec-table tr:first-child { border-top: none; }
.spec-table th, .spec-table td { padding: .78rem 1.1rem; text-align: left; }
.spec-table th { color: var(--text-dim); font-weight: 600; width: 44%; }
.spec-table td { font-weight: 600; }
.spec-table td.is-null { color: var(--text-faint); font-weight: 400; }

/* --- Radar chart --- */
.radar-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.radar-wrap svg { width: 100%; max-width: 380px; height: auto; overflow: visible; }
.radar-legend { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; justify-content: center; font-size: .86rem; }
.radar-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: .4em; flex: none; }
.radar-note { font-size: .82rem; color: var(--text-faint); text-align: center; max-width: 40ch; }

/* --- Ficha: galería --- */
.gallery { display: grid; grid-template-columns: 84px 1fr; gap: .8rem; }
.gallery.gallery-single { grid-template-columns: 1fr; }
.gallery-main { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); border: 1px solid var(--border); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; flex-direction: column; gap: .6rem; }
.gallery-thumbs button { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; opacity: .6; transition: all .2s var(--ease-out); }
.gallery-thumbs button.is-active, .gallery-thumbs button:hover { opacity: 1; border-color: var(--accent-2); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-caption { font-size: .8rem; color: var(--text-faint); margin-top: .5rem; }

/* --- Ficha: header --- */
.ficha-header { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr; }
.ficha-title-block h1 { margin-bottom: .5rem; }
.ficha-brand { color: var(--text-dim); font-weight: 600; }
.ficha-rating { display: flex; align-items: center; gap: .6em; margin-block: .8rem; font-size: .95rem; }
.stars { color: var(--warn); font-size: 1.05rem; letter-spacing: .05em; }
.ficha-price-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; margin-top: 1rem; }
.ficha-price-block .price-now { font-size: 2rem; }
.price-date-note { font-size: .8rem; color: var(--text-faint); margin-top: .6rem; }

/* --- Pros / contras --- */
.pc-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.pc-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.pc-col h3 { display: flex; align-items: center; gap: .5em; font-size: 1rem; margin-bottom: .8rem; }
.pc-col h3 svg { width: 1.15em; height: 1.15em; flex: none; }
.pc-col.pros h3 { color: var(--good); }
.pc-col.contras h3 { color: var(--bad); }
.pc-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.pc-col li { display: flex; gap: .6em; font-size: .93rem; color: var(--text-dim); }
.pc-col li svg { width: 1.1em; height: 1.1em; flex: none; margin-top: .15em; }
.ideal-para {
  background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(34,211,238,.08));
  border: 1px solid rgba(124,92,255,.28); border-radius: var(--radius); padding: 1.2rem 1.4rem;
  font-size: 1.02rem; font-weight: 600;
}

/* --- Reviews --- */
.review-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.review-verified { display: inline-flex; align-items: center; gap: .35em; font-size: .76rem; color: var(--good); font-weight: 700; }
.review-verified svg { width: 1.1em; height: 1.1em; flex: none; }

/* --- Comparador --- */
.comparator-picker { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; margin-bottom: 2rem; }
.comparator-search { position: relative; }
.comparator-search input {
  width: 100%; padding: .9em 1.1em; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--text); font-size: .98rem;
}
.comparator-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: .9rem; margin-top: 1.1rem; }
.compare-slot {
  position: relative; aspect-ratio: 1; border-radius: var(--radius); border: 1.5px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .6rem;
  text-align: center; font-size: .78rem; color: var(--text-faint); overflow: visible;
}
.compare-slot.is-filled { border-style: solid; border-color: var(--border); background: var(--bg-elevated); color: var(--text); }
.compare-slot .slot-thumb { width: 100%; flex: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-card); }
.compare-slot .slot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.compare-slot .remove-badge {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bad); color: #fff; display: grid; place-items: center; font-size: .9rem; font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 2rem; }
.compare-table { min-width: 720px; font-size: .92rem; }
.compare-table th, .compare-table td { padding: .8rem 1rem; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare-table thead th { position: sticky; top: 0; background: var(--bg-elevated); z-index: 1; border-top: none; }
.compare-table th.row-label { color: var(--text-dim); font-weight: 600; white-space: nowrap; background: var(--bg-elevated); position: sticky; left: 0; z-index: 2;}
.compare-table td.best { color: var(--good); font-weight: 800; }
.compare-table .col-head { min-width: 170px; }
.compare-table .col-head img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: .5rem; }
.compare-empty { padding: 3rem 1rem; text-align: center; color: var(--text-faint); }

/* --- Filtros de categoría --- */
.filters-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.sort-select { padding: .6em 1em; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text); font-weight: 600; font-size: .9rem; }

/* --- Guía / ranking --- */
.guide-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; counter-reset: guide; }
.guide-item { counter-increment: guide; display: flex; gap: 1.2rem; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.guide-item::before { content: counter(guide); font-family: var(--serif); font-size: 1.8rem; font-weight: 700; color: var(--accent-2); width: 2ch; flex: none; text-align: center; }
.guide-item img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); flex: none; }
.guide-item .info { flex: 1; }
.guide-item .why { font-size: .88rem; color: var(--text-dim); margin-top: .3rem; }

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid var(--border); padding-block: 1rem; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-2); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: .8rem; color: var(--text-dim); }

/* --- Trust / cómo elegimos --- */
.trust-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.trust-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.trust-card .num { font-family: var(--serif); font-size: 1.8rem; color: var(--accent-2); }

/* --- Disclosure --- */
.disclosure {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.2rem; font-size: .85rem; color: var(--text-dim); display: flex; gap: .7rem; align-items: flex-start;
}
.disclosure svg { flex: none; width: 1.3em; height: 1.3em; color: var(--accent-2); margin-top: .1em; }
.disclosure-bar { background: var(--bg-elevated); border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--text-faint); text-align: center; padding: .5rem var(--gutter); }
.disclosure-bar a { text-decoration: underline; color: var(--text-dim); }

/* --- Trust badges (bajo el botón de compra) --- */
.trust-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.trust-badges span {
  display: inline-flex; align-items: center; gap: .4em; font-size: .76rem; color: var(--text-dim);
  background: var(--bg-elevated); border: 1px solid var(--border); padding: .4em .7em; border-radius: 999px;
}
.trust-badges svg { width: 1.05em; height: 1.05em; flex: none; color: var(--good); }

/* --- Tilt en tarjetas de producto (hover fino, no gateado por reduced-motion) --- */
.product-card.tilt-ready { transform-style: preserve-3d; will-change: transform; }
.product-card .thumb { position: relative; }
.product-card .thumb::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s var(--ease-out);
  background: linear-gradient(120deg, rgba(255,255,255,.16), transparent 55%);
  pointer-events: none;
}
.product-card:hover .thumb::after { opacity: 1; }

/* --- Barra fija de compra (móvil, en fichas) --- */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: .8rem; padding: .7rem var(--gutter);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(0,0,0,.35);
  transform: translateY(110%); transition: transform .3s var(--ease-out);
}
.sticky-buy.is-visible { transform: translateY(0); }
@media (min-width: 960px) { .sticky-buy { display: none; } }
.sticky-buy img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; }
.sticky-buy .info { flex: 1; min-width: 0; }
.sticky-buy .info strong { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy .info span { font-family: var(--mono); font-size: .9rem; color: var(--accent-2); font-weight: 700; }
.sticky-buy .btn { flex: none; }

/* --- Bandeja flotante del comparador (persiste entre páginas) --- */
.compare-tray {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 95;
  display: flex; align-items: center; gap: .8rem; padding: .6rem .7rem .6rem 1rem; max-width: calc(100% - 2rem);
  background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .35s var(--ease-bounce);
}
.compare-tray.is-visible { transform: translate(-50%, 0); }
.compare-tray .tray-thumbs { display: flex; }
.compare-tray .tray-thumbs img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-elevated); margin-left: -8px; }
.compare-tray .tray-thumbs img:first-child { margin-left: 0; }
.compare-tray .tray-count { font-size: .85rem; font-weight: 700; white-space: nowrap; }
.compare-tray .tray-clear { font-size: .78rem; color: var(--text-faint); text-decoration: underline; white-space: nowrap; }
@media (max-width: 959px) {
  .compare-tray { bottom: 78px; padding-right: .5rem; }
  .compare-tray .tray-clear { display: none; }
}

/* --- Contador animado (hero stats) --- */
.hero-stats strong[data-countup] { font-variant-numeric: tabular-nums; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding-block: 3rem 2rem; margin-top: 4rem; }
.footer-grid { display: grid; gap: 2.2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-grid h4 { font-family: var(--sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-grid a { color: var(--text-dim); font-size: .92rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-faint); }

/* --- Hero --- */
.hero { padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2.5rem, 6vw, 4rem); position: relative; }
.hero-halo { position: absolute; inset: -20% -10% -40% -10%; background: radial-gradient(45% 40% at 30% 20%, rgba(124,92,255,.28), transparent 70%), radial-gradient(35% 35% at 80% 10%, rgba(34,211,238,.2), transparent 70%); filter: blur(80px); pointer-events: none; z-index: 0; }
.hero-inner { position: relative; z-index: 1; max-width: 46rem; }
.hero h1 { margin-block: .9rem 1.1rem; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.6rem; }
.hero-stats div strong { display: block; font-family: var(--serif); font-size: 1.7rem; }
.hero-stats div span { font-size: .82rem; color: var(--text-faint); }

/* --- Category entry cards (home) --- */
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; transition: all .25s var(--ease-out);
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cat-card .cat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gradient-brand); display: grid; place-items: center; color: #fff; margin-bottom: .4rem; }
.cat-card .cat-icon svg { width: 22px; height: 22px; }
.cat-card p { color: var(--text-dim); font-size: .9rem; }
.cat-card .cat-count { font-family: var(--mono); font-size: .78rem; color: var(--text-faint); margin-top: auto; padding-top: .6rem; }

/* =============================================================
   6. Secciones específicas
   ============================================================= */
.page-header { padding-block: clamp(2.4rem, 6vw, 3.6rem) 1rem; }
.breadcrumbs { font-size: .82rem; color: var(--text-faint); margin-bottom: .8rem; display: flex; gap: .4em; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-dim); }
.similar-strip { display: flex; gap: 1.1rem; overflow-x: auto; padding-block: .3rem 1rem; overflow-y: visible; }
.similar-strip .product-card { min-width: 240px; flex: 0 0 240px; }

/* =============================================================
   7. Efectos
   ============================================================= */
.tilt { transition: transform .35s var(--ease-out); }
.glow-ring { position: relative; }
.glow-ring::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--gradient-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s var(--ease-out); pointer-events: none;
}
.glow-ring:hover::after { opacity: .6; }

/* =============================================================
   8. Responsive
   ============================================================= */
.grid-products { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: 1fr; }
.grid-cats { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 540px) {
  .grid-cats { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: 96px 1fr; }
  .gallery.gallery-single { grid-template-columns: 1fr; }
  .pc-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .ficha-header { grid-template-columns: 1.1fr .9fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-cats { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 959px) {
  .nav-links { position: fixed; inset: 62px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start;
    padding: 1.6rem var(--gutter); gap: 1.3rem; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); border-top: 1px solid var(--border); overflow-y: auto; }
  .nav-links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border-strong); }
  .nav-toggle svg { width: 18px; height: 18px; }
}
@media (min-width: 1280px) {
  .hero-inner { max-width: 50rem; }
}

/* =============================================================
   9. Reduced-motion (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-halo { animation: none; }
}

/* =============================================================
   10. Excepciones puntuales de encuadre de fotos de producto
   Algunas fotos reales vienen en formato muy panorámico (vista de
   canto) y se recortan mal con object-fit:cover en tarjetas 4:3.
   Para esas, mostramos la imagen completa (contain) con relleno
   en vez de recortarla.
   ============================================================= */
img[src*="pc-escritorio-mac-mini-m4-1"] {
  object-fit: contain !important;
  padding: 12%;
  box-sizing: border-box;
  background: var(--bg-elevated);
}
