/* Tokens del boceto MountFix (tema oscuro, acento rojo-anaranjado) */
:root {
  --bg: oklch(0.15 0.006 250);
  --bg-alt: oklch(0.19 0.007 250);
  --card: oklch(0.205 0.007 250);
  --border: oklch(0.30 0.008 250);
  --fg: oklch(0.96 0.004 250);
  --fg-muted: oklch(0.68 0.012 250);
  --accent: oklch(0.64 0.20 27);
  --accent-strong: oklch(0.58 0.20 27);
  --accent-soft: oklch(0.64 0.20 27 / 0.15);
  --accent-fg: oklch(0.99 0 0);
  --ok: oklch(0.72 0.15 150);
  --ok-soft: oklch(0.72 0.15 150 / 0.15);
  --warn: oklch(0.80 0.14 80);
  --warn-soft: oklch(0.80 0.14 80 / 0.15);
  --info: oklch(0.72 0.12 240);
  --info-soft: oklch(0.72 0.12 240 / 0.15);
  --danger: oklch(0.66 0.20 25);
  --head-font: 'Rajdhani', system-ui, sans-serif;
  --body-font: 'Public Sans', system-ui, sans-serif;
  --radius: 4px;
  --maxw: 1200px;
  --gutter: 32px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body-font); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(230, 90, 40, 0.3); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head-font); font-weight: 700; margin: 0; line-height: 1.1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--fg-muted); }
.eyebrow {
  font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--accent); text-transform: uppercase;
}
.label-caps {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--fg-muted); text-transform: uppercase;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  font-weight: 700; font-size: 15px; padding: 14px 28px; text-align: center;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; font-weight: 600; }
.btn-ghost:hover { border-color: var(--fg-muted); }
.btn-inverse { background: var(--fg); color: var(--bg); }
.btn-soft { background: var(--accent-soft); color: var(--accent); font-size: 13px; padding: 8px 14px; }
.btn-soft:hover { background: oklch(0.64 0.20 27 / 0.25); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.15 0.006 250 / 0.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { font-family: var(--head-font); font-weight: 700; font-size: 22px; letter-spacing: .03em; color: var(--fg); display: inline-flex; align-items: center; gap: .4em; line-height: 1; }
.logo .logo-word { color: var(--fg); }
.logo-mark { width: 1.55em; height: 1.55em; flex: none; color: var(--fg); }
.logo-mark .visor { stroke: var(--accent); }
.logo span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-weight: 600; font-size: 15px; color: var(--fg-muted); }
.nav a:hover, .nav a.is-active { color: var(--fg); }
.nav .cart-link { color: var(--fg); display: flex; align-items: center; gap: 8px; }
.badge {
  background: var(--accent); color: var(--accent-fg); font-size: 12px; font-weight: 700;
  border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.badge[hidden] { display: none; }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; padding-top: 72px; padding-bottom: 56px; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 20px; }
.hero-title { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; }
.hero-sub { font-size: 17px; color: var(--fg-muted); max-width: 480px; margin: 0; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-media { flex: 1 1 380px; min-width: 0; }
.hero-media img, .hero-media .ph {
  width: 100%; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}
.hero-media .ph { aspect-ratio: 4 / 3; border-radius: 8px; }
.caption { margin-top: 10px; font-size: 13px; color: var(--fg-muted); font-family: ui-monospace, monospace; }

/* ---------- Franja compatibilidad ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.trust .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.trust .label-caps { margin: 0; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: var(--fg); background: transparent;
}
.chip-muted { color: var(--fg-muted); font-size: 12.5px; padding: 7px 14px; }
button.chip { cursor: pointer; }
button.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- Secciones ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-title { font-size: 30px; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; }
.page-title { font-size: 34px; margin-bottom: 8px; }
.page-sub { color: var(--fg-muted); font-size: 15px; margin: 0; }

/* ---------- Tarjetas de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: oklch(0.40 0.01 250); }
.card-media { aspect-ratio: 4 / 3; background: var(--bg-alt); display: block; overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--fg-muted); text-transform: uppercase; }
.card-name { font-family: var(--head-font); font-weight: 700; font-size: 19px; color: var(--fg); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-size: 17px; }
.tag-soldout {
  position: absolute; top: 10px; left: 10px; background: var(--bg); border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--fg-muted);
}

/* Placeholder rayado del boceto */
.ph {
  width: 100%; height: 100%;
  background-image: repeating-linear-gradient(135deg, var(--bg-alt) 0 14px, var(--card) 14px 28px);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  font-family: ui-monospace, monospace; font-size: 12px; color: var(--fg-muted); letter-spacing: .02em;
}

/* ---------- Cómo funciona ---------- */
.how { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 64px 0; }
.how .section-title { text-align: center; margin-bottom: 40px; }
.how-grid { max-width: 1100px; margin: 0 auto 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.how-step { display: flex; flex-direction: column; gap: 10px; }
.how-num { font-family: var(--head-font); font-weight: 700; font-size: 15px; color: var(--accent); }
.how-title { font-family: var(--head-font); font-weight: 700; font-size: 19px; }
.how-text { font-size: 14.5px; color: var(--fg-muted); }
.how-diagram { max-width: 760px; margin: 0 auto; }
.how-diagram img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- CTA ---------- */
.cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 64px; padding-bottom: 64px; }
.cta-title { font-family: var(--head-font); font-weight: 700; font-size: 28px; }
.cta-text { color: var(--fg-muted); font-size: 15px; max-width: 420px; margin: 0; }

/* ---------- Catálogo ---------- */
.filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row .label-caps { min-width: 72px; }
.search {
  width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; font-size: 15px;
}
.empty { text-align: center; padding: 60px 0; display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--fg-muted); }

/* ---------- Ficha de producto ---------- */
.product-top { display: flex; gap: 56px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 48px; }
.product-gallery { flex: 1 1 380px; min-width: 0; }
.product-main-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-alt); }
.product-gallery .ph { aspect-ratio: 1 / 1; border-radius: 6px; border: 1px solid var(--border); font-size: 15px; padding: 24px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
  width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; cursor: pointer; padding: 0;
  border: 1px solid var(--border); background: none; flex-shrink: 0;
}
.thumb.is-active { border: 2px solid var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; }
.breadcrumb { color: var(--fg-muted); font-size: 13px; }
.breadcrumb:hover { color: var(--fg); }
.product-title { font-size: 36px; }
.product-price { font-size: 26px; font-weight: 700; }
.product-desc { color: var(--fg-muted); font-size: 15.5px; max-width: 460px; margin: 0; white-space: pre-line; }
.stock-note { font-size: 13px; color: var(--fg-muted); }
.stock-note.low { color: var(--warn); }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); }
.qty button {
  width: 36px; height: 44px; background: none; border: 0; cursor: pointer; color: var(--fg); font-size: 18px;
}
.qty button:hover { color: var(--accent); }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.qty.sm button { width: 28px; height: 30px; font-size: 15px; }

/* ---------- Despiece animado ---------- */
.explode { height: 300vh; position: relative; }
.explode-sticky {
  position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--bg-alt); border-top: 1px solid var(--border);
}
.explode-head { position: absolute; top: 90px; left: 0; right: 0; text-align: center; padding: 0 16px; }
.explode-hint { font-size: 13px; color: var(--fg-muted); margin-top: 6px; font-family: ui-monospace, monospace; }
.explode-stage { position: relative; width: 100%; max-width: 1000px; height: 400px; }
.ex-part {
  position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.ex-helmet {
  width: 150px; height: 110px; background: var(--card); border: 1px solid var(--border); border-radius: 10px 10px 4px 4px;
  color: var(--fg-muted); font-family: var(--head-font); font-weight: 700; font-size: 15px; letter-spacing: .05em;
}
.ex-adhesive { width: 46px; height: 90px; background: linear-gradient(180deg, var(--accent), oklch(0.5 0.19 27)); border-radius: 3px; }
.ex-plate { width: 150px; height: 92px; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.ex-plate.ph { border-radius: 6px; font-size: 11px; padding: 6px; }
.ex-base { width: 40px; height: 56px; background: var(--fg-muted); border-radius: 4px; opacity: .85; }
.ex-camera {
  width: 84px; height: 110px; background: oklch(0.28 0.01 250); border-radius: 12px; border: 2px solid oklch(0.4 0.01 250);
}
.ex-lens { width: 46px; height: 46px; border-radius: 50%; background: oklch(0.1 0 0); border: 3px solid oklch(0.5 0.01 250); }
.ex-label {
  position: absolute; top: 50%; left: 50%; font-size: 13px; font-weight: 600; color: var(--fg-muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
  white-space: nowrap; text-align: center; opacity: 0; will-change: transform, opacity;
}

/* ---------- Carrito y checkout ---------- */
.two-col { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.col-main { flex: 2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 300px; min-width: 0; }
.cart-line {
  display: grid; grid-template-columns: 64px 1fr auto auto; grid-template-areas: "img info qty price" "img info remove remove";
  align-items: center; gap: 4px 16px; padding: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 6px;
}
.cart-line .img { grid-area: img; width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; }
.cart-line .img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .img .ph { font-size: 9px; padding: 4px; }
.cart-line .info { grid-area: info; min-width: 0; }
.cart-line .qty { grid-area: qty; }
.cart-line .line-price { grid-area: price; font-weight: 700; min-width: 80px; text-align: right; }
.cart-line .remove { grid-area: remove; justify-self: end; background: none; border: 0; color: var(--fg-muted); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }
.summary { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 24px; position: sticky; top: 90px; }
.summary h2 { font-size: 19px; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--fg-muted); padding: 6px 0; }
.sum-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.sum-hint { font-size: 12.5px; color: var(--accent); margin-top: 6px; }
.secure-note { font-size: 12px; color: var(--fg-muted); text-align: center; margin-top: 10px; }
.sum-item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }

.form-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.form-card h2 { font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.input {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 12px; font-size: 15px; width: 100%;
}
.input:focus { border-color: var(--accent); outline: none; }
textarea.input { resize: vertical; min-height: 80px; }
.form-error { color: var(--danger); font-size: 14px; background: oklch(0.66 0.2 25 / 0.12); border: 1px solid oklch(0.66 0.2 25 / 0.4); padding: 10px 12px; border-radius: var(--radius); }
.pay-box { display: flex; gap: 12px; align-items: flex-start; border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px; font-size: 14px; color: var(--fg-muted); }

.confirm { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 560px; margin: 0 auto; }
.confirm-title { font-size: 28px; color: var(--accent); }
.confirm-num { font-family: var(--head-font); font-size: 22px; font-weight: 700; letter-spacing: .05em; }
.confirm .items { width: 100%; text-align: left; border-top: 1px solid var(--border); padding-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); margin-top: 40px; }
.footer-inner { display: flex; gap: 56px; flex-wrap: wrap; justify-content: space-between; padding-top: 48px; padding-bottom: 24px; }
.footer-tag { color: var(--fg-muted); font-size: 13.5px; margin-top: 10px; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col span { font-size: 14px; color: var(--fg); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { padding-top: 16px; padding-bottom: 32px; font-size: 12px; color: var(--fg-muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--fg); color: var(--bg); font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity .2s, transform .2s; z-index: 100; display: flex; gap: 14px; align-items: center;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: var(--accent-strong); text-decoration: underline; white-space: nowrap; }

.loading { padding: 120px 0; text-align: center; color: var(--fg-muted); }

/* ---------- Móvil ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .site-header .wrap { height: 58px; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .nav .hide-sm { display: none; }
  .hero { padding-top: 40px; gap: 32px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .section { padding-top: 40px; padding-bottom: 40px; }
  .section-title { font-size: 26px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-body { padding: 12px; }
  .card-name { font-size: 17px; }
  .card-foot { flex-wrap: wrap; gap: 8px; }
  .product-top { padding-top: 24px; gap: 28px; }
  .product-title { font-size: 30px; }
  .buy-row .btn-primary { flex: 1 1 auto; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 56px 1fr auto; grid-template-areas: "img info price" "img qty remove"; }
  .cart-line .img { width: 56px; height: 56px; }
  .summary { position: static; }
  .confirm { padding: 28px 18px; }
  .footer-inner { gap: 32px; }
  .explode-head { top: 74px; }
  .ex-label { font-size: 11.5px; padding: 5px 10px; white-space: normal; max-width: 42vw; text-align: left; }
}
