:root {
  --bg: #FFFBF0;
  --surface: #FFFFFF;
  --ink: #141414;
  --ink-soft: #6B615A;
  --red: #FF1E1E;
  --red-dark: #C90000;
  --mustard: #F7C600;
  --blue: #38BDF8;
  --line: #F0E3B4;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 64px;
  --top-h: 56px;
}

* { box-sizing: border-box; }


/* ===== PICK UP / DELIVERY CHOICE ===== */
.order-type-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.order-type-overlay[hidden] { display: none; }
.order-type-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 2px solid var(--mustard);
  border-radius: 20px;
  padding: 24px 18px 20px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 24px rgba(247,198,0,0.14);
}
.order-type-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  margin-bottom: 14px;
}
.order-type-card h2 {
  font-size: 23px;
  line-height: 1.15;
  margin-bottom: 8px;
}
.order-type-card > p {
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 18px;
}
.order-type-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.order-type-btn {
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 14px;
  padding: 15px 10px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
}
.order-type-btn:hover { border-color: var(--blue); }
.order-type-btn.pickup { border-color: var(--mustard); }
.order-type-btn.delivery { border-color: var(--red); }
.order-type-btn .order-type-icon { font-size: 27px; line-height: 1; margin-bottom: 3px; }

.location-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.location-btn {
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 14px;
  padding: 15px 10px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
}
.location-btn.exact { border-color: var(--blue); }
.location-btn.manual { border-color: var(--mustard); }
.location-btn:hover { border-color: var(--blue); }
.location-icon { font-size: 27px; line-height: 1; margin-bottom: 3px; }
.location-btn small { color: var(--ink-soft); font-size: 10.5px; font-weight: 500; }
.manual-location-form { margin-top: 14px; text-align: left; }
.manual-location-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.manual-location-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; font-family: var(--font-body); background: var(--bg); color: var(--ink); resize: vertical; }
.location-continue-btn { width: 100%; margin-top: 9px; border: none; border-radius: 10px; padding: 12px; background: var(--blue); color: #fff; font-weight: 700; }
.location-back-btn { margin-top: 12px; border: none; background: transparent; color: var(--ink-soft); font-weight: 600; padding: 8px 12px; }
.location-status { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: var(--red); }
body.dark .location-btn { background: #262626; color: var(--ink); }
body.dark .manual-location-form textarea { background: #262626; color: var(--ink); }
.order-type-btn small {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 500;
}
body.dark .order-type-card { background: var(--surface); }
body.dark .order-type-btn { background: #262626; color: var(--ink); }

/* ===== TAP GLOW ===== */
button, .btn, .chip, .size-btn, .add-btn, .nav-btn {
  transition: box-shadow .15s ease, transform .1s ease;
}
button:active, .btn:active, .chip:active, .size-btn:active, .add-btn:active, .nav-btn:active {
  box-shadow: 0 0 0 5px rgba(247, 198, 0, 0.45);
  transform: scale(0.97);
}
.cart-icon-btn:active {
  box-shadow: 0 0 0 5px rgba(247, 198, 0, 0.45);
  border-radius: 999px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-top: var(--top-h);
  padding-bottom: calc(var(--nav-h) + 12px);
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: 0.2px;
}

p { margin: 0; }

button { font-family: var(--font-body); cursor: pointer; }

/* ===== TOP BAR ===== */
.topbar {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: var(--top-h);
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.topbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.topbar-brand span { color: var(--mustard); margin-left: 4px; font-weight: 500; }

.hamburger-btn {
  background: none;
  border: none;
  color: var(--blue);
  padding: 6px;
  display: flex;
}

/* ===== SIDE DRAWER ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 90;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.side-drawer {
  position: fixed;
  top: 0; right: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  background: #F2F2F2;
  z-index: 100;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 20px rgba(0,0,0,0.15);
}
.side-drawer.open { transform: translateX(0); }

.drawer-header {
  background: var(--red);
  color: #fff;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.drawer-close { background: none; border: none; color: var(--blue); padding: 4px; }

.drawer-list { padding: 8px 0; overflow-y: auto; }
.drawer-item {
  width: 100%;
  background: #F2F2F2;
  border: none;
  border-bottom: 1px solid var(--mustard);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.drawer-item svg { color: var(--blue); }

.drawer-panel {
  background: #EAEAEA;
  padding: 12px 18px 16px;
  border-bottom: 1px solid var(--mustard);
}
.drawer-panel p {
  font-size: 13px;
  line-height: 1.6;
}
.drawer-panel p + p {
  margin-top: 8px;
}
.drawer-sub-link {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
}

.switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--line);
  border: none;
  position: relative;
  transition: background .2s ease;
}
.switch.on { background: var(--red); }
.switch-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s ease;
}
.switch.on .switch-knob { left: 23px; }

/* ===== DARK MODE ===== */
body.dark {
  --bg: #121212;
  --surface: #1E1E1E;
  --ink: #F5F1EA;
  --ink-soft: #A79E95;
  --line: #333333;
}
body.dark .side-drawer { background: #1E1E1E; }
body.dark .drawer-item { background: #1E1E1E; color: #F5F1EA; }
body.dark .drawer-panel { background: #262626; color: #F5F1EA; }
body.dark .theme-toggle-row { color: #F5F1EA; }
body.dark .home-strip,
body.dark .category-chips { border-color: var(--line); }
body.dark .chip { background: #2A2A2A; color: var(--ink); }
body.dark .chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
body.dark .size-btn { background: #262626; }
body.dark .review-form input,
body.dark .review-form select,
body.dark .review-form textarea,
body.dark .cart-name-field input,
body.dark .cart-name-field textarea { background: #262626; color: var(--ink); }

/* ===== TAB PANELS ===== */
.tab-panel { display: none; padding: 20px 16px 8px; }
.tab-panel.active { display: block; }

/* ===== HOME ===== */
.hero {
  background: var(--blue);
  color: #fff;
  margin: -20px -16px 0;
  padding: 32px 20px 26px;
  border-radius: 0 0 20px 20px;
}
.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: var(--mustard);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
}
.hero h1 span { color: var(--mustard); }
.hero p {
  margin-top: 12px;
  color: var(--mustard);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  max-width: 34ch;
}
.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.hero .btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 13px 18px;
  font-weight: 600;
  font-size: 14px;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:active { background: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-small { padding: 10px 14px; font-size: 13px; }
.btn-full { width: 100%; }


.home-strip {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.strip-item { display: flex; flex-direction: column; gap: 2px; }
.strip-item strong { font-size: 13px; }
.strip-item span { font-size: 11px; color: var(--ink-soft); }

.home-deal {
  margin-top: 18px;
  background: var(--blue);
  color: #fff;
  border-radius: 16px;
  padding: 20px;
}
.home-deal .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--mustard);
  margin-bottom: 6px;
}
.home-deal h2 { font-size: 20px; margin-bottom: 6px; }
.home-deal p { color: var(--mustard); font-size: 13px; font-weight: 700; margin-bottom: 14px; }

/* ===== MENU ===== */
.menu-header { padding: 4px 0 14px; }
.menu-header h2 { font-size: 24px; }
.menu-header p { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.category-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  background: #F0F0F0;
  border: 1px solid #F0F0F0;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 3px 10px rgba(56,189,248,0.25); }

.menu-category { padding: 22px 0 6px; scroll-margin-top: 130px; }
.menu-category h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.item-name { font-weight: 600; font-size: 14.5px; }
.item-note { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.size-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.size-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
}
.size-btn span { font-weight: 400; color: #E0F7FF; font-size: 10.5px; }

.stepper {
  display: flex;
  align-items: center;
  background: var(--blue);
  border-radius: 10px;
  overflow: hidden;
}
.stepper button {
  background: none;
  border: none;
  color: #fff;
  width: 30px;
  height: 32px;
  font-size: 16px;
  font-weight: 700;
}
.stepper .qty {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  min-width: 22px;
  text-align: center;
}

.single-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.price-tag { font-weight: 700; color: var(--blue); font-size: 14px; }

.add-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== CART ===== */
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.cart-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.cart-item-price { font-weight: 700; font-size: 13px; color: var(--blue); margin-top: 6px; }

.cart-name-field {
  margin-top: 14px;
}
.cart-name-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 14px;
}
.cart-name-field label:first-child { margin-top: 0; }
.required-star { color: var(--red); }
.optional-tag { color: var(--ink-soft); font-weight: 400; }
.cart-name-field input,
.cart-name-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--surface);
}
.cart-name-field input.input-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(228,35,29,0.15);
}

.cart-summary {
  position: sticky;
  bottom: calc(var(--nav-h) + 12px);
  margin-top: 18px;
  background: var(--ink);
  border-radius: 16px;
  padding: 16px 18px;
  color: #fff;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
}
.cart-summary .btn-primary { background: var(--mustard); color: var(--ink); }

/* ===== FEEDBACK / FORM ===== */
.review-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.review-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin: 14px 0 6px;
}
.review-form label:first-of-type { margin-top: 0; }
.review-form input,
.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--bg);
}
.review-form button { margin-top: 16px; background: var(--blue); color: #fff; }
.review-form button:hover { background: #0EA5E9; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  position: relative;
}
.nav-btn.active { color: var(--blue); }
.nav-badge {
  position: absolute;
  top: 2px;
  right: 26%;
  background: var(--mustard);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}