/* Rutapeo · Carta QR. Móvil primero (375px). */
:root {
  --botella: #12372A; --hondo: #0B261D; --claro: #1E4D3C;
  --oro: #C9A24B; --oro-claro: #E6CF8F; --vermu: #9E1B32;
  --texto: #F3F5F1; --texto-2: #CFD9D2; --apagado: #93A89C; --linea: rgba(230, 207, 143, .16);
  --planito: #6f63ff; --planito-verde: #12b886;
  --f-display: "Gloock", Georgia, serif; --f-texto: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--hondo); color: var(--texto); font: 16px/1.5 var(--f-texto); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { font: inherit; }
a { color: var(--oro-claro); }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.demo-aviso { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: var(--planito); color: #fff; font-size: .8rem; text-align: center; padding: 6px 12px; }
.demo-aviso a { color: #fff; font-weight: 700; }

/* ---------- Portada del bar ---------- */
.c-cab { position: relative; min-height: 300px; display: flex; align-items: flex-end; overflow: hidden; }
.c-cab > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.c-cab::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 38, 29, .35) 0%, transparent 25%, rgba(11, 38, 29, .55) 55%, var(--hondo) 100%); }
.c-cab-texto { position: relative; z-index: 1; width: 100%; padding: 0 16px 16px; }
.c-cab h1 { margin: 0; font: 400 2.4rem/1.02 var(--f-display); color: var(--oro-claro); text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.c-cab-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--texto-2); font-size: .9rem; }
.c-cab-meta span, .c-cab-meta a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.c-cab-meta a { color: var(--oro-claro); font-weight: 600; }
.c-mesa { position: absolute; z-index: 2; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--oro); color: var(--hondo); font-weight: 700; font-size: .92rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }

/* ---------- Banner de puntos ---------- */
.c-puntos { display: flex; align-items: center; gap: 12px; margin: 4px 16px 0; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, var(--oro), #B48A35); color: var(--hondo); text-decoration: none; box-shadow: 0 10px 24px -14px rgba(201, 162, 75, .8); }
.c-puntos i { font-size: 1.6rem; }
.c-puntos strong { display: block; line-height: 1.2; }
.c-puntos span { font-size: .84rem; opacity: .85; }
.c-puntos b { margin-left: auto; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: rgba(11, 38, 29, .14); }

/* ---------- Lo más pedido (carrusel) ---------- */
.c-top-bloque { padding: 22px 0 4px; }
.c-top-bloque h2 { margin: 0 16px 10px; font: 400 1.5rem var(--f-display); color: var(--oro-claro); }
.c-carril { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
.c-carril::-webkit-scrollbar { display: none; }
.c-top { position: relative; flex: 0 0 70%; max-width: 260px; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; scroll-snap-align: start; background: var(--claro); }
.c-top img { width: 100%; height: 100%; object-fit: cover; }
.c-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(5, 18, 13, .92)); }
.c-top-info { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 4px; }
.c-top-info strong { font-size: 1.05rem; line-height: 1.2; }
.c-top-info span { font-weight: 700; color: var(--oro-claro); }
.c-top .c-mas { right: 10px; bottom: 10px; z-index: 2; }

/* ---------- Categorías ---------- */
.c-cats { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; background: rgba(11, 38, 29, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); scrollbar-width: none; border-bottom: 1px solid var(--linea); }
.c-cats::-webkit-scrollbar { display: none; }
.c-cats a { flex: 0 0 auto; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--linea); color: var(--texto-2); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background .2s, color .2s; }
.c-cats a small { opacity: .65; font-weight: 500; }
.c-cats a.on { background: var(--oro); border-color: var(--oro); color: var(--hondo); }

/* ---------- Platos ---------- */
.c-seccion { padding: 4px 16px; scroll-margin-top: 66px; }
.c-seccion h2 { font: 400 1.6rem var(--f-display); color: var(--oro-claro); margin: 20px 0 8px; }
.c-plato { display: grid; grid-template-columns: 1fr 112px; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.c-plato.sin-foto { grid-template-columns: 1fr auto; align-items: center; }
.c-plato h3 { margin: 0; font-size: 1.04rem; line-height: 1.25; }
.c-etiqueta { display: inline-block; margin: 6px 0 0; padding: 2px 8px; border-radius: 999px; background: var(--vermu); color: #fff; font-size: .72rem; font-weight: 700; }
.c-plato p { margin: 4px 0 8px; color: var(--apagado); font-size: .9rem; }
.c-alerg { display: flex; flex-wrap: wrap; gap: 4px; }
.c-alerg span { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--texto-2); font-size: .72rem; }
.c-precio { margin-top: 8px; font-weight: 700; font-size: 1.05rem; color: var(--oro-claro); font-variant-numeric: tabular-nums; }
.c-foto { position: relative; width: 112px; height: 112px; border-radius: 18px; overflow: hidden; background: var(--claro); }
.c-foto img { width: 100%; height: 100%; object-fit: cover; }
.c-mas { position: absolute; right: 6px; bottom: 6px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--oro); color: var(--hondo); font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); transition: transform .15s; }
.c-mas:active { transform: scale(.9); }
.c-plato.sin-foto .c-mas { position: static; }
.c-cant { position: absolute; left: 6px; top: 6px; z-index: 2; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--vermu); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; border: 2px solid var(--hondo); }
.c-cant[hidden] { display: none; }
.c-plato.sin-foto .c-acciones { position: relative; }
.c-plato.sin-foto .c-cant { left: -10px; top: -8px; }
.c-pop { animation: cpop .35s ease; }
@keyframes cpop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.c-agotado { opacity: .45; }
.c-agotado .c-mas { display: none; }

.c-pie { padding: 28px 16px 130px; text-align: center; color: var(--apagado); font-size: .85rem; display: grid; gap: 8px; justify-items: center; }
.c-pie .planito { display: inline-flex; align-items: center; gap: 6px; color: #b9b2ff; font-weight: 600; text-decoration: none; }

/* ---------- Barra de pedido ---------- */
.c-barra { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; transform: translateY(140%); transition: transform .25s ease; }
.c-barra.on { transform: none; }
.c-barra button { width: 100%; min-height: 58px; border: 0; border-radius: 999px; background: var(--oro); color: var(--hondo); font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 20px; cursor: pointer; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.c-barra .num { min-width: 30px; height: 30px; border-radius: 999px; background: var(--hondo); color: var(--oro-claro); display: grid; place-items: center; font-size: .9rem; }
.c-barra .total { margin-left: auto; padding: 10px 16px; border-radius: 999px; background: rgba(11, 38, 29, .14); }

/* ---------- Hoja inferior (pedido / confirmación) ---------- */
.c-hoja-fondo { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .6); display: none; }
.c-hoja-fondo.on { display: block; }
.c-hoja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 88vh; overflow-y: auto; background: var(--botella); border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .25s ease; }
.c-hoja.on { transform: none; }
.c-hoja-asa { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 6px auto 12px; }
.c-hoja h2 { margin: 0 0 4px; font: 400 1.6rem var(--f-display); color: var(--oro-claro); }
.c-linea { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.c-linea-foto { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--claro); display: grid; place-items: center; color: var(--oro); }
.c-linea-foto img { width: 100%; height: 100%; object-fit: cover; }
.c-linea small { display: block; color: var(--apagado); }
.c-stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--linea); border-radius: 999px; }
.c-stepper button { width: 40px; height: 40px; border: 0; background: none; color: var(--oro-claro); font-size: 1.2rem; cursor: pointer; }
.c-stepper span { min-width: 20px; text-align: center; font-weight: 700; }
.c-total { display: flex; justify-content: space-between; padding: 14px 0; font-weight: 700; font-size: 1.15rem; }
.c-nota { width: 100%; min-height: 48px; padding: 12px; font: 16px var(--f-texto); border-radius: 12px; border: 1px solid var(--linea); background: var(--hondo); color: var(--texto); resize: vertical; }
.c-btn { width: 100%; min-height: 54px; border: 0; border-radius: 999px; background: var(--oro); color: var(--hondo); font-weight: 700; font-size: 1.05rem; cursor: pointer; margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.c-btn.suave { background: rgba(230, 207, 143, .12); color: var(--oro-claro); }
.c-btn.planito { background: var(--planito); color: #fff; }
.c-ok { text-align: center; padding: 8px 0; }
.c-ok > i { font-size: 3.2rem; color: var(--planito-verde); }
.c-sello-ganado { margin: 14px 0; padding: 12px; border-radius: 14px; background: rgba(201, 162, 75, .14); color: var(--oro-claro); font-weight: 600; }
.c-legal { font-size: .78rem; color: var(--apagado); text-align: center; margin: 10px 0 0; }

@media (min-width: 700px) {
  main, .c-cats, .c-top-bloque, .c-puntos { max-width: 680px; margin-left: auto; margin-right: auto; }
  .c-cab { min-height: 380px; }
  .c-cab-texto { max-width: 680px; margin: 0 auto; }
  .c-hoja { max-width: 680px; margin: 0 auto; }
}
