@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-2: #4a4a4a;          /* texto secundario: 8.9:1 sobre blanco */
  --muted: #666666;          /* 5.7:1 sobre blanco */
  --line: #e4e4e4;
  --line-strong: #c9c9c9;
  --surface: #f6f6f5;
  --photo: #f3f2f0;          /* fondo de las fotos de producto */
  --accent: #f5a524;         /* ámbar: solo acciones y detalles puntuales */
  --accent-hover: #e8930c;
  --accent-ink: #141414;     /* texto sobre ámbar: 10:1 */
  --accent-soft: #fde9c4;
  --danger: #b42318;
  --ok: #157f3b;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --hdr: 64px;
  --gutter: 16px;
  --max: 1320px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 120ms;
  --dur-fast: 180ms;
  --dur-drawer: 320ms;
  --dur-drawer-out: 220ms;

  --shadow-pop: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.12);
  --shadow-bar: 0 -1px 0 var(--line), 0 -8px 24px rgb(0 0 0 / 0.06);

  color-scheme: light;
  accent-color: var(--ink);
}
@media (min-width: 760px) { :root { --gutter: 24px; --hdr: 72px; } }
@media (min-width: 1180px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); color: var(--ink); }
input, textarea { caret-color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.15; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, input, select, label, summary { touch-action: manipulation; }
html:has(.sticky-buy.is-visible) { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); font-weight: 400; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
main { min-height: 60vh; outline: none; }

/* Foco visible y consistente en toda la tienda */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); }
.skip:focus { top: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition-property: background-color, border-color, color, scale;
  transition-duration: var(--dur-fast), var(--dur-fast), var(--dur-fast), var(--dur-press);
  transition-timing-function: var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { scale: 0.96; }
.btn .icon { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-danger { background: #fff; border-color: #f0c2bd; color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn:disabled { background: var(--surface); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
  .btn-secondary:hover { border-color: var(--ink); }
}
.btn[aria-busy="true"] { cursor: progress; }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink);
  text-decoration: none; transition: background-color var(--dur-fast) var(--ease-out), scale var(--dur-press) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { scale: 0.96; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--surface); } }
.icon { width: 24px; height: 24px; display: block; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgb(255 255 255 / 0.96); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgb(255 255 255 / 0.88); backdrop-filter: saturate(1.4) blur(10px); } }
.hdr { max-width: var(--max); margin-inline: auto; height: var(--hdr); display: flex; align-items: center; gap: 8px; padding-inline: calc(var(--gutter) - 6px); }
/* Espacio de logo fijo: reemplazar el logo no altera el encabezado */
.logo-slot { --logo: 44px; flex: none; width: var(--logo); height: var(--logo); display: grid; place-items: center; border-radius: 6px; overflow: hidden; }
.logo-slot img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.logo-placeholder { width: 100%; height: 100%; border: 1px dashed var(--line-strong); border-radius: 6px; }
@media (min-width: 760px) { .logo-slot { --logo: 52px; } }
.search { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search input {
  width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 46px 0 16px; font-size: 16px; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:focus { outline: none; border-color: var(--ink); background: #fff; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-btn { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 999px; color: var(--ink-2); }
.search-btn .icon { width: 20px; height: 20px; }
@media (min-width: 1180px) { .search { max-width: 560px; margin-inline: auto; } }
.cart-count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px #fff;
  transition: opacity var(--dur-fast) var(--ease-out), scale var(--dur-fast) var(--ease-out);
}
.cart-count[data-count="0"] { opacity: 0; scale: 0.6; }

/* ---------- Paneles laterales (menú, carrito, filtros) ---------- */
.drawer {
  position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0; border: 0; max-height: none; height: 100dvh;
  width: min(88vw, 380px); max-width: none; background: #fff; color: var(--ink);
  box-shadow: var(--shadow-pop);
  translate: -100% 0;
  transition-property: translate, overlay, display;
  transition-duration: var(--dur-drawer-out);
  transition-timing-function: var(--ease-out);
  transition-behavior: allow-discrete;
}
.drawer-right { inset: 0 0 0 auto; translate: 100% 0; width: min(100vw, 440px); }
.drawer[open] { translate: 0 0; transition-duration: var(--dur-drawer); transition-timing-function: var(--ease-drawer); }
@starting-style { .drawer[open] { translate: -100% 0; } .drawer-right[open] { translate: 100% 0; } }
.drawer::backdrop {
  background: rgb(20 20 20 / 0); transition-property: background-color, overlay, display;
  transition-duration: var(--dur-drawer-out); transition-behavior: allow-discrete;
}
.drawer[open]::backdrop { background: rgb(20 20 20 / 0.36); transition-duration: var(--dur-drawer); }
@starting-style { .drawer[open]::backdrop { background: rgb(20 20 20 / 0); } }
.drawer-inner { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--hdr); padding: 0 8px 0 20px; border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 18px; font-weight: 650; margin: 0; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 24px; }
.drawer-foot { flex: none; display: flex; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.drawer-foot .btn { flex: 1; }
html:has(dialog[open]) { overflow: hidden; }

.menu, .menu ul, .menu-secondary { list-style: none; margin: 0; padding: 0; }
.menu a, .menu-all {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; margin: 0 -12px;
  border-radius: var(--radius-sm); text-decoration: none; font-size: 17px;
}
.menu a[aria-current="page"] { font-weight: 650; background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .menu a:hover, .menu-secondary a:hover { background: var(--surface); } }
.menu-all { font-weight: 600; }
.menu-group { padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--line); }
.menu-title { margin: 0 0 4px; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.menu-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.menu-secondary { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.menu-secondary a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; margin: 0 -12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); }

/* ---------- Catálogo ---------- */
.catalog { padding-top: 20px; padding-bottom: 48px; }
.page-title { font-size: clamp(26px, 6vw, 40px); font-weight: 700; margin: 0 0 16px; letter-spacing: -0.02em; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; }
.btn-filters { min-height: 44px; padding: 0 16px; }
.pill { min-width: 22px; height: 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; padding: 0 6px; }
.result-count { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sort { margin-left: auto; }
.sort select {
  height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background-color: #fff; color: var(--ink); padding: 0 36px 0 14px; font-size: 15px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23141414' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.catalog-head .page-title { margin: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 16px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 14px; position: relative;
  transition: border-color var(--dur-fast) var(--ease-out), scale var(--dur-press) var(--ease-out);
}
.chip::after { content: ""; position: absolute; inset: -4px 0; } /* área táctil de 44px */
.chip .icon { width: 16px; height: 16px; }
.chip:active { scale: 0.96; }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--ink); } }
.clear-link { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 320px; }
.card-link { display: grid; grid-template-rows: auto auto auto auto 1fr; text-decoration: none; height: 100%; border-radius: var(--radius); }
.card-link:focus-visible { outline-offset: 4px; }
.card-media { position: relative; aspect-ratio: 1; background: var(--photo); border-radius: var(--radius); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: scale 250ms var(--ease-out); }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.05); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .card-link:hover .card-media img { scale: 1.03; } }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
/* Nombre en 2 líneas reservadas: los precios quedan alineados en toda la fila */
.card-name {
  margin: 12px 0 0; font-size: 15px; font-weight: 500; line-height: 1.3; min-height: calc(2 * 1.3em);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-ref { margin: 2px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-price { margin: 6px 0 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.card-price .was, .pdp-price .was { font-weight: 400; color: var(--muted); font-size: 0.85em; margin-right: 4px; }
.card-note { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card.is-soldout .card-media img { opacity: 0.55; }
@media (min-width: 760px) { .card-name { font-size: 16px; } .card-price { font-size: 18px; } }

.empty { text-align: center; padding: 48px 16px; max-width: 520px; margin: 0 auto; }
.empty h2 { font-size: 22px; margin: 0 0 8px; }
.empty p { color: var(--ink-2); margin: 0 0 20px; }

/* Filtros */
.facet { border: 0; margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facet legend { font-weight: 650; padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.facet legend + * { clear: both; }
.facet-empty { margin: 0; color: var(--muted); font-size: 14px; clear: both; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 0; flex: none; }
.opt-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-size { position: relative; min-height: 44px; }
.opt-size input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt-size span { display: grid; place-items: center; min-width: 52px; height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.opt-size input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 650; }
.opt-size input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; clear: both; }
.price-range label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.price-range input, .field input, .field select, .field textarea {
  height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 12px; background: #fff; font-size: 16px; width: 100%;
}
.field textarea { height: auto; padding: 10px 12px; }

/* ---------- Ficha ---------- */
.pdp { padding-top: 12px; padding-bottom: 48px; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.crumbs a { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; text-decoration: none; }
.crumbs a:first-child { margin-left: -6px; }
.crumbs .icon { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { text-decoration: underline; } }
.pdp-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.pdp-info { min-width: 0; }
@media (min-width: 960px) { .pdp-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; } .pdp-info { position: sticky; top: calc(var(--hdr) + 20px); } }
.gallery { min-width: 0; margin-inline: calc(-1 * var(--gutter)); }
@media (min-width: 960px) { .gallery { margin-inline: 0; } }
.gallery-track { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--photo); }
.gallery-track::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .gallery-track { border-radius: var(--radius-lg); } }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { list-style: none; display: flex; gap: 8px; padding: 10px var(--gutter) 0; margin: 0; overflow-x: auto; }
@media (min-width: 960px) { .gallery-thumbs { padding-inline: 0; } }
.gallery-thumbs a { display: block; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--photo); outline: 1px solid var(--line); outline-offset: -1px; }
.gallery-thumbs a[aria-current="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }

.pdp-title { font-size: clamp(24px, 5vw, 34px); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.pdp-ref { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.badge-inline { color: var(--ink); font-weight: 600; }
.pdp-price { margin: 12px 0 4px; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #fff7e6; border: 1px solid #f6d79a; border-radius: var(--radius-sm); padding: 10px 12px; margin: 12px 0 0; font-size: 15px; }
.notice .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.variant-field { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.variant-field legend { font-weight: 650; margin-bottom: 10px; padding: 0; }
.legend-value { font-weight: 400; color: var(--ink-2); }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch, .size { position: relative; }
.swatch input, .size input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.swatch input:disabled, .size input:disabled { cursor: not-allowed; }
.swatch-box, .size-box {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), scale var(--dur-press) var(--ease-out);
}
.swatch-box { padding: 0 14px; }
.swatch-dot { width: 18px; height: 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15); }
.size-box { min-width: 60px; padding: 0 12px; font-size: 16px; }
/* Selección: relleno invertido + icono de check + grosor = se distingue sin percibir el color */
.size-box { position: relative; }
.size-box .icon { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; opacity: 0; scale: 0.25; filter: blur(4px); transition: opacity var(--dur-fast) var(--ease-out), scale var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out); stroke-width: 2.5; }
.size input:checked + .size-box, .swatch input:checked + .swatch-box { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 650; }
.size input:checked + .size-box .icon { opacity: 1; scale: 1; filter: blur(0); }
.swatch input:checked + .swatch-box { box-shadow: 0 0 0 2px #fff inset; }
.swatch input:active:not(:disabled) + .swatch-box, .size input:active:not(:disabled) + .size-box { scale: 0.96; }
.swatch input:focus-visible + .swatch-box, .size input:focus-visible + .size-box { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .swatch input:not(:checked):not(:disabled):hover + .swatch-box, .size input:not(:checked):not(:disabled):hover + .size-box { border-color: var(--ink); } }
/* Agotado: tachado diagonal + texto atenuado (no depende del color) */
.size.is-soldout .size-box, .swatch.is-soldout .swatch-box {
  color: var(--muted); border-style: dashed; background:
    linear-gradient(to top right, transparent calc(50% - 0.75px), var(--line-strong) calc(50% - 0.75px), var(--line-strong) calc(50% + 0.75px), transparent calc(50% + 0.75px)) #fafafa;
}
.size.is-soldout .size-text { text-decoration: line-through; }
.help { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.field-error { color: var(--danger); font-weight: 600; }
.variant-field.has-error .size-box { border-color: var(--danger); }

.buy { margin-top: 24px; }
.buy-status { min-height: 1.5em; margin: 10px 0 0; font-size: 15px; }
.buy-status.is-error { color: var(--danger); font-weight: 600; }
.buy-status.is-ok { color: var(--ok); font-weight: 600; }
.buy-status a { font-weight: 650; }
.pending-box { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pending-box p { margin: 0 0 14px; }
.pdp-details { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 8px; max-width: 70ch; }
.pdp-details h2 { font-size: 17px; margin: 16px 0 6px; }
.pdp-details p { margin: 0 0 8px; color: var(--ink-2); }

/* Barra fija de compra en móvil (aparece cuando el botón principal sale de pantalla) */
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: #fff; box-shadow: var(--shadow-bar);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  translate: 0 110%; transition: translate var(--dur-drawer-out) var(--ease-out);
}
.sticky-buy.is-visible { translate: 0 0; transition-duration: var(--dur-drawer); }
.sticky-buy-inner { display: flex; align-items: center; gap: 12px; max-width: var(--max); margin: 0 auto; }
.sticky-buy-text { flex: 1; min-width: 0; display: grid; }
.sticky-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.sticky-meta { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 960px) { .sticky-buy { display: none; } }

/* ---------- Carrito ---------- */
.cart-root { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cart-lines { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; margin: 0; padding: 4px 20px 16px; }
.cart-page .cart-lines { overflow: visible; padding: 0; }
.cart-line { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 88px; height: 88px; border-radius: var(--radius-sm); background: var(--photo); object-fit: cover; }
.cart-line-name { font-weight: 600; margin: 0; line-height: 1.3; }
.cart-line-name a { text-decoration: none; }
.cart-line-meta { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.cart-line-unit { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.cart-line-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.cart-line-sub { font-weight: 700; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; transition: scale var(--dur-press) var(--ease-out); }
.qty button:active:not(:disabled) { scale: 0.92; }
.qty button:disabled { color: var(--line-strong); cursor: not-allowed; }
.qty .icon { width: 18px; height: 18px; }
.qty output { min-width: 28px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.remove { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; border: 0; background: none; color: var(--ink-2); font-size: 14px; padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; }
.remove .icon { width: 18px; height: 18px; }
.cart-summary { flex: none; border-top: 1px solid var(--line); background: #fff; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
.cart-page .cart-summary { position: sticky; bottom: 0; margin-top: 8px; padding-inline: 0; box-shadow: 0 -12px 16px -12px rgb(0 0 0 / 0.08); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sum-row.total { color: var(--ink); font-weight: 700; font-size: 18px; margin: 8px 0 12px; }
.sum-note { font-size: 13px; color: var(--muted); margin: -8px 0 12px; }
.cart-empty { padding: 40px 20px; text-align: center; }
.cart-empty p { color: var(--ink-2); margin: 0 0 16px; }
.cart-alert { margin: 12px 20px 0; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid #f6d79a; background: #fff7e6; font-size: 15px; }
.cart-page .cart-alert { margin-inline: 0; }
.cart-alert.is-error { border-color: #f0c2bd; background: #fdf1f0; }
.cart-alert h3 { margin: 0 0 6px; font-size: 16px; }
.cart-alert ul { margin: 0 0 10px; padding-left: 18px; }
.cart-alert .btn { margin-top: 4px; }
.cart-done { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Toast ---------- */
.toast-region { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: center; pointer-events: none; padding: 0 16px; }
.is-pdp .toast-region { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .is-pdp .toast-region { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 460px; width: 100%;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 10px 10px 10px 16px; box-shadow: var(--shadow-pop);
  opacity: 0; translate: 0 12px; transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out);
}
.toast.is-shown { opacity: 1; translate: 0 0; }
.toast p { margin: 0; flex: 1; font-size: 15px; }
.toast .icon { width: 20px; height: 20px; color: var(--accent); flex: none; }
.toast a { color: #fff; font-weight: 650; min-height: 40px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: rgb(255 255 255 / 0.12); text-decoration: none; white-space: nowrap; }

/* ---------- Pie y consentimiento ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-2); }
.footer-grid { display: grid; gap: 12px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-grid nav a, .footer-grid nav button { min-height: 44px; display: inline-flex; align-items: center; color: inherit; font-size: 14px; }
.footer-grid p { margin: 0; }
.consent {
  position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 16px;
}
.consent p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
@media (max-width: 559px) { .consent { padding: 12px 14px; } .consent p { font-size: 13px; margin-bottom: 10px; } .consent-actions .btn { min-height: 44px; padding: 0 12px; font-size: 15px; } }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-actions .btn { flex: 1; min-height: 44px; }

/* ---------- Páginas de texto ---------- */
.prose { padding-top: 24px; padding-bottom: 48px; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); max-width: 70ch; }
.pending { background: var(--accent-soft); color: var(--ink); padding: 0 4px; border-radius: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.prose .table { display: block; overflow-x: auto; }
.empty-page { padding-top: 48px; padding-bottom: 64px; }
.search-inline label { display: block; font-weight: 600; margin-bottom: 6px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; font-size: 16px; }
.admin-preview { position: fixed; top: calc(var(--hdr) + 8px); left: 50%; translate: -50% 0; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 13px; z-index: 20; }

/* Movimiento reducido: sin desplazamientos, solo cambios de opacidad/color breves */
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-right, .drawer[open] { translate: 0 0; transition-property: opacity, overlay, display; opacity: 0; }
  .drawer[open] { opacity: 1; }
  @starting-style { .drawer[open], .drawer-right[open] { translate: 0 0; opacity: 0; } }
  .sticky-buy { transition-property: opacity; opacity: 0; translate: 0 0; visibility: hidden; }
  .sticky-buy.is-visible { opacity: 1; visibility: visible; }
  .toast { translate: 0 0; }
  .card-media img, .btn, .icon-btn, .chip, .size-box, .swatch-box, .qty button { transition-property: background-color, border-color, color, opacity; scale: none !important; }
  .card-link:hover .card-media img { scale: 1; }
  .size-box .icon { filter: none; scale: 1; }
}

/* Botón principal sin variante válida: aspecto inactivo, pero sigue explicando qué falta al pulsarlo */
.btn-primary.is-inactive { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
@media (hover: hover) and (pointer: fine) { .btn-primary.is-inactive:hover { background: var(--surface); } }

/* Tallas 22–47: cuadrícula regular (6 por fila en móvil, más en pantallas anchas) */
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.sizes .size-box { min-width: 0; width: 100%; padding: 0 4px; }
