:root {
  --bg: #0c0c0b;
  --surface: #151513;
  --line: #2a2926;
  --text: #f3eee6;
  --muted: #9b958b;
  --accent: #f3eee6;
  --photo-bg: #ffffff;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

/* Encabezado */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.brand img { width: 84px; height: auto; }
.header-tag {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Producto */
.product {
  display: grid;
  gap: 24px;
  padding: 20px var(--gutter) 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.gallery-main {
  margin: 0;
  background: var(--photo-bg);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .18s ease;
}
.gallery-main img.is-swapping { opacity: 0; }

.thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumb {
  width: 76px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--photo-bg);
  overflow: hidden;
  cursor: pointer;
  opacity: .6;
  transition: opacity .15s, border-color .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { opacity: 1; border-color: var(--text); }
.thumb:hover { opacity: 1; }

.buy { display: flex; flex-direction: column; }
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.title {
  margin: 0;
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.price {
  margin: 12px 0 0;
  font-size: 22px;
  font-weight: 500;
}
.price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.price.is-pending { color: var(--muted); font-size: 18px; }
.price .price-before { font-size: 16px; font-weight: 400; color: var(--muted); margin-left: 10px; }
.price .price-tag { display: inline-block; margin-left: 10px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text); vertical-align: middle; }

.colors { border: 0; padding: 0; margin: 22px 0 0; }
.colors legend { padding: 0; font-size: 14px; color: var(--muted); }
.colors legend span { color: var(--text); }
.swatches { display: flex; gap: 12px; margin-top: 10px; }
.swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #5a564f;
  background: var(--sw);
  cursor: pointer;
  padding: 0;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px transparent;
  transition: box-shadow .15s;
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--text); }
.swatch:focus-visible { outline: 2px solid var(--text); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #0c0c0b;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s, background .15s;
}
.cta:hover { background: #fff; }
.cta:active { transform: scale(.99); }
button.cta { border: 0; padding: 0 24px; width: 100%; }
.cta:disabled,
.cta[aria-disabled="true"] {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: not-allowed;
  pointer-events: none;
}

.launch { margin: 14px 0 0; font-size: 14px; color: var(--text); }
.stock-note { margin: 18px 0 -6px; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #f0b44c; }
.stock-note::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.stock-note.is-out { color: var(--muted); }
.stock-note[hidden] { display: none; }
.swatch.is-out { opacity: .35; }
.countdown {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.countdown:empty, .launch:empty { display: none; }

.facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; }
.is-pending-text { color: var(--muted); font-style: italic; }

/* Descripción */
.about {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
  border-top: 1px solid var(--line);
}
.about h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  font-stretch: 80%;
  text-transform: uppercase;
}
.about p { margin: 0; max-width: 62ch; font-size: 18px; color: #d9d3c9; }
.about p + p { margin-top: 14px; }
.uses { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.uses li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 22px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.lema { font-style: italic; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Encabezado: carrito */
.header-right { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.cart-count[hidden] { display: none; }

/* Inicio: cuenta regresiva */
.hero {
  min-height: calc(100svh - 77px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px var(--gutter) 32px;
  position: relative;
}
.hero .eyebrow { margin-bottom: 28px; }
.countdown-big {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 2vw, 24px);
  font-variant-numeric: tabular-nums;
}
.countdown-big[hidden] { display: none; }
.countdown-big .unit { display: flex; flex-direction: column; align-items: center; min-width: 2ch; }
.countdown-big .num {
  font-size: clamp(52px, 15vw, 168px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: .95;
  letter-spacing: -.02em;
}
.countdown-big .sep {
  font-size: clamp(36px, 10vw, 120px);
  font-weight: 300;
  line-height: 1.1;
  color: #4a4741;
}
.countdown-big .lbl {
  margin-top: 10px;
  font-size: clamp(10px, 2.6vw, 13px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.open-badge {
  margin: 0;
  font-size: clamp(48px, 13vw, 150px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: .95;
  text-transform: uppercase;
  text-wrap: balance;
}
.open-badge[hidden] { display: none; }
.hero-sub {
  max-width: 38ch;
  margin: 32px auto 0;
  font-size: clamp(15px, 2.2vw, 19px);
  color: #d9d3c9;
  text-wrap: balance;
}
.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* Inicio: tarjeta de producto */
.showcase {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px var(--gutter) 72px;
  scroll-margin-top: 8px;
}
.product-card {
  display: grid;
  gap: 20px;
  color: inherit;
  text-decoration: none;
  border-radius: calc(var(--radius) + 6px);
  outline-offset: 6px;
}
.product-card:focus-visible { outline: 2px solid var(--text); }
.card-photo {
  margin: 0;
  background: var(--photo-bg);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .5s ease;
}
.product-card:hover .card-photo img { transform: scale(1.03); }
.card-title {
  margin: 0;
  font-size: clamp(30px, 7vw, 56px);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
}
.card-colors { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid #5a564f;
}
.dot-names { margin-left: 6px; font-size: 14px; color: var(--muted); }
.card-cta { margin-top: 22px; }
.product-card:hover .card-cta { background: #fff; }

/* Ficha */
.crumbs {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px var(--gutter) 0;
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.qty-field { margin-top: 20px; }
.field-label { display: block; margin-bottom: 10px; font-size: 14px; color: var(--muted); }

/* Botón principal de la ficha: blanco, texto negro, ancho completo */
.add-to-cart {
  display: block;
  width: 100%;
  min-height: 60px;
  margin-top: 24px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #0c0c0b;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.25;
  text-wrap: balance;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.add-to-cart:hover { box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.add-to-cart:active { transform: scale(.99); }
.add-to-cart:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.add-to-cart:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  font-size: 14px;
  letter-spacing: .03em;
  text-transform: none;
  font-weight: 700;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 54px;
  flex: none;
}
.qty button {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  border-radius: 999px;
}
.qty button:disabled { color: #4a4741; cursor: default; }
.qty button:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; }
.qty output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.qty-sm { height: 36px; margin-top: 10px; }
.qty-sm button { width: 34px; font-size: 17px; }

/* Carrito */
body.cart-is-open { overflow: hidden; }
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 40;
}
.cart-overlay.is-open { opacity: 1; }
.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .22s ease;
  z-index: 50;
}
.cart.is-open { transform: none; }
.cart[hidden], .cart-overlay[hidden] { display: none; }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 22px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cart-list { list-style: none; margin: 0; padding: 0 22px; overflow-y: auto; flex: 1; }
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 72px; height: 72px; object-fit: contain; background: var(--photo-bg); border-radius: 8px; }
.cart-info p { margin: 0; }
.cart-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.cart-color { font-size: 13px; color: var(--muted); margin-top: 2px !important; }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-line { margin: 0; font-size: 14px; white-space: nowrap; }
.link-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--text); }
.cart-empty { display: none; flex: 1; padding: 32px 22px; color: var(--muted); }
.cart.is-empty .cart-empty { display: block; }
.cart.is-empty .cart-list, .cart.is-empty .cart-foot { display: none; }
.cart-empty .link-btn { font-size: 15px; color: var(--text); }
.cart-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.cart-subtotal strong { font-size: 18px; }
.cart-subtotal strong.is-pending-text { font-size: 15px; font-weight: 400; }
.cart-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.cart-checkout { margin-top: 16px; }
.cart-dev {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px dashed #6b5a2e;
  border-radius: 10px;
  font-size: 12px;
  color: #d8c28a;
  max-height: 34vh;
  overflow-y: auto;
}
.cart-dev p { margin: 8px 0 4px; }
.cart-dev ul { margin: 0; padding-left: 18px; }
.cart-dev code { display: block; word-break: break-all; color: var(--text); }

/* Computadora: galería a la izquierda, compra a la derecha */
@media (min-width: 900px) {
  .product {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
    padding-top: 32px;
  }
  .gallery { position: sticky; top: 24px; }
  /* Marco cuadrado fijo: todas las fotos (y todos los colores) se ven del mismo tamaño. */
  .gallery-main { aspect-ratio: 1 / 1; }
  .gallery-main img { width: 100%; height: 100%; object-fit: contain; }
  .thumb { width: 88px; }
  .buy { padding-top: 12px; }
  .brand img { width: 96px; }
  .product-card {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
  }
  .card-photo { aspect-ratio: auto; height: min(78vh, 760px); }
  .card-cta { max-width: 320px; }
}

@media (max-width: 520px) {
  .header-tag { display: none; }
}

/* Celular: foto y compra en la primera pantalla */
@media (max-width: 899px) {
  .site-header { padding-top: 12px; padding-bottom: 12px; }
  .brand img { width: 64px; }
  .product { gap: 16px; padding-top: 14px; }
  .gallery-main { aspect-ratio: 4 / 3; }
  .thumbs { margin-top: 8px; }
  .thumb { width: 52px; border-radius: 8px; }
  .buy .eyebrow { display: none; }
  .crumbs { display: none; }
  .title { font-size: clamp(28px, 8.4vw, 40px); }
  .price { margin-top: 8px; font-size: 20px; }
  .colors { margin-top: 14px; }
  .swatch { width: 36px; height: 36px; }
  .cta { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
