/* Plantilla "Plancha" del menú del cliente.
   Concepto: "la plancha encendida". Mobile primero: hero en tarjeta con luz cálida, riel de categorías fijo,
   destacados en carrusel, menú por secciones en 2 columnas, barra de pedido flotante y hojas desde abajo.
   Los colores salen de los 3 colores del dueño; el JS calcula fondos, textos y contrastes. */
:root {
  /* Colores del dueño (se reemplazan desde el panel) */
  --marca-fondo: #1B2A6B;
  --marca-primario: #FFFFFF;
  --marca-secundario: #FF5A36;

  /* Derivados (los recalcula aplicarPaleta) */
  --bg: #1B2A6B;
  --bg-hondo: #131f52;
  --sup: #233478;
  --sup-2: #2b3d86;
  --linea: rgba(255,255,255,.12);
  --txt: #FFF8EE;
  --txt-2: rgba(255,248,238,.72);
  --acento: #FFFFFF;      /* acento legible sobre el fondo */
  --pri: #FFFFFF;          /* relleno de botones */
  --sobre-pri: #17120E;    /* texto sobre --pri */
  --sec: #FF5A36;
  --sobre-sec: #17120E;
  --brillo: rgba(255,255,255,.25);
  --sombra: rgba(0,0,0,.45);

  /* Fijos: siempre sobre fondo oscuro fijo */
  --oscuro: #120d0a;
  --sobre-oscuro: #fff7ec;
  --ok: #22c55e;
  --alerta: #ef4444;

  --f-display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --f-texto: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-xl: 28px; --r-l: 22px; --r-m: 16px; --r-s: 12px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ancho: 1180px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--f-texto); font-size: 15px; line-height: 1.45;
  background: var(--bg); color: var(--txt); overflow-x: hidden;
}
body.sin-scroll { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 8px; }
.envoltura { width: 100%; max-width: calc(var(--ancho) + 32px); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.barra.con-sombra { border-bottom-color: var(--linea); box-shadow: 0 10px 30px -18px var(--sombra); }
.barra .envoltura { display: flex; align-items: center; gap: 10px; padding-block: 10px; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; flex: 1; }
.marca-logo { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; background: var(--pri); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px color-mix(in srgb, var(--pri) 55%, transparent), 0 8px 22px -6px var(--brillo); overflow: hidden; }
.marca-logo svg { width: 70%; height: 70%; color: var(--sobre-pri); }
.marca-texto { min-width: 0; display: grid; gap: 2px; }
.marca-nombre { font-family: var(--f-display); font-weight: 900; font-size: 1.45rem; line-height: .95; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--txt-2); }
.estado i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: latido 2s infinite; }
.estado.cerrado i { background: var(--alerta); animation: none; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.barra-nav { display: none; gap: 4px; }
.barra-nav a { color: var(--txt-2); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.barra-nav a:hover { color: var(--txt); background: var(--sup); }
.boton-pedido {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px 8px 10px; border-radius: 999px;
  background: var(--sec); color: var(--sobre-sec); font-weight: 800; font-size: 12.5px; text-decoration: none; border: none;
  box-shadow: 0 8px 20px -8px var(--sec); animation: pulso-pedido 2.4s ease-in-out infinite; white-space: nowrap;
}
.boton-pedido svg { width: 16px; height: 16px; }
@keyframes pulso-pedido { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.boton-carrito {
  position: relative; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--linea);
  background: var(--sup); display: grid; place-items: center; flex-shrink: 0; transition: transform .2s, background .2s;
}
.boton-carrito:hover { transform: translateY(-1px); background: var(--sup-2); }
.boton-carrito svg { width: 22px; height: 22px; }
.boton-carrito b {
  position: absolute; top: -6px; right: -6px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  background: var(--pri); color: var(--sobre-pri); font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--bg); font-variant-numeric: tabular-nums;
}
.boton-carrito b.vacio { display: none; }
.rebote { animation: rebote .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes rebote { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ---------- Hero ---------- */
.hero { padding-top: 14px; }
.hero-tarjeta {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-xl);
  background: var(--oscuro); color: var(--sobre-oscuro); min-height: 430px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 30px 60px -30px var(--sombra), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.hero-foto { position: absolute; inset: 0; z-index: -2; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; transform: scale(1.06); animation: respirar 14s ease-in-out infinite alternate; }
@keyframes respirar { to { transform: scale(1.14) translate(-1.5%, -1%); } }
.hero-tarjeta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 70% at 75% 25%, transparent 0%, rgba(12,8,6,.15) 40%, rgba(12,8,6,.55) 70%),
    linear-gradient(180deg, rgba(12,8,6,.05) 15%, rgba(12,8,6,.55) 52%, rgba(12,8,6,.94) 100%);
}
.hero-contenido { padding: 22px 20px 22px; display: grid; gap: 12px; }
.hero-etiqueta {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero-etiqueta svg { width: 14px; height: 14px; color: #ffb547; }
.hero h1 {
  margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.9rem, 13vw, 5.6rem); line-height: .86; letter-spacing: -.005em; text-wrap: balance;
  text-shadow: 0 6px 30px rgba(0,0,0,.45);
}
.hero h1 em { font-style: normal; color: var(--pri-hero, #ffffff); }
.hero-desc { margin: 0; max-width: 38ch; color: rgba(255,247,236,.86); font-size: 15.5px; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px;
  padding: 14px 22px; font-weight: 800; font-size: 15px; letter-spacing: .01em; text-decoration: none;
  transition: transform .18s, box-shadow .25s, filter .2s; position: relative;
}
.boton svg { width: 18px; height: 18px; }
.boton-pri { background: var(--pri); color: var(--sobre-pri); box-shadow: 0 12px 28px -10px var(--brillo), inset 0 0 0 1px var(--anillo-pri, transparent); }
.boton-pri:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 36px -10px var(--brillo), inset 0 0 0 1px var(--anillo-pri, transparent); filter: brightness(1.05); }
.boton-pri:active:not(:disabled) { transform: translateY(0) scale(.98); }
.boton-pri:disabled { filter: grayscale(.7) brightness(.8); box-shadow: none; }
.boton-vidrio { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.boton-vidrio:hover { background: rgba(255,255,255,.2); }
.ventajas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 0 2px; margin: 0; list-style: none; }
.ventajas::-webkit-scrollbar { display: none; }
.ventajas li { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-m); background: var(--sup); border: 1px solid var(--linea); }
.ventajas .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--pri) 18%, transparent); color: var(--acento); }
.ventajas .ico svg { width: 20px; height: 20px; }
.ventajas b { display: block; font-size: 13.5px; line-height: 1.15; }
.ventajas small { color: var(--txt-2); font-size: 12px; }

/* ---------- Aviso local cerrado ---------- */
.aviso-cerrado {
  margin-top: 14px; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--oscuro); color: var(--sobre-oscuro); border: 1px solid rgba(239,68,68,.45);
  box-shadow: 0 0 0 4px rgba(239,68,68,.1);
}
.aviso-cerrado svg { width: 26px; height: 26px; color: #f87171; flex-shrink: 0; }
.aviso-cerrado b { display: block; }
.aviso-cerrado span { font-size: 13.5px; opacity: .85; }

/* ---------- Buscador + riel de categorías (fijo) ---------- */
.riel {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 66px); z-index: 40; margin-top: 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.riel .envoltura { padding-block: 8px 10px; display: grid; gap: 10px; }
.buscador { position: relative; }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--txt-2); pointer-events: none; }
.buscador input {
  width: 100%; height: 46px; border-radius: 999px; border: 1px solid var(--linea); background: var(--sup);
  color: var(--txt); padding: 0 44px 0 42px; font: inherit; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.buscador input::placeholder { color: var(--txt-2); }
.buscador input:focus { border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 22%, transparent); }
.buscador button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; color: var(--txt-2); display: grid; place-items: center; }
.categorias { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px 0; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.categorias::-webkit-scrollbar { display: none; }
.cat {
  scroll-snap-align: start; flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; height: 42px;
  border-radius: 999px; border: 1px solid var(--linea); background: var(--sup); color: var(--txt); font-weight: 700; font-size: 14px;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.cat .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sup-2); color: var(--acento); transition: background .2s, color .2s; }
.cat .ico svg { width: 18px; height: 18px; }
.cat:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--acento) 50%, var(--linea)); }
.cat[aria-current="true"] { background: var(--pri); color: var(--sobre-pri); border-color: transparent; box-shadow: 0 8px 20px -10px var(--brillo); }
.cat[aria-current="true"] .ico { background: color-mix(in srgb, var(--sobre-pri) 14%, transparent); color: var(--sobre-pri); }

/* ---------- Secciones ---------- */
.seccion { padding-top: 26px; scroll-margin-top: 150px; }
.seccion-cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.seccion-titulo { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 8vw, 2.9rem); line-height: .9; letter-spacing: .005em; }
.seccion-titulo small { display: block; font-family: var(--f-texto); font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--acento); margin-bottom: 6px; }

/* Destacados: carrusel con tarjetas grandes */
.carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 22px; }
.carrusel::-webkit-scrollbar { display: none; }
.destacado {
  scroll-snap-align: start; position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-l); min-height: 300px;
  background: var(--oscuro); color: var(--sobre-oscuro); display: flex; flex-direction: column; justify-content: flex-end; text-align: left;
  border: none; padding: 0; box-shadow: 0 22px 40px -24px var(--sombra); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
.destacado img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.destacado::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(12,8,6,.6) 62%, rgba(12,8,6,.95)); }
.destacado-info { padding: 16px; display: grid; gap: 6px; }
.destacado-nombre { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: 1.9rem; line-height: .9; }
.destacado-desc { font-size: 13px; opacity: .82; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.destacado-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.destacado .precio { font-size: 1.7rem; color: #fff; }
.destacado .mas { width: 44px; height: 44px; }
.cinta { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 5px 10px; border-radius: 999px; background: var(--sec); color: var(--sobre-sec); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 16px -6px var(--sec); }

/* Banda "pedido en vivo" */
.banda {
  margin-top: 28px; position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-l);
  background: var(--pri); color: var(--sobre-pri); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px;
  padding: 18px 8px 18px 18px; box-shadow: 0 20px 40px -24px var(--brillo);
}
.banda::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(115deg, transparent 0 22px, color-mix(in srgb, var(--sobre-pri) 6%, transparent) 22px 44px); }
.banda h3 { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.6rem, 7vw, 2.3rem); line-height: .9; }
.banda p { margin: 6px 0 0; font-size: 13.5px; max-width: 34ch; opacity: .85; }
.banda img { width: 118px; height: auto; filter: drop-shadow(0 12px 16px rgba(0,0,0,.3)); animation: rodar 3s ease-in-out infinite; }
@keyframes rodar { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(-6px,-3px) rotate(-3deg); } }

/* Grilla del menú */
.grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tarjeta {
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; text-align: left;
  border-radius: var(--r-l); background: var(--sup); border: 1px solid var(--linea); padding: 0; color: inherit; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
  --mx: 50%; --my: 0%;
}
.tarjeta::after { /* luz que sigue al puntero */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.14), transparent 45%);
}
.tarjeta-foto { position: relative; aspect-ratio: 1 / .86; overflow: hidden; background: var(--sup-2); }
.tarjeta-foto::before { content: ""; position: absolute; inset: 18% 12% -20%; z-index: 0; background: radial-gradient(closest-side, var(--brillo), transparent); filter: blur(10px); opacity: .0; transition: opacity .4s; }
.tarjeta-foto img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.tarjeta-foto::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.28)); }
.tarjeta-cuerpo { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tarjeta-nombre { font-weight: 800; font-size: 14.5px; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.tarjeta-desc { display: none; }
.tarjeta-pie { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.precio { font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; line-height: 1; color: var(--acento); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mas {
  width: 40px; height: 40px; border-radius: 50%; border: none; flex-shrink: 0; display: grid; place-items: center;
  background: var(--pri); color: var(--sobre-pri); box-shadow: 0 8px 18px -8px var(--brillo), inset 0 0 0 1px var(--anillo-pri, transparent);
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .25s;
}
.mas svg { width: 20px; height: 20px; }
.mas:hover:not(:disabled) { transform: scale(1.1) rotate(90deg); }
.mas:active:not(:disabled) { transform: scale(.92); }
.mas:disabled { background: var(--sup-2); color: var(--txt-2); box-shadow: none; }
.paso { display: inline-flex; align-items: center; background: var(--pri); color: var(--sobre-pri); border-radius: 999px; height: 40px; box-shadow: 0 8px 18px -8px var(--brillo), inset 0 0 0 1px var(--anillo-pri, transparent); }
.paso button { width: 34px; height: 40px; border: none; background: none; color: inherit; display: grid; place-items: center; }
.paso button svg { width: 16px; height: 16px; }
.paso span { min-width: 16px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.sello {
  position: absolute; z-index: 3; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; background: var(--oscuro); color: var(--sobre-oscuro); border: 1px solid rgba(255,255,255,.18);
}
.sello.mejor { background: var(--sec); color: var(--sobre-sec); border-color: transparent; }
.tarjeta.agotado .tarjeta-foto img { filter: grayscale(1) brightness(.7); }
.tarjeta.agotado .precio { color: var(--txt-2); text-decoration: line-through; text-decoration-thickness: 2px; }
.sin-foto { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background:
  radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--pri) 30%, transparent), transparent 70%),
  linear-gradient(160deg, var(--sup-2), var(--bg-hondo)); color: var(--acento); }
.sin-foto svg { width: 46%; height: 46%; filter: drop-shadow(0 8px 18px var(--brillo)); }
.sin-resultados { grid-column: 1 / -1; text-align: center; padding: 36px 12px; color: var(--txt-2); border: 1px dashed var(--linea); border-radius: var(--r-l); }
.sin-resultados b { display: block; color: var(--txt); font-size: 16px; margin-bottom: 4px; }

@media (hover: hover) and (pointer: fine) {
  .tarjeta:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--acento) 45%, var(--linea)); box-shadow: 0 26px 44px -22px var(--sombra), 0 0 0 1px color-mix(in srgb, var(--acento) 20%, transparent); }
  .tarjeta:hover::after { opacity: 1; }
  .tarjeta:hover .tarjeta-foto img { transform: scale(1.08) rotate(-1.5deg); }
  .tarjeta:hover .tarjeta-foto::before { opacity: .9; }
  .destacado:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -24px var(--sombra), 0 0 40px -10px var(--brillo); }
  .destacado:hover img { transform: scale(1.07); }
}

/* ---------- Barra de pedido flotante ---------- */
.barra-pedido {
  position: fixed; z-index: 45; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 20px; border: none; text-align: left;
  background: var(--pri); color: var(--sobre-pri); box-shadow: 0 18px 40px -12px var(--sombra), 0 0 0 1px var(--anillo-pri, transparent) inset, 0 0 40px -12px var(--brillo);
  transform: translateY(140%); transition: transform .45s cubic-bezier(.2,1.2,.3,1); max-width: 560px; margin: 0 auto;
}
.barra-pedido.visible { transform: translateY(0); }
.barra-pedido .cant { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 900; background: color-mix(in srgb, var(--sobre-pri) 14%, transparent); font-variant-numeric: tabular-nums; }
.barra-pedido .txt { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; line-height: 1.1; }
.barra-pedido .txt small { display: block; font-weight: 600; font-size: 12px; opacity: .75; }
.barra-pedido .tot { font-family: var(--f-display); font-weight: 900; font-size: 1.5rem; padding: 6px 12px; border-radius: 12px; background: color-mix(in srgb, var(--sobre-pri) 12%, transparent); font-variant-numeric: tabular-nums; }

/* ---------- Hojas (detalle, carrito) ---------- */
.capa { position: fixed; inset: 0; z-index: 70; background: rgba(8,5,4,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.capa.abierta { opacity: 1; pointer-events: auto; }
.hoja {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--txt); border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.6);
  transform: translateY(105%); transition: transform .42s cubic-bezier(.2,.9,.2,1); overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px); border: 1px solid var(--linea); border-bottom: none;
}
.hoja.abierta { transform: translateY(0); }
.hoja-asa { width: 44px; height: 5px; border-radius: 999px; background: var(--linea); margin: 10px auto 0; flex-shrink: 0; }
.hoja-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
.cerrar {
  position: absolute; top: 12px; right: 12px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(12,8,6,.6); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px);
}
.cerrar svg { width: 18px; height: 18px; }

/* Detalle del producto */
.det-foto { position: relative; margin: 10px 12px 0; border-radius: 22px; overflow: hidden; aspect-ratio: 16/11; background: var(--sup-2); }
.det-foto img { width: 100%; height: 100%; object-fit: cover; }
.det-foto .sin-foto svg { width: 34%; height: 34%; }
.det-cuerpo { padding: 16px 18px 8px; display: grid; gap: 10px; }
.det-nombre { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: 2.2rem; line-height: .9; text-wrap: balance; }
.det-desc { margin: 0; color: var(--txt-2); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.det-precio { font-size: 1.9rem; }
.extras { display: grid; gap: 8px; margin-top: 6px; }
.extras h4 { margin: 4px 0 2px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-2); display: flex; justify-content: space-between; }
.extra { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid var(--linea); background: var(--sup); cursor: pointer; transition: border-color .2s, background .2s; }
.extra input { position: absolute; opacity: 0; pointer-events: none; }
.extra .check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--linea); display: grid; place-items: center; flex-shrink: 0; transition: background .2s, border-color .2s; }
.extra .check svg { width: 14px; height: 14px; opacity: 0; color: var(--sobre-pri); }
.extra > span:not(.check) { flex: 1; font-weight: 600; min-width: 0; }
.extra em { font-style: normal; color: var(--acento); font-weight: 800; font-variant-numeric: tabular-nums; }
.extra:has(input:checked) { border-color: var(--acento); background: color-mix(in srgb, var(--pri) 12%, var(--sup)); }
.extra:has(input:checked) .check { background: var(--pri); border-color: var(--pri); }
.extra:has(input:checked) .check svg { opacity: 1; }
.extra:has(input:focus-visible) { outline: 3px solid var(--acento); outline-offset: 2px; }
.hoja-pie { display: flex; gap: 10px; align-items: center; padding: 12px 16px 14px; border-top: 1px solid var(--linea); background: var(--bg); }
.hoja-pie .boton { flex: 1; }
.cantidad { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--linea); background: var(--sup); height: 50px; }
.cantidad button { width: 44px; height: 50px; border: none; background: none; display: grid; place-items: center; }
.cantidad button svg { width: 18px; height: 18px; }
.cantidad span { min-width: 22px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }

/* Carrito */
.car-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 10px; }
.car-cabeza h2 { margin: 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: 2rem; line-height: 1; }
.car-cabeza .cerrar { position: static; background: var(--sup); color: var(--txt); }
.pasos { display: flex; gap: 6px; padding: 0 18px 12px; }
.pasos i { flex: 1; height: 4px; border-radius: 999px; background: var(--linea); transition: background .3s; }
.pasos i.hecho { background: var(--acento); }
.car-lista { display: grid; gap: 10px; padding: 0 16px; }
.item { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-m); background: var(--sup); border: 1px solid var(--linea); }
.item-foto { width: 62px; height: 62px; border-radius: 14px; overflow: hidden; position: relative; background: var(--sup-2); }
.item-foto img { width: 100%; height: 100%; object-fit: cover; }
.item-foto .sin-foto svg { width: 55%; height: 55%; }
.item-info { min-width: 0; }
.item-info b { display: block; font-size: 14.5px; line-height: 1.2; }
.item-info small { display: block; color: var(--txt-2); font-size: 12.5px; margin-top: 2px; }
.item-info .precio { font-size: 1.2rem; margin-top: 4px; display: block; }
.item .paso { height: 34px; }
.item .paso button { width: 30px; height: 34px; }
.vacio-car { text-align: center; padding: 30px 20px 36px; color: var(--txt-2); display: grid; justify-items: center; gap: 10px; }
.vacio-car svg { width: 64px; height: 64px; color: var(--acento); opacity: .9; }
.vacio-car b { color: var(--txt); font-size: 17px; }
.sumale { padding: 18px 16px 6px; }
.sumale h4 { margin: 0 0 10px; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; }
.sumale-fila { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.sumale-fila::-webkit-scrollbar { display: none; }
.mini { flex: 0 0 138px; border-radius: var(--r-m); background: var(--sup); border: 1px solid var(--linea); overflow: hidden; text-align: left; padding: 0; color: inherit; transition: transform .2s, border-color .2s; }
.mini:hover { transform: translateY(-2px); border-color: var(--acento); }
.mini-foto { height: 84px; position: relative; background: var(--sup-2); }
.mini-foto img { width: 100%; height: 100%; object-fit: cover; }
.mini-foto .sin-foto svg { width: 40%; height: 40%; }
.mini div:last-child { padding: 8px 10px 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mini b { font-size: 12.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .mas { width: 30px; height: 30px; }
.mini .mas svg { width: 16px; height: 16px; }
.totales { padding: 16px 18px 6px; display: grid; gap: 6px; }
.totales div { display: flex; justify-content: space-between; color: var(--txt-2); font-size: 14px; }
.totales div.total { color: var(--txt); font-weight: 800; font-size: 16px; align-items: baseline; }
.totales .total .precio { font-size: 2rem; }

/* Formulario de checkout */
.form { display: grid; gap: 14px; padding: 4px 18px 18px; }
.campo { display: grid; gap: 6px; }
.campo > label, .campo > .etq { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-2); }
.campo input {
  height: 50px; border-radius: 14px; border: 1px solid var(--linea); background: var(--sup); color: var(--txt);
  padding: 0 14px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.campo input:focus { border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 20%, transparent); }
.campo input[aria-invalid="true"] { border-color: var(--alerta); }
.campo .error { color: #fca5a5; font-size: 12.5px; font-weight: 600; min-height: 0; }
.campo .error:empty { display: none; }
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcion { position: relative; display: grid; gap: 4px; padding: 14px; border-radius: var(--r-m); border: 1px solid var(--linea); background: var(--sup); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion svg { width: 24px; height: 24px; color: var(--acento); }
.opcion b { font-size: 14.5px; }
.opcion small { color: var(--txt-2); font-size: 12px; line-height: 1.3; }
.opcion:has(input:checked) { border-color: var(--acento); background: color-mix(in srgb, var(--pri) 12%, var(--sup)); box-shadow: 0 0 0 1px var(--acento) inset; }
.opcion:has(input:focus-visible) { outline: 3px solid var(--acento); outline-offset: 2px; }
.resumen-corto { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-radius: var(--r-m); background: var(--sup); border: 1px solid var(--linea); }
.resumen-corto span { color: var(--txt-2); font-size: 13.5px; }
.resumen-corto .precio { font-size: 1.8rem; }

/* Pedido confirmado */
.listo { padding: 10px 22px 22px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.listo-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #06240f; box-shadow: 0 0 0 10px rgba(34,197,94,.15), 0 0 40px rgba(34,197,94,.5); animation: aparecer-listo .6s cubic-bezier(.3,1.6,.5,1); }
.listo-ico svg { width: 42px; height: 42px; }
@keyframes aparecer-listo { from { transform: scale(.4); opacity: 0; } }
.listo h2 { margin: 6px 0 0; font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: 2.4rem; line-height: .9; }
.listo p { margin: 0; color: var(--txt-2); max-width: 34ch; }
.codigo { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .08em; padding: 8px 16px; border-radius: 12px; border: 1px dashed var(--acento); color: var(--acento); }

/* Espacio final para que la barra flotante del pedido no tape los últimos productos */
main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Pie (no se usa) ---------- */
.pie { margin-top: 48px; padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.pie .envoltura { border-top: 1px solid var(--linea); padding-block: 22px 0; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; color: var(--txt-2); font-size: 13px; }
.pie .marca-nombre { font-size: 1.2rem; color: var(--txt); }

/* Aviso flotante */
.aviso { position: fixed; z-index: 95; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 74px); transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--oscuro); color: var(--sobre-oscuro); padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); transition: opacity .25s, transform .3s cubic-bezier(.2,1.3,.3,1); white-space: nowrap; max-width: calc(100% - 32px); }
.aviso svg { width: 18px; height: 18px; color: var(--ok); flex-shrink: 0; }
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tablet / escritorio ---------- */
@media (min-width: 640px) {
  .grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .carrusel { grid-auto-columns: 46%; }
  .tarjeta-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--txt-2); font-size: 13px; }
  .hero-contenido { padding: 34px 32px; }
}
@media (min-width: 960px) {
  .barra-nav { display: flex; }
  .marca { flex: 0 1 auto; margin-right: auto; }
  .hero-tarjeta { min-height: 520px; justify-content: center; }
  .hero-contenido { max-width: 58%; padding: 48px 52px; }
  .hero-foto img { object-position: 70% 45%; }
  .ventajas { gap: 12px; }
  .riel .envoltura { grid-template-columns: 340px 1fr; align-items: center; }
  .categorias { margin: 0; padding-inline: 0; }
  .grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .carrusel { grid-auto-columns: calc((100% - 28px) / 3); margin: 0; padding-inline: 0; }
  .destacado { min-height: 360px; }
  .tarjeta-nombre { font-size: 16px; }
  .precio { font-size: 1.6rem; }
  .mas { width: 44px; height: 44px; }
  .banda { padding: 26px 30px; }
  .banda img { width: 170px; }
  .barra-pedido { left: auto; right: max(24px, env(safe-area-inset-right, 0px)); bottom: 24px; width: 380px; }
  .hoja { left: auto; top: 0; bottom: 0; width: 460px; max-height: none; border-radius: 26px 0 0 26px; transform: translateX(105%); border: 1px solid var(--linea); border-right: none; }
  .hoja.abierta { transform: translateX(0); }
  .hoja-asa { display: none; }
  .hoja.centrada { left: 50%; right: auto; top: 50%; bottom: auto; width: min(880px, calc(100% - 64px)); max-height: min(86dvh, 640px); border-radius: 28px; transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.2,1), opacity .25s; pointer-events: none; border: 1px solid var(--linea); }
  .hoja.centrada.abierta { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
  .hoja.centrada .hoja-scroll { display: grid; grid-template-columns: 1.05fr 1fr; }
  .hoja.centrada .det-foto { margin: 14px; aspect-ratio: auto; min-height: 380px; }
  .hoja.centrada .det-cuerpo { padding: 28px 26px 16px 8px; align-content: start; }
  .hoja.centrada .det-nombre { font-size: 2.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Errores del checkout y estado de carga */
.error-envio { margin: 0 18px; padding: 12px 14px; border-radius: var(--r-m); background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.45); color: var(--txt); font-size: 14px; font-weight: 600; }
.error-envio:empty { display: none; }
.cargando-menu { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.cargando-menu i { display: block; aspect-ratio: 1 / 1.25; border-radius: var(--r-l); background: linear-gradient(100deg, var(--sup) 30%, var(--sup-2) 50%, var(--sup) 70%); background-size: 300% 100%; animation: brillo-carga 1.4s linear infinite; }
@keyframes brillo-carga { to { background-position: -150% 0; } }
.hero-tarjeta.sin-foto-hero { background: radial-gradient(90% 80% at 80% 20%, color-mix(in srgb, var(--pri) 45%, #120d0a), #120d0a 70%); }
.marca-logo img { width: 100%; height: 100%; object-fit: cover; }
.marca-logo.con-imagen { background: #fff; }
.ancla-menu { display: block; height: 0; scroll-margin-top: 150px; }

/* Sin íconos decorativos: inicial del producto o del local en lugar de dibujos */
.sin-foto span { font-family: var(--f-display); font-weight: 900; font-size: clamp(3rem, 14vw, 5rem); line-height: 1; color: var(--acento); text-shadow: 0 8px 26px var(--brillo); }
.item-foto .sin-foto span, .mini-foto .sin-foto span { font-size: 2rem; }
.logo-inicial { font-family: var(--f-display); font-weight: 900; font-size: 1.5rem; line-height: 1; color: var(--sobre-pri); }
.boton-pedido { padding: 9px 14px; }
.vacio-car { padding-top: 40px; }
/* En la portada (siempre oscura) el botón principal usa el color que mejor se lee sobre la foto */
.hero .boton-pri { background: var(--pri); color: var(--sobre-pri); box-shadow: 0 12px 28px -12px rgba(0,0,0,.6), inset 0 0 0 2px var(--anillo-hero, transparent); }
.hero .boton-pri:hover:not(:disabled) { box-shadow: 0 16px 32px -12px rgba(0,0,0,.65), inset 0 0 0 2px var(--anillo-hero, transparent); }
