/* DoorDash Replica — design system */
:root {
  --red: #eb1700;
  --red-dark: #c21300;
  --red-pressed: #a81000;
  --red-tint: #fdf0ee;
  --ink: #191919;
  --ink-2: #454545;
  --gray: #757575;
  --gray-light: #a4a4a4;
  --line: #e6e6e6;
  --line-soft: #f0f0f0;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --bg-warm: #fafafa;
  --green: #0a7d2c;
  --green-tint: #e7f6ec;
  --teal: #017a5e;
  --dashpass: #063c2f;
  --orange: #d64300;
  --orange-tint: #fff1e6;
  --star: #f2a23a;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);
  --radius: 8px;
  --radius-lg: 12px;
  --font: "DD Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--red); color: #fff; }

/* focus visibility */
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-bottom: 1px solid var(--line-soft); }
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
}
.logo {
  display: flex; align-items: center; gap: 6px;
  color: var(--red); font-weight: 800; font-size: 24px; letter-spacing: -0.8px;
  flex-shrink: 0;
}
.logo svg { width: 28px; height: 28px; }
.mode-toggle {
  display: flex; background: var(--bg-soft); border-radius: 24px; padding: 4px; flex-shrink: 0;
}
.mode-toggle button {
  padding: 8px 18px; border-radius: 20px; font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.mode-toggle button.active { background: var(--ink); color: #fff; }
.mode-toggle button:not(.active):hover { background: #ececec; }
.addr-btn {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: 15px; font-weight: 700; padding: 8px 10px; border-radius: var(--radius);
  transition: background 0.15s ease;
  max-width: 260px;
}
.addr-btn:hover { background: var(--bg-soft); }
.addr-btn .addr-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-btn .addr-time { font-weight: 400; color: var(--gray); }
.addr-btn svg { flex-shrink: 0; color: var(--gray); }
.search-wrap {
  flex: 1; position: relative; min-width: 120px;
}
.search-input {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border-radius: 24px; padding: 12px 18px;
  cursor: text; transition: box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
}
.search-input:hover { background: #efefef; }
.search-input svg { color: var(--gray); flex-shrink: 0; }
.search-input input {
  border: none; background: none; outline: none; width: 100%; font-size: 15px;
}
.search-input input::placeholder { color: var(--gray); }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.signin-btn {
  font-size: 15px; font-weight: 600; padding: 10px 16px; border-radius: 24px;
  transition: background 0.15s ease;
}
.signin-btn:hover { background: var(--bg-soft); }
.cart-btn {
  display: flex; align-items: center; gap: 8px; position: relative;
  background: var(--red); color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 20px; border-radius: 24px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.cart-btn:hover { background: var(--red-dark); }
.cart-btn:active { transform: scale(0.96); background: var(--red-pressed); }
.cart-badge {
  background: #fff; color: var(--red); border-radius: 50%;
  min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-badge.bump { transform: scale(1.35); }

/* ------------------------------------------------------------ home hero */
.hero-banner {
  background: linear-gradient(135deg, #ff3008 0%, #eb1700 45%, #b81200 100%);
  color: #fff; border-radius: var(--radius-lg);
  margin: 20px 0 8px; overflow: hidden; position: relative;
}
.hero-banner .hero-inner {
  padding: 44px 40px; position: relative; z-index: 1;
  max-width: 60%;
}
.hero-banner h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; }
.hero-banner p { margin-top: 10px; font-size: 17px; opacity: 0.92; }
.hero-banner .hero-address {
  margin-top: 22px; background: #fff; border-radius: 28px; padding: 6px 6px 6px 20px;
  display: flex; align-items: center; gap: 10px; max-width: 440px; cursor: pointer;
  color: var(--ink); transition: box-shadow 0.15s ease;
}
.hero-banner .hero-address:hover { box-shadow: var(--shadow-md); }
.hero-banner .hero-address span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.hero-banner .hero-address .go {
  background: var(--ink); color: #fff; border-radius: 22px; padding: 10px 18px; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.hero-banner .hero-art {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%) rotate(-4deg);
  width: 46%; height: 130%; object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); opacity: 0.96;
}
.promo-strip {
  display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 6px;
  scrollbar-width: none;
}
.promo-strip::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 300px; border-radius: var(--radius-lg); padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 108px;
  color: #fff; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.promo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.promo-card h3 { font-size: 17px; font-weight: 800; }
.promo-card p { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.promo-card .promo-cta { font-size: 13px; font-weight: 700; margin-top: 10px; display: flex; align-items: center; gap: 4px; }

/* ----------------------------------------------------- category carousel */
.cuisine-row { position: relative; margin: 18px 0 4px; }
.cuisine-scroller {
  display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 10px;
  scroll-behavior: smooth; scrollbar-width: none;
}
.cuisine-scroller::-webkit-scrollbar { display: none; }
.cuisine-item {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; background: none; padding: 2px;
}
.cuisine-item .cuisine-img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid transparent; transition: transform 0.15s ease, border-color 0.15s ease;
}
.cuisine-item:hover .cuisine-img { transform: scale(1.06); }
.cuisine-item.active .cuisine-img { border-color: var(--red); }
.cuisine-item span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cuisine-item.active span { color: var(--red); }
.scroll-arrow {
  position: absolute; top: 36px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.scroll-arrow:hover { transform: scale(1.1); }
.scroll-arrow.left { left: -10px; }
.scroll-arrow.right { right: -10px; }
.scroll-arrow.hidden { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------ filter bar */
.filter-bar {
  display: flex; gap: 10px; align-items: center; overflow-x: auto;
  padding: 14px 2px; scrollbar-width: none; position: sticky; top: var(--header-h);
  background: var(--bg); z-index: 100;
}
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 20px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { background: var(--bg-soft); border-color: #d4d4d4; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .chip-badge { color: var(--red); font-weight: 800; }
.chip.active .chip-badge { color: #ffb3ab; }

/* --------------------------------------------------------- section heads */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 14px; }
.section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.section-head .see-all { font-size: 14px; font-weight: 600; color: var(--gray); }
.section-head .see-all:hover { color: var(--ink); }

/* -------------------------------------------------------- restaurant card */
.rest-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; padding-bottom: 8px;
}
.rest-grid.two { grid-template-columns: repeat(2, 1fr); }
.rest-card {
  cursor: pointer; border-radius: var(--radius-lg);
  transition: transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.rest-card:hover { transform: translateY(-3px); }
.rest-card:active { transform: scale(0.98); }
.rest-card .rc-imgwrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.rest-card img { width: 100%; aspect-ratio: 16/9.5; object-fit: cover; transition: transform 0.3s ease; background: var(--bg-soft); }
.rest-card:hover img { transform: scale(1.03); }
.rc-offer {
  position: absolute; left: 10px; bottom: 10px;
  background: var(--red); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 16px; box-shadow: var(--shadow-sm);
}
.rc-dashpass {
  position: absolute; left: 10px; top: 10px;
  background: rgba(6, 60, 47, 0.92); color: #a7f3d0; font-size: 11.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 14px; letter-spacing: 0.3px;
}
.rc-closed {
  position: absolute; inset: 0; background: rgba(255, 255, 255, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.rc-closed span { background: #fff; color: var(--ink); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 18px; box-shadow: var(--shadow-sm); }
.rc-body { padding: 10px 4px 0; }
.rc-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rc-name h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-rating {
  display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; flex-shrink: 0;
  background: var(--bg-soft); border-radius: 14px; padding: 3px 8px;
}
.rc-rating svg { color: var(--ink); }
.rc-meta { display: flex; align-items: center; gap: 5px; color: var(--gray); font-size: 13.5px; margin-top: 4px; flex-wrap: wrap; }
.rc-meta .dot { color: #c9c9c9; }
.rc-meta .fee-free { color: var(--green); font-weight: 700; }
.rc-meta .rc-closed-text { color: var(--red); font-weight: 600; }

/* ------------------------------------------------------------- homepage footer */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 48px; padding: 36px 0 60px; background: var(--bg-warm); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-cols h4 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.footer-cols li { margin-bottom: 8px; font-size: 14px; color: var(--gray); cursor: pointer; }
.footer-cols li:hover { color: var(--ink); }
.footer-note { margin-top: 28px; font-size: 13px; color: var(--gray-light); }

/* ------------------------------------------------------------ search page */
.search-page { max-width: 820px; margin: 0 auto; padding: 24px 24px 60px; }
.search-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.search-hero .back-btn { flex-shrink: 0; }
.search-field {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border-radius: 26px; padding: 14px 20px;
  border: 1px solid transparent; transition: border-color 0.15s ease, background 0.15s ease;
}
.search-field:focus-within { background: #fff; border-color: var(--ink); box-shadow: var(--shadow-sm); }
.search-field input { flex: 1; border: none; outline: none; background: none; font-size: 17px; }
.search-field .clear-q { color: var(--gray); display: none; padding: 2px; }
.search-field .clear-q.show { display: block; }
.search-suggest { margin-top: 18px; }
.suggest-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gray); margin: 20px 0 10px; }
.suggest-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-radius: var(--radius);
  cursor: pointer; font-size: 16px; transition: background 0.12s ease;
}
.suggest-row:hover { background: var(--bg-soft); }
.suggest-row svg { color: var(--gray); flex-shrink: 0; }
.suggest-row .recent-remove { margin-left: auto; color: var(--gray-light); padding: 4px; border-radius: 50%; }
.suggest-row .recent-remove:hover { color: var(--ink); background: var(--line); }
.popular-terms { display: flex; flex-wrap: wrap; gap: 10px; }
.search-results { margin-top: 26px; }
.dish-result {
  display: flex; gap: 14px; padding: 14px 6px; border-radius: var(--radius-lg); cursor: pointer;
  transition: background 0.12s ease; align-items: center;
}
.dish-result:hover { background: var(--bg-soft); }
.dish-result img { width: 76px; height: 76px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.dish-result .dr-body { flex: 1; min-width: 0; }
.dish-result h4 { font-size: 16px; font-weight: 700; }
.dish-result p { font-size: 13.5px; color: var(--gray); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-result .dr-rest { font-size: 13px; color: var(--gray); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.dish-result .dr-price { font-weight: 700; font-size: 15px; flex-shrink: 0; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-emoji { font-size: 52px; margin-bottom: 14px; }
.empty-state h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--gray); font-size: 15px; max-width: 380px; margin: 0 auto 18px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 16px;
  border-radius: 26px; padding: 14px 28px; transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:active { transform: scale(0.97); background: var(--red-pressed); }
.btn-primary:disabled { background: #d7d7d7; cursor: not-allowed; transform: none; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-soft); color: var(--ink); font-weight: 700; font-size: 15px;
  border-radius: 26px; padding: 12px 22px; transition: background 0.15s ease;
}
.btn-ghost:hover { background: var(--line); }

/* -------------------------------------------------------- restaurant page */
.rest-hero { position: relative; height: 300px; overflow: hidden; }
.rest-hero img { width: 100%; height: 100%; object-fit: cover; }
.rest-hero .hero-fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.28), transparent 45%); }
.rest-hero .back-btn-overlay {
  position: absolute; top: 18px; left: 24px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; transition: transform 0.15s ease;
}
.rest-hero .back-btn-overlay:hover { transform: scale(1.08); }
.rest-head { padding: 22px 0 0; }
.rest-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.6px; }
.rest-sub { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14.5px; margin-top: 8px; flex-wrap: wrap; }
.rest-sub .dot { color: #c9c9c9; }
.rest-sub svg { color: var(--star); }
.rest-infobar {
  display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.info-pill {
  display: flex; align-items: center; gap: 8px; background: var(--bg-soft);
  border-radius: 20px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease; border: 1px solid transparent;
}
.info-pill:hover { background: var(--line); }
.info-pill svg { color: var(--ink-2); }
.info-pill.active { background: var(--green-tint); border-color: #bfe6cc; color: var(--green); }
.rest-offerline {
  margin-top: 14px; display: flex; align-items: center; gap: 8px; color: var(--red); font-weight: 700; font-size: 14.5px;
}
.closed-banner {
  margin-top: 14px; background: var(--orange-tint); color: var(--orange);
  border-radius: var(--radius); padding: 12px 16px; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}

/* category nav */
.cat-nav-wrap {
  position: sticky; top: var(--header-h); z-index: 90; background: var(--bg);
  border-bottom: 1px solid var(--line); margin-top: 18px;
}
.cat-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav button {
  padding: 14px 14px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  border-bottom: 3px solid transparent; transition: color 0.15s ease, border-color 0.15s ease;
}
.cat-nav button:hover { color: var(--ink); }
.cat-nav button.active { color: var(--red); border-bottom-color: var(--red); }

/* menu layout */
.menu-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 60px; }
.menu-section { padding-top: 26px; scroll-margin-top: calc(var(--header-h) + 60px); }
.menu-section h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 14px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.menu-item {
  display: flex; justify-content: space-between; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px;
  cursor: pointer; transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  background: #fff; position: relative; overflow: hidden;
}
.menu-item:hover { box-shadow: var(--shadow-md); border-color: #d8d8d8; }
.menu-item:active { transform: scale(0.99); }
.menu-item.soldout { opacity: 0.62; cursor: not-allowed; }
.menu-item.soldout:hover { box-shadow: none; border-color: var(--line); transform: none; }
.mi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-badges { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.badge-pop {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--orange-tint); color: var(--orange);
  font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 12px; letter-spacing: 0.2px;
}
.badge-soldout {
  display: inline-flex; align-items: center; background: var(--line); color: var(--ink-2);
  font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 12px;
}
.badge-veg {
  display: inline-flex; align-items: center; gap: 4px; color: var(--green);
  font-size: 11.5px; font-weight: 700; padding: 3px 0;
}
.mi-body h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.1px; }
.mi-price { font-size: 14.5px; color: var(--ink-2); margin-top: 3px; font-weight: 600; }
.mi-desc {
  font-size: 13.5px; color: var(--gray); margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mi-imgwrap { position: relative; flex-shrink: 0; width: 128px; height: 108px; align-self: center; }
.mi-imgwrap img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--bg-soft); }
.mi-add {
  position: absolute; right: -6px; bottom: -6px;
  width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--red);
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.mi-add:hover { background: var(--red); color: #fff; transform: scale(1.08); }
.mi-add:active { transform: scale(0.92); }
.mi-imgwrap.no-img { display: none; }
.mi-add-inline {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 10px;
  border: 1.5px solid var(--red); color: var(--red); background: #fff;
  font-size: 13px; font-weight: 800; padding: 7px 14px; border-radius: 18px;
  transition: background 0.12s ease, color 0.12s ease, transform 0.1s ease;
}
.mi-add-inline:hover { background: var(--red); color: #fff; }
.mi-add-inline:active { transform: scale(0.95); }
.menu-item .soldout-veil { position: absolute; inset: 0; background: rgba(255,255,255,0.35); pointer-events: none; }

/* ------------------------------------------------------------ item modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(25, 25, 25, 0.55); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px;
  max-height: min(88vh, 860px); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(0.98); transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; transition: transform 0.12s ease;
}
.modal-close:hover { transform: scale(1.08) rotate(90deg); }
.modal-img { position: relative; height: 220px; flex-shrink: 0; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.modal-head { padding: 20px 24px 4px; position: relative; }
.modal-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.modal-head .modal-price { font-size: 16px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.modal-head .modal-desc { font-size: 14.5px; color: var(--gray); margin-top: 8px; }
.modal-head .mi-badges { margin: 8px 0 0; }
.mod-group { padding: 18px 24px; border-top: 8px solid var(--bg-soft); }
.mod-group:first-of-type { border-top: none; }
.mod-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mod-group-head h3 { font-size: 17px; font-weight: 800; }
.mod-req { font-size: 12px; font-weight: 700; color: var(--gray); background: var(--bg-soft); padding: 3px 9px; border-radius: 12px; }
.mod-req.required { color: var(--ink); background: var(--line); }
.mod-hint { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.mod-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px; cursor: pointer;
  border-radius: var(--radius); transition: background 0.1s ease; user-select: none;
}
.mod-option:hover { background: var(--bg-warm); }
.mod-option .opt-name { flex: 1; font-size: 15px; }
.mod-option .opt-price { font-size: 14px; color: var(--gray); font-weight: 600; }
.opt-control {
  width: 22px; height: 22px; flex-shrink: 0; border: 2px solid #bdbdbd;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.opt-control.radio { border-radius: 50%; }
.opt-control.check { border-radius: 6px; }
.mod-option.selected .opt-control { border-color: var(--red); background: var(--red); }
.opt-control svg { color: #fff; opacity: 0; transform: scale(0.5); transition: opacity 0.12s ease, transform 0.12s ease; }
.mod-option.selected .opt-control svg { opacity: 1; transform: scale(1); }
.opt-control.radio::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  transform: scale(0); transition: transform 0.12s ease;
}
.mod-option.selected .opt-control.radio::after { transform: scale(1); }
.mod-group.error { box-shadow: inset 4px 0 0 var(--red); }
.mod-error-msg { color: var(--red); font-size: 13px; font-weight: 600; margin-top: 6px; display: none; }
.mod-group.error .mod-error-msg { display: block; }
.instructions-area {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  font-size: 15px; resize: none; min-height: 72px; outline: none; transition: border-color 0.15s ease;
}
.instructions-area:focus { border-color: var(--ink); }
.char-count { text-align: right; font-size: 12px; color: var(--gray-light); margin-top: 4px; }
.modal-foot {
  display: flex; align-items: center; gap: 14px; padding: 14px 24px;
  border-top: 1px solid var(--line); background: #fff; flex-shrink: 0;
}
.qty-stepper {
  display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 24px; padding: 4px;
}
.qty-stepper button {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--ink); transition: background 0.12s ease, color 0.12s ease;
}
.qty-stepper button:hover:not(:disabled) { background: var(--bg-soft); }
.qty-stepper button:disabled { color: #cfcfcf; cursor: not-allowed; }
.qty-stepper .qty-val { min-width: 24px; text-align: center; font-weight: 800; font-size: 16px; }
.add-to-cart-btn {
  flex: 1; background: var(--red); color: #fff; border-radius: 26px; padding: 15px 20px;
  font-size: 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.add-to-cart-btn:hover { background: var(--red-dark); }
.add-to-cart-btn:active { transform: scale(0.98); }
.add-to-cart-btn:disabled { background: #d7d7d7; cursor: not-allowed; }

/* ------------------------------------------------------------ cart drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(25, 25, 25, 0.5); z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 94vw;
  background: #fff; z-index: 450; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.28, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.14);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.drawer-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.drawer-head .drawer-sub { font-size: 13.5px; color: var(--gray); margin-top: 2px; font-weight: 400; }
.drawer-close { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.12s ease; }
.drawer-close:hover { background: var(--bg-soft); }
.drawer-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.dashpass-hint {
  margin: 14px 16px 0; background: var(--dashpass); color: #d9f5e8; border-radius: var(--radius-lg);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: filter 0.15s ease;
}
.dashpass-hint:hover { filter: brightness(1.15); }
.dashpass-hint .dp-logo { font-weight: 900; font-style: italic; font-size: 15px; color: #fff; flex-shrink: 0; }
.dashpass-hint p { font-size: 13.5px; flex: 1; }
.dashpass-hint p b { color: #7be8b0; }
.cart-line { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.cart-line .qty-stepper.small { padding: 2px; border-radius: 18px; flex-shrink: 0; align-self: flex-start; }
.cart-line .qty-stepper.small button { width: 26px; height: 26px; }
.cart-line .qty-stepper.small .qty-val { min-width: 18px; font-size: 14px; }
.cl-body { flex: 1; min-width: 0; }
.cl-name { font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 10px; }
.cl-name .cl-price { flex-shrink: 0; }
.cl-mods { font-size: 13px; color: var(--gray); margin-top: 3px; line-height: 1.5; }
.cl-instr { font-size: 13px; color: var(--gray); margin-top: 3px; font-style: italic; }
.cl-actions { display: flex; gap: 14px; margin-top: 8px; }
.cl-actions button { font-size: 13.5px; font-weight: 700; color: var(--ink-2); padding: 2px 0; }
.cl-actions button:hover { color: var(--red); text-decoration: underline; }
.fee-breakdown { padding: 16px 20px; }
.fee-row { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--ink-2); padding: 5px 0; }
.fee-row .free { color: var(--green); font-weight: 700; }
.fee-row .strike { text-decoration: line-through; color: var(--gray-light); margin-right: 6px; }
.fee-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 17px; font-weight: 800; color: var(--ink); }
.fee-row .fee-info { color: var(--gray-light); cursor: help; margin-left: 4px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); flex-shrink: 0; background: #fff; }
.drawer-foot .btn-primary { width: 100%; display: flex; justify-content: space-between; padding: 16px 22px; }
.cart-empty { text-align: center; padding: 70px 30px; }
.cart-empty .empty-emoji { font-size: 56px; margin-bottom: 16px; }
.cart-empty h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.cart-empty p { color: var(--gray); font-size: 14.5px; margin-bottom: 20px; }
.cart-mode-row { display: flex; gap: 10px; padding: 14px 20px 0; }
.cart-mode-row .info-pill { font-size: 13px; padding: 8px 14px; }

/* confirm dialog */
.confirm-modal { max-width: 420px; }
.confirm-body { padding: 28px 28px 8px; }
.confirm-body h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; }
.confirm-body p { color: var(--ink-2); font-size: 15px; margin-top: 10px; }
.confirm-foot { display: flex; gap: 12px; padding: 20px 28px 24px; }
.confirm-foot .btn-primary, .confirm-foot .btn-ghost { flex: 1; }

/* -------------------------------------------------------------- checkout */
.checkout-page { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
.checkout-page h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 24px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.co-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 18px; background: #fff; }
.co-card h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.2px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.co-card h2 .step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.co-card h2 .edit-link { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--red); cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field-row.single { grid-template-columns: 1fr; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  font-size: 15px; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field .field-err { color: var(--red); font-size: 12.5px; font-weight: 600; margin-top: 5px; display: none; }
.field.invalid .field-err { display: block; }
.tip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tip-opt {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 18px;
  font-size: 15px; font-weight: 700; text-align: center; cursor: pointer; min-width: 82px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tip-opt:hover { border-color: #bdbdbd; background: var(--bg-warm); }
.tip-opt.active { border-color: var(--red); background: var(--red-tint); color: var(--red); }
.tip-opt .tip-amt { display: block; font-size: 12.5px; color: var(--gray); font-weight: 600; margin-top: 2px; }
.tip-opt.active .tip-amt { color: var(--red); }
.tip-custom { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tip-custom input { width: 120px; }
.summary-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; background: #fff; position: sticky; top: calc(var(--header-h) + 20px); }
.summary-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.summary-rest { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }
.summary-lines { max-height: 240px; overflow-y: auto; margin-bottom: 8px; }
.summary-line { display: flex; gap: 10px; font-size: 14px; padding: 6px 0; color: var(--ink-2); }
.summary-line .sl-qty { font-weight: 800; color: var(--ink); flex-shrink: 0; }
.summary-line .sl-name { flex: 1; }
.summary-line .sl-name .sl-mods { display: block; font-size: 12.5px; color: var(--gray); }
.place-order-btn { width: 100%; margin-top: 14px; padding: 17px; font-size: 17px; display: flex; justify-content: space-between; }
.place-order-btn .spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.4); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.co-radio-row {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; margin-bottom: 10px; transition: border-color 0.15s ease, background 0.15s ease;
}
.co-radio-row:hover { background: var(--bg-warm); }
.co-radio-row.selected { border-color: var(--red); background: var(--red-tint); }
.co-radio-row .opt-control { flex-shrink: 0; }
.co-radio-row .co-radio-body { flex: 1; font-size: 15px; }
.co-radio-row .co-radio-body small { display: block; color: var(--gray); font-size: 13px; margin-top: 2px; }
.co-radio-row svg.card-icon { color: var(--ink-2); }

/* -------------------------------------------------------------- tracking */
.tracking-page { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }
.tracking-grid { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; }
.track-status-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; background: #fff; margin-bottom: 18px; }
.track-status-card .order-id { font-size: 13.5px; color: var(--gray); font-weight: 600; }
.track-status-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.4px; margin: 6px 0 4px; }
.track-eta { color: var(--ink-2); font-size: 15px; }
.track-eta b { color: var(--ink); }
.progress-track { display: flex; align-items: center; margin: 26px 0 8px; }
.progress-node { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; width: 70px; }
.progress-node .pn-dot {
  width: 40px; height: 40px; border-radius: 50%; background: var(--bg-soft); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--gray-light);
  transition: all 0.3s ease;
}
.progress-node.done .pn-dot { background: var(--green); border-color: var(--green); color: #fff; }
.progress-node.current .pn-dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 6px var(--red-tint); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--red-tint); } 50% { box-shadow: 0 0 0 9px var(--red-tint); } }
.progress-node span { font-size: 11.5px; font-weight: 700; color: var(--gray); text-align: center; line-height: 1.25; }
.progress-node.done span, .progress-node.current span { color: var(--ink); }
.progress-bar { flex: 1; height: 4px; background: var(--line); border-radius: 2px; margin: 0 4px 26px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--green); border-radius: 2px; transition: width 0.8s cubic-bezier(0.3, 0.8, 0.4, 1); }
.map-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #eef3ee; }
.map-card svg { display: block; width: 100%; }
.dasher-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; background: #fff; margin-top: 18px; display: flex; align-items: center; gap: 16px; }
.dasher-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex-shrink: 0;
}
.dasher-card .dasher-info { flex: 1; }
.dasher-card h3 { font-size: 17px; font-weight: 800; }
.dasher-card p { font-size: 13.5px; color: var(--gray); margin-top: 2px; }
.dasher-actions { display: flex; gap: 8px; }
.dasher-actions button {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; transition: background 0.15s ease, transform 0.12s ease;
}
.dasher-actions button:hover { background: var(--line); transform: scale(1.06); }
.track-order-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; background: #fff; position: sticky; top: calc(var(--header-h) + 20px); }
.track-order-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.track-order-card .track-rest { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.track-help { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.track-help button { text-align: left; font-size: 14.5px; font-weight: 600; color: var(--ink-2); padding: 8px 0; display: flex; align-items: center; gap: 10px; }
.track-help button:hover { color: var(--red); }
.delivered-banner {
  background: var(--green-tint); border: 1px solid #bfe6cc; color: var(--green);
  border-radius: var(--radius-lg); padding: 18px 22px; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}

/* ---------------------------------------------------------------- toasts */
.toast-root { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; border-radius: 26px; padding: 13px 22px;
  font-size: 15px; font-weight: 600; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-width: min(90vw, 480px);
}
.toast svg { color: #7be8b0; flex-shrink: 0; }
.toast.leaving { animation: toast-out 0.25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(0.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* fly-to-cart micro animation */
.fly-dot {
  position: fixed; z-index: 700; width: 14px; height: 14px; border-radius: 50%;
  background: var(--red); pointer-events: none;
}

/* address modal list */
.saved-addr-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-radius: var(--radius);
  cursor: pointer; transition: background 0.12s ease;
}
.saved-addr-row:hover { background: var(--bg-soft); }
.saved-addr-row svg { color: var(--gray); flex-shrink: 0; }
.saved-addr-row .sa-body { flex: 1; }
.saved-addr-row .sa-body b { font-size: 15px; }
.saved-addr-row .sa-body small { display: block; color: var(--gray); font-size: 13px; margin-top: 2px; }
.saved-addr-row .sa-check { color: var(--red); }

/* schedule rows */
.schedule-row {
  display: flex; align-items: center; justify-content: space-between; padding: 13px 6px;
  border-radius: var(--radius); cursor: pointer; transition: background 0.12s ease;
}
.schedule-row:hover { background: var(--bg-soft); }
.schedule-row .sa-check { color: var(--red); }

/* generic icon button */
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: background 0.14s ease; color: var(--ink);
}
.icon-btn:hover { background: var(--bg-soft); }

/* page transition */
.view { animation: view-in 0.25s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* skeleton shimmer for images */
img.loading-img { background: linear-gradient(100deg, #f0f0f0 40%, #fafafa 50%, #f0f0f0 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .rest-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-grid, .tracking-grid { grid-template-columns: 1fr; }
  .summary-card, .track-order-card { position: static; }
  .hero-banner .hero-inner { max-width: 75%; }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  :root { --header-h: 108px; }
  .search-wrap { order: 5; flex-basis: 100%; }
  .addr-btn { max-width: 200px; }
  .menu-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .rest-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-banner .hero-inner { max-width: 100%; padding: 30px 24px; }
  .hero-banner .hero-art { display: none; }
  .hero-banner h1 { font-size: 28px; }
  .rest-head h1 { font-size: 27px; }
  .cart-drawer { width: 100vw; max-width: 100vw; }
  .modal { max-height: 94vh; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-width: 100vw; }
  .container { padding: 0 16px; }
  .checkout-page, .tracking-page, .search-page { padding-left: 16px; padding-right: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .signin-btn { display: none; }
  .progress-node { width: 56px; }
  .mode-toggle button { padding: 8px 12px; font-size: 14px; }
  .addr-btn .addr-time { display: none; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
