/* CUMBRE — sistema base compartido (tokens, cabecera, carrito, tarjeta, pie). */
:root {
  --ink: #0b0b0b;
  --ink-2: #151515;
  --ink-3: #222120;
  --bone: #e9e8e5;
  --bone-2: #dddcd8;
  --concrete: #8e8a84;
  --on-ink: #e9e8e5;
  --on-ink-mute: #a29e97;
  --on-bone: #0b0b0b;
  --on-bone-mute: #5f5b55;
  --line-ink: rgba(233, 232, 229, 0.14);
  --line-bone: rgba(11, 11, 11, 0.14);

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3.4vw, 56px);
  --header-h: 68px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --z-header: 50;
  --z-drawer: 80;
  --z-toast: 90;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3a3835 var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--f-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }
::selection { background: var(--bone); color: var(--ink); }
.on-bone ::selection, .on-bone::selection { background: var(--ink); color: var(--bone); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #3a3835; border: 2px solid var(--ink); }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 3px; }

.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;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--bone); color: var(--ink); padding: 10px 14px; font-weight: 500;
}
.skip:focus { top: 12px; }

/* Superficies */
.on-bone { background: var(--bone); color: var(--on-bone); }
.on-ink { background: var(--ink); color: var(--on-ink); }

/* Tipografía */
.display {
  font-family: var(--f-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: 0;
}
.h-section {
  font-family: var(--f-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 0.9;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}
.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mute { color: var(--on-ink-mute); }
.on-bone .mute { color: var(--on-bone-mute); }
.price { font-weight: 500; font-variant-numeric: lining-nums; }
.qty output { font-variant-numeric: tabular-nums; }

/* Marca */
.mark { width: 34px; height: 18px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__word {
  font-weight: 500; font-size: 13px; letter-spacing: 0.42em; text-transform: uppercase;
  padding-left: 0.1em;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font-weight: 500; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--bone); color: var(--ink);
  border: 1px solid var(--bone);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.2s var(--ease-out), opacity 0.2s;
}
.btn:hover { background: transparent; color: var(--bone); }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.38; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--bone); color: var(--ink); }
.on-bone .btn { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.on-bone .btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { background: var(--bone); color: var(--ink); }
.on-bone .btn--ghost { background: transparent; color: var(--ink); }
.on-bone .btn--ghost:hover { background: var(--ink); color: var(--bone); }
.btn.is-added { pointer-events: none; }

.link-u {
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
  color: inherit; opacity: 0.7; transition: opacity 0.2s;
}
.link-u:hover { opacity: 1; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  transition: opacity 0.2s, transform 0.2s var(--ease-out);
}
.icon-btn:hover { opacity: 0.6; }
.icon-btn:active { transform: scale(0.92); }
.icon-btn[disabled] { opacity: 0.25; cursor: default; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Tallas */
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size {
  min-width: 48px; height: 44px; padding: 0 10px;
  border: 1px solid var(--line-ink); font-size: 13px; font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.size:hover { border-color: var(--on-ink); }
.size[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.size:disabled { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }
.on-bone .size { border-color: var(--line-bone); }
.on-bone .size:hover { border-color: var(--ink); }
.on-bone .size[aria-pressed="true"] { background: var(--ink); color: var(--bone); border-color: var(--ink); }

/* Cabecera */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  color: var(--on-ink);
  transition: background-color 0.4s var(--ease-out), transform 0.5s var(--ease-out), color 0.3s;
}
.header.is-solid { background: rgba(11, 11, 11, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.header.is-hidden { transform: translateY(-100%); }
.header__nav { display: flex; gap: 28px; }
.header__nav a { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; transition: opacity 0.2s; }
.header__nav a:hover, .header__nav a[aria-current="page"] { opacity: 1; }
.header__end { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.bag-btn { position: relative; }
.bag-count {
  position: absolute; top: 6px; right: 4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--bone); color: var(--ink);
  font-size: 10px; font-weight: 600; line-height: 17px; text-align: center;
  transform: scale(0); transition: transform 0.35s var(--ease-out);
}
.bag-count.has { transform: scale(1); }
.bag-count.bump { animation: bump 0.45s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.45); } }
.menu-btn { display: none; }

@media (max-width: 820px) {
  .header { grid-template-columns: auto 1fr auto; }
  .header__nav { display: none; }
  .menu-btn { display: inline-grid; margin-left: -10px; }
  .header .brand { justify-self: center; }
}

/* Menú móvil */
.mnav {
  position: fixed; inset: 0; z-index: calc(var(--z-header) + 1);
  background: var(--ink); color: var(--on-ink);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 6px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 0.6s var(--ease-io), visibility 0s 0.6s;
}
.mnav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.6s var(--ease-io); }
.mnav a { font-family: var(--f-display); font-weight: 900; font-size: 56px; text-transform: uppercase; line-height: 1; }
.mnav__close { position: absolute; top: 12px; left: calc(var(--gutter) - 10px); }

/* Carrito */
.scrim {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0s 0.4s;
}
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease-out); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 1);
  width: min(460px, 100vw);
  background: var(--bone); color: var(--on-bone);
  display: grid; grid-template-rows: auto 1fr auto;
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.55s var(--ease-out), visibility 0s 0.55s;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform 0.55s var(--ease-out); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 24px; border-bottom: 1px solid var(--line-bone); }
.drawer__title { font-family: var(--f-display); font-weight: 900; font-size: 28px; text-transform: uppercase; margin: 0; }
.drawer__body { overflow-y: auto; padding: 8px 24px; overscroll-behavior: contain; }
.drawer__foot { padding: 20px 24px 24px; border-top: 1px solid var(--line-bone); display: grid; gap: 14px; }
.drawer__row { display: flex; justify-content: space-between; align-items: baseline; }
.drawer__total { font-size: 18px; font-weight: 500; }
.drawer__note { font-size: 12px; color: var(--on-bone-mute); margin: 0; }
.drawer .btn { width: 100%; }
.line {
  display: grid; grid-template-columns: 92px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line-bone);
  animation: lineIn 0.5s var(--ease-out) both;
}
@keyframes lineIn { from { opacity: 0; transform: translateY(8px); } }
.line__img { aspect-ratio: 4 / 5; object-fit: cover; width: 92px; background: var(--bone-2); }
.line__top { display: flex; justify-content: space-between; gap: 12px; }
.line__name { font-weight: 500; margin: 0; }
.line__meta { font-size: 13px; color: var(--on-bone-mute); margin: 2px 0 12px; }
.line__ctrl { display: flex; align-items: center; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-bone); }
.qty button { width: 36px; height: 36px; display: grid; place-items: center; }
.qty button:hover { background: var(--bone-2); }
.qty output { min-width: 28px; text-align: center; font-size: 14px; }
.line__remove { font-size: 12px; text-decoration: underline; text-underline-offset: 4px; color: var(--on-bone-mute); }
.line__remove:hover { color: var(--ink); }
.empty { padding: 56px 0; display: grid; gap: 20px; justify-items: start; }
.empty .mark { width: 64px; height: 34px; opacity: 0.3; }
.empty p { margin: 0; font-size: 16px; }

/* Aviso */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: var(--z-toast);
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--bone); color: var(--ink);
  padding: 14px 20px; font-size: 14px; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
  pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* Tarjeta de producto (riel del inicio y tienda) */
.card { position: relative; display: grid; gap: 14px; align-content: start; }
.card__media {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--bone);
}
.card__media img[src*="-flat-"] { mix-blend-mode: multiply; }
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.6s var(--ease-out), transform 1.2s var(--ease-out);
}
.card__media img + img { opacity: 0; }
.card:hover .card__media img:first-child { transform: scale(1.04); }
.card:hover .card__media img + img { opacity: 1; transform: scale(1.04); }
.card__badge {
  position: absolute; left: 12px; bottom: 12px;
  background: var(--bone); color: var(--ink);
  padding: 7px 11px; font-size: 13px; font-weight: 500;
  pointer-events: none;
}
.card__fav {
  position: absolute; top: 6px; right: 6px; color: var(--ink);
}
.card__fav[aria-pressed="true"] .icon { fill: currentColor; }
.card__info { display: grid; gap: 4px; }
.card__name { font-size: 17px; font-weight: 500; margin: 0; }
.card__meta { font-size: 15px; margin: 0; }
.card__price { font-size: 16px; margin-top: 14px; }
/* Muestras de color en la tarjeta */
.card__colors { display: flex; gap: 12px; margin: 10px 0 0; padding: 0; list-style: none; }
.swatch {
  position: relative; display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--sw); box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.28);
  outline: 1px solid transparent; outline-offset: 3px;
  transition: outline-color 0.2s var(--ease-out);
}
.swatch::before { content: ""; position: absolute; inset: -9px; }
.swatch[aria-current="true"] { outline-color: var(--ink); }
.swatch:focus-visible { outline: 2px solid var(--ink); }

/* Pie */
.footer { background: var(--ink); color: var(--on-ink); padding: 96px var(--gutter) 28px; overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer h2 { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 18px; color: var(--on-ink-mute); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { opacity: 0.6; }
.news { display: flex; border-bottom: 1px solid var(--on-ink); max-width: 420px; }
.news input { flex: 1; min-width: 0; background: none; border: 0; padding: 14px 0; outline: none; }
.news input::placeholder { color: var(--on-ink-mute); }
.news button { padding: 0 4px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.news__msg { font-size: 13px; color: var(--on-ink-mute); min-height: 20px; margin: 10px 0 0; }
.footer__mega {
  margin-top: 96px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
}
/* logo del pie: copia exacta del logo de la cabecera (icono + palabra), escalada en bloque */
.footer__logo { display: inline-flex; align-items: center; gap: 0.923em; font-size: clamp(22px, 4.6vw, 64px); }
.footer__logo .mark { width: 2.615em; height: 1.385em; }
.footer__logo .brand__word { font-size: 1em; }
.footer__legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-ink); font-size: 12px; color: var(--on-ink-mute); }
@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .footer__legal { flex-direction: column; }
}

/* Revelado al entrar en pantalla */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* pie: marca de agua del logo */
.footer { position: relative; }
.footer__wm { position: absolute; z-index: 0; right: -3vw; bottom: 84px; width: min(34vw, 480px); height: auto; color: rgba(233, 232, 229, 0.14); overflow: visible; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-width: 0.12; pointer-events: none; }
.footer__grid, .footer__mega, .footer__legal { position: relative; z-index: 1; }
@media (max-width: 820px) { .footer__wm { bottom: 150px; right: -16vw; width: 70vw; } }
