/* Página pública de Waffles Olimpo. Colores tomados del menú impreso. */
:root {
  --negro: #0d0d0d;
  --carbon: #1a1a1a;
  --carbon-2: #262626;
  --hueso: #f1ebe4;
  --verde: #2fb58f;
  --verde-oscuro: #1f8a6c;
  --dorado: #d9a95f;
  --rojo: #e2725b;
  --muted: #a39d96;
  --linea: rgba(241, 235, 228, 0.12);
  --radio: 16px;
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--negro);
  color: var(--hueso);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .03em; margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: var(--verde); }
.muted { color: var(--muted); }
.pequeno { font-size: .85rem; }
.centro { text-align: center; }
.error { color: var(--rojo); font-weight: 600; }
.eyebrow { color: var(--verde); text-transform: uppercase; letter-spacing: .25em; font-size: .78rem; font-weight: 700; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  background: var(--verde);
  color: var(--negro);
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s, transform .1s;
}
.btn:hover:not(:disabled) { background: #43c9a2; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }
.btn-chico { padding: 8px 18px; }

/* ===== Encabezado ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: rgba(13, 13, 13, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}
.marca { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: .04em; color: var(--hueso); text-decoration: none; }
.marca span { color: var(--verde); }

.hero { padding: 48px 16px 32px; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); margin: 10px 0 20px; }
.chips-info { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips-info li { background: var(--carbon-2); border: 1px solid var(--linea); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.aviso { margin-top: 18px; background: rgba(217, 169, 95, .12); border: 1px solid rgba(217, 169, 95, .4); color: var(--hueso); border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.aviso a { color: var(--dorado); font-weight: 700; }

/* ===== Página principal ===== */
.dorado { color: var(--dorado); }
.hero-inicio { padding-top: 64px; padding-bottom: 40px; }
.hero-texto { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin-bottom: 24px; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-grande { padding: 16px 28px; font-size: 1.05rem; }
.btn-fantasma { background: transparent; color: var(--hueso); border: 1.5px solid var(--linea); }
.btn-fantasma:hover:not(:disabled) { background: var(--carbon-2); }
.tarjetas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tarjetas li { background: var(--carbon); border: 1px solid var(--linea); border-radius: var(--radio); padding: 20px; }
.tarjetas h2 { font-size: 1.7rem; margin: 0 0 6px; }
.titulo-seccion { margin-bottom: 4px; }
.menu-preview { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.menu-preview li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.menu-preview strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: .03em; margin-right: 8px; }
.menu-preview small { display: block; color: var(--muted); }
.menu-preview .precio { color: var(--dorado); font-weight: 700; white-space: nowrap; font-size: .92rem; }

/* ===== Página de pedido ===== */
.link-inicio { color: var(--muted); text-decoration: none; font-weight: 600; }
.link-inicio:hover { color: var(--hueso); }
.pedido-cabeza { padding: 24px 16px 0; max-width: 1080px; margin: 0 auto; }
.pedido-cabeza h1 { font-size: 2.8rem; margin-bottom: 12px; }
.seccion.seccion-menu { padding-top: 16px; padding-bottom: 120px; }

.seccion { padding: 32px 16px; max-width: 1080px; margin: 0 auto; scroll-margin-top: 56px; }
.seccion h2 { font-size: 2.6rem; }
.seccion > .muted { margin: 4px 0 20px; }

/* ===== Menú ===== */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.waffle {
  font: inherit; color: inherit; text-align: left;
  background: var(--carbon);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 0; overflow: hidden;
  cursor: pointer;
  display: flex;
  transition: border-color .15s, transform .1s;
}
.waffle:hover { border-color: var(--verde); }
.waffle:active { transform: scale(.98); }
/* Marcador mientras llegan las fotos reales (images/waffle-<id>.jpg) */
.waffle-foto {
  width: 104px; flex-shrink: 0;
  background: repeating-linear-gradient(45deg, #1f1f1f 0 14px, #232323 14px 28px);
  display: grid; place-items: center; text-align: center; padding: 6px;
  color: #5f5a55; font-size: .65rem; word-break: break-all;
}
.waffle-cuerpo { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
@media (min-width: 600px) {
  .waffle { flex-direction: column; }
  .waffle-foto { width: auto; aspect-ratio: 16 / 9; font-size: .78rem; }
  .waffle-cuerpo { padding: 14px 16px 16px; }
}
.waffle-nombre { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.waffle-nombre span { color: var(--verde); }
.waffle-base { font-weight: 600; font-size: .95rem; }
.waffle-incluye { color: var(--muted); font-size: .88rem; }
.waffle-precio { color: var(--dorado); font-weight: 700; margin-top: auto; padding-top: 8px; }
.etiqueta { align-self: flex-start; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px; background: var(--verde); color: var(--negro); }
.etiqueta-temporada { background: var(--dorado); }
.waffle-en-carrito { color: var(--verde); font-size: .85rem; font-weight: 700; }

.como ol { padding-left: 20px; margin: 16px 0 0; display: grid; gap: 10px; max-width: 640px; }

.pie { text-align: center; padding: 40px 16px 120px; border-top: 1px solid var(--linea); margin-top: 24px; }

/* ===== Barra del carrito ===== */
.barra-carrito {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: inherit; font-size: 1rem;
  background: var(--verde); color: var(--negro);
  border: 0; border-radius: 999px; padding: 15px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  cursor: pointer; z-index: 15;
}
#barra-cantidad { background: var(--negro); color: var(--verde); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .9rem; }

/* ===== Hojas (diálogos) ===== */
.hoja {
  border: 0; padding: 0;
  width: min(560px, 100%); max-width: 100%;
  max-height: min(92vh, 900px);
  margin: auto auto 0;
  border-radius: 20px 20px 0 0;
  background: var(--carbon); color: var(--hueso);
}
.hoja::backdrop { background: rgba(0, 0, 0, .7); }
.hoja form { display: flex; flex-direction: column; max-height: min(92vh, 900px); }
.hoja-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 18px 10px; border-bottom: 1px solid var(--linea); }
.hoja-cabeza h2 { font-size: 2rem; }
.hoja-cuerpo { padding: 14px 18px; overflow-y: auto; flex: 1; }
.hoja-pie { padding: 12px 18px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); display: grid; gap: 8px; }
.cerrar { font: inherit; font-size: 1.1rem; background: var(--carbon-2); color: var(--hueso); border: 0; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
@media (min-width: 600px) {
  .hoja { margin: auto; border-radius: 20px; }
}

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion span {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--linea); background: var(--carbon-2);
  font-size: .92rem; transition: background .12s, border-color .12s;
}
.opcion input:checked + span { background: var(--verde); border-color: var(--verde); color: var(--negro); font-weight: 600; }
.opcion input:focus-visible + span { outline: 2px solid var(--dorado); outline-offset: 2px; }
.opcion input:disabled + span { opacity: .35; }
.opcion small { font-weight: 700; }

.cantidad-fila { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--linea); background: var(--carbon-2); color: var(--hueso); font: inherit; font-weight: 700; font-size: 1.1rem; cursor: pointer; }
.qty span { min-width: 20px; text-align: center; font-weight: 700; }

/* ===== Carrito ===== */
.carrito-lista { list-style: none; padding: 0; margin: 0; }
.carrito-lista li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.carrito-item { flex: 1; min-width: 0; }
.carrito-item strong { display: block; }
.carrito-item small { color: var(--muted); display: block; }
.resumen { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 14px 0; }
.resumen dt { color: var(--muted); }
.resumen dd { margin: 0; text-align: right; }
.resumen .total { color: var(--hueso); font-weight: 700; font-size: 1.15rem; }
.carrito-form h3, #carrito h3 { font-size: 1.6rem; margin: 22px 0 6px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 6px; }
/* Verificación anti-robots (solo se ve si Cloudflare la necesita) */
.turnstile:not(:empty) { margin-top: 8px; }

/* Buscador de direcciones */
.buscador { position: relative; }
.sugerencias {
  list-style: none; margin: 4px 0 0; padding: 4px;
  position: absolute; left: 0; right: 0; z-index: 5;
  background: var(--carbon-2); border: 1px solid var(--linea); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.sugerencias li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.sugerencias li[aria-selected="true"], .sugerencias li:hover { background: rgba(47, 181, 143, .18); }
.sugerencias small { display: block; color: var(--muted); }
.envio-confirmado { margin-top: 10px; background: var(--negro); border: 1.5px solid var(--verde); border-radius: 12px; overflow: hidden; }
.mapa { position: relative; height: 240px; background: #e8e4dc; }
/* Pin fijo al centro (como Google Maps): se mueve el mapa, no el pin. La punta marca la entrega. */
.pin-centro { position: absolute; left: 50%; top: 50%; z-index: 450; width: 26px; height: 26px; margin: -31px 0 0 -13px; pointer-events: none; }
.pin-centro::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; background: #2fb58f; border: 3px solid #0d0d0d; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.pin-centro::after { content: ""; position: absolute; left: 50%; top: 29px; width: 10px; height: 4px; margin-left: -5px; border-radius: 50%; background: rgba(0, 0, 0, .35); }
.envio-confirmado p { padding: 0 12px; }
.envio-confirmado p:first-of-type { padding-top: 10px; }
.link { font: inherit; font-size: .9rem; font-weight: 600; color: var(--verde); background: none; border: 0; padding: 6px 12px 10px; cursor: pointer; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--linea); background: var(--negro); color: var(--hueso);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--verde); outline-offset: 1px; border-color: transparent; }
