/* Home Ofertas Online — "La Cochera" · Carlos Hurtado Estudio Digital */

@font-face { font-family: "Anton"; src: url(/fonts/anton-latin-400-normal.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Anton"; src: url(/fonts/anton-latin-ext-400-normal.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F; }
@font-face { font-family: "Permanent Marker"; src: url(/fonts/permanent-marker-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F; }

:root {
  --marino: #0E2A5C;
  --marino-2: #0a1f45;
  --naranja: #F7931E;
  --naranja-osc: #b85f00;
  --kraft: #C8A27A;
  --crema: #F6EFE4;
  --sello: #D7262E;
  --tinta: #1b1a17;
  --verde-wa: #168A44;
  --f-rotulo: "Anton", Impact, "Arial Narrow", sans-serif;
  --f-marker: "Permanent Marker", "Comic Sans MS", cursive;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radio: 14px;
  --sombra: 0 10px 30px -12px rgb(0 0 0 / .55);
  --salida: cubic-bezier(.22, 1, .36, 1);
  --rebote: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; font-family: var(--f-texto); color: var(--tinta); background: var(--marino-2); line-height: 1.5; font-size: 1rem; }
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--naranja); color: var(--tinta); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.saltar:focus { top: 12px; }

.sello-marker { font-family: var(--f-marker); color: var(--naranja); font-size: 1.15rem; margin: 0 0 .25rem; transform: rotate(-2deg); display: inline-block; }
.titulo { font-family: var(--f-rotulo); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: .95; font-size: clamp(2.1rem, 7vw, 3.6rem); margin: 0; color: var(--marino); }
.titulo--claro { color: var(--crema); text-shadow: 0 2px 18px rgb(0 0 0 / .45); }

/* ───────────── 1-2. EL PORTÓN ───────────── */
.porton { position: relative; height: 330svh; background: #1a1308; }
.porton__fijo { position: sticky; top: 0; height: 100svh; overflow: hidden; }

.escena {
  /* puerta en la foto 16:9 (fracciones) */
  --dx: .14; --dy: .18; --dw: .75; --dh: .635; --har: calc(941 / 1672);
  /* hueco útil de la foto de la cochera 16:9 */
  --ix: .055; --iy: .14; --iw: .89; --iar: calc(941 / 1672);
  --ar: calc(1672 / 941);
  position: absolute; left: 50%; top: 50%;
  width: max(100vw, calc(100svh * var(--ar)));
  aspect-ratio: 1672 / 941;
  translate: -50% -50%;
  transform-origin: 51.5% 49.75%;
}
@media (max-aspect-ratio: 1/1) {
  .escena {
    --dx: .073; --dy: .116; --dw: .861; --dh: .716; --har: calc(1672 / 941);
    --ix: .05; --iy: .225; --iw: .90; --iar: calc(1672 / 941);
    --ar: calc(941 / 1672);
    aspect-ratio: 941 / 1672;
    transform-origin: 50.35% 47.4%;
  }
}
.escena__fondo { width: 100%; height: 100%; }

.vano {
  position: absolute; overflow: hidden;
  left: calc(var(--dx) * 100%); top: calc(var(--dy) * 100%);
  width: calc(var(--dw) * 100%); height: calc(var(--dh) * 100%);
  background: #2b1d0c;
}
.vano__adentro { position: absolute; inset: 0; overflow: hidden; }
.vano__adentro img {
  position: absolute; top: 0; max-width: none; height: auto;
  width: calc(100% / var(--iw));
  left: calc(-100% * var(--ix) / var(--iw));
  margin-top: calc(-100% * var(--iy) / var(--iw) * var(--iar));
  filter: brightness(.22) saturate(.5);
}
.vano__luces { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 60% at 50% 8%, rgb(255 190 90 / .35), transparent 60%); mix-blend-mode: screen; }
.luces-on .vano__adentro img { animation: encender 1.1s steps(1, end) forwards; }
.luces-on .vano__luces { animation: resplandor 1.4s .5s var(--salida) forwards; }
@keyframes encender {
  0% { filter: brightness(.22) saturate(.5); }
  12% { filter: brightness(.75) saturate(.9); }
  20% { filter: brightness(.3) saturate(.6); }
  34% { filter: brightness(.9) saturate(1); }
  44% { filter: brightness(.45) saturate(.8); }
  60%, 100% { filter: brightness(1) saturate(1.05); }
}
@keyframes resplandor { to { opacity: 1; } }

.hoja { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
.hoja__img {
  position: absolute; top: 0; max-width: none; height: auto;
  width: calc(100% / var(--dw));
  left: calc(-100% * var(--dx) / var(--dw));
  margin-top: calc(-100% * var(--dy) / var(--dw) * var(--har));
}
.hoja__logo {
  position: absolute; left: 50%; top: 46%; width: min(50%, 640px); translate: -50% -50%;
  filter: drop-shadow(0 2px 1px rgb(0 0 0 / .45)) drop-shadow(0 8px 18px rgb(0 0 0 / .35));
}
@media (max-aspect-ratio: 1/1) { .hoja__logo { width: 84%; top: 40%; } }
.hoja__logo img { width: 100%; height: auto; opacity: .96; }
/* las ranuras de las láminas pasan por encima del logo: se ve pintado sobre el portón */
.hoja__ranuras {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/img/logo/logo-porton.webp) center / 100% 100% no-repeat;
          mask: url(/img/logo/logo-porton.webp) center / 100% 100% no-repeat;
  background: repeating-linear-gradient(180deg, rgb(0 10 40 / 0) 0 7px, rgb(0 10 40 / .32) 7px 9px, rgb(255 255 255 / .10) 9px 10px);
  mix-blend-mode: multiply;
}
.rollo {
  position: absolute; left: -1%; right: -1%; top: 0; height: 0; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgb(255 255 255 / .06) 0 2px, rgb(0 0 0 / .25) 2px 4px),
    linear-gradient(180deg, #071633 0%, #1b3f80 45%, #0b2150 80%, #04102a 100%);
  box-shadow: 0 10px 18px rgb(0 0 0 / .55);
  border-radius: 0 0 40% 40% / 0 0 12px 12px;
}
.luz {
  position: absolute; left: 1%; right: 1%; bottom: 0; height: 5px; border-radius: 4px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--naranja) 8%, #ffc46b 50%, var(--naranja) 92%, transparent);
  box-shadow: 0 0 14px 4px rgb(247 147 30 / .85), 0 0 46px 14px rgb(247 147 30 / .45);
  animation: latido 2.6s ease-in-out infinite;
}
@keyframes latido { 50% { opacity: .72; } }

.porton__textos {
  position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 3;
  display: grid; justify-items: center; gap: 16px; padding: 0 16px; text-align: center;
  color: var(--crema);
}
.porton__linea {
  position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); translate: -50% 0; white-space: nowrap;
  margin: 0; font-size: clamp(.66rem, 2.9vw, .82rem); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: rgb(10 31 69 / .82); padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(6px);
}
.porton__deslizar { margin: 0; display: grid; justify-items: center; gap: 2px; font-family: var(--f-marker); font-size: 1.05rem;
  color: #fff; text-shadow: 0 2px 6px rgb(0 0 0 / .8); }
.porton__deslizar i { width: 22px; height: 22px; border-right: 3px solid var(--naranja); border-bottom: 3px solid var(--naranja);
  rotate: 45deg; animation: bajar 1.6s ease-in-out infinite; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .6)); }
@keyframes bajar { 50% { translate: 0 6px; } }
.btn-abrir {
  border: 0; cursor: pointer; background: var(--naranja); color: var(--tinta); font-weight: 800; letter-spacing: .02em;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 6px 0 var(--naranja-osc), 0 12px 24px rgb(0 0 0 / .4);
  transition: translate .15s, box-shadow .15s; min-height: 48px;
}
.btn-abrir:active { translate: 0 4px; box-shadow: 0 2px 0 var(--naranja-osc), 0 6px 12px rgb(0 0 0 / .4); }

.porton__adentro {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 90px 20px max(28px, env(safe-area-inset-bottom));
  text-align: center; color: var(--crema); opacity: 0; translate: 0 30px; pointer-events: none;
  background: linear-gradient(0deg, rgb(20 12 2 / .88) 0%, rgb(20 12 2 / .6) 55%, transparent);
}
.porton__adentro h2 { font-family: var(--f-rotulo); font-weight: 400; text-transform: uppercase; font-size: clamp(2.4rem, 10vw, 4.6rem); line-height: .92; margin: 0 0 .5rem; }
.porton__adentro p:not(.sello-marker) { margin: 0 auto; max-width: 30rem; font-size: 1.02rem; }

/* sin animación: portón abierto de una vez */
.rm .porton, html:not(.js) .porton { height: 100svh; }
.rm .hoja, .rm .rollo, .rm .luz, .rm .porton__deslizar, .rm .btn-abrir { display: none; }
.rm .vano__adentro img { filter: none; animation: none; }
.rm .porton__adentro { opacity: 1; translate: none; }
.rm .porton__textos { bottom: auto; top: max(16px, env(safe-area-inset-top)); }

/* ───────────── 3. CAJAS ───────────── */
main { background: #8d8a84 url(/img/ui/concreto.webp) center / 512px repeat; position: relative; }
main:focus { outline: none; }
.cajas {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgb(10 31 69 / .97), rgb(14 42 92 / .94));
  box-shadow: 0 8px 20px -8px rgb(0 0 0 / .6); border-bottom: 3px solid var(--naranja);
}
.cajas__lista {
  list-style: none; margin: 0 auto; padding: 10px 12px 8px; display: flex; gap: 6px; max-width: 1240px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain;
}
.cajas__lista::-webkit-scrollbar { display: none; }
.cajas__lista li { scroll-snap-align: start; flex: 0 0 auto; }
@media (min-width: 900px) { .cajas__lista { justify-content: center; gap: 14px; } }
.caja {
  position: relative; width: 100px; height: 86px; border: 0; padding: 0; background: none; cursor: pointer;
  display: block; -webkit-tap-highlight-color: transparent;
}
.caja__img { position: absolute; inset: 0; background: url(/img/ui/caja-cerrada.webp) center 70% / 100% auto no-repeat;
  filter: drop-shadow(0 6px 6px rgb(0 0 0 / .45)); transition: transform .25s var(--salida); }
.caja.is-abierta .caja__img { background-image: url(/img/ui/caja-abierta.webp); animation: rebote .55s var(--rebote); }
.caja__rotulo {
  /* etiqueta de papel pegada con cinta: texto azul sobre crema para que se lea bien */
  position: absolute; left: 0; right: 8%; bottom: 10%; min-height: 46%; display: grid; place-items: center;
  padding: 4px 4px; background: var(--crema); border-radius: 2px;
  box-shadow: 0 1px 0 rgb(0 0 0 / .12), 0 3px 6px -2px rgb(0 0 0 / .45);
  font-family: var(--f-marker); font-size: .78rem; line-height: 1.02; color: var(--marino); text-align: center;
  rotate: -3deg; letter-spacing: .01em; text-wrap: balance;
}
.caja__rotulo::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 30px; height: 10px; translate: -50% 0; rotate: 4deg;
  background: rgb(232 222 196 / .85); box-shadow: 0 1px 2px rgb(0 0 0 / .2);
}
.caja.is-abierta .caja__rotulo { background: #fff; }
.caja:hover .caja__img { transform: translateY(-3px) rotate(-2deg); }
.caja.is-abierta::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -6px; height: 4px; border-radius: 4px; background: var(--naranja); }
@keyframes rebote { 0% { transform: scale(.9) translateY(4px); } 55% { transform: scale(1.08) translateY(-6px); } 100% { transform: none; } }
@media (min-width: 900px) { .caja { width: 116px; height: 104px; } .caja__rotulo { font-size: .92rem; } }

/* ───────────── 4. MESAS (grilla) ───────────── */
.mesas { max-width: 1240px; margin: 0 auto; padding: 28px 14px 56px; overflow-x: clip; }
.mesas__cabeza { display: grid; gap: 14px; margin-bottom: 22px; }
.mesas__cabeza .titulo { color: var(--crema); text-shadow: 0 2px 0 var(--marino), 0 4px 18px rgb(0 0 0 / .5); }
.buscador label { display: block; font-family: var(--f-marker); color: var(--crema); font-size: 1.2rem; margin-bottom: 6px; text-shadow: 0 2px 6px rgb(0 0 0 / .6); }
.buscador__campo { position: relative; }
.buscador__campo svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--marino); }
.buscador input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 14px 16px 14px 44px; border-radius: 12px; min-height: 52px;
  border: 3px solid var(--marino); background: var(--crema); color: var(--tinta); box-shadow: 0 6px 0 rgb(10 31 69 / .55);
}
.buscador input::placeholder { color: #6b645a; }
.buscador input:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.mesas__cuenta { margin: 0; color: var(--crema); font-weight: 600; font-size: .95rem; text-shadow: 0 1px 4px rgb(0 0 0 / .7); }
@media (min-width: 900px) {
  .mesas { padding: 44px 24px 80px; }
  .mesas__cabeza { grid-template-columns: 1fr minmax(320px, 420px); align-items: end; }
  .mesas__cuenta { grid-column: 1 / -1; }
}

.grilla:empty { min-height: 180vh; }
.grilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
@media (min-width: 700px) { .grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 20px; } }
@media (min-width: 1100px) { .grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; } }

.art { position: relative; }
.art__btn {
  position: relative; width: 100%; text-align: left; border: 0; cursor: pointer; display: block; padding: 10px 10px 16px;
  border-radius: 10px 10px 6px 6px; color: var(--tinta);
  /* mantel crema con trama de tela y ruedo con costura */
  background:
    repeating-linear-gradient(45deg, rgb(120 90 50 / .045) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgb(120 90 50 / .045) 0 2px, transparent 2px 6px),
    var(--crema);
  box-shadow: 0 2px 0 #e2d5c1, 0 14px 22px -10px rgb(0 0 0 / .65);
  transition: translate .3s var(--salida), box-shadow .3s var(--salida);
}
.art__btn::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; border-top: 2px dashed rgb(160 120 70 / .45); pointer-events: none; }
.art__btn:hover { translate: 0 -3px; box-shadow: 0 2px 0 #e2d5c1, 0 22px 28px -12px rgb(0 0 0 / .7); }
.art__foto { position: relative; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: #e9dfcf; box-shadow: 0 6px 10px -6px rgb(0 0 0 / .45); }
.art__foto img { width: 100%; height: 100%; object-fit: cover; }
.art__nombre { display: block; font-weight: 650; font-size: .92rem; line-height: 1.25; margin: 10px 2px 0; color: var(--marino); }
.art__chip { display: inline-block; margin: 6px 0 0 2px; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 2px solid var(--marino); color: var(--marino); }
.art__chip--nuevo { background: var(--marino); color: var(--crema); }
@media (min-width: 700px) { .art__nombre { font-size: 1rem; } .art__btn { padding: 12px 12px 18px; } }

/* etiqueta kraft colgando de la esquina */
/* la etiqueta va acostada: el cordón queda a la derecha, amarrado a la esquina de la mesa */
.etiqueta {
  --w: 108px;
  position: absolute; top: 0; right: -6px; z-index: 2; width: var(--w); height: calc(var(--w) * 162 / 260); pointer-events: none;
  transform-origin: 90% 40%; rotate: -10deg;
  filter: drop-shadow(2px 5px 4px rgb(0 0 0 / .4));
}
.etiqueta::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--w) * 162 / 260); height: var(--w);
  translate: -50% -50%; rotate: 90deg; background: url(/img/ui/etiqueta.webp) center / 100% 100% no-repeat;
}
.etiqueta__precio {
  position: absolute; left: 3%; width: 58%; top: 0; bottom: 0; display: grid; place-items: center; text-align: center;
  font-family: var(--f-marker); color: #1b1a17; font-size: .98rem; line-height: 1; white-space: nowrap;
}
.etiqueta__precio--largo { font-size: .84rem; }
.etiqueta__precio--consulta { font-size: .64rem; white-space: normal; line-height: 1.05; }
@media (min-width: 700px) { .etiqueta { --w: 132px; right: -16px; } .etiqueta__precio { font-size: 1.2rem; } .etiqueta__precio--largo { font-size: 1.02rem; } .etiqueta__precio--consulta { font-size: .78rem; } }
.art__btn:hover .etiqueta, .art__btn:focus-visible .etiqueta, .art.is-tocado .etiqueta { animation: mecer 1.6s var(--salida); }
@keyframes mecer { 0% { rotate: -10deg; } 18% { rotate: 6deg; } 36% { rotate: -16deg; } 54% { rotate: -4deg; } 72% { rotate: -12deg; } 100% { rotate: -10deg; } }

/* colón dibujado a marcador (la fuente no trae ₡) */
.colon { position: relative; display: inline-block; margin-right: .04em; }
.colon::before, .colon::after { content: ""; position: absolute; top: -10%; bottom: -10%; width: .07em; background: currentColor; border-radius: 2px; rotate: 14deg; }
.colon::before { left: 34%; } .colon::after { left: 54%; }

/* cinta "¡Quedan 5!" */
.cinta {
  position: absolute; left: -4px; bottom: 10px; z-index: 2; width: 128px; height: 40px; rotate: -7deg; pointer-events: none;
  background: url(/img/ui/cinta.webp) center / 100% 100% no-repeat; display: grid; place-items: center;
  font-family: var(--f-marker); font-size: 1rem; color: var(--sello); filter: drop-shadow(0 2px 2px rgb(0 0 0 / .25));
}

/* vendido */
.art.is-vendido .art__foto img { filter: grayscale(1) contrast(.9) brightness(1.05); opacity: .8; }
.sello {
  position: absolute; left: 50%; top: 44%; z-index: 3; translate: -50% -50%; rotate: -16deg; pointer-events: none;
  font-family: var(--f-rotulo); font-size: clamp(1.4rem, 6vw, 2.1rem); letter-spacing: .08em; color: var(--sello);
  padding: .1em .45em; border: 4px solid var(--sello); border-radius: 8px;
  box-shadow: inset 0 0 0 3px rgb(246 239 228 / .9), inset 0 0 0 5px var(--sello);
  background: rgb(246 239 228 / .55);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.7'/%3E%3C/filter%3E%3Crect width='160' height='60' filter='url(%23f)'/%3E%3C/svg%3E") center / 160px 60px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='60'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.7'/%3E%3C/filter%3E%3Crect width='160' height='60' filter='url(%23f)'/%3E%3C/svg%3E") center / 160px 60px;
  opacity: 0;
}
.art.is-visto .sello, .detalle .sello { animation: golpe .5s cubic-bezier(.5, 0, .75, 0) forwards; }
.art.is-visto .art__btn:has(.sello) { animation: temblor .35s .45s ease-out; }
@keyframes golpe { 0% { opacity: 0; scale: 2.6; rotate: -4deg; } 85% { opacity: 1; scale: .94; rotate: -16deg; } 100% { opacity: 1; scale: 1; rotate: -16deg; } }
@keyframes temblor { 20% { translate: 0 3px; } 45% { translate: -2px -1px; } 70% { translate: 1px 1px; } 100% { translate: 0 0; } }

.vacio { text-align: center; color: var(--crema); padding: 30px 10px; text-shadow: 0 1px 4px rgb(0 0 0 / .7); }
.vacio a { color: #ffd39a; font-weight: 700; }
.sin-js { color: var(--crema); }

/* ───────────── 6. DEL PORTÓN PARA AFUERA ───────────── */
.afuera { position: relative; overflow: hidden; padding: 64px 14px 72px; isolation: isolate; }
.afuera__fondo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.afuera::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(10 31 69 / .9) 0%, rgb(10 31 69 / .55) 30%, rgb(10 31 69 / .75) 100%); }
.afuera__contenido { max-width: 1100px; margin: 0 auto; }
.afuera .sello-marker { color: #ffb45c; }
.fichas { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 22px; }
.ficha {
  display: grid; background: var(--crema); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
  border-left: 8px solid var(--naranja);
}
.ficha__foto { position: relative; border: 0; padding: 0; cursor: zoom-in; background: #ddd; aspect-ratio: 16 / 10; }
.ficha__foto img { width: 100%; height: 100%; object-fit: cover; }
.ficha__info { padding: 18px 18px 20px; display: grid; gap: 8px; align-content: start; }
.ficha__info h3 { font-family: var(--f-rotulo); font-weight: 400; text-transform: uppercase; color: var(--marino); font-size: 1.7rem; line-height: 1; margin: 0; }
.ficha__precio { font-family: var(--f-rotulo); font-size: 1.9rem; color: var(--naranja-osc); line-height: 1; margin: 0; }
.ficha__nota { margin: 0; color: #3a372f; }
.ficha__lineas { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ficha__lineas li { padding-left: 18px; position: relative; font-weight: 600; color: var(--marino); }
.ficha__lineas li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--naranja); rotate: 45deg; }
@media (min-width: 720px) {
  .ficha { grid-template-columns: minmax(0, 46%) 1fr; min-height: 280px; }
  .ficha__foto { aspect-ratio: auto; }
  .ficha__info { padding: 26px 28px; align-content: center; }
  .ficha__info h3 { font-size: 2.2rem; }
}

/* ───────────── botones ───────────── */
.btn-quiero, .btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer;
  background: var(--naranja); color: var(--tinta); font-weight: 900; font-size: 1.2rem; letter-spacing: .01em;
  padding: 14px 24px; min-height: 56px; border-radius: 14px; border: 0;
  box-shadow: 0 5px 0 var(--naranja-osc), 0 12px 22px -8px rgb(0 0 0 / .5);
  transition: translate .12s, box-shadow .12s, background .2s;
}
.btn-quiero:hover, .btn-wa:hover { background: #ffa53d; }
.btn-quiero:active, .btn-wa:active { translate: 0 4px; box-shadow: 0 1px 0 var(--naranja-osc), 0 6px 12px -6px rgb(0 0 0 / .5); }
.ficha .btn-quiero { justify-self: start; margin-top: 6px; }

/* ───────────── 8. CIERRE ───────────── */
.cierre { padding: 64px 16px 72px; overflow-x: clip; }
.cierre__carton {
  position: relative; max-width: 760px; margin: 0 auto; text-align: center; padding: 46px 22px 40px;
  background: var(--kraft) url(/img/ui/carton.webp) center / 512px; border-radius: 6px; rotate: -1deg;
  box-shadow: 0 2px 0 #a7825a, 0 24px 40px -18px rgb(0 0 0 / .7);
}
.cierre__carton h2 { font-family: var(--f-marker); font-weight: 400; font-size: clamp(1.7rem, 6vw, 2.6rem); line-height: 1.1; margin: 0 0 8px; color: var(--marino); }
.cierre__carton p { font-size: 1.15rem; font-weight: 600; margin: 0 0 22px; color: #2a2116; }
.cierre__cinta { position: absolute; width: 130px; height: 40px; background: url(/img/ui/cinta.webp) center / 100% 100% no-repeat; }
.cierre__cinta--a { left: -22px; top: 10px; rotate: -32deg; }
.cierre__cinta--b { right: -22px; top: 10px; rotate: 32deg; }

/* ───────────── 9. FOOTER ───────────── */
.pie { background: var(--marino-2); color: var(--crema); text-align: center; padding: 40px 16px calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 16px; justify-items: center; }
.pie__logo { width: min(300px, 78vw); height: auto; background: var(--crema); border-radius: 18px; padding: 14px 18px; }
.pie__datos { display: grid; gap: 4px; }
.pie__datos a { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: #fff; padding: 8px; }
.pie__datos a svg { color: #4fd57f; }
.pie__datos p { margin: 0; color: #cfd6e6; }
.pie__credito { margin: 6px 0 0; font-size: .8rem; color: #aeb8cf; }
.pie__credito a { color: #e4e9f3; }

/* ───────────── botón flotante ───────────── */
.flotante {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--verde-wa); box-shadow: 0 0 0 3px var(--crema), 0 10px 22px rgb(0 0 0 / .45);
  transition: scale .2s var(--rebote), opacity .2s;
}
.flotante:hover { scale: 1.07; }
.con-detalle .flotante { opacity: 0; pointer-events: none; }

/* ───────────── 5. DETALLE (bottom sheet / modal) ───────────── */
.detalle {
  border: 0; padding: 0; color: var(--tinta); background: var(--crema); overflow: auto; overscroll-behavior: contain;
  width: 100%; max-width: 100%; max-height: 92svh; margin: auto 0 0; border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgb(0 0 0 / .45);
}
.detalle::backdrop { background: rgb(6 16 38 / .7); backdrop-filter: blur(3px); }
.detalle[open] { animation: subir .42s var(--salida); }
.detalle[open]::backdrop { animation: aparecer .3s ease; }
@keyframes subir { from { translate: 0 100%; } }
@keyframes aparecer { from { opacity: 0; } }
.detalle__agarre { position: sticky; top: 0; z-index: 3; height: 26px; display: grid; place-items: center; touch-action: none; cursor: grab;
  background: linear-gradient(var(--crema) 70%, transparent); }
.detalle__agarre span { width: 48px; height: 5px; border-radius: 5px; background: #b9ab95; }
.detalle__cerrar { position: absolute; top: 12px; right: 12px; z-index: 4; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--marino); color: var(--crema); display: grid; place-items: center; box-shadow: 0 4px 12px rgb(0 0 0 / .3); }
.detalle__media { position: relative; padding: 0 14px; }
.detalle__principal { position: relative; border-radius: 14px; overflow: hidden; background: #e9dfcf; }
.detalle__principal img, .detalle__principal video { width: 100%; max-height: 52svh; object-fit: contain; margin: 0 auto; }
.detalle__miniaturas { display: flex; gap: 8px; margin-top: 8px; }
.detalle__miniaturas button { width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; border: 3px solid transparent; cursor: pointer; background: #e9dfcf; }
.detalle__miniaturas button[aria-current="true"] { border-color: var(--naranja); }
.detalle__miniaturas img { width: 100%; height: 100%; object-fit: cover; }
.detalle__miniaturas .es-video { display: grid; place-items: center; background: var(--marino); color: var(--crema); font-weight: 800; font-size: .72rem; }
.detalle__info { padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.detalle__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.detalle__chips span { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--marino); color: var(--crema); }
.detalle__chips .chip-ultimas { background: var(--sello); }
.detalle__chips .chip-vendido { background: #555; }
.detalle h2 { font-family: var(--f-rotulo); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 7vw, 2.5rem); line-height: 1; margin: 2px 0 0; color: var(--marino); }
.detalle__precio { font-family: var(--f-marker); font-size: 2.2rem; line-height: 1.1; margin: 0; color: var(--naranja-osc); }
.detalle__precio small { font-size: .55em; margin-left: .2em; color: var(--tinta); }
.detalle__precio--consulta { font-size: 1.6rem; }
.detalle__lineas { margin: 0; padding: 0 0 0 1.1em; font-weight: 600; color: var(--marino); }
.detalle__nota { margin: 0; color: #3a372f; }
.detalle__nota:empty, .detalle__lineas:empty { display: none; }
.detalle__acciones { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 8px; }
.detalle__acciones .btn-quiero { font-size: 1.25rem; white-space: nowrap; padding: 14px 16px; }
@media (max-width: 400px) { .btn-compartir { padding: 0 12px; font-size: .9rem; } .detalle__acciones .btn-quiero { font-size: 1.12rem; } }
.btn-compartir { display: inline-flex; align-items: center; gap: 8px; border: 3px solid var(--marino); background: transparent; color: var(--marino);
  font-weight: 800; padding: 0 16px; border-radius: 14px; cursor: pointer; min-height: 56px; }
.btn-compartir:hover { background: var(--marino); color: var(--crema); }
.detalle .sello { top: 45%; font-size: 2.6rem; }
.detalle.is-vendido .btn-quiero { background: #d5cbbd; box-shadow: none; }

@media (min-width: 900px) {
  .detalle { width: min(980px, 92vw); max-height: 88vh; margin: auto; border-radius: 22px; display: none; }
  .detalle[open] { display: grid; grid-template-columns: 1.15fr 1fr; animation: entrar .35s var(--salida); }
  .detalle__agarre { display: none; }
  .detalle__media { padding: 22px 0 22px 22px; }
  .detalle__principal img, .detalle__principal video { max-height: 72vh; }
  .detalle__info { padding: 64px 28px 28px; align-content: start; }
  @keyframes entrar { from { opacity: 0; scale: .96; } }
}

.aviso { position: fixed; left: 50%; bottom: 96px; translate: -50% 20px; z-index: 60; opacity: 0; pointer-events: none;
  background: var(--marino); color: var(--crema); font-weight: 700; padding: 10px 18px; border-radius: 999px; transition: opacity .25s, translate .25s var(--salida); }
.aviso.is-visible { opacity: 1; translate: -50% 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sello { opacity: 1; }
}
