:root {
  /* --ink y --gold se cambian desde el editor (colores del local) */
  --ink: #1c1f26;
  --gold: #e0a33b;
  --ink-2: color-mix(in srgb, var(--ink) 84%, #ffffff);
  --gold-soft: color-mix(in srgb, var(--gold) 50%, #ffffff);
  --paper: #f8f3ea;
  --card: #fffdf8;
  --line: #e7dcc6;
  --text: #1d2430;
  --muted: #7b7466;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(14, 26, 43, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Jost', system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
  padding-bottom: 60px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3, .serif { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ---------- Header ---------- */
.site-header {
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 60%),
    linear-gradient(180deg, var(--ink), var(--ink-2));
  color: var(--paper);
  text-align: center;
  padding: 28px 16px 26px;
  position: relative;
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.brand { position: relative; max-width: 360px; margin: 0 auto; }
.laurel {
  display: block;
  width: 210px;
  margin: 0 auto -44px;
  color: var(--gold);
  opacity: 0.9;
}
.brand-pre {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding-left: 0.55em;
}
.brand-name {
  margin: 22px 0 0;
  font-size: 3.4rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.location {
  margin: 12px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
}
.status-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6fcf97;
  box-shadow: 0 0 0 3px rgba(111, 207, 151, 0.25);
}
.status-pill.lunch .dot { background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }

/* ---------- Category nav ---------- */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  background: rgba(248, 243, 234, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: none;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  white-space: nowrap;
}
.cat-nav a:active, .cat-nav a:hover { border-color: var(--gold); }

/* ---------- Menu ---------- */
.menu-root {
  max-width: 680px;
  margin: 0 auto;
  padding: 18px 16px;
}

.loading { text-align: center; padding: 40px 0; color: var(--muted); }

.group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Jost', sans-serif;
  font-weight: 500;
}
.group-title::before, .group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.group-title::after { background: linear-gradient(90deg, var(--gold), transparent); }
.group-title:first-child { margin-top: 4px; }

.category {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px 8px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  scroll-margin-top: 64px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
}
.category-title .icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 1.05rem;
}
.category-note { font-size: 0.8rem; color: var(--muted); margin: -2px 0 6px; font-style: italic; }

.item-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #f0e8d9;
}
.item-row:last-child { border-bottom: none; }
.item-name { font-size: 0.98rem; }
.item-dots {
  flex: 1;
  min-width: 14px;
  border-bottom: 1px dotted #c9bda4;
  transform: translateY(-4px);
}
.item-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--ink);
  white-space: nowrap;
}
.item-price.ask { font-family: 'Jost', sans-serif; font-size: 0.8rem; font-weight: 500; color: var(--muted); font-style: italic; }

/* Cafetería cerrada (horario de almuerzo) */
.closed-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.closed-card .big { font-size: 1.8rem; line-height: 1; }
.closed-card h3 { margin: 0; font-size: 1.35rem; color: var(--gold-soft); }
.closed-card p { margin: 2px 0 0; font-size: 0.88rem; opacity: 0.85; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 10px 16px 30px;
  color: var(--muted);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
}
.footer-rule { width: 60px; height: 1px; background: var(--gold); margin: 0 auto 12px; }

/* ---------- Edit FAB ---------- */
.edit-fab {
  position: fixed;
  bottom: 18px; right: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--ink);
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0.45;
  z-index: 30;
}
.edit-fab:hover { opacity: 1; }

/* ---------- Modals / Editor ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(14, 26, 43, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal.hidden { display: none; }

.modal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
}
.modal-card-wide { max-width: 660px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-card h2 { margin-top: 0; color: var(--ink); font-size: 1.6rem; }

.modal-card input[type="password"],
.modal-card input[type="text"],
.modal-card input[type="number"],
.modal-card input[type="time"],
.modal-card select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: inherit;
  margin-top: 8px;
  background: #fff;
}

.error { color: #b3261e; font-size: 0.85rem; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:disabled { opacity: 0.6; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-small { padding: 6px 10px; font-size: 0.85rem; }

.editor-header { display: flex; justify-content: space-between; align-items: center; }
.editor-body { overflow-y: auto; flex: 1; margin: 10px 0; padding-right: 4px; }

.editor-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; border-top: 1px solid #eee; padding-top: 12px; flex-wrap: wrap;
}
.editor-footer-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.save-status { font-size: 0.85rem; color: var(--ink); }

.editor-category {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
  background: #fffaf0;
}
.editor-category.is-cafe { border-left: 4px solid var(--gold); }
.editor-schedule { background: #f3f5f9; border-color: #d6dce6; }
.editor-schedule p { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); }

.editor-category-head { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.editor-category-head input[type="text"] { margin-top: 0; font-weight: 600; }
.editor-category-head input[data-role="caticon"] { width: 56px; flex: none; text-align: center; }
.editor-category-head input[data-role="catname"] { flex: 1; min-width: 140px; width: auto; }

.editor-item-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.editor-item-row input[type="text"] { flex: 3; margin-top: 0; min-width: 0; }
.editor-item-row input[type="number"] { flex: 1; margin-top: 0; min-width: 80px; }

.schedule-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 6px; }
.schedule-grid label { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 480px) { .schedule-grid { grid-template-columns: 1fr 1fr; } .schedule-grid .span-all { grid-column: 1 / -1; } }

.toggle-row { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.toggle-row input { width: 17px; height: 17px; }

.icon-btn { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px 6px; }

.brand-name.long { font-size: 2.4rem; letter-spacing: 0.04em; }
.brand-name.xlong { font-size: 1.8rem; letter-spacing: 0.02em; }

@media (min-width: 560px) {
  .brand-name { font-size: 4rem; }
  .brand-name.long { font-size: 3rem; }
  .brand-name.xlong { font-size: 2.3rem; }
  .item-name { font-size: 1.02rem; }
}

/* ---------- Pedido desde la mesa ---------- */
.mesa-bar {
  max-width: 680px;
  margin: 14px auto 0;
  padding: 12px 14px;
  margin-left: max(16px, calc((100% - 680px) / 2));
  margin-right: max(16px, calc((100% - 680px) / 2));
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.mesa-bar-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mesa-tag { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1; }
.mesa-help { font-size: 0.85rem; color: var(--muted); }
.mesa-bar-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.pill-btn:disabled { opacity: 0.5; }
.mesa-error {
  max-width: 648px;
  margin: 14px 16px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdecec;
  color: #8a1c1c;
  font-size: 0.9rem;
}
@media (min-width: 680px) { .mesa-error { margin-left: auto; margin-right: auto; } }

.item-row.orderable { align-items: center; }
.add-btn, .stepper button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
  font-family: inherit;
}
.add-btn { margin-left: 4px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; flex: none; }
.stepper b { min-width: 16px; text-align: center; font-size: 1rem; }
.stepper button:first-child { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }

body.has-cart { padding-bottom: 110px; }
body.has-cart .edit-fab { display: none; }
.cart-bar {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  width: calc(100% - 32px);
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: none;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.cart-bar b { margin-left: auto; font-size: 1.05rem; }
.cart-count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
}

.csheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.csheet {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  animation: csheet-up 0.18s ease-out;
}
@media (min-width: 600px) {
  .csheet-backdrop { align-items: center; }
  .csheet { border-radius: 20px; }
}
@keyframes csheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.csheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.csheet-head h2 { margin: 0; font-size: 1.7rem; color: var(--ink); }
.csheet-close { border: none; background: var(--paper); width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.csheet-body { overflow-y: auto; min-height: 0; }
.cart-lines { border: 1px solid var(--line); border-radius: 12px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f0e8d9; }
.cart-line:last-child { border-bottom: none; }
.cl-name { flex: 1; min-width: 0; }
.cl-name small { display: block; color: var(--muted); font-size: 0.78rem; }
.cl-sub { font-weight: 600; white-space: nowrap; }
@media (max-width: 400px) {
  .cart-line { flex-wrap: wrap; row-gap: 6px; }
  .cl-name { flex-basis: 100%; }
  .cl-sub { margin-left: auto; }
}
.cart-note-label { display: block; margin: 14px 0 4px; font-size: 0.85rem; color: var(--muted); }
.cart-note { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-family: inherit; font-size: 0.95rem; resize: vertical; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 2px; }
.cart-total span { color: var(--muted); }
.cart-total b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.8rem; color: var(--ink); }
.order-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.order-btn:disabled { opacity: 0.6; }
.order-btn.secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.cart-fine { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 10px 0 0; }
.cart-empty { color: var(--muted); text-align: center; padding: 16px 6px; }
.pick-cat-title { margin: 6px 0 8px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sent-ok { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 14px; border-radius: 14px; background: #e8f6ee; color: #1d5c3a; }
.sent-ok span { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: #2f9e62; color: #fff; font-size: 1.2rem; }
.sent-ok p { margin: 0; font-size: 0.95rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
  text-align: center;
}

.editor-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.editor-label input[type="color"] { display: block; width: 100%; height: 40px; margin-top: 6px; padding: 2px; border: 1px solid #ccc; border-radius: 8px; background: #fff; }

/* ---------- Comensales y cuenta ---------- */
.cart-sub { margin: 0 0 10px; color: var(--muted); font-size: 0.88rem; }
.who { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.68rem; font-weight: 600; vertical-align: middle; }
.cart-input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-family: inherit; font-size: 0.95rem; }
.cart-warn { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: #fff4e0; color: #7a4b00; font-size: 0.9rem; }
.bill-status { margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: #fff4e0; color: #7a4b00; font-size: 0.9rem; }
.bill-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.bill-group.mine { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--gold); }
.bill-group-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; margin-bottom: 4px; }
.bill-item { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; color: var(--muted); padding: 2px 0; }
.mine-total { margin-top: -6px; }
.mine-total b { font-size: 1.4rem; }
.pay-options { display: grid; gap: 8px; margin-bottom: 14px; }
.pay-opt {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "t b" "s b";
  align-items: center;
  gap: 2px 10px;
  text-align: left;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}
.pay-opt:disabled { opacity: 0.45; cursor: default; }
.pay-opt.sel { border-color: var(--ink); background: color-mix(in srgb, var(--gold) 10%, #fff); }
.po-title { grid-area: t; font-weight: 600; font-size: 1rem; }
.po-sub { grid-area: s; font-size: 0.8rem; color: var(--muted); }
.pay-opt b { grid-area: b; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; color: var(--ink); }
.method-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.method { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font-family: inherit; font-size: 0.85rem; cursor: pointer; color: var(--text); }
.method.sel { border-color: var(--ink); background: var(--ink); color: #fff; }
.order-btn + .order-btn { margin-top: 8px; }
.mesa-error .pill-btn { margin-top: 8px; display: block; }

.item-desc { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 1px; line-height: 1.3; }
.item-row.sold-out .item-name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.25); }

/* =====================================================================
   Estilos de las cartas impresas del 7/14
   ===================================================================== */
:root {
  --wood:
    repeating-linear-gradient(2deg, rgba(0, 0, 0, 0.13) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(-1deg, rgba(255, 220, 180, 0.05) 0 1px, transparent 1px 27px),
    radial-gradient(ellipse at 30% 40%, rgba(0, 0, 0, 0.25), transparent 35%),
    radial-gradient(ellipse at 75% 70%, rgba(0, 0, 0, 0.2), transparent 30%),
    linear-gradient(180deg, #5b3623, #4a2b1b 45%, #56331f 75%, #3f2517);
}

body { background: #1c130d; color: #f3e9d8; }
.loading { color: #c9b89c; }

.site-header {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(212, 175, 97, 0.18), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.55), transparent 70%),
    var(--wood);
}
.stars {
  display: inline-block;
  padding: 6px 12px 6px 16px;
  border: 1px solid rgba(212, 175, 97, 0.6);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}
.brand-name { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }

.cat-nav { background: rgba(28, 19, 13, 0.94); border-bottom-color: rgba(212, 175, 97, 0.25); }
.cat-nav a { color: #f3e9d8; border-color: rgba(212, 175, 97, 0.35); background: rgba(255, 255, 255, 0.04); }

.group-title { color: var(--gold-soft); }
.site-footer { color: #c9b89c; }

.category { position: relative; overflow: hidden; border: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.category > * { position: relative; z-index: 1; }

/* --- Madera (carta de comidas) --- */
.theme-madera { background: var(--wood); color: #f6ead6; }
.theme-madera .category-title {
  display: inline-flex;
  padding: 3px 14px 3px 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #d9b98d, #bf9868);
  color: #2b1a10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-style: italic;
}
.theme-madera .category-title .icon { background: rgba(255, 255, 255, 0.35); border-color: rgba(43, 26, 16, 0.25); }
.theme-madera .category-note { color: #e2c9a6; }
.theme-madera .item-price { color: #f0cf95; }

/* --- Papel antiguo (carta de bebidas) --- */
.theme-papel {
  background:
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(120, 90, 60, 0.18)),
    #f4ede0;
  color: #2e2018;
  box-shadow: inset 0 0 0 2px #3b2a20, inset 0 0 0 5px #f4ede0, inset 0 0 0 6px #3b2a20, 0 8px 24px rgba(0, 0, 0, 0.45);
  padding-top: 18px;
}
.theme-papel .category-title {
  display: inline-flex;
  padding: 4px 30px 4px 6px;
  background: #3b2a20;
  color: #f4ede0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.35rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%);
  border-radius: 6px 0 0 6px;
}
.theme-papel .category-title .icon { background: #f4ede0; border-color: #3b2a20; }
.theme-papel .item-row, .theme-papel .item-desc { border-bottom-color: #e2d6c1; }
.theme-papel .item-dots { border-bottom-color: #a58e70; }
.theme-papel .item-price { color: #3b2a20; }
.theme-papel .item-desc, .theme-papel .item-price.ask { color: #7a6552; }

/* --- Negro con hojas (carta de tragos y vinos) --- */
.theme-noche {
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.6px) 0 0 / 7px 7px,
    radial-gradient(rgba(0, 0, 0, 0.35) 1px, transparent 1.6px) 3px 4px / 9px 9px,
    linear-gradient(160deg, #353535, #262626);
  color: #f1f1f1;
}
.theme-noche::before, .theme-noche::after {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M8 92 C 14 44, 52 10, 96 4 C 92 50, 58 88, 8 92Z' fill='%23c8313f'/%3E%3Cg stroke='%23000' stroke-opacity='.28' stroke-width='2' fill='none'%3E%3Cpath d='M8 92 L 96 4'/%3E%3Cpath d='M30 70 L 22 46 M44 56 L 38 30 M58 42 L 54 18 M72 28 L 72 10 M30 70 L 54 76 M44 56 L 70 62 M58 42 L 82 44 M72 28 L 90 26'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}
.theme-noche::before { top: -34px; right: -30px; transform: rotate(10deg); }
.theme-noche::after { width: 90px; height: 90px; bottom: -52px; left: -48px; transform: rotate(190deg); filter: hue-rotate(25deg) saturate(1.2); opacity: 0.45; }
.theme-noche .category-title {
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1.1rem;
  color: #fff;
}
.theme-noche .category-title .icon { background: transparent; border: 2px solid #e8453c; box-shadow: 0 0 10px rgba(232, 69, 60, 0.6); }
.theme-noche .item-name { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem; }
.theme-noche .item-price { color: #fff; }

/* --- Verde y dorado (carta de cafetería) --- */
.theme-verde {
  background:
    radial-gradient(ellipse at 85% 10%, rgba(230, 200, 90, 0.18), transparent 45%),
    radial-gradient(ellipse at 10% 100%, rgba(0, 0, 0, 0.35), transparent 55%),
    linear-gradient(170deg, #3a5429, #243a1c 60%, #1c2e16);
  color: #f3ecd0;
  outline: 1px solid rgba(224, 189, 90, 0.65);
  outline-offset: -6px;
}
.theme-verde .category-title {
  color: #e6c25e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.35rem;
}
.theme-verde .category-title .icon { background: transparent; border-color: rgba(230, 194, 94, 0.7); }
.theme-verde .item-price { color: #e6c25e; }

/* Líneas y textos en las secciones oscuras */
.theme-madera .item-row, .theme-madera .item-desc,
.theme-noche .item-row, .theme-noche .item-desc,
.theme-verde .item-row, .theme-verde .item-desc { border-bottom-color: rgba(255, 255, 255, 0.1); }
.theme-madera .item-dots, .theme-noche .item-dots, .theme-verde .item-dots { border-bottom-color: rgba(255, 255, 255, 0.28); }
.theme-madera .item-desc, .theme-noche .item-desc, .theme-verde .item-desc,
.theme-madera .item-price.ask, .theme-noche .item-price.ask, .theme-verde .item-price.ask { color: rgba(255, 255, 255, 0.62); }


/* =====================================================================
   Colores que cambian al bajar
   ===================================================================== */
body, .cat-nav { transition: background-color 0.9s ease; }
body[data-theme="madera"] { background-color: #1c130d; }
body[data-theme="papel"]  { background-color: #4a3727; }
body[data-theme="noche"]  { background-color: #0e0e10; }
body[data-theme="verde"]  { background-color: #0f1c0c; }
body[data-theme="madera"] .cat-nav { background-color: rgba(28, 19, 13, 0.94); }
body[data-theme="papel"]  .cat-nav { background-color: rgba(74, 55, 39, 0.94); }
body[data-theme="noche"]  .cat-nav { background-color: rgba(14, 14, 16, 0.94); }
body[data-theme="verde"]  .cat-nav { background-color: rgba(15, 28, 12, 0.94); }

/* Resplandor de fondo que acompaña el color de la sección */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, var(--glow, rgba(212, 175, 97, 0.12)), transparent 65%);
  transition: opacity 0.9s ease;
}
body[data-theme="papel"]  { --glow: rgba(244, 237, 224, 0.14); }
body[data-theme="noche"]  { --glow: rgba(200, 49, 63, 0.16); }
body[data-theme="verde"]  { --glow: rgba(230, 194, 94, 0.14); }

/* Categoría activa arriba */
.cat-nav a { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.cat-nav a.active { background: var(--gold); color: #1c130d; border-color: var(--gold); }

/* Secciones que aparecen al bajar */
.category.reveal { opacity: 0; transform: translateY(26px) scale(0.98); transition: opacity 0.6s ease, transform 0.6s ease; }
.category.reveal.visible { opacity: 1; transform: none; }

/* Hojas de tragos y vinos que se mueven apenas */
@keyframes sway { from { rotate: -4deg; } to { rotate: 5deg; } }
.theme-noche::before { animation: sway 4s ease-in-out infinite alternate; transform-origin: 70% 30%; }

/* Brillo dorado que recorre los títulos de la cafetería */
@keyframes shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.theme-verde .category-title {
  background: linear-gradient(100deg, #e6c25e 40%, #fff3c4 50%, #e6c25e 60%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
}
.theme-verde .category-title .icon { -webkit-text-fill-color: initial; color: initial; }

@media (prefers-reduced-motion: reduce) {
  body, .cat-nav, .category.reveal { transition: none; }
  .category.reveal { opacity: 1; transform: none; }
  .theme-noche::before, .theme-verde .category-title { animation: none; }
}

/* ---------- Botón de WhatsApp ---------- */
.wa-fab {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 22px 9px 14px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.6);
  animation: wa-pulse 2.6s ease-out infinite;
}
.wa-fab svg { width: 28px; height: 28px; flex: none; }
.wa-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.wa-text small { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.95; }
.wa-text b { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; }
.wa-fab:active { background: #1ebe5b; }
@keyframes wa-pulse {
  0% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) { .wa-fab { animation: none; } }
body { padding-bottom: 90px; }


/* =====================================================================
   Sistema completo 7/14: marca, fotos, delivery
   ===================================================================== */
:root { --ink: #2b1a10; --gold: #d4af61; --gold-soft: #ecd9a8; }
.stars { margin: 0 0 8px; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.35em; }
.brand-name { margin: 0; }
.pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pills .status-pill { margin-top: 14px; }
.status-pill.closed .dot { background: #e8453c; box-shadow: 0 0 0 3px rgba(232, 69, 60, 0.25); }
.status-pill.wait { border-color: rgba(212, 175, 97, 0.8); color: var(--gold-soft); }

/* Botones + y − sobre fondos oscuros */
.add-btn, .stepper button { background: var(--gold); color: #1c130d; font-weight: 700; }
.stepper button:first-child { background: rgba(255, 255, 255, 0.9); color: #1c130d; border: 1px solid rgba(0, 0, 0, 0.15); }
.theme-papel .add-btn, .theme-papel .stepper button:last-child { background: #3b2a20; color: #f4ede0; }
.cart-bar { background: #1c130d; border: 1px solid var(--gold); }
.cart-count { background: var(--gold); color: #1c130d; }

/* Foto del plato */
.item-row.has-img { align-items: center; }
.thumb {
  flex: none; width: 58px; height: 58px; padding: 0; border: 1px solid rgba(212, 175, 97, 0.5);
  border-radius: 10px; overflow: hidden; cursor: zoom-in; background: rgba(0, 0, 0, 0.2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, 0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 14px; }
.lightbox p { color: #f3e9d8; margin-top: 12px; font-weight: 600; }

/* Aviso de delivery arriba de la carta */
.delivery-banner {
  max-width: 648px; margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(212, 175, 97, 0.45); color: #f3e9d8; font-size: 0.92rem; text-align: center;
}
.delivery-banner.closed { border-color: rgba(232, 69, 60, 0.6); color: #ffc9c2; }
@media (min-width: 680px) { .delivery-banner { margin-left: auto; margin-right: auto; } }

/* Formulario del pedido para llevar */
.f-group { margin-top: 14px; }
.f-label { display: block; margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.f-label .opt { font-weight: 400; opacity: 0.8; }
.seg2 { display: flex; gap: 8px; }
.seg2 button {
  flex: 1; padding: 12px 8px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
  font-family: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text); cursor: pointer;
}
.seg2 button.sel { border-color: var(--ink); background: color-mix(in srgb, var(--gold) 14%, #fff); }
.geo-btn { width: 100%; padding: 11px; border-radius: 12px; border: 1px dashed var(--ink); background: #fff; font-family: inherit; font-size: 0.92rem; cursor: pointer; color: var(--ink); }
.geo-btn.on { border-style: solid; background: #e8f6ee; color: #1d5c3a; border-color: #2f9e62; }
.f-hint { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
.f-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #8a1c1c; font-size: 0.9rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tot-row { display: flex; justify-content: space-between; color: var(--muted); padding: 2px 2px; font-size: 0.92rem; }
.wait-note { text-align: center; font-weight: 600; color: #7a4b00; margin: 0 0 10px; }
.btn-wa-big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border-radius: 14px; padding: 15px; background: #25d366; color: #fff; font-weight: 600; font-size: 1.02rem; text-decoration: none; margin-bottom: 8px; }
.btn-wa-big svg { width: 24px; height: 24px; }
.done-warn { background: #fff4e0; color: #7a4b00; }
.done-warn span { background: #d08a00; }
body.has-cart .wa-fab { display: none; }

/* Botón "Consultar" (sin precio) y mensaje al mozo */
.ask-btn {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(212, 175, 97, 0.75); background: rgba(0, 0, 0, 0.18); color: inherit;
  font: 500 0.8rem 'Jost', sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.theme-papel .ask-btn { border-color: #3b2a20; background: #fff; color: #3b2a20; }
.mozo-rapidos { display: flex; flex-wrap: wrap; gap: 6px; }

/* Los nombres largos se parten en renglones en lugar de empujar la página hacia el costado. */
.item-row .item-name { min-width: 0; overflow-wrap: anywhere; }

/* Datos para transferir */
.transf { margin: 10px 0 4px; padding: 12px; border-radius: 12px; background: #eef7ff; border: 1px solid #b9dcf7; color: #0f2a3f; }
.transf h4 { margin: 0 0 6px; font-size: 0.95rem; }
.transf-monto { font-weight: 700; margin: 0 0 8px; }
.transf-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px dashed #b9dcf7; }
.transf-row small { display: block; color: #4b6a82; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; }
.transf-row b { font-family: ui-monospace, 'Consolas', monospace; font-size: 0.95rem; word-break: break-all; }
.copy-btn { flex: none; border: none; border-radius: 999px; padding: 7px 12px; background: #0f5c99; color: #fff; font: 600 0.82rem inherit; cursor: pointer; }
.copy-btn.ok { background: #2f9e62; }
.transf-nota { margin: 8px 0 0; font-size: 0.82rem; color: #4b6a82; }

/* Pizza mitad y mitad */
.mitad-op.mitad-sola { border-style: dashed; font-weight: 700; }
.mitad-btn small { display: block; margin-top: 3px; font-weight: 500; font-size: 0.8rem; opacity: 0.85; }
.item-ctrl { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: 4px; }
.item-ctrl .add-btn, .item-ctrl .stepper { margin-left: 0; }
.item-row.has-img .item-ctrl { grid-area: boton; justify-self: end; }
/* Con el contador (− 1 +) el "½ media" pasa arriba si no entra en el celular */
.item-ctrl { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
.item-row:not(.has-img) .item-ctrl { max-width: 50%; }
/* Los avisos no tapan botones (p. ej. "Ver pedido") */
.toast { pointer-events: none; }
.half-btn { flex: none; height: 32px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--gold); background: transparent; color: inherit; font: 700 0.85rem inherit; white-space: nowrap; cursor: pointer; }
.theme-papel .half-btn { border-color: #3b2a20; color: #3b2a20; }
.half-btn.on { background: var(--gold); color: #1c130d; }
.mitad-btn { display: block; width: 100%; margin: 4px 0 8px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--gold); background: rgba(0, 0, 0, 0.15); color: inherit; font: 700 0.95rem inherit; cursor: pointer; }
.theme-papel .mitad-btn { background: #fff; color: #3b2a20; }
.mitad-lista { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mitad-op { border: 1.5px solid var(--line); background: #fff; color: #1d2430; border-radius: 999px; padding: 8px 12px; font: 600 0.88rem inherit; cursor: pointer; }
.mitad-op.sel { border-color: var(--ink); background: var(--ink); color: #fff; }
.mitad-op small { font-weight: 400; opacity: 0.75; margin-left: 4px; }
.mitad-res { text-align: center; font-weight: 700; margin: 4px 0 12px; }

/* Dónde está hoy el carrito */
.ubic-hoy { max-width: 648px; margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; text-align: center;
  background: rgba(230, 185, 63, 0.14); border: 1.5px solid var(--gold); color: inherit; }
.ubic-hoy b { display: block; font-size: 1.05rem; margin: 2px 0; }
.ubic-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.ubic-hoy .ubic-btns a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.ubic-hoy .ubic-ir { background: var(--gold); color: #1c130d; font-size: 1.02rem; padding-left: 20px; padding-right: 20px; }
.ubic-hoy .ubic-ver { border: 1.5px solid var(--gold); color: inherit; }
.ubic-hoy small { display: block; margin-top: 6px; opacity: 0.75; font-size: 0.78rem; }
.ubic-hoy .ubic-nota { margin-top: 0; }
@media (min-width: 680px) { .ubic-hoy { margin-left: auto; margin-right: auto; } }
