/* Carta pública. Un rojo de salsa como campo, harina de fondo, tinta de horno. */
.carta {
  --rojo: #b3261e; --rojo-osc: #8f1d17; --rojo-claro: #fbe9e6;
  --tinta: #1d1815; --tinta2: #5a514b; --fondo: #fbf8f4; --sup: #ffffff; --masa: #f3ece3; --linea: #ebe3d9;
  --verde: #1f6b43; --control: #d6ccc1; --foco: #b3261e; --seleccion: #f6d3cd; --hover: #f5efe8;
  --primario: #b3261e; --primario-hover: #8f1d17; --radio-control: 999px; --seg-fondo: #efe7dd;
  --margen: clamp(16px, 4vw, 32px); --ancho: 1180px;
}
.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 12px; top: 12px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: 8px; }
.cargando { padding: 48px var(--margen); color: var(--tinta2); }

/* ---------- tapa ---------- */
.tapa { background: var(--rojo); color: #fff; position: relative; overflow: hidden; }
.tapa-in { max-width: var(--ancho); margin: 0 auto; padding: clamp(28px, 6vw, 64px) var(--margen) 0; display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 38vw, 460px); align-items: end; gap: 8px; }
.marca { font-size: clamp(64px, 15vw, 168px); font-weight: 900; letter-spacing: -0.045em; line-height: .86; }
.bajada { font-size: clamp(17px, 2.2vw, 22px); margin-top: 18px; max-width: 30ch; font-weight: 500; }
.estado { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; font-weight: 600; }
.estado .punto { display: inline-flex; align-items: center; gap: 8px; }
.estado .punto::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #7ee2a8; box-shadow: 0 0 0 3px rgba(126,226,168,.25); }
.estado .punto.cerrado::before { background: #f6d88f; box-shadow: 0 0 0 3px rgba(246,216,143,.25); }
.estado .suave { color: #fde3df; font-weight: 500; }
.tapa-pizza { align-self: end; margin-bottom: -26%; margin-right: -18%; transform-origin: 50% 50%; animation: girar 120s linear infinite; }
.tapa-pizza .dibujo { filter: drop-shadow(0 18px 30px rgba(60, 8, 4, .35)); }
@keyframes girar { to { transform: rotate(360deg); } }
.tapa-controles { max-width: var(--ancho); margin: 0 auto; padding: 22px var(--margen) 26px; display: flex; flex-wrap: wrap;
  gap: 12px; align-items: center; position: relative; z-index: 1; }
.tapa .seg { background: rgba(255,255,255,.16); }
.tapa .seg button { color: #fff; padding: 9px 16px; font-size: 15px; }
.tapa .seg button[aria-pressed=true] { background: #fff; color: var(--rojo-osc); box-shadow: none; }
.buscador { position: relative; flex: 1 1 220px; max-width: 360px; }
.buscador .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tinta2); }
.buscador input { border-radius: 999px; padding-left: 40px; border: 0; min-height: 42px; background: #fff; }
.mesa-acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.claro { background: #fff; color: var(--rojo-osc); border-color: #fff; }
.btn.claro:hover { background: #fde3df; }
.btn.contorno-claro { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn.contorno-claro:hover { background: rgba(255,255,255,.12); }

.cartel { max-width: var(--ancho); margin: 16px auto 0; padding: 12px var(--margen); font-weight: 600; color: #7a3e06;
  background: #fff4d6; border-radius: 12px; width: calc(100% - 2 * var(--margen)); }

/* ---------- categorías ---------- */
.cats { position: sticky; top: 0; z-index: 20; background: var(--fondo); display: flex; gap: 4px; overflow-x: auto;
  padding: 10px var(--margen); scrollbar-width: none; max-width: 100%; }
.cats::-webkit-scrollbar { display: none; }
.cats.pegada { box-shadow: 0 1px 0 var(--linea), 0 6px 16px rgba(29, 24, 21, .06); }
.cats a { flex: none; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px;
  color: var(--tinta2); transition: background .15s, color .15s; }
.cats a:hover { background: var(--masa); color: var(--tinta); }
.cats a[aria-current=true] { background: var(--tinta); color: #fff; }
@media (min-width: 1100px) { .cats { justify-content: center; } }

/* ---------- cuerpo ---------- */
.cuerpo { max-width: var(--ancho); margin: 0 auto; padding: 8px var(--margen) 120px; display: grid; gap: 40px;
  grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .cuerpo { grid-template-columns: minmax(0, 1fr) 360px; } }
main:focus { outline: none; }

.seccion { padding-top: 40px; scroll-margin-top: 64px; }
.seccion h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.seccion > p { color: var(--tinta2); margin-top: 6px; font-size: 16px; }
.lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px 24px; margin-top: 20px; }

.plato { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px;
  margin: 0 -10px; border-radius: 16px; cursor: pointer; transition: background .15s; text-align: left; border: 0;
  background: transparent; width: calc(100% + 20px); }
.plato:hover { background: var(--masa); }
.plato .foto { width: 92px; height: 92px; border-radius: 14px; background: var(--masa); overflow: hidden; display: grid; place-items: center; }
.plato:hover .foto { background: #ebe1d4; }
.plato .foto img { width: 100%; height: 100%; object-fit: cover; }
.plato .foto .dibujo { width: 84%; transition: transform .3s ease; }
.plato:hover .foto .dibujo { transform: rotate(-8deg) scale(1.04); }
.plato h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.plato .desc { color: var(--tinta2); font-size: 14px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plato .precio { margin-top: 6px; font-weight: 700; font-size: 16px; }
.plato .mas { width: 40px; height: 40px; border-radius: 50%; background: var(--rojo); color: #fff; display: grid; place-items: center; transition: transform .15s, background .15s; }
.plato:hover .mas { background: var(--rojo-osc); transform: scale(1.06); }
.plato .cant { min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px; background: var(--tinta); color: #fff; display: grid; place-items: center; font-weight: 700; }
.plato.agotado { cursor: default; }
.plato.agotado:hover { background: transparent; }
.plato.agotado h3, .plato.agotado .precio { color: #8b827b; }
.plato.agotado .foto { filter: grayscale(1); opacity: .55; }
.plato .nodisp { font-size: 13px; font-weight: 600; color: #8b827b; }

/* recomendadas */
.recomendadas { padding-top: 36px; }
.recomendadas h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.fila-rec { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; margin-top: 20px;
  padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rec { scroll-snap-align: start; border: 0; text-align: left; cursor: pointer; background: var(--masa); border-radius: 20px; padding: 18px;
  display: grid; gap: 10px; transition: background .2s; }
.rec:hover { background: #ebe1d4; }
.rec .dibujo { width: 72%; margin: 0 auto; transition: transform .5s ease; }
.rec:hover .dibujo { transform: rotate(24deg); }
.rec h3 { font-size: 19px; font-weight: 800; }
.rec .precio { font-weight: 700; }

/* ---------- pedido (lateral y hoja) ---------- */
.lateral { display: none; }
@media (min-width: 1100px) {
  .lateral { display: block; position: sticky; top: 76px; align-self: start; margin-top: 40px; background: var(--sup);
    border-radius: 20px; padding: 20px; max-height: calc(100vh - 96px); overflow: auto; box-shadow: 0 1px 0 var(--linea), 0 0 0 1px var(--linea); }
}
.pedido h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pedido .vacio { color: var(--tinta2); margin-top: 10px; }
.renglones { display: grid; gap: 12px; margin-top: 14px; }
.renglon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.renglon .nom { font-weight: 600; }
.renglon .det { color: var(--tinta2); font-size: 13px; grid-column: 1; }
.renglon .imp { font-weight: 600; text-align: right; }
.paso { display: inline-flex; align-items: center; gap: 2px; border-radius: 999px; background: var(--masa); }
.paso button { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.paso button:hover { background: #e4d8ca; }
.paso button .ico { width: 16px; height: 16px; }
.paso span { min-width: 22px; text-align: center; font-weight: 700; }
.totales { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--control); }
.totales div { display: flex; justify-content: space-between; }
.totales .total { font-size: 20px; font-weight: 800; }

.form-pedido { display: grid; gap: 16px; margin-top: 20px; }
.form-pedido h3 { font-size: 17px; font-weight: 700; }
.opciones-chip { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--control); background: var(--sup); border-radius: 999px; padding: 8px 14px; font-weight: 600;
  font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--tinta2); }
.chip[aria-pressed=true] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.nota-campo { font-size: 13px; color: var(--tinta2); }
.error-form { color: var(--rojo); font-weight: 600; font-size: 14px; }

.barra-pedido { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); border: 0;
  background: var(--rojo); color: #fff; border-radius: 999px; min-height: 58px; padding: 0 10px 0 22px; display: flex; align-items: center;
  justify-content: space-between; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(143, 29, 23, .35);
  max-width: 560px; margin: 0 auto; animation: dlg-entra .25s ease-out; }
.barra-pedido .cuenta { background: #fff; color: var(--rojo-osc); border-radius: 999px; padding: 8px 16px; }
@media (min-width: 1100px) { .barra-pedido { display: none; } }

/* hoja del plato */
.dlg.hoja { width: min(560px, 100vw); }
@media (max-width: 640px) {
  .dlg.hoja, .dlg.pedido-hoja { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; max-height: 94dvh; }
  .dlg.hoja[open], .dlg.pedido-hoja[open] { animation: sube .25s ease-out; }
}
@keyframes sube { from { transform: translateY(40px); opacity: .4; } }
.hoja-foto { background: var(--masa); display: grid; place-items: center; padding: 22px 0 10px; position: relative; }
.hoja-foto .dibujo { width: min(260px, 64vw); transition: transform .5s ease; }
.hoja-foto img { width: 100%; max-height: 300px; object-fit: cover; }
.hoja-foto .cerrar { position: absolute; top: 12px; right: 12px; background: #fff; }
.hoja-cuerpo { padding: 20px 22px 22px; display: grid; gap: 16px; }
.hoja-cuerpo h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.hoja-cuerpo .desc { color: var(--tinta2); margin-top: 4px; }
.mitades { display: grid; gap: 10px; }
.mitades .lista-mitad { display: flex; flex-wrap: wrap; gap: 8px; max-height: 172px; overflow: auto; padding: 2px; }
.grupo-op { display: grid; gap: 8px; }
.grupo-op h3, .mitades h3 { font-size: 16px; font-weight: 700; }
.grupo-op small, .mitades small { color: var(--tinta2); font-weight: 500; }
.hoja-pie { display: flex; gap: 12px; align-items: center; }
.hoja-pie .btn { flex: 1; }
.paso.grande button { width: 44px; height: 44px; }
.paso.grande span { min-width: 28px; font-size: 18px; }

.dlg.pedido-hoja { width: min(560px, 100vw); }
.pedido-hoja .pedido { padding: 22px; }

/* listo */
.listo-cuerpo { padding: 26px 22px; display: grid; gap: 16px; }
.listo-cuerpo h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.burbuja { background: #e7f6dd; border-radius: 14px 14px 14px 4px; padding: 12px 14px; white-space: pre-wrap; font-size: 14px;
  max-height: 260px; overflow: auto; color: #1d2a17; }
.btn.wa { background: #1f6b43; border-color: #1f6b43; color: #fff; }
.btn.wa:hover { background: #185436; }

/* seguimiento */
.seguir { max-width: 640px; margin: 0 auto; padding: 32px var(--margen) 80px; }
.seguir h2 { font-size: clamp(30px, 6vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.seguir .grande-hora { font-size: 20px; font-weight: 600; margin-top: 8px; }
.pasos { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 0; }
.pasos li { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: start; padding-bottom: 22px; position: relative; }
.pasos li::before { content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--linea); }
.pasos li:last-child::before { display: none; }
.pasos .marca-paso { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--control); background: var(--sup); display: grid; place-items: center; z-index: 1; }
.pasos li.hecho .marca-paso { background: var(--verde); border-color: var(--verde); color: #fff; }
.pasos li.actual .marca-paso { border-color: var(--rojo); box-shadow: 0 0 0 4px var(--rojo-claro); }
.pasos li.actual .marca-paso::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--rojo); animation: latir 1.4s ease-in-out infinite; }
@keyframes latir { 50% { transform: scale(.6); opacity: .6; } }
.pasos .t { font-weight: 700; font-size: 17px; }
.pasos .s { color: var(--tinta2); font-size: 14px; }
.pasos .h { color: var(--tinta2); font-size: 14px; }
.pasos li:not(.hecho):not(.actual) .t { color: #9a918a; }
.caja-seguir { background: var(--sup); border-radius: 18px; padding: 18px; box-shadow: 0 0 0 1px var(--linea); }

/* ---------- pie ---------- */
.pie { background: var(--tinta); color: #f3ece3; }
.pie-in { max-width: var(--ancho); margin: 0 auto; padding: 56px var(--margen) 40px; display: grid; gap: 28px; }
.pie .marca-pie { font-size: clamp(56px, 13vw, 150px); font-weight: 900; letter-spacing: -0.045em; line-height: .86; color: #fff; }
.pie .datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; font-size: 15px; }
.pie .datos h3 { font-size: 13px; font-weight: 600; color: #b8aea5; margin-bottom: 6px; }
.pie .hecho { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #b8aea5; padding-top: 18px; border-top: 1px solid #3a332e; }
.pie .hecho img { height: 18px; width: auto; }
.horas { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; }
.horas .hoy { color: #fff; font-weight: 700; }

@media (max-width: 640px) {
  .tapa-in { grid-template-columns: 1fr 42vw; }
  .tapa-pizza { margin-bottom: -30%; margin-right: -32%; }
  .estado { font-size: 14px; }
  .tapa-controles { padding-top: 18px; }
  .tapa .seg { width: 100%; }
  .tapa .seg button { flex: 1; justify-content: center; padding: 9px 6px; }
  .buscador { max-width: none; }
  .plato { grid-template-columns: 80px minmax(0, 1fr) auto; }
  .plato .foto { width: 80px; height: 80px; }
}
@media (max-width: 420px) {
  .tapa .seg button .ico { display: none; }
  .tapa .seg button { font-size: 14px; }
}
