/* Base común de las maquetas de Snake. Cada maqueta redefine los tokens de :root y acomoda el resto.
   Colores de la marca, sacados del logo: celeste #6EC6E0, petróleo #2E6E8E, negro, blanco y arena #F5D58E. */
:root {
  --fondo: #ffffff;
  --superficie: #ffffff;
  --hundido: #f3f5f6;
  --tinta: #111417;
  --suave: #5d666d;
  --linea: #e3e7ea;
  --acento: #2e6e8e;
  --acento-tinta: #ffffff;
  --celeste: #6ec6e0;
  --arena: #f5d58e;
  --wa: #1fa855;
  --radio: 12px;
  --radio-foto: 10px;
  --letra: system-ui, -apple-system, "Segoe UI", sans-serif;
  --titulo: var(--letra);
  --ancho: 1280px;
  --foto-fondo: #f3f5f6;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 16px/1.5 var(--letra); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tarjeta mínima; cada maqueta la reacomoda. */
.pieza__abrir { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.pieza__foto { display: block; aspect-ratio: 1; background: var(--foto-fondo); border-radius: var(--radio-foto); overflow: hidden; }
.pieza__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .pieza__abrir:hover .pieza__foto img { transform: scale(1.03); } }
.pieza__texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pieza__marca { font-size: 13px; color: var(--suave); }
.pieza__nombre { font-weight: 600; line-height: 1.3; }
.pieza__tallas { font-size: 13px; color: var(--suave); font-variant-numeric: tabular-nums; }

.mas, .vacio { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 0; color: var(--suave); text-align: center; }
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--radio); background: var(--acento); color: var(--acento-tinta); font-weight: 600; text-decoration: none; transition: transform .15s ease, filter .15s ease; }
.boton:active { transform: scale(.98); }
@media (hover: hover) { .boton:hover { filter: brightness(1.08); } }
.boton span { opacity: .7; font-weight: 500; }
.boton--wa { background: var(--wa); color: #fff; width: 100%; }

/* Filtros (min-width: 0 para que un carril con scroll no estire la cuadrícula que lo contiene) */
.filtro { min-width: 0; }
.filtro__titulo { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--suave); }
.filtro__ops { display: flex; flex-wrap: wrap; gap: 6px; }
.op { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--linea); border-radius: 999px; background: var(--superficie); font-size: 14px; line-height: 1; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.op em { font-style: normal; font-size: 12px; color: var(--suave); font-variant-numeric: tabular-nums; }
.op small { font-size: 11px; color: var(--suave); }
.op[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--fondo); }
.op[aria-pressed="true"] em, .op[aria-pressed="true"] small { color: inherit; opacity: .7; }
.op:disabled { opacity: .35; cursor: default; }
[data-grupo="talla"] .op span { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; gap: 1px; }
[data-grupo="talla"] .op { min-width: 48px; justify-content: center; padding: 6px 10px; border-radius: 10px; }
.quitar { margin-top: 4px; padding: 6px 0; border: 0; background: none; color: var(--acento); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.muestra { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex: none; }
.muestra[data-familia="Blanco"] { background: #fff; }
.muestra[data-familia="Negro"] { background: #16181a; }
.muestra[data-familia="Gris"] { background: #9aa1a6; }
.muestra[data-familia="Azul"] { background: #2f64c8; }
.muestra[data-familia="Morado"] { background: #7a4cc2; }
.muestra[data-familia="Rojo"] { background: #d23a32; }
.muestra[data-familia="Rosa"] { background: #ef9cbc; }
.muestra[data-familia="Verde"] { background: #3c9a5b; }
.muestra[data-familia="Naranja"] { background: #ee8a2c; }
.muestra[data-familia="Arena"] { background: #d9c19a; }
.muestra[data-familia="Multicolor"] { background: conic-gradient(#d23a32, #ee8a2c, #f2d14a, #3c9a5b, #2f64c8, #7a4cc2, #d23a32); }

/* Ficha */
.ficha { width: min(980px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--radio-ficha, 18px); background: var(--superficie); color: var(--tinta); box-shadow: 0 30px 80px rgba(0,0,0,.25); overflow: auto; }
.ficha::backdrop { background: rgba(10,14,18,.55); }
.ficha[open] { animation: ficha-entra .28s cubic-bezier(.2,.8,.2,1); }
@keyframes ficha-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.ficha__caja { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; }
.ficha__cerrar { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--superficie); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.ficha__galeria { background: var(--foto-fondo); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ficha__foto { aspect-ratio: 1; border-radius: var(--radio-foto); overflow: hidden; background: var(--foto-fondo); }
.ficha__foto img { width: 100%; height: 100%; object-fit: contain; }
.ficha__minis { display: flex; gap: 8px; overflow-x: auto; }
.ficha__minis button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--superficie); }
.ficha__minis button[aria-current="true"] { border-color: var(--tinta); }
.ficha__minis img { width: 100%; height: 100%; object-fit: cover; }
.ficha__info { padding: 36px 28px 28px; display: flex; flex-direction: column; gap: 6px; }
.ficha__marca { margin: 0; color: var(--suave); font-size: 14px; }
.ficha__nombre { margin: 0 0 18px; font: 700 clamp(24px, 3vw, 32px)/1.1 var(--titulo); letter-spacing: -.01em; text-wrap: balance; padding-right: 40px; }
.ficha__etiqueta { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.ficha__tallas { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ficha__tallas button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 1px solid var(--linea); border-radius: 10px; background: var(--superficie); line-height: 1.1; transition: background .15s, border-color .15s; }
.ficha__tallas b { font-size: 17px; }
.ficha__tallas small { font-size: 11px; color: var(--suave); }
.ficha__tallas button[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--fondo); }
.ficha__tallas button[aria-pressed="true"] small { color: inherit; opacity: .7; }
.ficha__nota { margin: 14px 0 12px; color: var(--suave); font-size: 14px; }
.ficha .boton--wa { margin-top: auto; }
@media (max-width: 720px) {
  .ficha { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .ficha__caja { grid-template-columns: 1fr; }
  .ficha__info { padding: 20px 18px 22px; }
  .ficha .boton--wa { position: sticky; bottom: 12px; }
}

/* Volver al menú de maquetas (sólo en las maquetas) */
.volver { position: fixed; left: 12px; bottom: 12px; z-index: 50; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(17,20,23,.86); color: #fff; font: 600 13px/1 system-ui, sans-serif; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

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