/* Colours of the printed menu: navy background, champagne-gold titles, lines and buttons, cream text.
   The admin panel uses the same file but keeps its light colours (overridden in admin/index.html). */
:root {
  --bg: #001942;
  --surface: #0a2554;
  --surface-2: #133067;
  --field: #021c48;
  --ink: #f6ecd6;
  --heading: #fdedcb;
  --muted: #a9b5cd;
  --line: #24427a;
  --brand: #e7c98f;
  --brand-dark: #f3dcab;
  --brand-soft: rgba(231, 201, 143, .18);
  --on-brand: #001942;
  --green: #86d6a8;
  --green-soft: rgba(134, 214, 168, .14);
  --gold: #e7c98f;
  --gold-soft: rgba(231, 201, 143, .14);
  --danger: #ff9b8c;
  --danger-soft: rgba(255, 155, 140, .14);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .28);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 10px 18px; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--surface); color: var(--ink);
  border-color: var(--line); transition: background .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { color: var(--danger); }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; }

/* forms */
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=url], input[type=datetime-local], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 80px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.error { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.note { background: var(--gold-soft); color: var(--gold); padding: 10px 12px; border-radius: 10px; margin: 12px 0; font-size: 14px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge-red { background: var(--danger-soft); color: var(--danger); }

/* header */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 8px; height: 60px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--heading); text-decoration: none; margin-right: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang { font-weight: 700; font-size: 12px; letter-spacing: .04em; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: var(--on-brand);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg); }
.announce { background: var(--brand); color: var(--on-brand); text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 500; }
.closed-bar { background: var(--gold-soft); color: var(--gold); text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 500; }

/* hero */
.hero { position: relative; color: var(--ink); min-height: 360px; display: flex; align-items: flex-end; background: var(--bg) center/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 25, 66, .2) 0%, rgba(0, 25, 66, .92) 100%); }
.hero h1 { color: var(--heading); }
.hero .wrap { position: relative; padding-top: 80px; padding-bottom: 36px; width: 100%; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); max-width: 720px; }
.hero p { font-size: 17px; max-width: 580px; opacity: .92; margin: 12px 0 22px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn:not(.btn-primary) { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); color: #fff; }
.facts { display: flex; gap: 10px 24px; flex-wrap: wrap; padding: 16px 0; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line); }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.dot.off { background: var(--danger); }

/* category nav */
.catnav { position: sticky; top: 60px; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.catnav .wrap { display: flex; gap: 8px; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px;
  white-space: nowrap; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.search { max-width: 220px; }
.search input { padding: 8px 12px; border-radius: 999px; }

/* menu */
.section { padding: 28px 0 8px; }
.section h2 { display: flex; align-items: center; gap: 12px; font-size: 25px; text-transform: uppercase; letter-spacing: .03em; color: var(--heading);
  padding-bottom: 10px; border-bottom: 1px solid rgba(231, 201, 143, .45); }
.section h2 .icon { width: 40px; height: 40px; color: var(--gold); flex: none; }
.section > .muted { margin: 4px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  cursor: pointer; border: 1px solid transparent; transition: border-color .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .card:hover { border-color: var(--line); transform: translateY(-2px); } }
.card .ph { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .ph .tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.card .ph .tags .badge { background: rgba(0, 25, 66, .86); }
.card .body { padding: 14px 14px 12px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.card .desc { color: var(--muted); font-size: 13.5px; margin: 4px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 16px; }
.card .portion { font-size: 12px; color: var(--muted); }
.card.soldout { opacity: .6; }
.add-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.add-btn:disabled { background: var(--line); cursor: not-allowed; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--gold);
  background: radial-gradient(circle at 50% 45%, var(--surface-2), var(--bg) 75%); }
.noimg .icon { width: 34%; height: 34%; opacity: .85; }
.noimg-sm { display: grid; place-items: center; color: var(--gold); }
.noimg-sm .icon { width: 60%; height: 60%; }

/* sections without photos: a list like the printed menu (name and details, price, +) */
.mlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; margin-top: 6px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 38px; gap: 14px; align-items: center; padding: 14px 0;
  border-bottom: 1px dashed var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mrow.has-img { grid-template-columns: 56px minmax(0, 1fr) auto 38px; }
.mrow > img, .mrow > .noimg-sm { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.mrow h3 { font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.mrow .desc { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }
.mrow .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mrow .price { white-space: nowrap; }
.mrow.soldout { opacity: .6; }
@media (hover: hover) { .mrow:hover h3 { color: var(--heading); text-decoration: underline; text-decoration-color: rgba(231, 201, 143, .5); text-underline-offset: 3px; } }

/* modal & drawer */
.overlay { position: fixed; inset: 0; background: rgba(0, 8, 24, .7); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 18px; max-width: 720px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; position: relative; }
.modal .close { position: absolute; right: 12px; top: 12px; z-index: 2; background: var(--surface-2); color: var(--ink); border: 0; box-shadow: var(--shadow); font-size: 20px; }
.modal-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 150px; color: var(--gold);
  background: radial-gradient(circle at 50% 40%, var(--surface-2), var(--bg) 80%); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.modal-icon .icon { width: 64px; height: 64px; }
.gallery .main { aspect-ratio: 16 / 10; background: var(--surface-2); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; padding: 8px 20px 0; overflow-x: auto; }
.gallery .thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 64px; height: 48px; flex: none; cursor: pointer; }
.gallery .thumbs button.on { border-color: var(--brand); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.modal .content { padding: 18px 20px 20px; }
.modal h2 { font-size: 28px; color: var(--heading); }
.modal .meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.modal h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ing { display: flex; flex-wrap: wrap; gap: 6px; }
.ing span { background: var(--surface-2); padding: 5px 10px; border-radius: 999px; font-size: 13.5px; }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin: 4px 0; }
.credit { font-size: 11px; color: var(--muted); margin-top: 14px; }
.buybar { position: sticky; bottom: 0; background: var(--surface); padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.qty button { border: 0; background: transparent; width: 36px; height: 36px; font-size: 18px; cursor: pointer; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }
.qty.sm button { width: 30px; height: 30px; font-size: 16px; }

.drawer-overlay { justify-content: flex-end; align-items: stretch; padding: 0; }
.drawer { background: var(--surface); width: min(420px, 100%); height: 100%; display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .5; } }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 22px; }
.drawer .lines { flex: 1; overflow: auto; padding: 8px 20px; }
.line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img, .line .noimg-sm { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.line .info { flex: 1; min-width: 0; }
.line .info b { display: block; font-size: 14.5px; }
.line .info small { color: var(--muted); }
.drawer footer { padding: 16px 20px; border-top: 1px solid var(--line); }
.sumrow { display: flex; justify-content: space-between; margin: 4px 0; }
.sumrow.total { font-weight: 800; font-size: 18px; margin-top: 8px; }

/* pages */
.page { padding: 24px 0 60px; }
.page-narrow { max-width: 720px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 16px; }
.panel h3 { font-size: 19px; margin-bottom: 4px; color: var(--heading); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick:empty { display: none; }
.checkout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.summary { position: sticky; top: 76px; }
.cohead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.cohead a { font-size: 14px; font-weight: 600; text-decoration: none; }
.coline { display: grid; grid-template-columns: 56px 1fr auto auto 32px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.coline:last-child { border-bottom: 0; }
.coline img, .coline .noimg-sm { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.coline .info { min-width: 0; }
.coline .info b { display: block; font-size: 14.5px; line-height: 1.25; }
.coline .info small { color: var(--muted); font-size: 12.5px; }
.coline .lt { font-size: 14.5px; white-space: nowrap; min-width: 64px; text-align: right; }
.coline .rm { border: 0; background: transparent; color: var(--muted); font-size: 16px; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.coline .rm:hover { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 520px) {
  .coline { grid-template-columns: 52px 1fr auto; grid-template-areas: "img info rm" "img qty lt"; row-gap: 6px; }
  .coline img, .coline .noimg-sm { grid-area: img; width: 52px; height: 52px; align-self: start; }
  .coline .info { grid-area: info; }
  .coline .qty { grid-area: qty; justify-self: start; }
  .coline .lt { grid-area: lt; justify-self: end; }
  .coline .rm { grid-area: rm; justify-self: end; }
}
.summary .row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.status-hero { text-align: center; padding: 28px 20px; }
.status-hero .code { font-family: ui-monospace, Consolas, monospace; font-size: 26px; font-weight: 800; letter-spacing: .12em; margin: 6px 0; }
.timeline { display: flex; gap: 0; margin: 22px 0 6px; }
.timeline .st { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; }
.timeline .st::before { content: ''; position: absolute; top: 5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--line); z-index: 1; }
.timeline .st::after { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.timeline .st:first-child::after { display: none; }
.timeline .st.done { color: var(--ink); font-weight: 600; }
.timeline .st.done::before, .timeline .st.done::after { background: var(--green); }
.timeline .st.now::before { box-shadow: 0 0 0 4px var(--green-soft); }
.msg { background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 12px 14px; margin-top: 14px; text-align: left; }

.orders-list .o { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.orders-list .o:last-child { border-bottom: 0; }

.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 40px 0; border-top: 1px solid var(--line); margin-top: 32px; }
.about h2 { font-size: 24px; margin-bottom: 10px; color: var(--heading); }
.about p { margin: 0 0 8px; }
footer.site { border-top: 1px solid var(--line); padding: 20px 0 100px; color: var(--muted); font-size: 13px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.floating-cart { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; display: none; }
.floating-cart .btn { width: 100%; justify-content: space-between; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--on-brand); padding: 10px 18px; border-radius: 999px;
  z-index: 80; font-weight: 600; font-size: 14px; animation: fade .2s; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .mlist { gap: 0 24px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Phones: the search gets its own full-width row under the chips (still sticky, so it's always at hand). */
  .catnav .wrap { flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .chips { flex: 1 1 100%; }
  .search { max-width: none; flex: 1 1 100%; }
  .search input { padding: 7px 12px; font-size: 16px; } /* 16px stops iPhones zooming in on focus */
  html { scroll-padding-top: 172px; } /* the sticky bar is taller here, so category taps stop below it */
  .hero { min-height: 300px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mlist { grid-template-columns: 1fr; }
  .section h2 { font-size: 21px; }
  .section h2 .icon { width: 34px; height: 34px; }
  .card .body { padding: 10px; }
  .card h3 { font-size: 14.5px; }
  .card .desc { display: none; }
  .price { font-size: 14.5px; }
  .add-btn { width: 34px; height: 34px; font-size: 20px; }
  .floating-cart.show { display: block; }
  .overlay:not(.drawer-overlay) { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .two { grid-template-columns: 1fr; }
  .topbar .label { display: none; }
}
@media (max-width: 360px) { .grid { grid-template-columns: 1fr; } }

/* cart lines of dishes without a photo: no empty picture square */
.line:not(:has(> img)) { padding-left: 0; }
.coline.noimg-line { grid-template-columns: 1fr auto auto 32px; }
@media (max-width: 520px) { .coline.noimg-line { grid-template-columns: 1fr auto; grid-template-areas: "info rm" "qty lt"; } }
