/* El Carrito · carta digital (demo de Kabetek). Diseño propio: las fotos mandan. */
:root {
  --brasa: #FF5B14;
  --brasa-osc: #E2470A;
  --carbon: #1B1410;
  --crema: #FFF4E6;
  --mostaza: #FFB800;
  --blanco: #FFFFFF;
  --suave: #7A6556;
  --linea: #F0E2D0;
  --sombra: 0 2px 4px rgb(27 20 16 / 6%), 0 12px 28px rgb(27 20 16 / 10%);
  --radio: 26px;
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--crema); color: var(--carbon); font: 500 16px/1.45 Rubik, system-ui, sans-serif; overflow-x: clip; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
.envoltura { max-width: 1120px; margin: 0 auto; padding-inline: max(16px, 4vw); }
:focus-visible { outline: 3px solid var(--mostaza); outline-offset: 3px; }

/* Aviso demo */
.aviso-demo { background: var(--carbon); color: #FFE9D6; font-size: 13px; text-align: center; padding: 7px 12px; }
.aviso-demo a { color: var(--mostaza); font-weight: 700; }

/* Barra superior */
.barra { position: sticky; top: 0; z-index: 30; background: var(--blanco); box-shadow: 0 1px 0 var(--linea); }
.barra .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.marca { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; }
.marca .sello { width: 46px; height: 46px; border-radius: 50%; background: var(--carbon); color: var(--brasa); display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: -.02em; box-shadow: inset 0 -4px 0 var(--brasa); }
.marca b { display: block; font-size: 20px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.marca small { color: var(--suave); font-size: 13px; }
.acciones { display: flex; align-items: center; gap: 8px; }
.moneda { display: inline-flex; background: var(--crema); border-radius: 999px; padding: 3px; }
.moneda button { border: 0; background: none; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--suave); }
.moneda button[aria-pressed="true"] { background: var(--carbon); color: var(--blanco); }
.bolsa { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--brasa); color: var(--blanco); font-weight: 800; padding: 11px 16px; border-radius: 999px; }
.bolsa svg { width: 20px; height: 20px; }
.bolsa .num { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--mostaza); color: var(--carbon); font-size: 12px; display: grid; place-items: center; padding: 0 5px; }
.bolsa .num[hidden] { display: none; }
@media (max-width: 420px) { .bolsa span.texto { display: none; } .marca small { display: none; } }

/* Portada */
.portada { background: var(--brasa); color: var(--blanco); position: relative; overflow: hidden; }
.portada .envoltura { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: 12px; padding-block: 34px 70px; }
.portada h1 { margin: 0; font-size: clamp(40px, 9vw, 76px); line-height: .95; font-weight: 900; letter-spacing: -.035em; }
.portada h1 em { font-style: normal; color: var(--carbon); }
.portada p { margin: 16px 0 0; font-size: 18px; max-width: 420px; font-weight: 500; }
.estado { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.estado span { background: rgb(0 0 0 / 16%); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.estado .abierto::before { content: "● "; color: #86EFAC; }
.estado .cerrado::before { content: "● "; color: #FFD0C0; }
.plato-portada { position: relative; justify-self: center; width: min(100%, 420px); aspect-ratio: 1; border-radius: 50%; background: var(--blanco); box-shadow: 0 30px 60px rgb(90 25 0 / 35%); display: grid; place-items: center; border: 0; padding: 0; }
.plato-portada img { width: 86%; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.plato-portada:hover img { transform: scale(1.05) rotate(-2deg); }
.plato-portada .precio-pegatina { position: absolute; right: 2%; top: 8%; width: 96px; height: 96px; border-radius: 50%; background: var(--mostaza); color: var(--carbon); display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 22px; line-height: 1; transform: rotate(10deg); box-shadow: var(--sombra); }
.plato-portada .precio-pegatina small { display: block; font-size: 12px; font-weight: 700; }
.ola { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; color: var(--crema); }
@media (max-width: 700px) {
  .portada .envoltura { grid-template-columns: minmax(0, 1fr); padding-block: 26px 64px; }
  .plato-portada { width: 74%; order: -1; }
  .plato-portada .precio-pegatina { width: 78px; height: 78px; font-size: 18px; }
}

/* Secciones */
.seccion { padding-block: 34px 10px; }
.seccion h2 { margin: 0 0 18px; font-size: clamp(28px, 5vw, 40px); font-weight: 900; letter-spacing: -.03em; line-height: 1; }

/* Categorías: tarjetas grandes con foto */
.categorias { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; position: relative; }
.categoria { background: var(--blanco); border: 0; border-radius: var(--radio); padding: 14px 14px 18px; box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s; }
.categoria:hover { transform: translateY(-8px); box-shadow: 0 4px 8px rgb(27 20 16 / 8%), 0 24px 40px rgb(27 20 16 / 16%); }
.categoria img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.categoria:hover img { transform: translateY(-10px) scale(1.1) rotate(-4deg); }
.categoria b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.categoria small { color: var(--suave); font-size: 14px; }
.fondo-ola { background: radial-gradient(120% 60% at 50% 100%, var(--mostaza) 0 48%, transparent 48.3%); }
@media (max-width: 760px) { .categorias { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .categoria b { font-size: 18px; } }

/* Lo más pedido: carrusel */
.carrusel-caja { position: relative; }
.carrusel { display: flex; gap: 14px; overflow-x: auto; padding: 14px 4px 22px; margin-top: -10px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; cursor: grab; -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 70px), transparent); }
.carrusel.arrastrando { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.carrusel.al-final { -webkit-mask-image: none; mask-image: none; }
.flecha { position: absolute; top: 42%; z-index: 3; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--carbon); color: var(--blanco); display: grid; place-items: center; box-shadow: var(--sombra); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.flecha:hover { transform: scale(1.1); }
.flecha svg { width: 22px; height: 22px; }
.flecha.izq { left: -12px; }
.flecha.der { right: -12px; }
.flecha[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .flecha { display: none; } }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel .producto { flex: 0 0 220px; scroll-snap-align: start; }

/* Productos */
.productos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.producto { position: relative; background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 12px 14px 16px; display: flex; flex-direction: column; border: 0; text-align: left; cursor: pointer; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s; }
.producto:hover { transform: translateY(-6px); box-shadow: 0 4px 8px rgb(27 20 16 / 8%), 0 22px 36px rgb(27 20 16 / 15%); }
.producto img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.producto:hover img { transform: translateY(-8px) scale(1.08) rotate(-3deg); }
.mas { transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.mas:hover { transform: scale(1.12) rotate(90deg); }
.producto b { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.producto .desc { color: var(--suave); font-size: 14px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.producto .pie { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.precio { font-weight: 900; font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mas { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--brasa); color: var(--blanco); font-size: 26px; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 14px rgb(255 91 20 / 35%); flex: none; }
.mas.ok { background: #16A34A; box-shadow: none; }
.etiqueta { position: absolute; top: 12px; left: 12px; background: var(--mostaza); color: var(--carbon); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.etiqueta.picante { background: #DC2626; color: #fff; }
@media (max-width: 760px) { .productos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .producto b { font-size: 16px; } .precio { font-size: 18px; } .mas { width: 38px; height: 38px; } }

/* Vista de categoría */
.cabeza-cat { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.volver { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--blanco); box-shadow: var(--sombra); display: grid; place-items: center; flex: none; }
.volver svg { width: 22px; height: 22px; }
.cabeza-cat h2 { margin: 0; }
.cabeza-cat p { margin: 4px 0 0; color: var(--suave); }
.pestanas { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { flex: none; border: 0; background: var(--blanco); border-radius: 999px; padding: 9px 16px; font-weight: 700; box-shadow: 0 1px 0 var(--linea); }
.pestanas button[aria-current="true"] { background: var(--carbon); color: var(--blanco); }

.vista { animation: entra .35s ease both; }
.escalonado > * { animation: rebota .6s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * 70ms + 60ms); }
@keyframes rebota { from { opacity: 0; transform: translateY(40px) scale(.9); } to { opacity: 1; transform: none; } }
.cabeza-cat h2 { animation: desliza .5s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes desliza { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.volando { position: fixed; z-index: 80; pointer-events: none; object-fit: contain; }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Hoja inferior (producto, pedido) */
.velo { position: fixed; inset: 0; z-index: 50; background: rgb(27 20 16 / 55%); display: flex; align-items: flex-end; justify-content: center; }
.velo[hidden] { display: none; }
.hoja { width: min(560px, 100%); max-height: 94vh; overflow-y: auto; background: var(--blanco); border-radius: 30px 30px 0 0; padding: 10px 20px max(22px, env(safe-area-inset-bottom)); animation: sube .3s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes sube { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { .velo { align-items: center; } .hoja { border-radius: 30px; } }
.asa { width: 44px; height: 5px; border-radius: 3px; background: var(--linea); margin: 4px auto 8px; }
.cerrar { position: sticky; top: 0; float: right; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--crema); font-size: 22px; z-index: 2; }
.hoja .foto-grande { width: 78%; margin: 0 auto; }
.hoja h3 { margin: 6px 0 0; font-size: 28px; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.hoja .desc { color: var(--suave); margin: 8px 0 0; }
.hoja .precios { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.hoja .precios .otro { color: var(--suave); font-weight: 600; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.opciones label { position: relative; }
.opciones input { position: absolute; opacity: 0; }
.opciones span { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--crema); font-weight: 700; }
.opciones input:checked + span { background: var(--carbon); color: var(--blanco); }
.opciones input:focus-visible + span { outline: 3px solid var(--mostaza); }
.fila-agregar { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.cantidad { display: inline-flex; align-items: center; gap: 4px; background: var(--crema); border-radius: 999px; padding: 4px; }
.cantidad button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blanco); font-size: 20px; font-weight: 800; }
.cantidad b { min-width: 28px; text-align: center; font-size: 18px; }
.boton { flex: 1; min-height: 54px; border: 0; border-radius: 999px; background: var(--brasa); color: var(--blanco); font-weight: 800; font-size: 17px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.boton:hover { background: var(--brasa-osc); }
.boton.wa { background: #25D366; color: #06311a; width: 100%; }
.boton.claro { background: var(--crema); color: var(--carbon); width: 100%; margin-top: 10px; }

/* Pedido */
.linea { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.linea img { width: 64px; height: 64px; object-fit: contain; background: var(--blanco); border-radius: 14px; }
.linea small { display: block; color: var(--suave); }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 22px; font-weight: 900; padding: 14px 0 2px; }
.total small { font-size: 14px; color: var(--suave); font-weight: 600; }
.campos { display: grid; gap: 12px; margin: 14px 0; }
.campos label { display: grid; gap: 5px; font-weight: 700; font-size: 14px; }
.campos input, .campos select { font: inherit; border: 2px solid var(--linea); border-radius: 14px; padding: 12px; background: var(--blanco); }
.campos input:focus, .campos select:focus { outline: none; border-color: var(--brasa); }
.burbuja { white-space: pre-wrap; background: #DCF8C6; border-radius: 16px 16px 4px 16px; padding: 14px; font-size: 14px; margin: 14px 0; box-shadow: 0 2px 6px rgb(0 0 0 / 10%); }

/* Barra de pedido flotante */
.barra-pedido { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; width: min(520px, calc(100% - 28px)); border: 0; border-radius: 999px; background: var(--carbon); color: var(--blanco); display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 22px; box-shadow: 0 16px 34px rgb(27 20 16 / 35%); font-weight: 700; }
.barra-pedido[hidden] { display: none; }
.barra-pedido .ir { background: var(--brasa); border-radius: 999px; padding: 12px 18px; font-weight: 800; }
.tasa { color: var(--suave); font-size: 13px; text-align: center; padding: 24px 16px 110px; }
.tasa a { color: var(--carbon); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .carrusel { scroll-behavior: auto; } }
