/* Plantilla de sitio — los colores y fuentes llegan desde config.js (tema) */
:root {
  --bg: #ffffff;
  --text: #1b1640;
  --acc: #8b5cf6;
  --on-acc: #ffffff;
  --f-tit: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-txt: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --card: color-mix(in srgb, var(--text) 5%, var(--bg));
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --muted: color-mix(in srgb, var(--text) 68%, var(--bg));
  --acc-soft: color-mix(in srgb, var(--acc) 13%, var(--bg));
  --acc-dark: color-mix(in srgb, var(--acc) 55%, #000);
  --r: 18px;
  --barra: 0px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--f-txt); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-bottom: var(--barra);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-tit); line-height: 1.12; letter-spacing: -.015em; margin: 0; }
h2 { font-size: clamp(26px, 4.2vw, 38px); margin-bottom: 8px; }
h3 { font-size: 19px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.sec { padding: 56px 0; }
.sec.alt { background: var(--card); }
.sec-sub { color: var(--muted); margin: 0 0 26px; }
.oculto { display: none !important; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  min-height: 48px; padding: 12px 20px; border-radius: 14px; border: 1.5px solid transparent;
  transition: transform .15s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.05); }
.btn-acc { background: var(--acc); color: var(--on-acc); }
.btn-borde { background: transparent; color: var(--text); border-color: var(--line); }
.btn-blanco { background: #fff; color: var(--acc-dark); }
.btn-transp { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-wa { background: #25d366; color: #06301a; }
.btn-mp { background: #009ee3; color: #fff; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(160deg, var(--acc), var(--acc-dark));
  padding: 64px 0 56px; overflow: hidden;
}
.hero.con-portada { background-size: cover; background-position: center; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60px; height: 120px; background: var(--bg); border-radius: 50% 50% 0 0; }
.hero .wrap { position: relative; z-index: 1; padding-bottom: 30px; }
.logo { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 26px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 48px; overflow: hidden; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: clamp(34px, 7vw, 60px); font-weight: 800; }
.lema { font-size: clamp(17px, 2.4vw, 21px); opacity: .92; margin: 8px 0 14px; }
.estado { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(0, 0, 0, .22); font-size: 14px; font-weight: 600; }
.estado .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff6b6b; }
.estado.abierto .dot { background: #3ee08f; box-shadow: 0 0 0 4px rgba(62, 224, 143, .25); }
.aviso-hero { display: inline-block; margin: 10px 0 0; padding: 6px 14px; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--acc-dark); font-size: 14px; }
.especiales { margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: var(--acc-soft); border: 1.5px solid color-mix(in srgb, var(--acc) 30%, transparent); }
.especiales ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.especiales li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.especiales li span::first-letter { text-transform: uppercase; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

/* ---------- Anuncios ---------- */
.ad-slot { max-width: 1080px; margin: 8px auto 24px; padding: 0 16px; }
.ad {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--r); text-decoration: none; color: inherit;
  background: var(--card); border: 1.5px dashed var(--line);
}
.ad-label { position: absolute; top: -10px; left: 14px; padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg); letter-spacing: .04em; text-transform: uppercase; }
.ad-media { width: 56px; height: 56px; flex-shrink: 0; border-radius: 14px; background: var(--acc-soft); display: grid; place-items: center; font-size: 28px; overflow: hidden; }
.ad-media img { width: 100%; height: 100%; object-fit: cover; }
.ad-txt { flex: 1; min-width: 0; }
.ad-txt b { display: block; }
.ad-txt span { color: var(--muted); font-size: 14.5px; }
.ad-cta { flex-shrink: 0; font-weight: 700; font-size: 14px; color: var(--acc-dark); white-space: nowrap; }

/* ---------- Promociones ---------- */
.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.promo { padding: 20px; border-radius: var(--r); background: var(--acc-soft); border: 1.5px solid color-mix(in srgb, var(--acc) 30%, transparent); }
.promo b { font-family: var(--f-tit); font-size: 19px; display: block; margin-bottom: 4px; }
.promo span { color: var(--muted); font-size: 15px; }

/* ---------- Catálogo ---------- */
.cat-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.cat-nav a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-size: 15px; font-weight: 600; }
.cat h3 { margin: 26px 0 12px; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.prod { display: flex; flex-direction: column; background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sec.alt .prod { background: var(--bg); }
.prod-img { aspect-ratio: 4 / 3; background: var(--acc-soft); display: grid; place-items: center; font-size: 48px; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.prod-top b { font-size: 17px; }
.precio { font-weight: 800; white-space: nowrap; }
.prod p { margin: 0; color: var(--muted); font-size: 14.5px; flex: 1; }
.etiqueta { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--acc); color: var(--on-acc); }
.prod-acc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); border-radius: 12px; padding: 2px; }
.stepper button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper span { min-width: 28px; text-align: center; font-weight: 800; }

/* ---------- Formularios (agenda, mesas, cotización, pedido) ---------- */
.form-card { max-width: 620px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 22px; padding: 22px 18px; }
.campo { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 15px; }
.campo small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.vacio { color: var(--muted); font-size: 15px; }
.opciones { display: grid; gap: 8px; border: 0; padding: 0; margin: 0 0 14px; }
.opciones legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.opcion { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; }
.opcion input { width: auto; margin: 0; accent-color: var(--acc); }
.opcion:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); }
.exito { text-align: center; padding: 10px 0; }
.exito .e { font-size: 48px; }
.aviso { color: #c2410c; font-size: 14px; min-height: 20px; margin: 4px 0 10px; }

/* ---------- Reseñas ---------- */
.resenas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.resena { padding: 18px; border-radius: var(--r); background: var(--bg); border: 1.5px solid var(--line); }
.estrellas { color: #f5a524; letter-spacing: 2px; }
.resena p { margin: 8px 0; }
.resena small { color: var(--muted); }

/* ---------- Información ---------- */
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.horarios { width: 100%; border-collapse: collapse; }
.horarios td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.horarios td:last-child { text-align: right; }
.horarios tr.hoy td { font-weight: 800; color: var(--acc-dark); }
.mapa { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r); background: var(--card); }
.redes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Barra de demostración (solo demos de la agencia) ---------- */
.demo-barra { background: #0d0b1e; color: #f7f5ff; font-size: 13px; line-height: 1.4; text-align: center; padding: 8px 16px; }
.demo-barra a { color: #ffc145; font-weight: 700; white-space: nowrap; }

/* ---------- Pie ---------- */
footer.pie { padding: 32px 0 40px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer.pie a { color: var(--muted); }
.sello { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }
.sello img { width: 18px; height: 18px; flex: none; }

/* ---------- Barra móvil, botón flotante y carrito ---------- */
.barra-movil {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.barra-movil .btn { min-height: 46px; padding: 8px 6px; font-size: 14.5px; }
.wa-flotante { position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 60px; height: 60px; border-radius: 50%; background: #25d366; display: none; place-items: center; font-size: 30px; text-decoration: none; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.barra-carrito {
  position: fixed; z-index: 31; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--barra) + 12px); width: min(520px, calc(100% - 24px));
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--text); color: var(--bg); font: inherit; font-weight: 700;
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .5);
}
body { --barra: 76px; }
@media (min-width: 900px) {
  body { --barra: 0px; }
  .barra-movil { display: none; }
  .wa-flotante { display: grid; }
  .barra-carrito { left: auto; right: 96px; transform: none; bottom: 26px; width: 380px; }
}

/* ---------- Diálogos ---------- */
dialog.hoja {
  width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 22px 22px 0 0; background: var(--bg); color: var(--text);
}
dialog.hoja::backdrop { background: rgba(0, 0, 0, .55); }
@media (min-width: 600px) { dialog.hoja { margin: auto; border-radius: 22px; } }
.hoja-in { padding: 20px 18px 22px; }
.hoja-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cerrar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); font-size: 18px; cursor: pointer; }
.linea { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.linea .n { flex: 1; min-width: 0; }
.linea small { color: var(--muted); display: block; }
.totales { padding: 12px 0 16px; display: grid; gap: 4px; }
.totales div { display: flex; justify-content: space-between; }
.totales .total { font-weight: 800; font-size: 19px; }

/* ---------- Utilidades ---------- */
mark.pendiente { background: #ffe066; color: #000; padding: 0 5px; border-radius: 4px; font-weight: 600; }
.toast { position: fixed; left: 50%; top: 18px; z-index: 60; transform: translate(-50%, -30px); opacity: 0; background: var(--text); color: var(--bg); font-weight: 700; padding: 11px 18px; border-radius: 99px; transition: all .3s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
.revision { position: fixed; top: 12px; right: 12px; z-index: 55; display: grid; gap: 8px; width: 240px; padding: 14px; border-radius: 16px; background: #111; color: #fff; font-size: 13.5px; box-shadow: 0 14px 40px rgba(0, 0, 0, .4); }
.revision b { font-size: 14px; cursor: pointer; }
.revision.min { width: auto; padding: 10px 14px; }
.revision.min > :not(b) { display: none; }
.revision button { font: inherit; font-weight: 700; padding: 8px; border-radius: 10px; border: 0; cursor: pointer; }

@media (max-width: 700px) {
  .info { grid-template-columns: 1fr; }
  .sec { padding: 44px 0; }
  .ad { flex-wrap: wrap; }
  .ad-cta { width: 100%; }
}
@media (max-width: 380px) { .fila2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
