/* Carta del cliente (QR de mesa, web, kiosco) — diseño premium de CartFast.
   Los colores son los de cada restaurante (Ajustes → colores): index.html sobreescribe
   estas variables. Aquí solo la forma: tarjetas, botones, iconos y ventanas. */
:root {
  /* Acentos configurables (se sobreescriben desde ajustes en index.html) */
  --morado: #3f8018;        /* primario: precios, botones «+» */
  --dorado: #7cbf2e;        /* acento */
  --hdr1: #61cf1f;          /* cabecera (degradado) */
  --hdr2: #2f7b12;
  --exito: #1f8a3b;         /* botones de pagar */
  --exito-osc: #166b2d;
  --negro-grupo: #141414;   /* título de categoría (fondo) */
  --categoria-txt: #ffffff; /* título de categoría (texto) */
  --fondo1: #f3f5f0;
  --fondo2: #eceee8;
  /* Neutros */
  --rojo: #e0434a;
  --tinta: #151a26;
  --gris-texto: #2a3040;
  --gris-suave: #6b7385;
  --tarjeta: #ffffff;
  --borde: #e6e8ee;
  --gris-s: #f2f3f7;
  --sombra: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 22px rgba(16, 24, 40, .07);
  --sombra-fuerte: 0 22px 50px rgba(16, 24, 40, .22);
  --radio: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--gris-texto);
  background: linear-gradient(180deg, var(--fondo1) 0%, var(--fondo2) 100%);
  background-attachment: fixed;
  min-height: 100vh; line-height: 1.45; padding-bottom: 104px;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { letter-spacing: -.01em; }
button { font-family: inherit; }
.ic { width: 1.15em; height: 1.15em; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- Cabecera ---------- */
.cabecera {
  background: linear-gradient(135deg, var(--hdr1) 0%, var(--hdr2) 100%);
  padding: 16px 18px 22px; border-radius: 0 0 30px 30px;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--hdr2) 35%, transparent);
  position: relative; overflow: hidden;
}
.cabecera::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); pointer-events: none; }
.cab-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
.marca { display: flex; align-items: center; text-decoration: none; gap: 10px; }
.banner { height: 46px; width: auto; max-width: 66vw; object-fit: contain; display: block; }
.logo { height: 46px; width: auto; display: block; }
.marca-emoji { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: rgba(255, 255, 255, .2); color: #fff; }
.marca-emoji .ic { width: 24px; height: 24px; }
.marca-texto { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.cab-top.pos-centro { justify-content: center; }
.cab-top.pos-centro .cab-acciones { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.cab-acciones { display: flex; align-items: center; gap: 8px; }
.cab-top.pos-derecha { flex-direction: row-reverse; }
.logo { max-width: 72vw; object-fit: contain; }
.logo.tam-pequeno, .banner.tam-pequeno { height: 38px; }
.logo.tam-mediano, .banner.tam-mediano { height: 52px; }
.logo.tam-grande,  .banner.tam-grande  { height: 68px; }
.logo.tam-extra,   .banner.tam-extra   { height: 88px; }

.btn-carrito {
  position: relative; width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .2); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center; transition: transform .1s;
}
.btn-carrito .ic { width: 22px; height: 22px; }
.btn-carrito:active { transform: scale(.94); }
.contador {
  position: absolute; top: -4px; right: -4px; background: var(--rojo); color: #fff;
  border-radius: 999px; min-width: 22px; height: 22px; font-size: .72rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; border: 2px solid #fff;
}
.saludo { color: rgba(255, 255, 255, .95); font-size: 1.05rem; font-weight: 800; margin: 16px 2px 0; position: relative; z-index: 1; }
.buscador-wrap {
  margin-top: 12px; background: #fff; border-radius: 999px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 24px rgba(16, 24, 40, .18); position: relative; z-index: 1;
}
.buscador-ico { display: inline-flex; color: var(--gris-suave); }
.buscador { flex: 1; border: none; background: transparent; outline: none; font-size: .95rem; font-family: inherit; color: var(--gris-texto); }
.btn-reservar { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; background: rgba(255, 255, 255, .96);
  color: var(--tinta); text-decoration: none; font-weight: 800; font-size: .9rem; padding: 10px 18px; border-radius: 999px;
  position: relative; z-index: 1; box-shadow: 0 6px 16px rgba(16, 24, 40, .12); }
.btn-reservar .ic { color: var(--hdr2); }

/* ---------- Chip de mesa ---------- */
.mesa-chip {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px auto 0; width: fit-content; max-width: calc(100% - 32px);
  background: var(--tarjeta); color: var(--gris-texto); font-size: .9rem; padding: 9px 16px; border-radius: 999px; box-shadow: var(--sombra);
}
.mesa-chip .ic { color: var(--morado); }
.mesa-chip strong { color: var(--tinta); }

/* ---------- Chips de categorías ---------- */
.chips-barra {
  position: sticky; top: 0; z-index: 15;
  background: color-mix(in srgb, var(--fondo1) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--borde) 70%, transparent);
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth;
  padding: 12px 16px; white-space: nowrap; scrollbar-width: none;
}
/* Flechas: un círculo blanco sobre un degradado que difumina los chips del borde. */
.chips-flecha {
  position: absolute; top: 0; bottom: 0; z-index: 2; width: 52px; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; color: var(--tinta);
}
.chips-flecha.izq { left: 0; justify-content: flex-start; padding-left: 8px;
  background: linear-gradient(90deg, var(--fondo1) 45%, transparent); }
.chips-flecha.der { right: 0; justify-content: flex-end; padding-right: 8px;
  background: linear-gradient(270deg, var(--fondo1) 45%, transparent); }
.chips-flecha .ic { width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--tarjeta);
  box-shadow: var(--sombra); stroke-width: 2.6; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  background: var(--tarjeta); border-radius: 999px; padding: 6px 16px 6px 6px; border: 1.5px solid var(--borde);
  font-size: .86rem; color: var(--gris-texto); font-weight: 700; text-decoration: none; transition: all .15s ease;
}
.chip img { width: 30px; height: 30px; object-fit: contain; border-radius: 50%; background: var(--gris-s); padding: 2px; }
.chip-emoji { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gris-s); color: var(--gris-suave); }
.chip-emoji .ic { width: 16px; height: 16px; }
.chip.on { background: var(--tinta); border-color: var(--tinta); color: #fff; box-shadow: 0 8px 18px rgba(16, 24, 40, .25); }
.chip.on img, .chip.on .chip-emoji { background: rgba(255, 255, 255, .9); }

/* ---------- Carta ---------- */
.carta { max-width: 760px; margin: 0 auto; padding: 14px 16px 0; }
.categoria { margin-bottom: 26px; scroll-margin-top: 78px; }
.categoria h2 {
  font-size: 1.25rem; font-weight: 800; color: var(--categoria-txt); background: var(--negro-grupo);
  padding: 8px 18px; margin-bottom: 14px; display: inline-block; border-radius: 999px; box-shadow: var(--sombra);
}
.lista-productos { display: flex; flex-direction: column; gap: 12px; }
.producto {
  background: var(--tarjeta); border-radius: var(--radio); padding: 10px; display: flex; gap: 14px; align-items: stretch;
  box-shadow: var(--sombra); border: 1px solid color-mix(in srgb, var(--borde) 60%, transparent);
  transition: transform .12s ease, box-shadow .12s ease;
}
.producto:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16, 24, 40, .1); }
.prod-img { width: 96px; height: 96px; flex: 0 0 auto; border-radius: 16px; object-fit: cover; background: var(--gris-s); display: block; }
.prod-img.ph { display: flex; align-items: center; justify-content: center; color: #b8bfcd; }
.prod-img.ph .ic { width: 34px; height: 34px; stroke-width: 1.5; }
.prod-img-wrap { position: relative; flex: 0 0 auto; }
.btn-zoom {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(16, 24, 40, .45); color: #fff; padding: 0; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.btn-zoom svg { width: 15px; height: 15px; }
.prod-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 4px 2px 0; }
.prod-body h3 { font-size: 1.04rem; font-weight: 800; color: var(--tinta); }
.desc { font-size: .83rem; color: var(--gris-suave); margin: 3px 0 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.precio { font-weight: 800; color: var(--tinta); font-size: .95rem; background: var(--gris-s); padding: 5px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.zona-control { display: flex; align-items: center; gap: 8px; }

/* Botón + redondo y contador en píldora (los crea script.js) */
.btn-add {
  width: 40px; height: 40px; border: none; border-radius: 50%; background: var(--morado);
  color: #fff; font-size: 1.5rem; font-weight: 600; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--morado) 40%, transparent);
  display: inline-flex; align-items: center; justify-content: center; transition: transform .1s;
}
.btn-add:active { transform: scale(.9); }
.badge-cant { font-size: .8rem; color: var(--morado); font-weight: 800; background: color-mix(in srgb, var(--morado) 12%, #fff);
  padding: 4px 10px; border-radius: 999px; }
.producto { cursor: pointer; }
.producto.en-carrito { border-color: color-mix(in srgb, var(--morado) 45%, transparent); }
/* Nombre original del plato bajo el traducido (para pedirlo al camarero). */
.nombre-orig { font-size: .74rem; font-weight: 600; color: var(--gris-suave); font-style: italic; margin-top: 1px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--gris-s); border-radius: 999px; padding: 4px; }
.stepper button {
  width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--tarjeta); color: var(--morado);
  font-size: 1.2rem; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(16, 24, 40, .1); transition: transform .1s;
}
.stepper button:last-child { background: var(--morado); color: #fff; }
.stepper button:active { transform: scale(.9); }
.stepper .cant { min-width: 22px; text-align: center; font-weight: 800; font-size: 1rem; color: var(--tinta); }
.sin-resultados { text-align: center; color: var(--gris-suave); padding: 30px 10px; }

/* ---------- Alérgenos ---------- */
.alergenos { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 8px; font-size: .85rem; line-height: 1; }
.alergenos span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gris-s); }
.leyenda-alergenos { margin: 26px 0 8px; padding: 16px 18px; border-radius: var(--radio); background: var(--tarjeta); color: var(--gris-texto); box-shadow: var(--sombra); }
.leyenda-alergenos h2 { font-size: 1rem; font-weight: 800; margin: 0 0 10px; }
.leyenda-alergenos ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .84rem; }
.leyenda-alergenos li { padding: 4px 10px; border-radius: 999px; background: var(--gris-s); }
.leyenda-alergenos p { margin: 0; font-size: .8rem; color: var(--gris-suave); }

/* ---------- Barra inferior ---------- */
.barra {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(140%);
  width: 100%; max-width: 480px; padding: 12px 16px 18px; z-index: 25; transition: transform .25s ease;
}
.barra.visible { transform: translateX(-50%) translateY(0); }
.barra-inner {
  width: 100%; border: none; cursor: pointer; background: var(--tinta);
  border-radius: 999px; padding: 10px 10px 10px 22px; color: #fff; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--sombra-fuerte);
}
.barra-l { font-size: .82rem; opacity: .8; font-weight: 600; }
.barra-total { font-weight: 800; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.barra-go { margin-left: auto; background: var(--exito); color: #fff; font-weight: 800; font-size: .92rem; padding: 11px 18px; border-radius: 999px; }

/* ---------- Carrito ---------- */
.overlay { position: fixed; inset: 0; background: rgba(12, 16, 28, .5); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .25s; z-index: 30; }
.overlay.visible { opacity: 1; visibility: visible; }
.carrito {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 94vw; background: var(--fondo1);
  box-shadow: -10px 0 40px rgba(16, 24, 40, .25); transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  z-index: 40; display: flex; flex-direction: column; overflow-y: auto;
}
.carrito.abierto { transform: translateX(0); }
.carrito-cabecera { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; color: var(--tinta); }
.carrito-cabecera h2 { font-size: 1.35rem; font-weight: 800; }
.btn-cerrar { display: inline-grid; place-items: center; background: var(--tarjeta); border: none; color: var(--gris-texto);
  width: 38px; height: 38px; border-radius: 50%; font-size: 1rem; cursor: pointer; box-shadow: var(--sombra); }
.carrito-items { flex: 1; overflow-y: auto; padding: 4px 16px 12px; min-height: 140px; }
.carrito-vacio { color: var(--gris-suave); text-align: center; padding: 40px 0; }
.item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 8px;
  background: var(--tarjeta); border-radius: 16px; box-shadow: var(--sombra); }
.item-nombre { font-weight: 800; font-size: .95rem; color: var(--tinta); }
.item-extra { font-size: .78rem; color: var(--gris-suave); margin-top: 2px; }
.item-nota { font-size: .78rem; color: #8a5a00; background: #fff6df; display: inline-block; padding: 2px 8px; border-radius: 8px; margin-top: 4px; }
.item-precio { font-size: .85rem; color: var(--gris-suave); margin-top: 2px; font-weight: 600; }
.controles { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; background: var(--gris-s); border-radius: 999px; padding: 4px; }
.controles button { width: 30px; height: 30px; border: none; border-radius: 50%; background: var(--tarjeta); color: var(--morado);
  font-size: 1.1rem; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(16, 24, 40, .08); }
.controles button:last-child { background: var(--morado); color: #fff; }
.cantidad { min-width: 20px; text-align: center; font-weight: 800; }

.carrito-pie { border-top: 1px solid var(--borde); padding: 16px 18px 22px; background: var(--tarjeta); flex-shrink: 0;
  border-radius: 24px 24px 0 0; box-shadow: 0 -8px 24px rgba(16, 24, 40, .06); }
.total-fila { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 1.25rem; color: var(--tinta); margin-bottom: 14px; }
.cliente-datos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cliente-datos input, .cliente-datos select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--borde); border-radius: 14px; font-size: .95rem;
  font-family: inherit; color: var(--gris-texto); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.cliente-datos input:focus, .cliente-datos select:focus { outline: none; border-color: var(--morado);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--morado) 15%, transparent); }
.modo-entrega { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; background: var(--gris-s); padding: 5px; border-radius: 999px; }
.modo-entrega label { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 10px 8px; border-radius: 999px;
  font-size: .88rem; font-weight: 700; cursor: pointer; text-align: center; color: var(--gris-suave); transition: all .15s ease; }
.modo-entrega label:has(input:checked) { background: var(--tarjeta); color: var(--tinta); box-shadow: 0 2px 8px rgba(16, 24, 40, .1); }
.modo-entrega input { position: absolute; opacity: 0; pointer-events: none; }
.entrega-info { margin: 0; font-size: .85rem; color: var(--gris-suave); font-weight: 600; }
.entrega-info.mal { color: var(--rojo); }
.acepto { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; color: var(--gris-suave); margin-bottom: 14px; cursor: pointer; }
.acepto input { width: 20px; height: 20px; accent-color: var(--morado); flex: 0 0 auto; margin-top: 1px; }
.acepto a { color: var(--morado); font-weight: 700; }

.btn-pagar {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--exito); color: #fff;
  border: none; border-radius: 999px; padding: 16px; font-size: 1.05rem; font-weight: 800; cursor: pointer; font-family: inherit;
  transition: filter .15s, transform .1s; box-shadow: 0 12px 24px color-mix(in srgb, var(--exito) 35%, transparent);
}
.btn-pagar:disabled { background: #cfd4de; cursor: not-allowed; box-shadow: none; }
.btn-pagar:not(:disabled):hover { filter: brightness(.95); }
.btn-pagar:not(:disabled):active { transform: scale(.98); }
/* Segundo botón de pago (debajo de otro): con borde. Si es el único, se queda relleno. */
.btn-pagar ~ .btn-caja { margin-top: 10px; background: var(--tarjeta); color: var(--exito-osc); border: 2px solid var(--exito-osc); box-shadow: none; }
.btn-pagar ~ .btn-caja:disabled { background: var(--tarjeta); color: #b3b9c6; border-color: #dfe3ea; }
.mensaje-error { color: var(--rojo); font-size: .85rem; font-weight: 600; margin-top: 8px; text-align: center; }

/* ---------- Ventanas (opciones del producto, fuera de horario) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(12, 16, 28, .55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-overlay.visible { display: flex; }
@keyframes subir { from { transform: translateY(24px); opacity: .5; } }
.modal { background: var(--tarjeta); border-radius: 26px; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--sombra-fuerte); animation: subir .2s ease; }
.modal-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 6px; color: var(--tinta); }
.modal-cabecera h3 { font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-cabecera .btn-cerrar { box-shadow: none; background: var(--gris-s); }
.modal-desc { color: var(--gris-suave); font-size: .9rem; padding: 4px 20px 0; }
.modal-bloque { padding: 14px 20px; border-bottom: 1px solid var(--borde); }
.modal-label { font-weight: 800; margin-bottom: 10px; color: var(--tinta); }
/* Opciones: chips que se marcan y desmarcan */
.modal .opcion { display: inline-flex; gap: 8px; align-items: center; margin: 0 6px 8px 0; padding: 10px 14px; border-radius: 999px;
  border: 1.5px solid var(--borde); font-size: .92rem; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.modal .opcion input { width: 18px; height: 18px; margin: 0; accent-color: var(--morado); }
.modal .opcion:has(input:checked) { border-color: var(--morado); background: color-mix(in srgb, var(--morado) 10%, #fff); color: var(--tinta); font-weight: 800; }
.modal .btn-pagar { margin: 16px 20px 20px; width: calc(100% - 40px); }
.horario-info p { margin: 8px 0; }
@media (max-width: 600px) {  /* en el móvil, las ventanas salen desde abajo */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 26px 26px 0 0; max-height: 92vh; }
}

/* ---------- Visor de imagen del plato ---------- */
.zoom-overlay { position: fixed; inset: 0; background: rgba(8, 10, 18, .92); display: none; align-items: center; justify-content: center; z-index: 60; padding: 24px; }
.zoom-overlay.visible { display: flex; }
.zoom-cerrar { position: absolute; top: 16px; left: 16px; width: 46px; height: 46px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px; cursor: pointer; z-index: 61; }
.zoom-cerrar:hover { background: rgba(255, 255, 255, .28); }
.zoom-contenido { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; }
.zoom-img { max-width: 92vw; max-height: 74vh; width: auto; height: auto; border-radius: 22px; object-fit: contain; background: #fff; box-shadow: var(--sombra-fuerte); }
.zoom-nombre { color: #fff; font-size: 1.2rem; font-weight: 800; text-align: center; }

/* ---------- Selector de idioma (cabecera) ---------- */
.idioma-sel { position: relative; }
.idioma-sel summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .2); color: #fff;
  font-weight: 800; font-size: .85rem; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.idioma-sel summary::-webkit-details-marker { display: none; }
.idioma-sel summary .ic { width: 18px; height: 18px; }
/* Fijo (la cabecera recorta lo que sobresale): script.js lo coloca bajo el botón al abrirlo. */
.idioma-menu { position: fixed; right: 16px; top: 76px; z-index: 40; min-width: 170px; padding: 6px;
  background: var(--tarjeta); border-radius: 18px; box-shadow: var(--sombra-fuerte); display: grid; gap: 2px; }
.idioma-menu a { padding: 11px 14px; border-radius: 12px; color: var(--tinta); text-decoration: none; font-weight: 700; font-size: .92rem; }
.idioma-menu a:hover { background: var(--gris-s); }
.idioma-menu a.on { background: var(--tinta); color: #fff; }

/* ---------- Ficha del producto (pantalla completa en el móvil) ---------- */
body.ficha-abierta { overflow: hidden; }
.ficha-velo { position: fixed; inset: 0; z-index: 60; background: rgba(12, 16, 28, .55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.ficha { position: relative; width: 100%; max-width: 560px; height: min(92vh, 860px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--fondo1), var(--fondo2)); border-radius: 28px; overflow: hidden;
  box-shadow: var(--sombra-fuerte); animation: subir .2s ease-out; }
.ficha-top { flex: 0 0 auto; padding: 12px 14px 4px; }
.ficha-volver { display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent; color: var(--tinta);
  font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; padding: 8px 10px 8px 4px; border-radius: 999px; }
.ficha-volver .ic { width: 22px; height: 22px; }
.ficha-scroll { flex: 1; overflow-y: auto; padding: 4px 16px 20px; -webkit-overflow-scrolling: touch; }
.ficha-card, .ficha-grupo { background: var(--tarjeta); border-radius: 24px; box-shadow: var(--sombra); padding: 18px; margin-bottom: 14px; }
.ficha-img { margin: -6px -6px 14px; border-radius: 18px; overflow: hidden; background: var(--gris-s); aspect-ratio: 4 / 3; }
.ficha-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ficha-card h2 { font-size: 1.45rem; font-weight: 800; color: var(--tinta); line-height: 1.2; }
.ficha-card .nombre-orig { font-size: .85rem; margin-top: 2px; }
.ficha-desc { color: var(--gris-suave); margin: 8px 0 10px; line-height: 1.45; }
.ficha-card .alergenos { margin: 6px 0 10px; }
.ficha-card .precio { display: inline-block; font-size: 1.05rem; }
.ficha-nota { margin-top: 16px; border: 1.5px solid var(--borde); border-radius: 16px; }
.ficha-nota summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer;
  font-weight: 700; color: var(--gris-texto); }
.ficha-nota summary::-webkit-details-marker { display: none; }
.ficha-nota summary span { flex: 1; }
.ficha-nota summary .flecha { transition: transform .15s; }
.ficha-nota[open] summary .flecha { transform: rotate(180deg); }
.ficha-nota textarea { display: block; width: calc(100% - 28px); margin: 0 14px 14px; padding: 12px; border: 1.5px solid var(--borde);
  border-radius: 12px; font: inherit; font-size: .95rem; resize: vertical; background: var(--gris-s); color: var(--tinta); }
.ficha-nota textarea:focus { outline: none; border-color: var(--morado); background: #fff; }
.ficha-grupo h3 { font-size: 1.05rem; font-weight: 800; color: var(--tinta); text-transform: uppercase; letter-spacing: .02em; }
.ficha-grupo .pista { font-size: .82rem; color: var(--gris-suave); margin: 2px 0 10px; font-weight: 600; }
.ficha-grupo .pista.falta { color: var(--rojo); }
.opcion-fila { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--borde); cursor: pointer; }
.opcion-fila:first-of-type { border-top: none; }
.opcion-fila input { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--morado); }
.opcion-fila .op-nom { flex: 1; font-weight: 700; color: var(--gris-texto); }
.opcion-fila .op-extra { font-size: .85rem; font-weight: 800; color: var(--gris-suave); font-variant-numeric: tabular-nums; }
.opcion-fila:has(input:checked) .op-nom { color: var(--tinta); }
.opcion-fila:has(input:checked) .op-extra { color: var(--morado); }
.ficha-pie { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--tarjeta); border-top: 1px solid var(--borde); }
.ficha-stepper { padding: 6px; }
.ficha-stepper button { width: 38px; height: 38px; }
.ficha-stepper .cant { min-width: 28px; font-size: 1.1rem; }
.ficha-pie .btn-pagar { flex: 1; width: auto; }
@media (max-width: 600px) {
  .ficha-velo { padding: 0; background: none; backdrop-filter: none; }
  .ficha { max-width: none; height: 100%; border-radius: 0; animation: entrar .22s ease-out; }
}
@keyframes entrar { from { transform: translateX(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .ficha { animation: none; } }

/* ---------- Páginas de resultado (pago correcto, cancelado, kiosco) ---------- */
.resultado { max-width: 520px; margin: 60px auto; background: var(--tarjeta); border-radius: 28px; box-shadow: var(--sombra-fuerte); padding: 44px 30px; text-align: center; }
@media (max-width: 560px) { .resultado { margin: 24px 14px; padding: 36px 22px; } }
.resultado .icono { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  font-size: 2.4rem; background: color-mix(in srgb, var(--exito) 12%, #fff); color: var(--exito); }
.resultado .icono .ic { width: 40px; height: 40px; stroke-width: 2.2; }
.resultado .icono.aviso { background: #fff3d9; color: #b77400; }
.resultado h1 { color: var(--tinta); font-weight: 800; margin-bottom: 10px; }
.resultado p { color: var(--gris-suave); margin-bottom: 24px; }
.btn-volver { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--tarjeta); color: var(--tinta);
  text-decoration: none; padding: 14px 26px; border-radius: 999px; font-weight: 800; border: 2px solid var(--borde); }
.btn-volver:hover { border-color: var(--gris-suave); }
.resultado .acciones { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 8px; }
.resultado .btn-pagar { max-width: 320px; margin: 0 auto; text-decoration: none; }
.resultado .btn-volver { width: 100%; max-width: 320px; }

/* ---------- Ticket del cliente ---------- */
.ticket-wrap { max-width: 420px; margin: 0 auto; padding: 24px 16px; }
.ticket-card { background: var(--tarjeta); border-radius: 26px; box-shadow: var(--sombra-fuerte); padding: 26px 22px; display: flex; flex-direction: column; position: relative; }
.t-marca { font-weight: 800; font-size: 1.5rem; text-align: center; color: var(--tinta); }
.t-estado { align-self: center; text-align: center; font-weight: 800; font-size: .82rem; margin-top: 8px; padding: 5px 14px; border-radius: 999px; }
.t-estado.ok { color: #0f7a52; background: #e2f5ed; }
.t-estado.pend { color: #a26500; background: #fff3d9; }
.t-sep { border-top: 2px dashed var(--borde); margin: 16px 0; }
.t-linea { display: flex; justify-content: space-between; font-size: .9rem; padding: 3px 0; color: var(--gris-texto); }
.t-linea span:first-child { color: var(--gris-suave); }
.t-item { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; padding: 6px 0; }
.t-item span:last-child { font-weight: 700; white-space: nowrap; }
.t-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.3rem; color: var(--tinta); }
.t-nota { text-align: center; color: var(--gris-suave); font-size: .82rem; margin: 12px 0 18px; }
.ticket-card .btn-pagar { text-decoration: none; text-align: center; }
.ticket-card .btn-volver { margin-top: 12px; }
.ticket-card .icono { display: grid; place-items: center; width: 76px; height: 76px; margin: 6px auto 16px; border-radius: 50%;
  background: #fff3d9; color: #b77400; }
.ticket-card .icono .ic { width: 36px; height: 36px; }
.ticket-card h1 { text-align: center; color: var(--tinta); font-weight: 800; font-size: 1.4rem; margin-bottom: 8px; }
.ticket-card > p { text-align: center; color: var(--gris-suave); margin-bottom: 8px; }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; margin: 24px auto; padding: 34px 28px; background: var(--tarjeta); border-radius: 26px; box-shadow: var(--sombra); }
.legal h1 { color: var(--tinta); font-weight: 800; margin-bottom: 14px; }
.legal h2 { margin: 22px 0 8px; font-size: 1.1rem; font-weight: 800; }
.legal p { margin-bottom: 10px; color: var(--gris-texto); }
.legal-nota { padding: 12px 14px; border-radius: 14px; background: #fff7e6; color: #8a5a00 !important; font-size: .88rem; font-weight: 600; }
.legal-volver { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--morado); font-weight: 800; text-decoration: none; }

@media (max-width: 480px) {
  .banner { height: 42px; }
  .prod-img { width: 86px; height: 86px; }
  .categoria h2 { font-size: 1.15rem; }
}
