/* RR BISTRO — customer website. Mobile-first. Orange + Black + White. */
:root {
  --orange: #ff6b00;
  --orange-dark: #d95a00;
  --orange-soft: #fff2e8;
  --black: #111111;
  --ink: #1c1c1c;
  --muted: #6f6a66;
  --line: #ece8e4;
  --bg: #faf8f6;
  --white: #ffffff;
  --veg: #1b8a3a;
  --nonveg: #c0392b;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(17, 17, 17, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.4; font-size: 15px; }
body.no-scroll { overflow: hidden; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
a { color: var(--orange-dark); }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* ---------- header ---------- */
.c-header {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--black); color: var(--white);
}
.c-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.c-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--white); object-fit: contain; flex: none; }
.c-name { font-weight: 800; font-size: 18px; letter-spacing: .06em; line-height: 1.1; }
.c-tagline { font-size: 10.5px; letter-spacing: .14em; color: var(--orange); font-weight: 700; white-space: nowrap; }
.lang-toggle { display: flex; background: #2a2a2a; border-radius: 999px; padding: 3px; flex: none; }
.lang-toggle button { border: 0; background: transparent; color: #d8d8d8; padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.lang-toggle button.on { background: var(--orange); color: var(--white); }

.c-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 4px; }
.ctx-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; }
.ctx-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.ctx-chip.delivery::before { background: #2f6fed; }
.ctx-chip.pickup::before { background: #8a4fff; }
.ctx-timer { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ctx-timer b { font-variant-numeric: tabular-nums; color: var(--ink); }
.ctx-timer.warn { color: var(--danger); font-weight: 600; }
.ctx-timer.warn b { color: var(--danger); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- tools ---------- */
.c-tools { padding: 8px 14px 6px; display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; padding: 11px 0; background: transparent; min-width: 0; color: var(--ink); }
.search:focus-within { border-color: var(--orange); }
.diet-filter { display: flex; gap: 8px; }
.diet-filter button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.diet-filter button.on { border-color: var(--black); background: var(--black); color: var(--white); }

.veg-mark { display: inline-block; width: 14px; height: 14px; border: 1.6px solid var(--veg); border-radius: 3px; position: relative; flex: none; vertical-align: -2px; }
.veg-mark::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--veg); }
.veg-mark.non_veg { border-color: var(--nonveg); }
.veg-mark.non_veg::after { background: transparent; inset: auto; left: 1.5px; top: 2px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--nonveg); border-radius: 0; }

.section-tabs { position: sticky; top: 64px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; background: var(--bg); scrollbar-width: none; border-bottom: 1px solid var(--line); }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs button { flex: none; border: 0; background: transparent; padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.section-tabs button.on { background: var(--orange-soft); color: var(--orange-dark); }

/* ---------- menu ---------- */
.menu-list { padding: 4px 14px 24px; }
.m-section { padding-top: 14px; }
.m-section h3 { font-size: 18px; margin: 4px 0 6px; font-weight: 800; }
.m-section h3 small { color: var(--muted); font-weight: 600; font-size: 13px; }
.m-item { display: flex; gap: 12px; justify-content: space-between; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.m-item.na { opacity: .55; }
.m-info { flex: 1; min-width: 0; cursor: pointer; }
.m-info h4 { margin: 6px 0 4px; font-size: 16px; font-weight: 700; line-height: 1.25; }
.m-price { font-weight: 700; font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.m-price .pv { white-space: nowrap; }
.m-price .dot { color: var(--muted); }
.m-desc { margin: 6px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-side { flex: none; width: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.m-side.has-img { justify-content: flex-start; }
.m-img { width: 112px; height: 112px; border-radius: 14px; overflow: hidden; background: #f0ebe6; cursor: pointer; }
.m-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-side.has-img .m-ctl { margin-top: -18px; }
.m-ctl { position: relative; z-index: 1; }

.add-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 92px; height: 36px; padding: 0 12px; border: 1px solid #f1d6c2; background: var(--white); color: var(--orange-dark); font-weight: 800; border-radius: 10px; box-shadow: 0 3px 10px rgba(255, 107, 0, .15); font-size: 14px; }
.add-btn b { font-size: 16px; line-height: 1; }
.add-btn.has { background: var(--orange); color: var(--white); border-color: var(--orange); font-size: 12.5px; }
.stepper { display: inline-flex; align-items: center; height: 36px; background: var(--orange); color: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 3px 10px rgba(255, 107, 0, .25); }
.stepper button { width: 34px; height: 100%; border: 0; background: transparent; color: var(--white); font-size: 20px; font-weight: 700; }
.stepper span { min-width: 24px; text-align: center; font-weight: 800; }
.na-tag { font-size: 12px; font-weight: 700; color: var(--danger); background: #fdecea; padding: 5px 9px; border-radius: 8px; }

.empty-state { text-align: center; padding: 48px 12px; color: var(--muted); }
.btn-outline { display: inline-block; border: 1.5px solid var(--black); background: var(--white); color: var(--black); border-radius: 12px; padding: 11px 18px; font-weight: 700; text-decoration: none; text-align: center; }
.btn-outline.wide { display: block; margin: 14px 0; }
.link-btn { border: 0; background: none; color: var(--orange-dark); font-weight: 700; padding: 12px 0; }

.skeleton { height: 96px; margin: 14px 0; border-radius: 14px; background: linear-gradient(90deg, #f1ede9 25%, #f8f5f2 50%, #f1ede9 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
.skeleton.tall { height: 260px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- views ---------- */
.view-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 4px; }
.view-head h2 { margin: 0; font-size: 20px; }
.back-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); font-size: 24px; line-height: 1; padding-bottom: 3px; }
.cart-lines, .checkout-form, [data-cart-bill] { padding: 4px 14px; }
.cart-line { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 4px 10px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 10px 0; }
.cart-line .veg-mark { grid-row: 1; }
.cl-info { min-width: 0; }
.cl-name { font-weight: 700; }
.cl-name em, .bill-row em { color: var(--muted); font-style: normal; font-weight: 500; }
.cl-unit { font-size: 12.5px; color: var(--muted); }
.cart-line .stepper { grid-column: 3; grid-row: 1; height: 32px; }
.cl-total { grid-column: 2 / 4; text-align: right; font-weight: 700; }
.bill-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 14px; }
[data-cart-bill].bill-card, [data-cart-bill] .bill-total { margin: 0; }
.bill-title { font-weight: 800; margin-bottom: 6px; }
.bill-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.bill-sub { margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--orange-dark); text-transform: uppercase; letter-spacing: .06em; }
.bill-total { display: flex; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px; font-size: 17px; font-weight: 800; }
[data-cart-bill] { margin: 8px 14px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); padding: 0 14px 12px; }
[data-cart-bill]:empty { display: none; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.c-field { display: block; margin-bottom: 12px; }
.c-field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.c-field input, .c-field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; color: var(--ink); outline: 0; }
.c-field input:focus, .c-field textarea:focus { border-color: var(--orange); }
.c-field.bad input, .c-field.bad textarea { border-color: var(--danger); }
.c-field .err { color: var(--danger); font-size: 12.5px; display: block; margin-top: 4px; }
.c-field .err:empty { display: none; }
.c-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loc-box { border: 1.5px dashed #f1c9ab; background: var(--orange-soft); border-radius: 12px; padding: 12px; }
.loc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.loc-title { font-weight: 700; font-size: 14px; }
.loc-sub { font-size: 12px; color: var(--muted); }
.loc-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--orange); color: var(--white); display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px rgba(255, 107, 0, .35); }
.loc-status { margin-top: 8px; font-size: 13px; }
.loc-link { border: 0; background: none; color: var(--orange-dark); font-weight: 700; padding: 0; text-decoration: underline; }
.loc-ok { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.loc-ok b { color: var(--veg); }
.loc-err { color: var(--danger); }
.loc-busy { color: var(--muted); }
.pay-title { font-weight: 800; margin-bottom: 10px; }
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay-opt span { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.pay-opt b { font-size: 20px; }
.pay-opt em { font-style: normal; font-weight: 600; font-size: 13px; }
.pay-opt input:checked + span { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); box-shadow: inset 0 0 0 1px var(--orange); }
.pay-opt input:focus-visible + span { outline: 2px solid var(--black); }
.pay-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.form-error { color: var(--danger); background: #fdecea; border-radius: 10px; padding: 10px 12px; font-weight: 600; margin: 8px 0; }

/* ---------- cart bar ---------- */
body.has-bar { padding-bottom: 88px; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(250, 248, 246, 0)); }
.cart-bar-btn { width: 100%; max-width: 640px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 14px; padding: 13px 16px; background: var(--black); color: var(--white); box-shadow: var(--shadow); }
.cart-bar-btn.place { background: var(--orange); }
.cart-bar-btn:disabled { opacity: .7; }
.cb-left { display: flex; flex-direction: column; align-items: flex-start; font-size: 12px; opacity: .9; }
.cb-total { font-size: 17px; font-weight: 800; opacity: 1; }
.cb-right { font-weight: 800; font-size: 15px; letter-spacing: .02em; }

/* ---------- item sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 50; animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 88vh; overflow-y: auto; background: var(--white); border-radius: 20px 20px 0 0; animation: up .22s ease-out; max-width: 640px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: #ddd; margin: 8px auto; }
.sheet-img { margin: 0 14px; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: #f0ebe6; }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-body { padding: 14px 16px 18px; }
.sheet-title { display: flex; gap: 8px; align-items: center; }
.sheet-title h3 { margin: 0; font-size: 20px; }
.sheet-desc { color: var(--muted); margin: 8px 0 0; }
.sheet-sub { margin: 16px 0 4px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.var-list { margin-top: 8px; }
.var-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.var-label { font-weight: 700; }
.var-price { color: var(--muted); font-weight: 600; }
.sheet-done { width: 100%; margin-top: 16px; border: 0; border-radius: 12px; background: var(--black); color: var(--white); padding: 14px; font-weight: 800; font-size: 15px; }

.c-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; background: var(--black); color: var(--white); padding: 10px 16px; border-radius: 12px; max-width: calc(100% - 32px); font-size: 14px; box-shadow: var(--shadow); text-align: center; }

.powered { text-align: center; font-size: 12px; color: #9a948f; padding: 18px 12px 26px; }
.powered a { color: #9a948f; }

/* ---------- plain pages (landing / expired / invalid QR) ---------- */
.plain-page { background: var(--black); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px 0; }
.notice-card { background: var(--white); border-radius: 22px; padding: 28px 22px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.notice-logo { width: 96px; height: 96px; object-fit: contain; border-radius: 20px; }
.notice-card h1 { font-size: 22px; margin: 12px 0 6px; }
.notice-card h2 { font-size: 18px; margin: 16px 0 6px; }
.brand-title { letter-spacing: .08em; font-weight: 900; }
.brand-tagline { color: var(--orange); font-weight: 800; letter-spacing: .16em; font-size: 12px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.scan-art { margin: 18px auto 4px; }
.expired-icon { margin: 12px auto 0; }
.expired-msg { font-size: 16px; font-weight: 600; margin: 6px 0; }
.expired-other { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.scan-steps { background: var(--orange-soft); border-radius: 16px; padding: 10px 14px 14px; }
.scan-steps p { margin: 4px 0 0; font-weight: 600; }
.plain-page .powered { color: #8f8a86; }

/* ---------- track page ---------- */
.track { padding: 14px; max-width: 640px; margin: 0 auto; }
.placed-banner { display: flex; gap: 14px; align-items: center; background: var(--orange); color: var(--white); border-radius: 18px; padding: 16px; margin-bottom: 12px; animation: up .3s ease-out; }
.placed-banner h1 { margin: 0; font-size: 20px; }
.placed-banner p { margin: 2px 0 0; opacity: .95; }
.tick { width: 48px; height: 48px; border-radius: 50%; background: var(--white); color: var(--orange); display: grid; place-items: center; font-size: 26px; font-weight: 900; flex: none; }
.track-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.track-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.track-no { font-size: 22px; font-weight: 900; }
.track-ctx { color: var(--muted); font-size: 13px; margin-top: 2px; }
.track-total { font-size: 20px; font-weight: 800; }
.track-title { font-weight: 800; margin: 14px 0 8px; }
.track-card > .track-title:first-child { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 18px 26px; color: #a09a95; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d5cfc9; background: var(--white); }
.timeline li.done { color: var(--ink); }
.timeline li.done .dot { background: var(--orange); border-color: var(--orange); }
.timeline li.done::before { background: var(--orange); }
.timeline li.now { color: var(--ink); font-weight: 800; }
.timeline li.now .dot { border-color: var(--orange); box-shadow: 0 0 0 5px rgba(255, 107, 0, .18); animation: pulse 1.4s infinite; }
.timeline .lbl small { display: block; font-weight: 500; color: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(255, 107, 0, .05); } }
.cancel-box { margin-top: 12px; background: #fdecea; color: var(--danger); border-radius: 12px; padding: 12px; }
.cancel-box p { margin: 4px 0 0; color: var(--ink); }
.pay-remind { margin-top: 14px; background: var(--orange-soft); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.live-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--veg); animation: blink 1.2s infinite; }

@media (min-width: 700px) {
  .c-header, .c-context, .c-tools, .section-tabs, .menu-list, .view-head, .cart-lines, .checkout-form, [data-cart-bill], .bill-card { max-width: 720px; margin-left: auto; margin-right: auto; }
  .c-header { max-width: none; padding-left: max(14px, calc(50vw - 346px)); padding-right: max(14px, calc(50vw - 346px)); }
  .section-tabs { max-width: none; padding-left: max(14px, calc(50vw - 346px)); }
}
