/* YL Studios — catálogo y panel.
   La firma: cada zapato se asienta sobre el disco rosa del logo. Las fotos de
   proveedor con fondo blanco se funden en el disco (mix-blend-mode: multiply). */

:root {
  --vino: #6E1A2B;
  --vino-hondo: #3E0F19;
  --vino-medio: #8A2E42;
  --rosa: #F2C4CE;
  --rosa-suave: #FBE9ED;
  --papel: #FFFBFB;
  --tinta: #2B1A1F;
  --gris: #86707A;
  --linea: #EBD6DB;
  --wa: #1F8F55;
  --display: 'Bodoni Moda', Didot, 'Times New Roman', serif;
  --texto: 'Hanken Grotesk', system-ui, sans-serif;
  --radio: 18px;
  --sombra: 0 18px 40px -24px rgba(62, 15, 25, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 16px/1.5 var(--texto);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--vino); }
:focus-visible { outline: 2px solid var(--vino); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- Encabezado ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--papel) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--vino); }
.marca span { font: 600 20px/1 var(--display); letter-spacing: .01em; }
.marca em { font-weight: 400; color: var(--vino-medio); }

.bolsa-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--linea); background: #fff;
  display: grid; place-items: center;
}
.bolsa-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--vino); stroke-width: 1.6; stroke-linejoin: round; }
.bolsa-num {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--vino); color: #fff;
  font: 700 12px/22px var(--texto); text-align: center;
}
.bolsa-num.salto { animation: salto .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes salto { 40% { transform: scale(1.35); } }

/* ---------- Intro ---------- */
.intro { padding: 36px 16px 8px; max-width: 1180px; margin: 0 auto; }
.ojo {
  margin: 0 0 10px; color: var(--vino-medio);
  font: 600 12px/1 var(--texto); letter-spacing: .16em; text-transform: uppercase;
}
.intro h1 {
  margin: 0; color: var(--vino-hondo);
  font: 400 clamp(44px, 12vw, 96px)/.92 var(--display);
  letter-spacing: -.02em;
}
.intro h1 em { color: var(--vino); font-style: italic; }
.sub { max-width: 34ch; margin: 16px 0 0; color: var(--gris); font-size: 16px; }

/* ---------- Filtros ---------- */
.filtros {
  max-width: 1180px; margin: 22px auto 0; padding: 0 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--linea); background: #fff; color: var(--tinta);
  padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip[aria-pressed="true"] { background: var(--vino); border-color: var(--vino); color: #fff; }
.buscar {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--linea); padding: 6px 2px;
}
.buscar svg { width: 18px; height: 18px; fill: none; stroke: var(--gris); stroke-width: 1.7; flex: none; }
.buscar input { border: 0; background: transparent; outline: none; width: 100%; font-size: 16px; padding: 6px 0; }

@media (min-width: 760px) {
  .filtros { flex-direction: row; align-items: center; justify-content: space-between; }
  .chips { margin: 0; padding: 2px 0; }
  .buscar { width: 260px; flex: none; }
}

/* ---------- Cuadrícula ---------- */
.grid {
  max-width: 1180px; margin: 20px auto 0; padding: 0 16px 40px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px;
}
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 40px 24px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: block; width: 100%; text-align: left; padding: 0;
  border: 0; background: none; color: inherit;
  opacity: 0; transform: translateY(12px);
  animation: aparece .6s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes aparece { to { opacity: 1; transform: none; } }

/* El disco */
.disco {
  position: relative; margin: 0; aspect-ratio: 1 / 1.08;
  display: grid; place-items: center;
  isolation: isolate;
  background: var(--papel); /* el multiply necesita un fondo dentro del grupo */
}
.disco::before {
  content: ''; position: absolute; z-index: -1;
  width: 84%; aspect-ratio: 1; border-radius: 50%;
  left: 6%; bottom: 4%;
  background: var(--rosa);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), background .3s;
}
.disco img {
  position: absolute; inset: 4%;
  width: 92%; height: 92%; object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  transform: rotate(-4deg);
}
.disco .sin-foto { width: 62%; fill: none; stroke: var(--vino); stroke-width: 1.3; opacity: .55; }
@media (hover: hover) {
  .card:hover .disco::before { transform: scale(1.05) translate(3%, -2%); }
  .card:hover .disco img { transform: rotate(-9deg) translateY(-4%) scale(1.04); }
}
.card[data-estado="agotado"] .disco::before,
.card[data-estado="no_disponible"] .disco::before { background: #EFE6E8; }
.card[data-estado="agotado"] .disco img,
.card[data-estado="no_disponible"] .disco img { filter: grayscale(.85); opacity: .7; }

.sello {
  position: absolute; top: 8%; right: 4%;
  padding: 6px 10px; border-radius: 999px;
  background: var(--vino-hondo); color: #fff;
  font: 600 11px/1 var(--texto); letter-spacing: .08em; text-transform: uppercase;
}
.sello.oferta { background: #fff; color: var(--vino); border: 1px solid var(--vino); }

.card h3 { margin: 12px 0 2px; font: 500 17px/1.2 var(--display); color: var(--vino-hondo); }
.card .precio-mini { font-weight: 600; font-size: 15px; }
.card .precio-mini s { color: var(--gris); font-weight: 400; margin-left: 6px; font-size: 13px; }

.tallas-mini { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 6px; font: 400 14px/1.4 var(--display); color: var(--vino); }
.tallas-mini .no { color: #C9B3B9; text-decoration: line-through; }

.vacio { text-align: center; color: var(--gris); padding: 40px 16px 80px; margin: 0; }

/* Esqueleto de carga */
.card.cargando .disco::before { background: var(--rosa-suave); animation: pulso 1.2s ease-in-out infinite alternate; }
.card.cargando h3, .card.cargando .precio-mini { background: var(--rosa-suave); color: transparent; border-radius: 6px; width: 70%; }
.card.cargando .precio-mini { width: 35%; }
@keyframes pulso { to { opacity: .45; } }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--linea); text-align: center; padding: 36px 16px 48px; color: var(--gris); font-size: 14px; }
.pie img { margin: 0 auto 10px; }
.pie p { margin: 4px 0; }
.pie-links { display: flex; gap: 20px; justify-content: center; margin-top: 10px !important; }
.pie-links a { font-weight: 600; text-decoration: none; }

/* ---------- Hojas (dialog) ---------- */
.hoja {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%;
  max-height: 92dvh; border-radius: 26px 26px 0 0;
  background: var(--papel); color: var(--tinta);
  box-shadow: 0 -20px 60px -20px rgba(62, 15, 25, .5);
}
.hoja[open] { animation: sube .38s cubic-bezier(.2, .8, .2, 1); }
.hoja::backdrop { background: rgba(43, 26, 31, .45); backdrop-filter: blur(2px); }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 760px) {
  .hoja { margin: auto; max-width: 520px; border-radius: 26px; max-height: 90vh; }
}
.cerrar {
  position: sticky; top: 10px; float: right; margin: 10px 10px -56px 0; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: var(--vino); font-size: 26px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
.ficha-cuerpo { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
.ficha-cuerpo h2 { margin: 0; font: 400 32px/1.05 var(--display); color: var(--vino-hondo); }

.galeria {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  background: var(--rosa-suave);
}
.galeria::-webkit-scrollbar { display: none; }
.galeria .disco { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / .9; }
.galeria .disco::before { width: 70%; left: 12%; background: var(--rosa); }
.puntos { display: flex; justify-content: center; gap: 6px; margin-top: 10px; min-height: 6px; }
.puntos i { width: 6px; height: 6px; border-radius: 50%; background: var(--linea); transition: background .2s, width .2s; }
.puntos i.on { background: var(--vino); width: 18px; border-radius: 3px; }

.precio { margin: 8px 0 0; font-size: 22px; font-weight: 600; }
.precio s { color: var(--gris); font-size: 16px; font-weight: 400; margin-left: 8px; }
.desc { color: #5A454C; margin: 12px 0 0; white-space: pre-line; }

.tallas-sel { border: 0; padding: 0; margin: 22px 0 0; }
.tallas-sel legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; padding: 0; }
.tallas-sel legend span { font-weight: 400; color: var(--gris); margin-left: 6px; }
#fTallas { display: flex; flex-wrap: wrap; gap: 8px; }
.talla {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--linea); background: #fff;
  font: 500 18px/1 var(--display); color: var(--vino-hondo);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.talla[aria-pressed="true"] { background: var(--vino); border-color: var(--vino); color: #fff; transform: scale(1.06); }
.talla:disabled { color: #CDB9BF; background: transparent; cursor: not-allowed; position: relative; }
.talla:disabled::after {
  content: ''; position: absolute; left: 10px; right: 10px; top: 50%; height: 1px;
  background: #CDB9BF; transform: rotate(-35deg);
}

.cant { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 0; font-weight: 600; font-size: 14px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: 999px; background: #fff; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; color: var(--vino); }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; }

.estado-nota { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--rosa-suave); color: var(--vino-hondo); font-size: 14px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 12px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .15s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-vino { background: var(--vino); color: #fff; margin-top: 22px; }
.btn-vino:hover:not(:disabled) { background: var(--vino-hondo); }
.btn-linea { background: transparent; color: var(--vino); border-color: var(--vino); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa svg { width: 20px; height: 20px; fill: #fff; }

/* ---------- Pedido ---------- */
.lineas { list-style: none; margin: 18px 0 0; padding: 0; }
.linea { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.linea .disco { aspect-ratio: 1; }
.linea .disco::before { width: 90%; left: 5%; bottom: 5%; }
.linea h4 { margin: 0; font: 500 16px/1.2 var(--display); color: var(--vino-hondo); }
.linea p { margin: 2px 0 0; font-size: 13px; color: var(--gris); }
.linea .der { text-align: right; }
.linea .der strong { display: block; }
.quitar { border: 0; background: none; color: var(--gris); font-size: 13px; text-decoration: underline; padding: 4px 0; }
.vacio-bolsa { color: var(--gris); margin: 16px 0 0; }

.total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 6px; }
.total span { font-weight: 600; }
.total strong { font: 500 28px/1 var(--display); color: var(--vino-hondo); }
.datos label { display: block; font-weight: 600; font-size: 14px; margin-top: 14px; }
.datos input:not([type=radio]), .datos textarea {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px;
  border: 1px solid var(--linea); border-radius: 12px; background: #fff;
  font-weight: 400; font-size: 16px; resize: vertical;
}
.datos input:focus, .datos textarea:focus { outline: none; border-color: var(--vino); }
.entrega { border: 0; padding: 0; margin: 16px 0 0; }
.entrega legend { font-weight: 600; font-size: 14px; padding: 0; }
.entrega label { display: flex; align-items: center; gap: 10px; font-weight: 400; margin-top: 10px; }
.entrega input { accent-color: var(--vino); width: 18px; height: 18px; }
.error { color: #B3261E; font-size: 14px; margin: 12px 0 0; }
.letra-chica { text-align: center; color: var(--gris); font-size: 12px; margin: 10px 0 0; }

/* ---------- Aviso flotante ---------- */
.aviso {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--vino-hondo); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; box-shadow: var(--sombra);
  transition: transform .3s, opacity .3s; max-width: calc(100% - 32px); text-align: center;
}
.aviso.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .card { opacity: 1; transform: none; }
}
