/* Pedido Yummy · versión 2, "hoja de stickers". Contexto de diseño: .impeccable.md (yummy-waffle). */
@font-face { font-family: 'Dela Gothic One'; src: url('fonts/dela-gothic-one-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-latin.woff2') format('woff2'); font-weight: 500 800; font-display: swap; }

:root {
  --papel: #FFFCF2; --papel-2: #F6F0DE; --blanco-sticker: #FFFEFA;
  --tinta: #1B1813; --tinta-2: #5E574B; --raya: #E6DCC4; --raya-2: #EFE6D0;
  --amarillo: #FFD400; --sombra: 3px 4px 0 var(--tinta);
  --display: 'Dela Gothic One', 'Archivo', system-ui, sans-serif;
  --texto: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --curva: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font-family: var(--texto); font-weight: 500; line-height: 1.45; padding-bottom: 104px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }
[hidden] { display: none !important; }
.icono { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.cifra { font-family: var(--display); font-weight: 400; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--amarillo); padding: 8px 12px; border: 2px solid var(--tinta); border-radius: 10px; z-index: 50; }
.saltar:focus { left: 8px; }

/* Barra de arriba */
.barra { position: sticky; top: 0; z-index: 20; height: 68px; padding: 0 18px; display: flex; align-items: center; gap: 12px; background: var(--papel); }
.gata { width: 46px; height: 46px; border-radius: 50%; background: var(--amarillo); border: 2px solid var(--tinta); box-shadow: 2px 3px 0 var(--tinta); transform: rotate(-8deg); display: grid; place-items: center; overflow: hidden; }
.gata img { width: 56px; }
.marca { font-family: var(--display); font-size: 23px; letter-spacing: -.5px; }
.boton-pedido { margin-left: auto; position: relative; width: 48px; height: 48px; border-radius: 16px; border: 2px solid var(--tinta); background: var(--papel); display: grid; place-items: center; }
.contador { position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 12px; background: var(--amarillo); border: 2px solid var(--tinta); font-size: 12px; font-weight: 800; display: grid; place-items: center; transform: rotate(10deg); }

/* Estado de pedidos */
.estado { margin: 6px 20px 0; display: flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 800; letter-spacing: 2px; white-space: nowrap; }
.cuadrito { width: 8px; height: 8px; border-radius: 2px; background: var(--amarillo); box-shadow: 0 0 0 1.5px var(--tinta); }
body.pedidos-cerrados .cuadrito { background: var(--papel); }
.raya { flex: 1; min-width: 12px; height: 1px; background: var(--raya); }
.estado-hora { color: var(--tinta-2); }

/* Portada */
.portada { padding: 18px 20px 0; }
.portada h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(40px, 11vw, 60px); line-height: 1.04; letter-spacing: -1px; }
.sticker { display: inline-block; margin-top: 6px; padding: 2px 12px 6px; background: var(--amarillo); border: 2px solid var(--tinta); border-radius: 12px; box-shadow: var(--sombra); transform: rotate(-2.5deg); }
.lema { margin: 18px 0 0; font-size: 15px; font-weight: 700; }
.como { margin: 4px 0 0; font-size: 13.5px; color: var(--tinta-2); }

/* Fuera de horario */
.aviso-cerrado { margin: 24px 20px 0; position: relative; }
.aviso-cerrado h2 { margin: 0; max-width: calc(100% - 112px); font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.aviso-cerrado p { margin: 12px 0 0; max-width: 34ch; color: var(--tinta-2); }
.gata-grande { position: absolute; right: 0; top: -6px; width: 96px; height: 96px; border-radius: 50%; background: var(--amarillo); border: 2px solid var(--tinta); box-shadow: var(--sombra); transform: rotate(10deg); display: grid; place-items: center; overflow: hidden; }
.gata-grande img { width: 118px; }
.horario { margin: 18px 0 0; display: grid; gap: 4px; font-size: 14.5px; }
.horario div { min-height: 40px; display: flex; align-items: baseline; gap: 8px; }
.horario dt { font-weight: 700; }
.horario dd { margin: 0; font-weight: 800; }
.horario .puntos { flex: 1; border-bottom: 2px dotted #C9BFAA; }

/* Destacado */
.destacado { margin: 26px 20px 0; display: flex; gap: 28px; align-items: center; }
.destacado-foto { position: relative; flex: 0 0 140px; }
.destacado-foto .foto-sticker { transform: rotate(-3deg); }
.sello { position: absolute; top: -22px; right: -14px; width: 80px; height: 80px; transform: rotate(14deg); }
.sello-fondo { fill: var(--amarillo); stroke: var(--tinta); stroke-width: 3; }
.sello-texto { font-family: var(--texto); font-size: 8.6px; font-weight: 800; letter-spacing: 1.4px; fill: var(--tinta); }
.sello-num { font-family: var(--display); font-size: 21px; fill: var(--tinta); }
.destacado-texto { min-width: 0; }
.destacado-texto h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.1; }
.destacado-texto p { margin: 6px 0 0; font-size: 13px; color: var(--tinta-2); }
.destacado-precio { color: var(--tinta) !important; font-weight: 700; }
.destacado-precio .cifra { font-size: 19px; }
.boton-tinta { margin-top: 10px; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 2px solid var(--tinta); background: var(--tinta); color: var(--papel); font-weight: 800; }

/* Fotos como stickers */
.foto-sticker { display: block; background: var(--blanco-sticker); padding: 5px; border: 2px solid var(--tinta); border-radius: 22px; box-shadow: var(--sombra); }
.foto-sticker img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }

/* Pestañas */
.pestanas { position: sticky; top: 68px; z-index: 15; margin-top: 28px; padding: 0 20px; display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; background: var(--papel); border-bottom: 1px solid var(--raya); }
.pestanas a { flex: 0 0 auto; min-height: 46px; display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 15px; font-weight: 700; color: var(--tinta-2); border-bottom: 3px solid transparent; }
.pestanas a[aria-current="true"] { color: var(--tinta); font-weight: 800; border-bottom-color: var(--tinta); }
.pestanas small { font-size: 11px; }
.aviso-fotos { margin: 10px 20px 0; font-size: 12px; font-weight: 600; color: var(--tinta-2); }
.error-menu { margin: 16px 20px; padding: 12px 14px; border: 2px dashed var(--tinta); border-radius: 14px; font-weight: 700; }

/* Familias y tarjetas */
.familia { padding: 34px 20px 0; scroll-margin-top: 124px; }
.familia-cabeza { display: flex; align-items: baseline; gap: 10px; }
.familia-cabeza h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; }
.familia-cuenta { font-size: 12px; font-weight: 800; color: var(--tinta-2); }
.familia-nota { margin: 4px 0 18px; font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 16px; }
.tarjeta { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 0; border: none; background: none; text-align: left; }
.tarjeta .foto-sticker { transition: transform 180ms var(--curva); }
.tarjeta:nth-child(4n+1) .foto-sticker { transform: rotate(-1.5deg); }
.tarjeta:nth-child(4n+2) .foto-sticker { transform: rotate(1.2deg); }
.tarjeta:nth-child(4n+3) .foto-sticker { transform: rotate(.8deg); }
.tarjeta:nth-child(4n) .foto-sticker { transform: rotate(-1deg); }
.tarjeta-foto { position: relative; display: block; }
.tarjeta-mas { position: absolute; right: -6px; bottom: -8px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--tinta); background: var(--amarillo); display: grid; place-items: center; }
.tarjeta-mas .icono { width: 18px; height: 18px; stroke-width: 2.8; }
.tarjeta-nombre { padding: 0 4px; font-size: 15px; font-weight: 800; line-height: 1.2; }
.tarjeta-precio { padding: 0 4px; margin-top: -8px; font-size: 13px; font-weight: 600; color: var(--tinta-2); }

/* Pie */
.pie { margin-top: 48px; padding: 28px 20px; border-top: 1px solid var(--raya); display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--tinta-2); }
.pie b { color: var(--tinta); }
.pie p { margin: 0; }
.gata-pie { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%; background: var(--amarillo); border: 2px solid var(--tinta); transform: rotate(6deg); display: grid; place-items: center; overflow: hidden; }

/* Barra del pedido (teléfono) */
.barra-pedido { position: fixed; left: 14px; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; border-radius: 20px; background: var(--tinta); color: var(--papel); padding: 10px 10px 10px 14px; display: flex; align-items: center; gap: 12px; }
.cuenta-sticker { width: 34px; height: 34px; border-radius: 50%; background: var(--amarillo); border: 2px solid var(--papel); color: var(--tinta); font-weight: 800; display: grid; place-items: center; transform: rotate(-8deg); }
.barra-texto { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.barra-texto span { color: #C9BFAA; font-size: 12.5px; font-weight: 600; }
.barra-total { font-size: 19px; }
.barra-ir { width: 50px; height: 50px; border-radius: 16px; border: none; background: var(--amarillo); color: var(--tinta); display: grid; place-items: center; }

/* Hojas (dialog) */
.hoja { width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: none; border-top: 2px solid var(--tinta); border-radius: 28px 28px 0 0; background: var(--papel); color: var(--tinta); }
.hoja::backdrop { background: rgb(27 24 19 / .45); }
.hoja-interior { display: flex; flex-direction: column; max-height: 92dvh; }
.hoja-cabeza { position: relative; padding: 22px 20px 0; display: flex; gap: 16px; align-items: flex-start; }
.hoja-cabeza .foto-sticker { flex: 0 0 104px; transform: rotate(-3deg); }
.hoja-cabeza > div { flex: 1; min-width: 0; }
.hoja-cabeza h2 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.1; padding-right: 44px; }
.hoja-cabeza .desc { margin: 6px 0 0; font-size: 13px; color: var(--tinta-2); }
.referencia { margin: 2px 0 0; font-size: 11px; font-weight: 600; color: var(--tinta-2); }
.hoja-cabeza .cifra { display: block; margin-top: 6px; font-size: 24px; }
.cerrar { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--tinta); background: var(--papel); display: grid; place-items: center; }
.cerrar .icono { width: 16px; height: 16px; stroke-width: 2.8; }
.hoja-cuerpo { padding: 0 20px 16px; overflow-y: auto; }
.grupo { margin: 22px 0 0; padding: 0; border: none; }
.grupo legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 800; }
.suave { font-weight: 600; color: var(--tinta-2); }
.solo-rocas { margin: 22px 0 0; font-weight: 700; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opciones-forma, .opciones-tapioca { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.opcion label { min-height: 48px; padding: 6px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--raya); border-radius: 14px; background: var(--papel); font-weight: 800; cursor: pointer; }
.opciones-leche .opcion label { flex-direction: row; gap: 6px; min-height: 44px; border-radius: 12px; font-weight: 700; }
.opcion-precio { font-size: 12.5px; font-weight: 600; color: var(--tinta-2); }
.opcion input:checked + label { background: var(--amarillo); border-color: var(--tinta); box-shadow: var(--sombra); }
.opciones-leche .opcion input:checked + label { background: var(--tinta); color: var(--papel); box-shadow: none; }
.opciones-leche .opcion input:checked + label .opcion-precio { color: var(--amarillo); }
.opcion input:focus-visible + label { outline: 3px solid var(--tinta); outline-offset: 3px; }
.extras { list-style: none; margin: 0; padding: 0; }
.extras li { position: relative; border-bottom: 1px solid var(--raya-2); }
.extras input { position: absolute; opacity: 0; }
.extras label { position: relative; min-height: 48px; display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.extras label::before { content: ''; flex: 0 0 22px; height: 22px; border-radius: 6px; border: 2px solid var(--tinta); background: var(--papel); }
.extras input:checked + label::before { background: var(--amarillo); }
.extras input:checked + label::after { content: ''; position: absolute; left: 8px; top: 50%; width: 6px; height: 11px; border: solid var(--tinta); border-width: 0 3px 3px 0; transform: translateY(-65%) rotate(45deg); }
.extras input:focus-visible + label::before { outline: 3px solid var(--tinta); outline-offset: 2px; }
.extras label span:first-child { flex: 1; }
.hoja-pie { margin-top: auto; padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--raya); display: flex; align-items: center; gap: 12px; background: var(--papel); }
.cantidad { display: flex; align-items: center; border: 2px solid var(--tinta); border-radius: 16px; }
.cantidad button { width: 44px; height: 48px; border: none; background: none; font-size: 20px; font-weight: 800; }
.cantidad span { min-width: 20px; text-align: center; font-weight: 800; }
.boton-sticker { flex: 1; min-height: 56px; border-radius: 16px; border: 2px solid var(--tinta); background: var(--amarillo); box-shadow: var(--sombra); color: var(--tinta); font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; }
.boton-sticker:disabled { background: var(--raya-2); box-shadow: none; border-color: var(--raya); color: var(--tinta-2); cursor: not-allowed; }

/* Tu pedido (dentro de la hoja en teléfono, en la columna en computadora) */
.pedido { position: relative; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.lateral .cerrar { display: none; }
.pedido h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; }
.pedido-sub { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.renglones { list-style: none; margin: 12px 0 0; padding: 0; }
.renglon { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--raya-2); }
.renglon .foto-sticker { flex: 0 0 58px; padding: 3px; border-radius: 16px; box-shadow: none; transform: rotate(-4deg); }
.renglon:nth-child(even) .foto-sticker { transform: rotate(3deg); }
.renglon .foto-sticker img { border-radius: 12px; }
.renglon-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.renglon-texto span { font-size: 13px; color: var(--tinta-2); }
.quitar { align-self: flex-start; min-height: 44px; min-width: 44px; margin-left: -8px; padding: 0 8px; border: none; background: none; font-size: 12.5px; font-weight: 700; color: var(--tinta-2); text-decoration: underline; }
.vacio { margin: 16px 0 0; color: var(--tinta-2); }
.pedido .etiqueta { display: block; margin: 20px 0 8px; padding: 0; font-size: 15px; font-weight: 800; }
.pedido fieldset { margin: 0; padding: 0; border: none; }
.campo { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--tinta); background: var(--blanco-sticker); color: var(--tinta); font: inherit; font-size: 16px; font-weight: 700; }
.aviso-campo { margin: 6px 0 0; min-height: 1.2em; font-size: 13px; font-weight: 700; }
.opciones-recoger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.opciones-recoger .opcion label { padding: 6px 4px; font-size: 14px; }
.total { margin-top: 26px; padding-top: 16px; border-top: 2px dashed var(--tinta); display: flex; align-items: baseline; justify-content: space-between; font-weight: 800; }
.total .cifra { font-size: 32px; }
.nota-pago { margin: 6px 0 0; font-size: 13px; color: var(--tinta-2); }
.mandar { margin-top: 18px; width: 100%; min-height: 60px; font-size: 17px; }
.razon { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--tinta-2); text-align: center; }
.enviado { margin-top: 18px; padding: 12px 14px; border: 2px dashed var(--tinta); border-radius: 14px; font-size: 13.5px; font-weight: 600; }
.enviado p { margin: 0; }
.boton-texto { min-height: 44px; padding: 0; border: none; background: none; font-weight: 800; text-decoration: underline; }

/* Computadora: el pedido vive en una columna fija */
.lateral { display: none; }
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .barra { padding: 0 48px; height: 80px; border-bottom: 1px solid var(--raya); }
  .contenido { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; padding: 0 48px; }
  .estado, .portada, .destacado, .aviso-fotos, .error-menu, .aviso-cerrado { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .pestanas { padding: 0; top: 80px; }
  .familia { padding-left: 0; padding-right: 0; scroll-margin-top: 140px; }
  .rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 24px; }
  .pie { padding-left: 0; }
  .lateral { display: block; position: sticky; top: 104px; align-self: start; margin-top: 32px; border: 2px solid var(--tinta); border-radius: 24px; box-shadow: 5px 6px 0 var(--tinta); background: var(--blanco-sticker); max-height: calc(100dvh - 128px); overflow-y: auto; }
  .barra-pedido { display: none !important; }
  .hoja { margin: auto; border: 2px solid var(--tinta); border-radius: 28px; }
}

/* Movimiento: sutil, y nada si la persona pidió reducirlo */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hoja[open] { animation: subir 260ms var(--curva); }
  .hoja[open]::backdrop { animation: aparecer 260ms ease-out; }
  .tarjeta { animation: entrar 420ms var(--curva) both; animation-delay: calc(var(--i, 0) * 45ms); }
  .tarjeta:active .foto-sticker { transform: rotate(0deg) scale(.97); }
  .boton-sticker:active, .boton-tinta:active, .barra-ir:active { transform: translate(2px, 3px); box-shadow: none; }
  .pop { animation: pop 380ms var(--curva); }
}
@keyframes subir { from { transform: translateY(48px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes entrar { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: rotate(10deg) scale(1); } 40% { transform: rotate(-6deg) scale(1.25); } 100% { transform: rotate(10deg) scale(1); } }
