/* Metrobites shop — lightweight storefront on top of the Metrobites API */

:root {
  --green: #0cb06b;
  --green-600: #08955a;
  --green-700: #067347;
  --green-50: #ecf9f2;
  --green-100: #d4f2e3;
  --accent: #ff8a1f;
  --accent-600: #ea7200;
  --accent-50: #fff3e6;
  --ink: #0f2219;
  --ink-2: #2a3d33;
  --muted: #5c6d65;
  --line: #e4ebe7;
  --soft: #f5f8f6;
  --white: #fff;
  --danger: #d93a3a;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(15, 34, 25, .06), 0 2px 8px rgba(15, 34, 25, .05);
  --shadow: 0 10px 30px rgba(15, 34, 25, .09);
  --shadow-lg: 0 24px 60px rgba(15, 34, 25, .16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
:focus-visible { outline: 3px solid var(--green-100); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.page { min-height: 70vh; padding-bottom: 40px; }
.hide-sm { }
.only-sm { display: none; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 8px 18px rgba(12, 176, 107, .25); }
.btn--primary:hover { background: var(--green-600); }
.btn--primary:disabled { background: #a9c9b9; box-shadow: none; cursor: not-allowed; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-600); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--green); color: var(--green-700); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--soft); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap;
}
.chip--green { background: var(--green-50); border-color: transparent; color: var(--green-700); }
.chip--accent { background: var(--accent-50); border-color: transparent; color: var(--accent-600); }
.chip--closed { background: #fdecec; border-color: transparent; color: var(--danger); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; position: relative; flex: none;
}
.icon-btn:hover { border-color: var(--green); color: var(--green-700); }
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}

/* ---------- Header ---------- */
.hd {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hd__row { display: flex; align-items: center; gap: 14px; height: 72px; }
.hd__logo img { height: 26px; width: auto; }
.hd__loc {
  display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; min-width: 0;
}
.hd__loc svg { color: var(--accent); flex: none; }
.hd__loc small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; line-height: 1.2; }
.hd__loc b { display: block; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.hd__nav { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.hd__nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.hd__nav a:hover { color: var(--green-700); }
.hd__nav a.on { background: #fff; color: var(--green-700); box-shadow: var(--shadow-sm); }
.hd__search { flex: 1; min-width: 160px; max-width: 360px; margin-left: auto; position: relative; }
.hd__actions { display: flex; gap: 8px; }

.search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(12, 176, 107, .12); }
.search svg { color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14.5px; }
.search input::placeholder { color: #94a39c; }
.search--lg { height: 58px; padding: 0 8px 0 20px; box-shadow: var(--shadow); border-color: transparent; }
.search--lg input { font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 48px 0 64px;
  background:
    radial-gradient(700px 360px at 90% 10%, rgba(255, 138, 31, .14), transparent 60%),
    radial-gradient(800px 420px at 0% 100%, rgba(12, 176, 107, .14), transparent 60%),
    linear-gradient(180deg, #f2fbf6, #fff);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero__lead { margin-top: 16px; font-size: 17.5px; color: var(--muted); max-width: 520px; }
.hero__search { margin-top: 28px; max-width: 540px; }
.hero__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.hero__chips span { font-size: 13px; font-weight: 700; color: var(--muted); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hero__facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts svg { color: var(--green); }
.hero__art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin-left: auto; }
.hero__ring { position: absolute; inset: 5%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #19c37a, var(--green-700)); box-shadow: var(--shadow-lg); }
.hero__plate { position: absolute; inset: 15%; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 30px 60px rgba(0, 0, 0, .25); }
.hero__plate img { width: 100%; height: 100%; object-fit: cover; }
.float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px;
  border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); animation: bob 6s ease-in-out infinite;
}
.float b { display: block; font-size: 13.5px; color: var(--ink); line-height: 1.25; }
.float small { display: block; font-size: 12px; color: var(--muted); }
.float i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); font-style: normal; flex: none; }
.float--a { top: 8%; left: -4%; }
.float--b { bottom: 10%; right: -2%; animation-delay: -3s; }
.float--b i { background: var(--accent-50); color: var(--accent-600); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.hero__wave svg { width: 100%; height: 44px; display: block; }

/* ---------- Sections ---------- */
.sec { padding: 44px 0 8px; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec__head h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec__head p { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.sec__head--center { justify-content: center; text-align: center; }
.more { color: var(--accent-600); font-weight: 700; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.more:hover { gap: 8px; }

.rail {
  display: grid; grid-auto-flow: column; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 4px 2px 8px; margin: 0 -2px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Categories */
.cats { grid-auto-columns: 112px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cat__img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--soft); border: 3px solid #fff; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.cat__img img { width: 100%; height: 100%; object-fit: cover; }
.cat:hover .cat__img, .cat.on .cat__img { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--green), var(--shadow); }
.cat span { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25; }

/* Item cards */
.items-rail { grid-auto-columns: 210px; }
.icard {
  position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; transition: box-shadow .2s, transform .2s; text-align: left; padding: 0;
}
.icard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.icard__img { position: relative; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; flex: none; }
.icard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.icard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.icard__name { font-weight: 800; color: var(--ink); font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard__store { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; color: var(--ink); font-size: 15px; }
.price s { color: var(--muted); font-weight: 600; font-size: 12.5px; margin-left: 6px; }
.add {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--green); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 14px rgba(12, 176, 107, .3); flex: none;
}
.add:hover { background: var(--green-600); }
.tag-off { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; z-index: 1; }

/* Store cards */
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.scard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.scard:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.scard__cover { position: relative; aspect-ratio: 16 / 9; background: var(--soft); flex: none; }
.scard__cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scard__cover .chip { position: absolute; top: 12px; right: 12px; box-shadow: var(--shadow-sm); }
.scard__logo { position: absolute; left: 16px; bottom: -22px; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; border: 3px solid #fff; background: #fff; box-shadow: var(--shadow-sm); }
.scard__logo img { width: 100%; height: 100%; object-fit: cover; }
.scard__body { padding: 30px 18px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.scard__name { font-size: 17px; font-weight: 800; color: var(--ink); }
.scard__addr { font-size: 13px; color: var(--muted); }
.scard__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.step i { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent-600); font-style: normal; margin-bottom: 16px; }
.step h3 { font-size: 17px; font-weight: 800; }
.step p { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* Banners */
.banners { grid-auto-columns: min(100%, 560px); }
/* Banners carry their own text, so show the whole image instead of cropping it */
.banner { border-radius: var(--radius-lg); overflow: hidden; background: var(--soft); }
.banner img { width: 100%; height: auto; }

/* App band */
.appband {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-top: 44px;
  padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(500px 300px at 95% 100%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(135deg, #12c07a, var(--green-700));
}
.appband h2 { color: #fff; font-size: clamp(22px, 3vw, 32px); font-weight: 800; }
.appband p { margin-top: 8px; color: rgba(255, 255, 255, .88); }
.store-btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px 0 14px; border-radius: 14px; background: #0b0f0d; color: #fff; }
.store-btn img { width: 24px; height: 24px; }
.store-btn small { display: block; font-size: 10.5px; opacity: .8; line-height: 1.2; }
.store-btn b { display: block; font-size: 16px; line-height: 1.2; }

/* ---------- Store page ---------- */
.sp-cover { position: relative; height: clamp(180px, 30vw, 320px); background: var(--soft) center / cover no-repeat; }
.sp-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 40%); }
.sp-cover .icon-btn { position: absolute; top: 16px; left: 16px; z-index: 1; border: 0; box-shadow: var(--shadow-sm); }
.sp-head { display: flex; align-items: flex-start; gap: 18px; margin-top: -44px; position: relative; z-index: 2; }
.sp-logo { width: 96px; height: 96px; border-radius: 22px; overflow: hidden; border: 4px solid #fff; background: #fff; box-shadow: var(--shadow); flex: none; }
.sp-logo img { width: 100%; height: 100%; object-fit: cover; }
/* Only the logo overlaps the cover; the name sits below it so it never lands on the photo */
.sp-title { padding-top: 54px; min-width: 0; }
.sp-title h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.sp-title p { color: var(--muted); font-size: 14px; }
.sp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.sp-note { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-50); color: var(--accent-600); font-weight: 600; font-size: 14px; }

.tabs {
  position: sticky; top: 72px; z-index: 30; background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-top: 22px;
}
.tabs .rail { grid-auto-columns: max-content; gap: 6px; padding: 10px 2px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.menu-sec { padding-top: 26px; scroll-margin-top: 140px; }
.menu-sec h2 { font-size: 21px; font-weight: 800; margin-bottom: 12px; }
.menu-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mrow {
  display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  text-align: left; width: 100%; transition: box-shadow .2s, border-color .2s; position: relative;
}
.mrow:hover { box-shadow: var(--shadow); border-color: transparent; }
.mrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mrow__name { font-weight: 800; color: var(--ink); font-size: 15.5px; }
.mrow__desc { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mrow__foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 10px; }
.mrow__img { position: relative; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--soft); flex: none; }
.mrow__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mrow__img .add { position: absolute; right: 8px; bottom: 8px; }
.mrow.is-off { opacity: .55; }
.qty-pill { padding: 3px 9px; border-radius: 999px; background: var(--green-50); color: var(--green-700); font-size: 12.5px; font-weight: 800; }

/* Grid of items (category / search) */
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }

/* ---------- Sheet (item details) ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(10, 25, 18, .45); display: flex; align-items: center; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(560px, 100%); max-height: min(92vh, 860px); background: #fff; border-radius: var(--radius-lg);
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); animation: up .25s ease;
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet__scroll { overflow-y: auto; flex: 1; }
.sheet__img { position: relative; aspect-ratio: 16 / 10; background: var(--soft); }
.sheet__img img { width: 100%; height: 100%; object-fit: cover; }
.sheet__img .icon-btn { position: absolute; top: 14px; right: 14px; border: 0; box-shadow: var(--shadow-sm); }
.sheet__body { padding: 20px 22px 8px; }
.sheet__body h2 { font-size: 23px; font-weight: 800; }
.sheet__body > p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.opt { margin-top: 20px; }
.opt__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--soft); }
.opt__head b { color: var(--ink); font-size: 15px; }
.opt__head small { font-size: 12px; font-weight: 700; color: var(--muted); }
.opt__head .req { color: var(--accent-600); }
.opt__head .req.ok { color: var(--green-700); }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14.5px; }
.choice:last-child { border-bottom: 0; }
.choice input { width: 20px; height: 20px; accent-color: var(--green); flex: none; margin: 0; }
.choice span { flex: 1; color: var(--ink-2); font-weight: 600; }
.choice em { font-style: normal; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.sheet__foot { display: flex; align-items: center; gap: 12px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; height: 46px; flex: none; }
.stepper button { width: 42px; height: 100%; border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--ink); }
.stepper button:disabled { color: #b8c4be; cursor: not-allowed; }
.stepper span { min-width: 26px; text-align: center; font-weight: 800; color: var(--ink); }
.sheet__foot .btn { flex: 1; min-width: 0; justify-content: space-between; gap: 10px; padding: 0 18px; }
.sheet__foot .btn span:first-child { overflow: hidden; text-overflow: ellipsis; }
.sheet__foot .btn span:last-child { flex: none; }

/* ---------- Cart drawer ---------- */
.drawer-wrap { position: fixed; inset: 0; z-index: 110; background: rgba(10, 25, 18, .45); animation: fade .2s; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slide .25s ease;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 20px; font-weight: 800; }
.drawer__head p { font-size: 13px; color: var(--muted); }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer__foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; }
.line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--soft); flex: none; }
.line__body { flex: 1; min-width: 0; }
.line__name { font-weight: 800; color: var(--ink); font-size: 14.5px; }
.line__opts { font-size: 12.5px; color: var(--muted); }
.line__row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.line .stepper { height: 36px; }
.line .stepper button { width: 34px; font-size: 17px; }
.sum { display: flex; justify-content: space-between; font-size: 14.5px; }
.sum b { color: var(--ink); }
.sum--total { font-size: 17px; font-weight: 800; color: var(--ink); }
.note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* Floating cart bar (mobile + store page) */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)); z-index: 60;
  width: min(560px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); border: 0;
  animation: up .25s ease;
}
.cartbar b { font-size: 15px; }
.cartbar small { display: block; font-size: 12px; opacity: .75; }
.cartbar span.go { padding: 10px 18px; border-radius: 999px; background: var(--green); font-weight: 800; font-size: 14px; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding-top: 28px; }
.co-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.co-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.co-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 22px; margin-top: 18px; }
.co-card h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.co-step { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green-50); color: var(--green-700); font-size: 14px; font-weight: 800; }
.co-hint { color: var(--muted); font-size: 13.5px; margin: -6px 0 12px; }
.co-side { position: sticky; top: 92px; }
.co-summary h2 { margin-bottom: 4px; }
.co-store { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.co-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.co-line small { display: block; color: var(--muted); font-size: 12.5px; }
.co-line > span:last-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
.co-sums { display: grid; gap: 8px; padding: 14px 0; }
.co-summary .btn { margin-top: 6px; }
.co-summary .note { margin-top: 10px; }
.co-err { margin: 6px 0 10px; padding: 12px 14px; border-radius: 12px; background: #fdecec; color: var(--danger); font-size: 14px; font-weight: 600; }
.co-maprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 4px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field > span { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.field > span small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.field input {
  height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font-size: 15px; outline: 0; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(12, 176, 107, .12); }
.field__err { font-style: normal; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.field__hint { font-style: normal; font-size: 12.5px; color: var(--muted); }

.map { position: relative; height: 280px; border-radius: 16px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.map__canvas { position: absolute; inset: 0; }
.map__pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--accent); pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.map__pin svg { width: 40px; height: 40px; }
.map__pin svg path, .map__pin svg circle { stroke-width: 2.4; fill: #fff; }
.map--failed { display: grid; place-items: center; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; height: auto; min-height: 120px; }

.pay-opt { display: flex; align-items: center; gap: 14px; padding: 14px; border: 2px solid var(--green); border-radius: 14px; background: var(--green-50); }
.pay-opt__logo { padding: 8px 10px; border-radius: 10px; background: #fff; color: #00a650; font-weight: 900; letter-spacing: .02em; font-size: 14px; border: 1px solid var(--line); }
.pay-opt b { display: block; color: var(--ink); }
.pay-opt small { color: var(--muted); font-size: 13px; }

/* ---------- Order page ---------- */
.order, .account { max-width: 760px; padding-top: 28px; }
.order__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.paybox { border-color: var(--accent); background: var(--accent-50); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.paybox__row { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.paybox__row b { display: block; color: var(--ink); font-size: 16px; }
.paybox__row small { display: block; color: var(--ink-2); font-size: 13.5px; }
.paybox__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 900; flex: none; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid rgba(255, 138, 31, .25); border-top-color: var(--accent); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 0; color: var(--muted); font-weight: 600; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 32px; bottom: -10px; width: 2px; background: var(--line); }
.timeline__dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex: none; position: relative; z-index: 1; }
.timeline li.done { color: var(--ink-2); }
.timeline li.done .timeline__dot { background: var(--green); border-color: var(--green); }
.timeline li.done:not(:last-child)::after { background: var(--green); }
.timeline li.now { color: var(--ink); font-weight: 800; }
.timeline li.now .timeline__dot { border-color: var(--green); box-shadow: 0 0 0 5px var(--green-100); }
.rider { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--soft); }
.rider b { display: block; color: var(--ink); }
.rider small { color: var(--muted); }
.rider .btn { margin-left: auto; }
.float-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); flex: none; }

/* ---------- Account ---------- */
.auth { display: grid; gap: 14px; max-width: 440px; }
.auth img { border-radius: 14px; }
.orders { display: grid; gap: 10px; }
.orow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.orow:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.orow b { color: var(--ink); }
.orow small { display: block; color: var(--muted); font-size: 13px; }
.orow__end { display: flex; align-items: center; gap: 10px; text-transform: capitalize; }

@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; }
  .co-side { position: static; }
}
@media (max-width: 720px) {
  .fields { grid-template-columns: 1fr; }
  .co-card { padding: 18px; border-radius: 20px; }
  .map { height: 240px; }
}

/* ---------- Empty / errors / skeletons ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 19px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }
.sk { background: linear-gradient(90deg, #eef2f0 25%, #f6f8f7 50%, #eef2f0 75%); background-size: 200% 100%; animation: sk 1.4s infinite linear; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
.boot { padding-top: 28px; }
.sk--hero { height: 220px; border-radius: var(--radius-lg); }
.sk-row { display: flex; gap: 16px; margin-top: 28px; overflow: hidden; }
.sk--circle { width: 96px; height: 96px; border-radius: 50%; flex: none; }
.sk--card { height: 230px; flex: 1; min-width: 200px; border-radius: var(--radius); }
.sk--row { height: 140px; border-radius: var(--radius); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 80px); transform: translateX(-50%); z-index: 200;
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: up .2s;
  max-width: calc(100% - 32px);
}

/* ---------- Footer & tab bar ---------- */
.ft { margin-top: 56px; padding: 40px 0 calc(30px + var(--tabbar)); background: var(--soft); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.ft__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.ft__logo { display: inline-flex; padding: 10px 14px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.ft__logo img { height: 24px; width: auto; }
.ft a:hover { color: var(--green-700); }
.ft__links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 600; }

.tabbar {
  display: none; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 70;
  height: var(--tabbar); padding: 0 6px; border-radius: 22px; background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  align-items: center; justify-content: space-around;
}
.tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border: 0; background: none; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.tabbar .on { color: var(--green-700); }
.tabbar .badge { top: 0; right: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hd__nav { display: none; }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { display: none; }
  .menu-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --radius-lg: 22px; }
  .wrap { padding: 0 16px; }
  .hide-sm { display: none !important; }
  .only-sm { display: initial; }
  .hd__row { height: 64px; gap: 10px; }
  .hd__logo { display: none; }
  .hd__loc { border: 0; padding: 0; background: none; }
  .hd__search { display: none; }
  .hd__actions { margin-left: auto; }
  .tabs { top: 64px; }
  .tabbar { display: flex; }
  .hero { padding: 26px 0 50px; }
  .hero__lead { font-size: 16px; }
  .sec { padding-top: 34px; }
  .cats { grid-auto-columns: 88px; gap: 12px; }
  .cat__img { width: 76px; height: 76px; }
  .cat span { font-size: 12.5px; }
  .items-rail { grid-auto-columns: 168px; gap: 12px; }
  .igrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stores { grid-template-columns: 1fr; }
  .mrow__img { width: 96px; height: 96px; }
  .appband { grid-template-columns: 1fr; }
  .overlay { align-items: flex-end; }
  .sheet { border-radius: 24px 24px 0 0; max-height: 94vh; }
  .sp-logo { width: 78px; height: 78px; border-radius: 18px; }
  .sp-title { padding-top: 50px; }
  .sp-cover .icon-btn { top: 12px; left: 12px; }
}
@media (min-width: 721px) {
  .cartbar { bottom: 24px; }
  .toast { bottom: 100px; }
  .ft { padding-bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
