:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #14171a;
  --ink-soft: #6b7280;
  --line: #e7e9ec;
  --primary: #ff5a36;
  --primary-dark: #e04320;
  --primary-light: #fff0eb;
  --accent: #2f6fed;
  --accent-light: #eaf1ff;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(20,23,26,.04), 0 6px 16px -8px rgba(20,23,26,.12);
  --shadow-pop: 0 16px 32px -10px rgba(20,23,26,.25);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.topbar {
  background: var(--ink);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.topbar .brand::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 3px;
  display: inline-block;
}
.topbar .tagline {
  color: #9aa0a6;
  font-size: .8rem;
}

main { max-width: 720px; margin: 0 auto; padding: 0 0 6.5rem; }

.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  padding: 2.6rem 1.25rem 3rem;
  margin-bottom: 1.75rem;
}
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  transform: rotate(-2deg);
}
.hero-title {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0 0 .6rem;
  max-width: 20ch;
}
.hero-sub {
  color: rgba(255,255,255,.92);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1.5rem;
  max-width: 34ch;
}
.hero-illustration { position: absolute; right: -12px; bottom: -18px; z-index: 0; opacity: .85; }
.search-box {
  background: #fff;
  border-radius: 999px;
  padding: .85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  box-shadow: 0 16px 32px -10px rgba(0,0,0,.35);
  max-width: 420px;
}
.search-box input {
  border: none;
  outline: none;
  font-size: 1rem;
  width: 100%;
  font-family: inherit;
  color: var(--ink);
}

.section-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 .9rem; padding: 0 1.25rem; }
h1 { font-size: 1.4rem; font-weight: 800; margin: 0 0 1rem; padding: 0 1.25rem; }

.filter-bar {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: 0 1.25rem 1.1rem;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  border: none;
  background: var(--card);
  color: var(--ink-soft);
  padding: .5rem 1.05rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.filter-btn.active { background: var(--ink); color: #fff; }

.vendor-grid {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 0 1.25rem;
}
.vendor-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: .85rem .95rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform .12s ease, box-shadow .12s ease;
}
.vendor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.vendor-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.vendor-card h3 { margin: 0 0 .15rem; font-size: 1.02rem; font-weight: 700; }
.vendor-card .address { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.vendor-meta { flex: 1; min-width: 0; }
.vendor-badges { display: flex; gap: .35rem; margin-top: .35rem; flex-wrap: wrap; }

.badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 999px;
  letter-spacing: .01em;
}
.badge.category { background: #eef0f2; color: var(--ink-soft); }
.badge.delivery { background: var(--primary-light); color: var(--primary-dark); }
.badge.pickup { background: var(--accent-light); color: var(--accent); }

/* Vendor detail */
.vendor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--card);
  margin-bottom: 1rem;
}
.vendor-header .vendor-icon { width: 64px; height: 64px; font-size: 2rem; }
.vendor-header h1 { padding: 0; margin: 0 0 .2rem; }
.vendor-header .address { color: var(--ink-soft); margin: 0; font-size: .85rem; }
.back-link {
  display: inline-block;
  color: #fff;
  font-size: .85rem;
  text-decoration: none;
  padding: 0 1.25rem;
  margin-top: -.4rem;
}

.menu-cat-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin: 1.5rem 0 .1rem;
  padding: 0 .1rem;
}
.product-list :first-child.menu-cat-title { margin-top: 0; }
.product-list { display: flex; flex-direction: column; gap: .6rem; padding: 0 1.25rem; }
.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: .9rem 1.1rem;
  box-shadow: var(--shadow-card);
}
.product-row .name { font-weight: 700; font-size: .95rem; }
.product-row .desc { color: var(--ink-soft); font-size: .82rem; margin-top: .15rem; }
.product-row .price { color: var(--ink); font-weight: 700; white-space: nowrap; margin-left: 1rem; }

.qty-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.qty-btn.minus { background: #eee; color: var(--ink); }
.qty-controls { display: flex; align-items: center; gap: .6rem; }
.qty-num { min-width: 1.2rem; text-align: center; font-weight: 700; }

.cart-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink);
  color: #fff;
  padding: 1rem 1.25rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -8px 24px rgba(0,0,0,.25);
}
.cart-bar.visible { display: flex; }
.cart-bar a {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: .65rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
}

/* Checkout */
main.checkout-main { padding-top: 1.25rem; }
.fulfillment-choice { display: flex; gap: .75rem; margin: 1rem 1.25rem 1.5rem; }
.fulfillment-choice label {
  flex: 1;
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-md);
  padding: .9rem 1rem;
  cursor: pointer;
  display: block;
}
.fulfillment-choice input { display: none; }
.fulfillment-choice input:checked + span { color: var(--primary-dark); font-weight: 700; }
.fulfillment-choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.fulfillment-choice .sub { display: block; font-weight: 400; color: var(--ink-soft); font-size: .82rem; margin-top: .2rem; }

form.checkout-form { padding: 0 1.25rem; }
form.checkout-form label { display: block; margin: .9rem 0 .3rem; font-weight: 700; font-size: .88rem; }
form.checkout-form input, form.checkout-form select, form.checkout-form textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
}
.order-summary {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin: 0 1.25rem 1rem;
  box-shadow: var(--shadow-card);
}
.order-summary .line { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .92rem; }
.order-summary .total { font-weight: 800; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; }

button.submit-btn {
  width: calc(100% - 2.5rem);
  margin: 1.25rem 1.25rem 0;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}
button.submit-btn:hover { background: var(--primary-dark); }

.confirm-box {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  margin: 1.25rem;
  box-shadow: var(--shadow-card);
}
.confirm-box .check {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 1rem;
  font-weight: 800;
}

footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: .78rem;
  padding: 2rem 1rem;
}
