/* ==========================================================================
   King Moss — sistema visual
   Tokens: ver documento de marca (paleta, tipografía, movimiento)
   ========================================================================== */

:root {
  --bg: #0B0E0B;          /* Asfalto */
  --surface: #181C18;     /* Hormigón */
  --line: #2A2F2B;        /* Línea */
  --campo: #666A62;       /* Borde de campos: 3:1 sobre Asfalto y Hormigón */
  --error: #E0866B;       /* Errores: 7:1 sobre Asfalto */
  --text: #EBE8DE;        /* Hueso */
  --muted: #9DA095;       /* Liquen */
  --accent: #964E1C;      /* Óxido: botones y opciones (acción) */
  --accent-ink: #EBE8DE;  /* texto sobre Óxido */
  --accent-text: #82962B; /* Musgo claro: verde de marca como texto chico sobre oscuro */
  --naranja-texto: #D9864A; /* naranja legible como texto chico sobre oscuro */
  --olive: #5F6D1F;       /* Musgo: verde de marca para marcas y detalles */
  --deep: #37420F;        /* Musgo hondo */
  --hero-accent: #964E1C;
  --hero-accent-ink: #EBE8DE;
  --deep-ink: #EBE8DE;
  --overlay: rgb(11 14 11 / 0.72);
  --grain-opacity: 0.05;

  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 68px;
  color-scheme: dark;
}

:root[data-km-theme="light"] {
  --bg: #EBE8DE;
  --surface: #E1DED3;
  --line: #CFCBBF;
  --campo: #7A766A;
  --error: #A23B1E;
  --text: #0B0E0B;
  --muted: #53574D;
  --accent: #964E1C;
  --accent-ink: #EBE8DE;
  --accent-text: #37420F;
  --naranja-texto: #964E1C;
  --olive: #5F6D1F;
  --deep: #37420F;
  --deep-ink: #EBE8DE;
  --overlay: rgb(11 14 11 / 0.5);
  --grain-opacity: 0.035;
  color-scheme: light;
}



/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: clamp(1rem, 0.95rem + 0.15vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 8px; }

/* textura de hormigón, muy sutil */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Lo marcado como oculto queda oculto aunque su clase le dé otro display. */
[hidden] { display: none !important; }

/* ---------- tipografía ---------- */
.display {
  margin: 0; font-weight: 900; font-stretch: 62.5%; text-transform: uppercase;
  font-size: clamp(4rem, 14vw, 14.5rem); line-height: .82; letter-spacing: -0.03em;
}
.h2 {
  margin: 0; font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  font-size: clamp(2.25rem, 5.4vw, 5rem); line-height: .9; letter-spacing: -0.01em;
}
.h3 { margin: 0; font-weight: 700; font-size: clamp(1.125rem, 1.2vw + 0.75rem, 1.375rem); line-height: 1.25; }
.mono {
  font-family: var(--f-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }
.lead { font-size: clamp(1.0625rem, 1vw + 0.75rem, 1.25rem); max-width: 46ch; margin: 0; text-wrap: pretty; }
.prose { max-width: 62ch; color: var(--muted); }
.prose p { margin: 0 0 1em; }

.wrap { padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 140px); }
.section-head {
  display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap;
  gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 48px);
}

/* ---------- botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px; font-weight: 700; font-size: 1rem;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .25s var(--ease-out), filter .25s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--text); filter: none; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.link {
  display: inline-block; font-weight: 600; padding-bottom: 3px;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 2px no-repeat;
  transition: background-size .35s var(--ease-out), color .2s;
}
.link:hover { color: var(--accent-text); }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- barra de aviso ---------- */
.announce {
  background: var(--surface); border-bottom: 1px solid var(--line);
  text-align: center; padding: 9px var(--gutter); font-family: var(--f-mono);
  font-size: 0.75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.announce strong { color: var(--text); font-weight: 500; }

/* ---------- header ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; color: var(--text); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility .35s; }
/* el contenedor del header no debe limitar el sticky */
#km-top { display: contents; }
/* en la portada, el logo del header se oculta mientras se ve la animación */
.header[data-logo-hidden] .wordmark { opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none; }
.header { transition: box-shadow .3s; }
.header[data-stuck] { background: var(--bg); box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgb(0 0 0 / .6); }
.wordmark:hover { color: var(--accent-text); }
.logo-wordmark { display: block; height: 19px; width: auto; }
@media (max-width: 900px) { .logo-wordmark { height: 16px; } }
.nav { display: flex; gap: 6px; justify-self: center; }
.nav > a, .nav-drop > button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  font-size: 0.9375rem; font-weight: 500; transition: color .2s;
}
.nav > a:hover, .nav-drop > button:hover, .nav [aria-current="page"] { color: var(--accent-text); }
.nav-drop { position: relative; }
.nav-drop .icon { width: 14px; height: 14px; transition: transform .25s; }
.nav-drop[data-open] .icon { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); padding: 8px;
  display: none; flex-direction: column;
}
.nav-drop[data-open] .nav-menu { display: flex; }
.nav-menu a { padding: 10px 12px; font-size: 0.9375rem; display: flex; justify-content: space-between; gap: 16px; }
.nav-menu a:hover { background: var(--bg); color: var(--accent-text); }
.nav-menu .mono { font-size: 0.6875rem; color: var(--muted); }

.header-tools { display: flex; gap: 4px; justify-self: end; align-items: center; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px;
  padding: 0 10px; justify-content: center; font-size: 0.9375rem; font-weight: 500;
}
.tool:hover { color: var(--accent-text); }
.cart-count {
  font-family: var(--f-mono); font-size: 0.75rem; min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center; background: var(--accent); color: var(--accent-ink);
}
.cart-count[data-empty] { background: var(--line); color: var(--muted); }
.theme-toggle .sun { display: none; }
:root[data-km-theme="light"] .theme-toggle .sun { display: block; }
:root[data-km-theme="light"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }

/* menú móvil */
.mobile-nav {
  position: fixed; top: var(--mnav-top, var(--header-h)); bottom: 0; left: 0; z-index: 49;
  width: min(max(66.67vw, 260px), 380px); background: var(--bg); border-right: 1px solid var(--line);
  box-shadow: 16px 0 40px rgb(0 0 0 / .35);
  padding: 24px var(--gutter) 40px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-102%); visibility: hidden; transition: transform .35s var(--ease-out), visibility 0s .35s;
}
.mobile-nav[data-open] { transform: none; visibility: visible; transition: transform .35s var(--ease-out); }
/* El resto de la web se sigue viendo detrás, oscurecida; tocarla cierra el menú. */
.mnav-scrim { position: fixed; top: var(--mnav-top, var(--header-h)); left: 0; right: 0; bottom: 0; z-index: 48; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity .3s; }
.mobile-nav[data-open] + .mnav-scrim { opacity: 1; pointer-events: auto; }
.mobile-nav a { font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 2.125rem; line-height: 1.1; padding: 6px 0; }
.mobile-nav .sub { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 16px; }
.mobile-nav .sub a { font-family: var(--f-mono); font-size: 0.875rem; font-weight: 400; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

@media (max-width: 900px) {
  .header { grid-template-columns: auto 1fr auto; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; order: -1; }
  .wordmark { justify-self: center; }
  .tool .label { display: none; }
}

/* ---------- portada (B — Muro) ---------- */
.hero {
  position: relative; min-height: clamp(520px, 80svh, 880px);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--surface); overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media picture { display: contents; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
/* Con foto, el título ocupa la mitad izquierda para no tapar la remera. */
@media (min-width: 721px) {
  .hero:has(.hero-media img) .display { font-size: clamp(4rem, 10vw, 11rem); }
}
.hero-inner { padding: var(--gutter); padding-bottom: clamp(32px, 5vw, 64px); color: var(--text); }
/* Con foto de campaña: velo oscuro y texto claro, en cualquier modo, para que se lea sobre la imagen. */
.hero:has(.hero-media img), .hero--foto { background: #181C18; }
.hero:has(.hero-media img)::after, .hero--foto::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(11 14 11 / .78) 0%, rgb(11 14 11 / .15) 55%, rgb(11 14 11 / .05) 100%);
}
.hero:has(.hero-media img) .hero-inner, .hero--foto .hero-inner { color: #EBE8DE; }
.hero .display .dot { color: var(--olive); }
.hero-foot { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 24px; margin-top: clamp(24px, 3vw, 40px); }
.hero .btn { background: var(--hero-accent); color: var(--hero-accent-ink); }

/* marcador de foto pendiente */
.ph {
  position: relative; background: var(--surface); width: 100%; height: 100%;
  display: flex; align-items: flex-end; padding: 16px;
}
.ph-label { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ph-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 900; font-stretch: 62.5%; font-size: clamp(3.5rem, 8vw, 8rem); letter-spacing: -0.02em;
  color: var(--line);
}
.hero .ph-label { position: absolute; top: 24px; right: var(--gutter); writing-mode: vertical-rl; }

/* ---------- grilla de catálogo (A — Registro) ---------- */
.catalog-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  padding: 0 var(--gutter) 16px;
}
.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.filter {
  min-height: 40px; padding: 0 14px; font-family: var(--f-mono); font-size: 0.8125rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }

.grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card { background: var(--bg); display: flex; flex-direction: column; position: relative; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.card-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease-out), transform .8s var(--ease-out); }
.card-media .back { opacity: 0; }
.card:hover .card-media .back { opacity: 1; }
.card:hover .card-media img { transform: scale(1.025); }
.card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: .05em; text-transform: uppercase;
  background: var(--bg); color: var(--accent-text); padding: 5px 8px;
}
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px 6px; align-items: baseline; }
@media (max-width: 720px) {
  .card-body { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 4px; }
  .card-body .price { text-align: left; white-space: normal; }
  .card-action { padding: 8px 12px 12px; }
  .sizes { flex-wrap: wrap; }
  .size { flex: 1 0 calc(33.333% - 4px); font-size: 0.75rem; min-width: 0; }
  .size-x { flex: 1 0 calc(33.333% - 4px); }
}
.card-num { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent-text); grid-column: 1 / -1; }
.card-name { font-size: clamp(0.9375rem, .5vw + 0.75rem, 1.0625rem); font-weight: 600; line-height: 1.3; }
.card-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.price { font-family: var(--f-mono); font-size: 0.8125rem; white-space: nowrap; text-align: right; }
.price s { color: var(--muted); margin-left: 6px; }
.card-action { padding: 8px 16px 16px; position: relative; z-index: 2; margin-top: auto; }
.add {
  width: 100%; min-height: 44px; font-family: var(--f-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, color .2s;
}
.add:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }
.sizes { display: none; gap: 4px; }
.card[data-picking] .add { display: none; }
.card[data-picking] .sizes { display: flex; }
.size {
  flex: 1; min-height: 44px; font-family: var(--f-mono); font-size: 0.8125rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.size:hover:not([disabled]) { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.size[disabled] { color: var(--muted); text-decoration: line-through; cursor: not-allowed; opacity: .6; }
.size-x { flex: 0 0 44px; }
.size-x .icon { margin: auto; width: 16px; height: 16px; }
.card[data-added] .add { color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }

.grid-empty { background: var(--bg); grid-column: 1 / -1; box-shadow: 0 1px 0 var(--line); padding: 64px var(--gutter); color: var(--muted); }

/* ---------- manifiesto ---------- */
.manifesto { background: var(--deep); color: var(--deep-ink); }
.manifesto .h2 { max-width: 16ch; }
.manifesto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px 64px; align-items: end; }
.manifesto p { margin: 0; max-width: 52ch; font-size: clamp(1.0625rem, .6vw + 0.8125rem, 1.25rem); opacity: .9; }

/* ---------- bloques de info ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.split > * { background: var(--bg); padding: clamp(28px, 4vw, 56px) var(--gutter); }

.giftcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 28px; }
@media (max-width: 720px) { .giftcards { grid-template-columns: 1fr; } }
.gc {
  text-align: left; aspect-ratio: 1.6; padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .35s var(--ease-out);
}
.gc:hover { box-shadow: inset 0 0 0 1px var(--accent); transform: translateY(-2px); }
.gc-amount { font-weight: 900; font-stretch: 75%; font-size: clamp(1.5rem, 1.9vw, 2.25rem); line-height: 1; white-space: nowrap; }
/* gift cards con el diseño de la tarjeta */
.gc-vista svg { display: block; width: calc(100% + 24px); height: auto; margin: -10px -12px -6px; }
.gc-colores { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.gc-color { display: flex; align-items: center; gap: 8px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 0.8125rem; }
.gc-color input { position: absolute; opacity: 0; pointer-events: none; }
.gc-color:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); }
.gc-color:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.gc-chip { flex: none; width: 22px; height: 16px; border-radius: 3px; background: linear-gradient(90deg, var(--a) 0 45%, var(--b) 45%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.gc-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .gc-dos { grid-template-columns: 1fr; } }
#giftcard { width: min(calc(100% - 24px), 620px); }


.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 64px; padding: 14px 0; font-weight: 600; font-size: clamp(1rem, .4vw + 0.875rem, 1.125rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .3s var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--accent-text); }
.faq details p { margin: 0 0 20px; max-width: 64ch; color: var(--muted); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px 64px; }
.faq-grid .h2, .split .h2 { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } }

.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 24px; }
.contact-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; border-bottom: 1px solid var(--line); font-size: 1.125rem; font-weight: 600; }
.contact-list a:hover { color: var(--accent-text); }

.newsletter { display: flex; gap: 0; margin-top: 24px; max-width: 520px; box-shadow: inset 0 0 0 1px var(--line); }
.newsletter input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; background: transparent; border: 0; }
.newsletter input::placeholder { color: var(--muted); }
.form-note { margin-top: 12px; font-size: 0.875rem; color: var(--muted); min-height: 1.5em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 80px) var(--gutter) 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer h2 { margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--muted); }
.footer ul a:hover { color: var(--accent-text); }
.footer-big { margin: clamp(48px, 6vw, 96px) 0 24px; color: var(--surface); }
.footer-big svg { display: block; width: 100%; height: auto; }
.footer-brand .logo-wordmark { height: 22px; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); }

/* ---------- confianza ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 0.8125rem; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { width: 16px; height: 16px; }

/* ---------- paneles: carrito, checkout, ruleta, gift card ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 70; background: var(--overlay);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.scrim[data-open] { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(100%, 460px);
  background: var(--bg); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .45s var(--ease-out);
  visibility: hidden;
}
.drawer[data-open] { transform: none; visibility: visible; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 1.75rem; line-height: 1; }
.close { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.close:hover { color: var(--accent-text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 20px 24px 24px; display: grid; gap: 14px; }

.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-media { aspect-ratio: 3 / 4; background: var(--surface); overflow: hidden; display: grid; place-items: center; font-weight: 900; font-stretch: 62.5%; color: var(--line); font-size: 1.375rem; }
.line-media img { width: 100%; height: 100%; object-fit: cover; }
.line-media--gc { aspect-ratio: auto; align-self: start; background: none; }
.line-media--gc svg { display: block; width: 100%; height: auto; }
.line-name { font-weight: 600; line-height: 1.3; }
.line-meta { font-size: 0.8125rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; box-shadow: inset 0 0 0 1px var(--line); margin-top: 10px; }
.qty button { width: 36px; height: 36px; display: grid; place-items: center; }
.qty button:hover { color: var(--accent-text); }
.qty span { min-width: 28px; text-align: center; font-family: var(--f-mono); font-size: 0.8125rem; }
.line-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.remove { font-size: 0.8125rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.remove:hover { color: var(--text); }
.empty { padding: 48px 0; color: var(--muted); }

.progress { font-size: 0.8125rem; color: var(--muted); }
.progress-bar { height: 2px; background: var(--line); margin-top: 8px; }
.progress-bar span { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease-out); }

.code-row { display: flex; box-shadow: inset 0 0 0 1px var(--line); }
.code-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; background: transparent; border: 0; text-transform: uppercase; font-family: var(--f-mono); font-size: 0.8125rem; }
.code-row input::placeholder { text-transform: none; font-family: var(--f-sans); font-size: 0.9375rem; color: var(--muted); }
.code-row button { padding: 0 16px; font-weight: 600; font-size: 0.875rem; }
.code-row button:hover { color: var(--accent-text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 0.75rem; padding: 4px 4px 4px 10px; background: var(--surface); color: var(--accent-text); }
.chip button { width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); }
.chip button:hover { color: var(--text); }

.totals { display: grid; gap: 6px; font-size: 0.9375rem; }
.totals div { display: flex; justify-content: space-between; }
.totals dd, .totals dt { margin: 0; }
.totals .total { font-weight: 800; font-size: 1.25rem; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.totals .neg { color: var(--accent-text); }

.modal {
  position: fixed; z-index: 80; left: 50%; top: 50%; width: min(calc(100% - 24px), 560px); max-height: calc(100svh - 32px);
  transform: translate(-50%, -46%); opacity: 0; visibility: hidden; transition: transform .4s var(--ease-out), opacity .3s;
  background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column;
}
.modal[data-open] { transform: translate(-50%, -50%); opacity: 1; visibility: visible; }
.modal-body { overflow-y: auto; padding: 20px 24px 24px; display: grid; gap: 20px; grid-auto-rows: max-content; }

.fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.fieldset legend { padding: 0; margin-bottom: 8px; }
.option {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding: 14px 16px;
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
}
.option:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; margin: 2px 0 0; }
.option strong { display: block; font-weight: 600; }
.option small { color: var(--muted); font-size: 0.8125rem; display: block; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.875rem; font-weight: 600; }
.field label .muted { font-weight: 400; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 10px 14px; background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--campo); width: 100%;
}
.field textarea { min-height: 88px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239DA095' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field select option { background: var(--bg); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.error { color: var(--error); font-size: 0.875rem; min-height: 1.2em; }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--error); }
.seg { display: flex; box-shadow: inset 0 0 0 1px var(--campo); }
.seg label { flex: 1; text-align: center; min-height: 44px; display: grid; place-items: center; cursor: pointer; font-size: 0.9375rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -4px; }
.pay { display: grid; gap: 8px; }

/* ruleta */
.wheel-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 6px 16px 6px 6px; min-height: 52px;
  font-size: 0.875rem; font-weight: 600; transition: box-shadow .2s, transform .4s var(--ease-out);
}
.wheel-fab:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.wheel-fab .disc { width: 40px; height: 40px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.wheel-fab[hidden] { display: none; }
@media (max-width: 720px) { .wheel-fab { padding: 6px; font-size: 0; gap: 0; } .wheel-fab .disc { width: 40px; height: 40px; } }
.wheel-wrap { position: relative; width: min(100%, 360px); margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
/* Al girar, las esquinas del dibujo (invisibles) ya no empujan el recuadro: sin barras de desplazamiento. */
#wheel .modal-body { overflow-x: hidden; scrollbar-width: thin; }
.wheel-svg { width: 100%; height: 100%; transition: transform 5.2s cubic-bezier(0.12, 0.8, 0.12, 1); }
.wheel-pointer { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--accent); z-index: 2; }
.wheel-result { text-align: center; min-height: 3.2em; }
.wheel-result strong { display: block; font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 2rem; line-height: 1.1; color: var(--accent-text); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 12px 18px; font-size: 0.875rem; font-weight: 600;
  transition: opacity .3s, transform .4s var(--ease-out); pointer-events: none; max-width: calc(100% - 32px);
}
.toast[data-show] { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ficha de pieza ---------- */
.crumbs { display: flex; gap: 8px; padding: 20px var(--gutter); color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent-text); }
.piece { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .piece { grid-template-columns: 1fr; } }
.piece-media { display: grid; gap: 1px; background: var(--line); border-right: 1px solid var(--line); }
.piece-media figure { margin: 0; aspect-ratio: 3 / 4; background: var(--surface); position: relative; overflow: hidden; }
.piece-media figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .piece-media { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-right: 0; }
  .piece-media figure { flex: 0 0 88%; scroll-snap-align: start; }
}
.piece-info { padding: clamp(28px, 4vw, 56px) var(--gutter); }
.piece-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 24px; }
.piece-title { margin: 0; font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; font-size: clamp(2.75rem, 5vw, 5rem); line-height: .88; letter-spacing: -0.02em; }
.piece-price { font-family: var(--f-mono); font-size: 1.125rem; }
.piece-price s { color: var(--muted); margin-left: 10px; font-size: 0.9375rem; }
.size-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.size-grid label { min-height: 52px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--f-mono); cursor: pointer; position: relative; }
.size-grid input { position: absolute; opacity: 0; pointer-events: none; }
.size-grid label:has(input:checked) { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.size-grid label:has(input:disabled) { color: var(--muted); text-decoration: line-through; cursor: not-allowed; opacity: .55; }
.size-grid label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.specs { margin: 0; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); }
.specs dt, .specs dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { padding-right: 24px; }
.specs dd { color: var(--text); }

.size-table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 0.8125rem; }
.size-table th, .size-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.size-table th { color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- movimiento: crecer desde abajo ---------- */
@media (scripting: enabled) and (not print) { .grow:not(.is-in) { opacity: 0; transform: translateY(12px); } }
.grow { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--d, 0ms); }
.grow.is-in { opacity: 1; transform: none; }

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

/* ---------- animación del logo ---------- */
.brand-intro { background: var(--bg); height: clamp(260px, min(46vw, 50svh), 640px); overflow: hidden; border-bottom: 1px solid var(--line); }
.brand-intro video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* En pantallas anchas el video entra completo (sin recortar la corona); el fondo del video es el mismo que el de la web. */
@media (min-width: 900px) { .brand-intro video { object-fit: contain; transform: scale(1.45); } }

/* sin foto todavía: la portada sigue el modo elegido */
.hero .ph { background: var(--surface); }
.hero .ph-label { color: var(--muted); }

/* celular: talles de la tarjeta en dos filas, con botones cómodos para el dedo */
@media (max-width: 720px) {
  .card .sizes { flex-wrap: wrap; }
  .card .sizes .size { flex: 1 0 calc(33.333% - 4px); min-height: 44px; }
  body { padding-bottom: 64px; } /* que la ruleta flotante no tape lo último de la página */
}

/* ---------- vista: prenda o personaje ---------- */
.vista { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.vista-label { color: var(--muted); margin-right: 6px; }
.vista button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px;
  font-size: 0.875rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, background .2s;
}
.vista button:hover { box-shadow: inset 0 0 0 1px var(--text); }
.vista button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.vista-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgb(235 232 222 / .35); }
.vista-dot--prenda { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; border-radius: 2px; }
.ph--pj { background: color-mix(in srgb, var(--pj) 38%, var(--surface)); }
.ph-pj { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; }
.ph-pj-name { font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: .9; color: var(--text); opacity: .55; }
.ph-pj-meta { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); opacity: .6; }
.catalog-bar .vista { margin-left: auto; }
.pj-note { margin: 10px 0 0; font-size: 0.875rem; color: var(--muted); }
@media (max-width: 720px) {
  .vista button { padding: 0 10px 0 8px; font-size: 0.8125rem; gap: 6px; }
  .vista-label { width: 100%; margin: 0 0 4px; }
  .catalog-bar .vista { margin-left: 0; width: 100%; }
}

/* ---------- consumidor y legales ---------- */
.footer-consumer { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding: 24px 0; margin-bottom: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.footer-arrep { min-height: 48px; }
.footer-ddc { display: inline-grid; gap: 2px; font-size: 0.8125rem; line-height: 1.3; padding: 10px 14px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.footer-ddc strong { color: var(--text); font-weight: 700; }
.footer-ddc:hover { box-shadow: inset 0 0 0 1px var(--text); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-legal-links a:hover { color: var(--accent-text); }
.size--out { color: var(--muted); text-decoration: line-through; opacity: .7; }
.size--out:hover { opacity: 1; text-decoration: none; box-shadow: inset 0 0 0 1px var(--accent) !important; background: transparent !important; color: var(--text) !important; }
.avisar-link { margin-top: 10px; font-size: 0.875rem; }
.legal { max-width: 72ch; padding-block: clamp(48px, 7vw, 104px); }
.legal h1 { margin: 0 0 12px; }
.legal h2 { margin: 48px 0 12px; font-size: 1.375rem; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.legal-toc a { padding: 8px 12px; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.875rem; }
.legal-toc a:hover { box-shadow: inset 0 0 0 1px var(--text); }
.note { padding: 14px 16px; background: var(--surface); font-size: 0.875rem; color: var(--muted); }
.arrep-ok { padding: 24px; box-shadow: inset 0 0 0 1px var(--accent); display: grid; gap: 10px; }
.arrep-code { font-family: var(--f-mono); font-size: 1.375rem; letter-spacing: .06em; color: var(--text); }

/* ---------- checkout: envío, sucursales y mapa ---------- */
.co-address { display: grid; gap: 12px; }
.co-address[hidden] { display: none; }
.co-ship, .co-puntos { display: grid; gap: 8px; margin-top: 4px; }
.co-puntos[hidden] { display: none; }
.co-label { margin: 4px 0 0; }
.co-hint { margin: 0; font-size: 0.875rem; }
.co-free { margin: 0; padding: 12px 14px; background: var(--surface); color: var(--text); font-size: 0.9375rem; }
.co-free strong { color: var(--accent-text); }
.co-price { text-align: right; white-space: nowrap; }
.co-price s { display: block; color: var(--muted); font-size: 0.75rem; }
.pay-note { margin: 0 0 6px; font-size: 0.8125rem; }
.co-mapwrap { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); gap: 10px; align-items: stretch; }
@media (max-width: 480px) { .co-mapwrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; } }
/* El mapa no ocupa todo el ancho del pago: un poco menos de la mitad, y de alto 1,5 veces su ancho. La lista va al lado y se desplaza si no entra. */
.co-map { width: 100%; aspect-ratio: 2 / 3; height: auto; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); z-index: 0; border-radius: 10px; overflow: hidden; font: inherit; }
/* Calles en tonos cálidos y apagados (claro) o casi negro (oscuro), para que se lean los pines. */
.co-map .leaflet-tile-pane { filter: grayscale(1) sepia(.22) contrast(.88) brightness(1.04); }
:root:not([data-km-theme="light"]) .co-map .leaflet-tile-pane { filter: grayscale(1) invert(1) sepia(.18) brightness(.82) contrast(.9); }
.co-map .leaflet-container, .co-map.leaflet-container { background: var(--surface); }
.co-map .leaflet-control-attribution { font-size: 0.5938rem; background: color-mix(in srgb, var(--bg) 75%, transparent); color: var(--muted); border-radius: 6px 0 0 0; padding: 1px 6px; }
.co-map .leaflet-control-attribution a { color: var(--muted); }
.co-map .leaflet-control-zoom { border: 0 !important; box-shadow: 0 2px 8px rgb(0 0 0 / .25) !important; border-radius: 8px; overflow: hidden; margin: 0 8px 8px 0 !important; }
.co-map .leaflet-control-zoom a { width: 28px !important; height: 28px !important; line-height: 28px !important; font: 500 16px/28px var(--f-mono) !important; background: var(--bg); color: var(--text); border-color: var(--line) !important; }
.co-map .leaflet-control-zoom a:hover { background: var(--surface); }
/* Tu dirección */
.co-casa { display: grid !important; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 22%, transparent), 0 2px 8px rgb(0 0 0 / .35); }
.co-casa svg { width: 18px; height: 18px; }
.co-casa::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--text); opacity: 0; animation: co-pulso 2.4s var(--ease-out) infinite; }
@keyframes co-pulso { 0% { transform: scale(.8); opacity: .55; } 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .co-casa::after { animation: none; } }
/* Sucursales */
.co-pin-map { position: relative; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .35)); transition: transform .25s var(--ease-out); transform-origin: 50% 100%; }
.co-pin-map svg { position: absolute; z-index: 0; left: 0; top: 0; width: 100% !important; height: 100% !important; }
.co-pin-forma { fill: var(--accent); stroke: var(--bg); stroke-width: 2.5; }
.co-pin-num { font: 700 15px var(--f-mono); fill: #fff; }
.co-pin-map.is-on { transform: scale(1.22); }
.co-pin-map.is-on .co-pin-forma { fill: var(--text); }
.co-pin-map.is-on .co-pin-num { fill: var(--bg); }
.co-linea { stroke: var(--text); opacity: .7; }
.co-tip { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 8px rgb(0 0 0 / .25); font: 600 12px/1.2 var(--f-sans, inherit); padding: 4px 8px; }
.co-tip::before { display: none; }
.co-pin {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; vertical-align: -5px;
  background: var(--accent); color: var(--accent-ink, #fff); font: 600 12px/1 var(--f-mono); border-radius: 50%;
}
.co-cerca { font-weight: 600; color: var(--accent-text); }
.co-buscar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 2px; }
.co-buscar input { min-width: 0; }
.co-mapwrap--sinmapa { grid-template-columns: minmax(0, 1fr); }
.co-mapwrap--sinmapa .co-lista { contain: none; }
.co-aviso { margin: 0; padding: 12px 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.875rem; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.co-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 0.8125rem; color: var(--muted); cursor: pointer; line-height: 1.4; }
.field .co-check input, .co-check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 1px 0 0; flex: none; background: none; border: 0; box-shadow: none; appearance: auto; accent-color: var(--accent); }
.co-lista .co-punto:has(input:checked) .co-pin { background: var(--text); color: var(--bg); }
.co-punto small { word-break: break-word; }
.co-lista { contain: size; overflow-y: auto; gap: 6px; align-content: start; overscroll-behavior: contain; }
.co-lista .co-punto { position: relative; padding: 10px 12px; gap: 4px; grid-template-columns: minmax(0, 1fr); border-radius: 8px; }
.co-lista .co-punto > input { position: absolute; opacity: 0; pointer-events: none; }
.co-lista .co-punto strong { display: block; font-size: 0.8125rem; line-height: 1.25; }
.co-lista .co-punto small { font-size: 0.7188rem; line-height: 1.3; }
.co-lista .co-punto > .mono { grid-column: 1; font-size: 0.6875rem; color: var(--muted); }
.co-lista .co-pin { width: 18px; height: 18px; font-size: 0.6562rem; margin-right: 6px; vertical-align: -3px; }
.co-lista .co-punto:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); }
.chip--pausa { opacity: .6; }

/* Con el menú o un panel abierto, el botón de la ruleta no queda flotando encima. */
body.is-locked .wheel-fab { visibility: hidden; }

/* transferencia: datos para pagar */
.tr-box { display: flex; flex-direction: column; gap: 16px; }
.tr-monto { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 12px; padding: 14px 16px; background: var(--surface); }
.tr-monto span { grid-column: 1 / -1; font-size: 0.8125rem; }
.tr-monto strong { font-size: 1.875rem; font-weight: 900; font-stretch: 75%; line-height: 1; }
.tr-datos { display: grid; gap: 0; box-shadow: inset 0 0 0 1px var(--line); }
.tr-fila { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tr-fila:last-child { border-bottom: 0; }
.tr-fila .mono { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .05em; }
.tr-fila strong { font-weight: 600; overflow-wrap: anywhere; font-size: 0.9375rem; }
.tr-box [data-copiar] { white-space: nowrap; }
@media (max-width: 480px) { .tr-fila { gap: 8px; padding: 10px; } .tr-fila .mono { font-size: 0.625rem; } .tr-monto strong { font-size: 1.625rem; } }
.tr-qr { box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; }
.tr-qr summary { cursor: pointer; font-weight: 600; }
.tr-qr img { display: block; width: min(100%, 260px); height: auto; margin: 12px auto; background: #fff; padding: 8px; }
@media (min-width: 721px) { .tr-qr { order: -1; } .tr-qr[open] summary { display: none; } .tr-box > p.accent { order: -2; } }

/* cuentas regresivas de la ruleta */
.cuenta { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cuenta-grande { display: block; font: 600 30px/1.1 var(--f-mono); color: var(--accent-text); margin-top: 4px; }
.premio-reloj { margin: 0 0 -6px; font-size: 0.8125rem; color: var(--muted); }
.premio-reloj .cuenta { font-weight: 700; color: var(--accent-text); }
.progress strong { color: var(--naranja-texto); }
.cuenta-grande .cuenta { font: inherit; color: inherit; }

/* completá el look (carrito) */
.look { padding: 16px 0 8px; display: grid; gap: 10px; }
.look-title { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; }
.look-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }
.look-media { aspect-ratio: 3 / 4; background: var(--surface); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 0.75rem; }
.look-media img { width: 100%; height: 100%; object-fit: cover; }
.look-name { display: block; font-weight: 600; font-size: 0.875rem; }
.look-price { display: block; font-size: 0.8125rem; color: var(--muted); margin: 2px 0 6px; }
.look-sizes { display: flex; flex-wrap: wrap; gap: 4px; }
.look-sizes button { min-width: 36px; min-height: 32px; padding: 0 8px; font: 500 12px var(--f-mono); box-shadow: inset 0 0 0 1px var(--line); }
.look-sizes button:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }
.look-sizes button:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
/* stock bajo (prenda) */
.stock-bajo { margin: 8px 0 0; font-size: 0.875rem; font-weight: 600; color: var(--naranja-texto); min-height: 1.2em; }
#talles-modal .size-table { width: 100%; }

/* ---------- reseñas ---------- */
.resenas { padding-bottom: 0; }
.res-lista { display: grid; gap: 0; border-top: 1px solid var(--line); }
.res { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.res > p { max-width: 72ch; }
.res p { margin: 0; }
.res-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 0.8125rem; }
.res-est { color: var(--accent); letter-spacing: .08em; font-size: 0.9375rem; }
.res-est span { color: var(--line); }
.res img { width: 120px; height: 150px; object-fit: cover; display: block; }
.res-resp { padding-left: 12px; box-shadow: inset 2px 0 0 var(--line); color: var(--muted); font-size: 0.875rem; }
.res-mini { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 0.8125rem; color: var(--muted); text-decoration: none; }
.res-form { display: grid; gap: 18px; }
.res-pieza { border: 1px solid var(--line); padding: 18px; display: grid; gap: 14px; }
.res-estrellas { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.res-estrellas input { position: absolute; opacity: 0; pointer-events: none; }
.res-estrellas label { font-size: 1.875rem; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.res-estrellas input:checked ~ label, .res-estrellas label:hover, .res-estrellas label:hover ~ label { color: var(--accent); }
.res-estrellas input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Campo trampa para bots: invisible para personas y lectores de pantalla */
.trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Aviso de cookies (solo con Pixel de Meta configurado) */
.ck { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 85; max-width: 560px; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line); padding: 16px; display: grid; gap: 12px; font-size: 0.875rem; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.ck p { margin: 0; }
.ck-acciones { display: flex; gap: 8px; justify-content: flex-end; }
.ck-acciones .btn { min-height: 40px; padding: 0 16px; }

/* Opiniones de clientes en la portada */
.op .section-head { align-items: baseline; }
.op-resumen { margin: 0; font-size: 0.8125rem; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.op-card { background: var(--bg); border: 1px solid var(--line); padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.op-card p { margin: 0; font-size: 1rem; line-height: 1.5; flex: 1; }
.op-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; max-height: 280px; }
.op-card footer { font-size: 0.75rem; color: var(--muted); }
.op-card footer strong { color: var(--text); font-weight: 500; }
.op-card footer a { color: inherit; }
.op-card footer a:hover { color: var(--accent-text); }
@media (max-width: 640px) { .op-grid { grid-template-columns: 1fr; } }

/* ---------- Animaciones: foto que se ilumina y prenda que vuela al carrito ---------- */
.card-media img, .card-media .ph { transition: opacity .45s var(--ease-out), transform .8s var(--ease-out), filter .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-media img, .card:hover .card-media .ph { filter: brightness(1.12) saturate(1.06); }
}
.km-vuela { position: fixed; z-index: 95; pointer-events: none; border: 1px solid var(--campo); background: var(--surface); overflow: hidden;
  transition: transform .7s cubic-bezier(.65, 0, .35, 1), opacity .7s ease-in, border-radius .7s; }
.km-vuela img, .km-vuela .ph { position: static; width: 100%; height: 100%; object-fit: cover; }
.cart-count.km-salta { animation: km-salta .5s var(--ease-out); }
@keyframes km-salta { 0% { transform: scale(1); } 35% { transform: scale(1.4); background: var(--accent); color: #fff; } 100% { transform: scale(1); } }
.cart-btn.km-sacude { animation: km-sacude .5s ease-in-out; }
@keyframes km-sacude { 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .km-vuela { display: none; } .cart-count.km-salta, .cart-btn.km-sacude { animation: none; } }

/* ---------- Impecable: pasada de calidad ---------- */
/* Datos que faltan en el checkout: marca en el campo y aviso al lado */
.campo-error { margin: 2px 0 0; font-size: 0.8125rem; color: var(--error); }
.seg[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--error); }
/* Resumen de lo que estás comprando, arriba del checkout */
.co-resumen { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; margin: 0 0 18px; background: var(--surface); font-size: 0.875rem; }
.co-resumen p { margin: 0; color: var(--muted); }
.co-resumen strong { color: var(--text); font-weight: 600; }
.co-resumen .link { white-space: nowrap; font-size: 0.875rem; }
/* Guía de talles sin medidas todavía */
.talles-pronto { margin: 16px 0 0; max-width: 60ch; font-size: 1rem; line-height: 1.55; color: var(--muted); }
/* Links chicos con zona de toque cómoda en celular (sin cambiar cómo se ven) */
@media (pointer: coarse) {
  .footer ul a, .footer-legal-links a, .crumbs a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  legend .link, .avisar-link .link { padding-block: 10px; margin-block: -10px; }
}
/* Menos salto al cargar: el encabezado, la grilla y el pie se dibujan con JS; se les reserva lugar */
#km-top:empty { display: block; height: calc(var(--header-h) + 34px); }
.grid:empty { min-height: 70vh; }
#km-footer:empty { display: block; min-height: 480px; }
main[data-piece]:empty { min-height: 100svh; }

/* Títulos y textos: sin palabras sueltas en la última línea */
.h2, .h3, .piece-title, .faq summary { text-wrap: balance; }
.prose, .faq p, .manifesto p { text-wrap: pretty; }
/* Preguntas frecuentes agrupadas por tema */
.faq-grupo + .faq-grupo { margin-top: 36px; }
.faq-grupo > h3 { margin: 0 0 4px; font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* «Finalizar compra» entra en una línea en el celular */
@media (max-width: 480px) { .panel-head h2 { font-size: 1.375rem; } }

/* Ruleta: se queda, pero no tapa «Agregar al carrito» en la ficha ni los paneles abiertos */
@media (min-width: 721px) { body[data-page="pieza"] .wheel-fab { right: auto; left: 16px; } }
body.is-locked .wheel-fab { opacity: 0; pointer-events: none; }

/* UI/UX Pro Max: toques sin demora, zonas seguras del celular y botones de cantidad cómodos */
a, button, label, summary, input, select, textarea { touch-action: manipulation; }
.wheel-fab { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.qty button { width: 44px; height: 44px; }

/* Design-Taste-Frontend: la tarjeta sube 2px al pasar el mouse (movimiento fijo, no sigue al cursor) */
.card.grow { transition: opacity .7s var(--ease-out) var(--d, 0ms), transform .7s var(--ease-out) var(--d, 0ms), translate .25s var(--ease-out) 0s; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { translate: 0 -2px; z-index: 3; }
}
@media (prefers-reduced-motion: reduce) { .card:hover { translate: none; } }
/* Con los títulos de sección del mismo tamaño, «Preguntas frecuentes» va arriba de las preguntas (no entra en la columna angosta sin cortar palabras) */
.faq-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.faq-grid .h2 { hyphens: manual; }
.faq-grid > :first-child { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; }
