/* La 10 Retro · tienda. Paleta tomada de las historias destacadas del Instagram de la tienda. */
:root {
  --ink: #14120f;
  --ink-2: #1c1916;
  --ink-3: #26221d;
  --line: #322c26;
  --paper: #f3ebdd;
  --paper-2: #b4aa9b;
  --paper-3: #81786b;
  --orange: #e07a30;
  --orange-hi: #ee8a40;
  --cream: #f9dcad;
  --teal: #2f7c86;
  --teal-text: #7cc0c6;
  --font: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: clamp(16px, 4vw, 44px);
  --top: 60px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
:root:has(.cart[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 15px/1.5 var(--font);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }

/* ---------- Cabecera ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--top);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  view-transition-name: top;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 38px; height: 38px; }
.brand span {
  font-weight: 800; font-stretch: 75%; font-style: italic;
  font-size: 19px; letter-spacing: 0.01em; text-transform: uppercase;
}
.cart-btn {
  display: flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 6px 0 10px; margin-right: -6px;
  background: none; border: 0; border-radius: 3px; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.cart-btn:active { transform: scale(0.96); }
.cart-btn svg, .icon-btn svg, .back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cart-count {
  min-width: 1ch; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}
.cart-count:empty { display: none; }
.cart-count.bump { color: var(--orange); }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  min-height: min(76vh, 740px);
  padding: 0 var(--gutter);
  background: radial-gradient(60% 80% at 76% 62%, #2a241e 0%, var(--ink) 70%);
  border-bottom: 1px solid var(--line);
}
.hero::after { /* grano */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-copy { position: relative; z-index: 1; grid-column: 1; grid-row: 1; padding: 0 0 clamp(36px, 6vw, 72px); }
.hero h1 {
  font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase;
  font-size: clamp(64px, 10.5vw, 172px); line-height: 0.84; letter-spacing: -0.012em;
  color: var(--paper);
}
.hero h1 span { display: block; white-space: nowrap; }
.hero p { margin-top: 24px; color: var(--paper-2); font-size: 16px; max-width: 46ch; }
.hero-img {
  position: relative; z-index: 0; grid-column: 2; grid-row: 1; align-self: end; justify-self: center;
  width: min(100%, 560px); height: auto; margin-bottom: -9%;
  transform: rotate(-5deg); transform-origin: 50% 100%;
}
.hero.photo { display: block; min-height: min(84vh, 820px); background: var(--ink-2); }
.hero.photo .hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0;
  object-fit: cover; transform: none;
}
.hero.photo::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.92) 0%, rgba(20, 18, 15, 0.35) 45%, rgba(20, 18, 15, 0) 70%);
}
.hero.photo .hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; z-index: 3; }

/* ---------- Tienda: navegación + grilla ---------- */
.shop {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px);
  padding: 40px var(--gutter) 96px;
}
.side {
  position: sticky; top: calc(var(--top) + 28px); align-self: start;
  display: flex; flex-direction: column; gap: 2px;
  max-height: calc(100vh - var(--top) - 56px); overflow-y: auto; scrollbar-width: none;
}
.side a {
  position: relative; padding: 5px 0 5px 14px; color: var(--paper-2);
  font-size: 15px; transition: color 150ms ease;
}
.side a::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 14px; margin-top: -7px;
  background: var(--orange); border-radius: 2px; opacity: 0; transform: scaleY(0.4);
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}
.side a[aria-current] { color: var(--paper); }
.side a[aria-current]::before { opacity: 1; transform: none; }
.side-group { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; }
.side .side-head {
  margin-bottom: 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.12em; color: var(--paper-3);
}
.side .side-head[aria-current] { color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .side a:hover { color: var(--paper); }
}

.chips { display: none; }

.listing-title {
  margin: -6px 0 28px;
  font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase;
  font-size: clamp(44px, 6vw, 84px); line-height: 0.9; letter-spacing: -0.01em;
}
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 36px 20px;
}
.card a { display: block; }
.card-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--ink-2); border-radius: 2px;
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-alt { opacity: 0; transition: opacity 320ms ease; }
@media (hover: hover) and (pointer: fine) {
  .card a:hover .card-alt { opacity: 1; }
}
.card-blank, .gallery .card-blank {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase; font-size: 28px; line-height: 0.95;
  color: var(--paper-3);
}
.card-flag {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 7px; border-radius: 2px;
  background: rgba(20, 18, 15, 0.84); color: var(--teal-text);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
}
.card-flag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card-flag.out { color: var(--paper-2); }
.card-name { margin-top: 12px; font-size: 14.5px; font-weight: 500; line-height: 1.35; letter-spacing: -0.005em; }
.card-price { margin-top: 3px; font-weight: 750; font-stretch: 75%; font-size: 18px; letter-spacing: 0.01em; }
.empty { color: var(--paper-2); padding: 40px 0; }

/* ---------- Producto ---------- */
.pdp {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  padding: 28px var(--gutter) 72px;
}
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery img, .gallery .card-blank { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--ink-2); border-radius: 2px; }
.gallery .card-blank { position: relative; }
.pdp-info { position: sticky; top: calc(var(--top) + 28px); align-self: start; max-width: 460px; }
.back {
  display: inline-flex; align-items: center; gap: 2px; margin-left: -6px;
  color: var(--paper-2); font-size: 14px; transition: color 150ms ease;
}
.back svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .back:hover { color: var(--paper); } }
.pdp h1 {
  margin-top: 18px;
  font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase;
  font-size: clamp(42px, 4.6vw, 64px); line-height: 0.9; letter-spacing: -0.008em; text-wrap: balance;
}
.pdp-price { margin-top: 14px; font-weight: 750; font-stretch: 75%; font-size: 28px; letter-spacing: 0.01em; }
.buy { margin-top: 30px; }
.sizes { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.sizes legend {
  padding: 0; margin-bottom: 10px;
  font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.12em; color: var(--paper-2);
}
.sizes:first-of-type legend { color: var(--teal-text); }
.sizes:only-of-type legend { color: var(--paper-2); }
.sizes:only-of-type:has([data-delivery="now"]) legend { color: var(--teal-text); }
.size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size span {
  display: grid; place-items: center; min-width: 56px; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 3px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms var(--ease-out);
}
.size input:checked + span { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.size input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.size input:active + span { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .size input:not(:checked):hover + span { border-color: var(--paper-3); }
}
.add {
  width: 100%; height: 56px; margin-top: 8px;
  border: 0; border-radius: 3px; cursor: pointer;
  background: var(--ink-3); color: var(--paper-2);
  font-weight: 700; font-size: 16px; letter-spacing: 0.01em;
  transition: background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}
.add.ready { background: var(--orange); color: var(--ink); }
.add:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .add.ready:hover { background: var(--orange-hi); } }
.soldout { margin-top: 30px; font-weight: 700; color: var(--paper-2); }
.ship { margin-top: 18px; color: var(--paper-2); font-size: 14px; }
.desc { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--paper-2); max-width: 44ch; }

.more { padding: 8px var(--gutter) 96px; }
.more h2 {
  margin-bottom: 24px;
  font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase;
  font-size: clamp(30px, 3.4vw, 44px); line-height: 0.95;
}
.more .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.notfound { padding: 120px var(--gutter); }
.notfound h1 { font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase; font-size: clamp(44px, 7vw, 96px); line-height: 0.9; }
.notfound a { display: inline-block; margin-top: 24px; color: var(--orange); }

/* ---------- Pie ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--paper-3); font-size: 13.5px;
}
.foot span { margin-right: auto; }
.foot a { transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--paper); } }

/* ---------- Carrito ---------- */
.cart {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; border-left: 1px solid var(--line);
  background: var(--ink-2); color: var(--paper);
  display: none; flex-direction: column;
  transform: translateX(100%);
  transition: transform 200ms var(--ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete;
}
.cart[open] {
  display: flex; transform: none;
  transition: transform 300ms var(--ease-drawer), overlay 300ms allow-discrete, display 300ms allow-discrete;
}
@starting-style { .cart[open] { transform: translateX(100%); } }
.cart::backdrop {
  background: rgba(10, 9, 8, 0.62); opacity: 0;
  transition: opacity 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete;
}
.cart[open]::backdrop { opacity: 1; }
@starting-style { .cart[open]::backdrop { opacity: 0; } }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--top); padding: 0 12px 0 24px; border-bottom: 1px solid var(--line); flex: none;
}
.cart-head h2 { font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase; font-size: 26px; letter-spacing: 0.005em; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: none; border: 0; border-radius: 3px; cursor: pointer; color: var(--paper-2);
  transition: color 150ms ease, transform 160ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--paper); } }
.cart-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cart-items { list-style: none; margin: 0; padding: 8px 24px; overflow-y: auto; flex: 1; }
.cart-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item img, .cart-item .ci-blank { grid-row: span 2; width: 64px; height: 80px; object-fit: cover; border-radius: 2px; background: var(--ink-3); }
.ci-name { font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.ci-meta { grid-column: 2; font-size: 13px; color: var(--paper-2); }
.ci-meta .now { color: var(--teal-text); }
.ci-side { grid-row: 1 / span 2; grid-column: 3; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; }
.ci-price { font-weight: 750; font-stretch: 75%; font-size: 16px; }
.qty { display: inline-flex; align-items: center; margin-top: 10px; border: 1px solid var(--line); border-radius: 3px; }
.qty button {
  width: 32px; height: 30px; background: none; border: 0; cursor: pointer; color: var(--paper-2); font-size: 17px; line-height: 1;
  transition: color 150ms ease;
}
.qty button:active { color: var(--paper); }
.qty output { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.ci-remove { width: 32px; height: 32px; margin: -6px -8px 0 0; }
.ci-remove svg { width: 18px; height: 18px; }
.cart-foot { flex: none; padding: 18px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ink-2); }
.cart-foot dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0 0 18px; font-size: 14px; }
.cart-foot dt { color: var(--paper-2); }
.cart-foot dd { margin: 0; text-align: right; }
.cart-foot .total { font-weight: 800; font-stretch: 75%; font-size: 24px; line-height: 1.1; }
.cart-foot dt.total-label { align-self: end; color: var(--paper); }
.checkout {
  display: grid; place-items: center; height: 56px; border-radius: 3px;
  background: var(--orange); color: var(--ink); font-weight: 700; font-size: 16px; letter-spacing: 0.01em;
  transition: background-color 180ms ease, transform 160ms var(--ease-out);
}
.checkout:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .checkout:hover { background: var(--orange-hi); } }
.cart-empty, .cart-sent { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 18px; padding: 24px; }
.cart-empty p { color: var(--paper-2); font-size: 16px; }
.cart-sent h3 { font-weight: 850; font-stretch: 62%; font-style: italic; text-transform: uppercase; font-size: 40px; line-height: 0.92; }
.cart-sent h3 span { color: var(--orange); }
.text-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--orange); font-size: 15px; }
.ghost-btn {
  display: inline-grid; place-items: center; height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 3px;
  font-weight: 600; transition: border-color 150ms ease, transform 160ms var(--ease-out);
}
.ghost-btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .ghost-btn:hover { border-color: var(--paper-3); } }

/* ---------- Móvil y tablet ---------- */
@media (max-width: 960px) {
  .shop { display: block; padding-top: 0; }
  .side { display: none; }
  .chips {
    display: block; position: sticky; top: var(--top); z-index: 15;
    margin: 0 calc(var(--gutter) * -1) 22px; padding: 12px 0 10px;
    background: var(--ink); border-bottom: 1px solid var(--line);
  }
  .chips-row {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter);
    scroll-padding: 0 var(--gutter);
  }
  .chips-row::-webkit-scrollbar { display: none; }
  .chips-row.sub { margin-top: 10px; }
  .chip {
    flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 3px; color: var(--paper-2); font-size: 14px; white-space: nowrap;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  }
  .chip[aria-current] { background: var(--paper); border-color: var(--paper); color: var(--ink); font-weight: 600; }
  .chips-row.sub .chip { height: 30px; font-size: 13.5px; border-color: transparent; background: var(--ink-3); }
  .chips-row.sub .chip[aria-current] { background: var(--cream); color: var(--ink); }
  .no-hero .chips { margin-bottom: 26px; }
  .listing-title { margin: 0 0 22px; }
  .shop:not(.no-hero) .chips { margin-top: 0; }

  .pdp { display: block; padding: 0 0 56px; }
  .gallery {
    flex-direction: row; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 12px var(--gutter) 0; scroll-padding: 0 var(--gutter);
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery img, .gallery .card-blank { flex: none; width: 84%; scroll-snap-align: start; }
  .gallery > :only-child { width: 100%; }
  .pdp-info { position: static; max-width: none; padding: 22px var(--gutter) 0; }
  .more .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; align-items: start; min-height: 0; padding-top: 36px; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { font-size: clamp(60px, 18.5vw, 104px); }
  .hero p { margin-top: 16px; font-size: 15px; }
  .hero-img { grid-column: 1; grid-row: 2; width: 74%; justify-self: end; margin: -8px -4% -16%; }
  .hero.photo { min-height: 78vh; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .card-name { font-size: 14px; margin-top: 10px; }
  .card-price { font-size: 17px; }
  .card-flag { left: 6px; top: 6px; font-size: 11px; padding: 3px 7px 3px 6px; }
  .cart {
    inset: auto 0 0 0; width: 100vw; height: auto; max-height: 90dvh;
    border-left: 0; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0;
    transform: translateY(100%);
  }
  @starting-style { .cart[open] { transform: translateY(100%); } }
  .cart-items { max-height: 52dvh; }
  .foot span { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cart, .cart[open] { transition-property: opacity, overlay, display; transform: none; }
  @starting-style { .cart[open] { opacity: 0; transform: none; } }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  * { scroll-behavior: auto; }
}
