/* ==========================================================================
   Qahram Express — Mini App
   ========================================================================== */
:root {
  --accent: #FF6B00;
  --accent-2: #FF3D54;
  --accent-soft: rgba(255, 107, 0, .12);
  --accent-text: #ffffff;
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --surface-2: #F0F1F5;
  --text: #15171C;
  --muted: #7C8291;
  --border: rgba(20, 23, 28, .07);
  --shadow: 0 6px 24px rgba(17, 24, 39, .06);
  --shadow-lg: 0 16px 48px rgba(17, 24, 39, .14);
  --success: #12B76A;
  --danger: #F04438;
  --warning: #F79009;
  --info: #2E90FA;
  --radius: 20px;
  --radius-sm: 14px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root.dark {
  --bg: #0E1014;
  --surface: #181B21;
  --surface-2: #22262E;
  --text: #F3F4F6;
  --muted: #8E95A3;
  --border: rgba(255, 255, 255, .07);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
  --accent-soft: rgba(255, 107, 0, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: var(--text); }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.xs { width: 15px; height: 15px; }
svg.i.fill { fill: currentColor; }

/* -------------------------------------------------------------- splash */
.splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); transition: opacity .35s ease; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-logo { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 14px 40px rgba(255, 107, 0, .35); animation: pop .6s cubic-bezier(.2, 1.4, .4, 1); }
.splash-logo span { font-size: 42px; font-weight: 800; color: #fff; }
.splash-name { font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.splash-loader { display: flex; gap: 6px; }
.splash-loader i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite ease-in-out; }
.splash-loader i:nth-child(2) { animation-delay: .15s; }
.splash-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------------------------------------------------------------- layout */
.view { max-width: 680px; margin: 0 auto; padding: 0 0 calc(var(--tab-h) + 96px + var(--safe-b)); min-height: 100vh; animation: fadeUp .25s ease; }
.page { padding: 12px 16px 0; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 8px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- header */
.hero { position: relative; padding: 16px 16px 6px; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 230px; z-index: -1; background: radial-gradient(120% 90% at 10% 0%, var(--accent-soft), transparent 70%); }
.topbar { display: flex; align-items: center; gap: 12px; }
.logo { width: 48px; height: 48px; border-radius: 16px; overflow: hidden; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 22px; box-shadow: 0 8px 22px rgba(255, 107, 0, .3); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand { flex: 1; min-width: 0; }
.brand h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.status-chip b { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(18, 183, 106, .15); }
.status-chip.closed b { background: var(--danger); box-shadow: 0 0 0 4px rgba(240, 68, 56, .15); }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); flex: none; position: relative; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; display: grid; place-items: center; }
.lang-btn { font-weight: 800; font-size: 13px; width: auto; padding: 0 12px; }
.greet { margin: 16px 0 12px; }
.greet h2 { margin: 0; font-size: 25px; line-height: 1.15; font-weight: 800; letter-spacing: -.6px; }
.greet p { margin: 6px 0 0; color: var(--muted); }

.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 0 14px; height: 50px; box-shadow: var(--shadow); color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; font-size: 15px; min-width: 0; }
.search .clear { color: var(--muted); }

.pills { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.pills::-webkit-scrollbar, .chips::-webkit-scrollbar, .hscroll::-webkit-scrollbar, .banners::-webkit-scrollbar { display: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill svg { color: var(--accent); }

/* --------------------------------------------------------------- banners */
.banners { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 14px 16px 4px; scrollbar-width: none; }
.banner { flex: 0 0 88%; scroll-snap-align: center; border-radius: 22px; overflow: hidden; position: relative; aspect-ratio: 2 / 1; background: var(--surface-2); box-shadow: var(--shadow); }
.banner:only-child { flex-basis: 100%; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; color: #fff; font-weight: 800; font-size: 17px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--border); transition: all .3s; }
.dots i.on { width: 18px; background: var(--accent); }

/* --------------------------------------------------------- category chips */
.chips-wrap { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); padding: 10px 0; margin-top: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-weight: 650; font-size: 14px; white-space: nowrap; transition: all .2s ease; }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.chip .em { font-size: 17px; }

/* --------------------------------------------------------------- products */
.cat-section { padding: 0 16px; scroll-margin-top: 66px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.p-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; animation: fadeUp .3s ease both; }
.p-img { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.p-img .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; }
.p-card:active .p-img img { transform: scale(1.04); }
.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge { font-size: 11.5px; font-weight: 750; padding: 4px 8px; border-radius: 9px; background: rgba(255, 255, 255, .92); color: #15171C; backdrop-filter: blur(6px); }
.badge.sale { background: var(--danger); color: #fff; }
.badge.hit { background: #FFE8D6; color: #C2410C; }
.badge.new { background: #DCFCE7; color: #15803D; }
.badge.spicy { background: #FEE2E2; color: #B91C1C; }
.fav { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #9AA0AC; backdrop-filter: blur(6px); }
.fav.on { color: var(--danger); }
.fav.on svg { fill: currentColor; }
.soldout { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-weight: 800; font-size: 15px; }
.p-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.p-desc { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 6px; min-height: 38px; }
.p-foot > div:first-child { min-width: 0; }
.p-foot.qty { flex-direction: column; align-items: stretch; gap: 8px; }
.p-foot.qty .stepper { width: 100%; justify-content: space-between; }
.p-foot.qty .stepper button { width: 42px; }
.price { font-weight: 800; font-size: 15px; letter-spacing: -.2px; white-space: nowrap; }
.old { display: block; font-size: 12px; color: var(--muted); text-decoration: line-through; font-weight: 500; white-space: nowrap; }
.add { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 0, .32); transition: transform .15s; flex: none; }
.add:active { transform: scale(.9); }
.stepper { display: inline-flex; align-items: center; background: var(--accent); color: #fff; border-radius: 13px; height: 38px; overflow: hidden; box-shadow: 0 6px 16px rgba(255, 107, 0, .3); }
.stepper button { width: 34px; height: 38px; display: grid; place-items: center; color: inherit; }
.stepper b { min-width: 20px; text-align: center; font-size: 14px; }
.stepper.light { background: var(--surface-2); color: var(--text); box-shadow: none; }
.stepper.big { height: 54px; border-radius: 17px; flex: none; }
.stepper.big button { width: 44px; height: 54px; }
.stepper.big b { min-width: 26px; font-size: 17px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 8px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; }
.hscroll .p-card { flex: 0 0 44%; scroll-snap-align: start; }
@media (min-width: 560px) { .hscroll .p-card { flex-basis: 30%; } }

.empty { text-align: center; padding: 50px 24px; color: var(--muted); }
.empty .big { width: 96px; height: 96px; border-radius: 32px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 46px; background: var(--surface); box-shadow: var(--shadow); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.empty p { margin: 0 0 18px; }

/* --------------------------------------------------------------- buttons */
.btn { white-space: nowrap; overflow: hidden; height: 54px; border-radius: 17px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 750; font-size: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 26px rgba(255, 107, 0, .32); transition: transform .12s ease, opacity .2s; width: 100%; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow: none; }
.btn.danger { background: rgba(240, 68, 56, .12); color: var(--danger); box-shadow: none; }
.btn.success { background: var(--success); box-shadow: 0 10px 26px rgba(18, 183, 106, .3); }
.btn.sm { height: 42px; border-radius: 13px; font-size: 14px; padding: 0 14px; width: auto; }
.btn .sp { margin-left: auto; opacity: .95; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { color: var(--accent); font-weight: 700; font-size: 14px; }

/* --------------------------------------------------------------- cart bar */
.cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 10px + var(--safe-b)); z-index: 40; padding: 0 16px; max-width: 680px; margin: 0 auto; animation: fadeUp .3s ease; }
.cartbar button { width: 100%; height: 58px; border-radius: 19px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 14px 34px rgba(255, 107, 0, .4); font-weight: 750; }
.cartbar .cnt { width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-weight: 800; }
.cartbar .info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.cartbar .info small { font-size: 12px; font-weight: 600; opacity: .85; }
.cartbar .info b { font-size: 16px; white-space: nowrap; }
.cartbar .go { margin-left: auto; white-space: nowrap; display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .2); height: 40px; padding: 0 12px; border-radius: 13px; }
.cartbar.bump button { animation: bump .35s ease; }

/* ---------------------------------------------------------------- tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: space-around; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--border); }
.tab { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 650; position: relative; transition: color .2s; }
.tab.on { color: var(--accent); }
.tab.on::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .badge-n { position: absolute; top: 7px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-2); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

/* ------------------------------------------------------------------- sheet */
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: fade .25s ease; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 680px; margin: 0 auto; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding-bottom: calc(16px + var(--safe-b)); animation: slideUp .32s cubic-bezier(.2, .9, .3, 1); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 10px auto 0; position: sticky; top: 10px; z-index: 2; }
.sheet.closing .sheet-panel { animation: slideDown .25s ease forwards; }
.sheet.closing .sheet-backdrop { animation: fade .25s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slideDown { to { transform: translateY(100%); } }
.ps-img { margin: -15px 0 0; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); position: relative; overflow: hidden; }
.ps-img > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 90px; }
.ps-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 14px; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.ps-body { padding: 18px 18px 6px; }
.ps-body h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.4px; }
.ps-body .badges { position: static; flex-direction: row; flex-wrap: wrap; margin: 10px 0 0; }
.ps-body .desc { color: var(--muted); margin: 12px 0 0; white-space: pre-line; }
.ps-price { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.ps-price .price { font-size: 26px; }
.ps-actions { display: flex; gap: 12px; align-items: center; padding: 16px 18px 4px; }
.ps-actions .btn { flex: 1; }

/* ------------------------------------------------------------------- forms */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 0 6px 4px; }
.input { width: 100%; height: 52px; border-radius: 15px; border: 1.5px solid transparent; background: var(--surface-2); padding: 0 14px; outline: 0; font-size: 15.5px; transition: border-color .2s, background .2s; }
.input:focus { border-color: var(--accent); background: var(--surface); }
textarea.input { height: 84px; padding: 13px 14px; resize: none; line-height: 1.4; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.seg { display: flex; background: var(--surface-2); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 46px; border-radius: 13px; font-weight: 700; font-size: 14.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 2px solid transparent; margin-bottom: 10px; text-align: left; width: 100%; transition: all .2s; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); }
.opt .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); color: var(--accent); flex: none; }
.opt .t { font-weight: 700; }
.opt .s { font-size: 12.5px; color: var(--muted); }
.opt .radio { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex: none; position: relative; }
.opt.on .radio { border-color: var(--accent); }
.opt.on .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--border); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch.on { background: var(--success); }
.switch.on::after { transform: translateX(20px); }

/* -------------------------------------------------------------------- map */
.map-wrap { position: relative; height: 230px; border-radius: 18px; overflow: hidden; background: var(--surface-2); margin-bottom: 12px; }
#map { position: absolute; inset: 0; }
.map-pin { position: absolute; left: 50%; top: 50%; z-index: 500; transform: translate(-50%, -100%); pointer-events: none; color: var(--accent); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); transition: transform .2s; }
.map-pin svg { width: 44px; height: 44px; fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.map-pin.lift { transform: translate(-50%, -115%); }
.map-shadow { position: absolute; left: 50%; top: 50%; z-index: 499; width: 12px; height: 5px; margin-left: -6px; border-radius: 50%; background: rgba(0, 0, 0, .35); }
.map-locate { position: absolute; right: 12px; bottom: 12px; z-index: 600; width: 46px; height: 46px; border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-lg); display: grid; place-items: center; color: var(--accent); }
.map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 20px; gap: 10px; }
.addr-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; scrollbar-width: none; }
.addr-chip { flex: none; max-width: 220px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.addr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-control-attribution { font-size: 9px !important; }

/* ---------------------------------------------------------------- summary */
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); font-weight: 550; }
.sum-row b { color: var(--text); font-weight: 650; }
.sum-row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 12px; color: var(--text); font-size: 18px; font-weight: 800; }
.sum-row.total b { font-weight: 800; }
.sum-row.green b { color: var(--success); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s ease; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 15px; background: var(--accent-soft); font-size: 13.5px; font-weight: 550; }
.note.warn { background: rgba(247, 144, 9, .14); }
.note.err { background: rgba(240, 68, 56, .12); color: var(--danger); }
.note svg { color: var(--accent); margin-top: 1px; }
.sticky-cta.above-tabs { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 12px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 12px 16px calc(12px + var(--safe-b)); max-width: 680px; margin: 0 auto; background: linear-gradient(transparent, var(--bg) 28%); }

/* -------------------------------------------------------------- cart list */
.c-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.c-item:last-child { border-bottom: 0; }
.c-thumb { width: 70px; height: 70px; border-radius: 16px; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); display: grid; place-items: center; font-size: 30px; }
.c-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-info { flex: 1; min-width: 0; }
.c-info .n { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.c-info .p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.c-info .t { font-weight: 800; margin-top: 4px; }

/* ----------------------------------------------------------------- orders */
.o-card { display: block; width: 100%; text-align: left; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.o-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.o-id { font-weight: 800; font-size: 16px; }
.o-items { color: var(--muted); font-size: 13.5px; margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.o-foot { display: flex; align-items: center; justify-content: space-between; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 750; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); white-space: nowrap; }
.st.new, .st.accepted { background: rgba(46, 144, 250, .13); color: var(--info); }
.st.pending_payment, .st.payment_review { background: rgba(247, 144, 9, .15); color: var(--warning); }
.st.ready, .st.delivering { background: var(--accent-soft); color: var(--accent); }
.st.delivered { background: rgba(18, 183, 106, .13); color: var(--success); }
.st.cancelled { background: rgba(240, 68, 56, .12); color: var(--danger); }

.track { display: flex; justify-content: space-between; position: relative; margin: 18px 4px 6px; }
.track::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 17px; height: 4px; border-radius: 2px; background: var(--surface-2); }
.track .bar { position: absolute; left: 12.5%; top: 17px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 25%; padding: 0 2px; text-align: center; font-size: 11px; line-height: 1.2; font-weight: 650; color: var(--muted); overflow-wrap: anywhere; }
.step .c { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 3px solid var(--surface); transition: all .3s; }
.step.done .c { background: var(--accent); color: #fff; }
.step.cur .c { background: var(--accent); color: #fff; box-shadow: 0 0 0 6px var(--accent-soft); animation: pulse 1.8s infinite; }
.step.done, .step.cur { color: var(--text); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 9px var(--accent-soft); } }
.stars { display: flex; gap: 8px; justify-content: center; margin: 8px 0 14px; }
.stars button { color: #D0D4DC; }
.stars button svg { width: 38px; height: 38px; }
.stars button.on { color: #FDB022; }
.stars button.on svg { fill: currentColor; }
.kv { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); display: flex; align-items: center; gap: 8px; flex: none; }
.kv .v { margin-left: auto; text-align: right; font-weight: 600; min-width: 0; word-break: break-word; }

/* ---------------------------------------------------------------- success */
.success { text-align: center; padding: 30px 16px 10px; }
.check-anim { width: 104px; height: 104px; margin: 10px auto 18px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #32D583, #12B76A); box-shadow: 0 18px 44px rgba(18, 183, 106, .35); animation: pop .6s cubic-bezier(.2, 1.5, .4, 1); }
.check-anim svg { width: 54px; height: 54px; stroke: #fff; stroke-width: 3; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .35s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h2 { font-size: 24px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.4px; }
.pay-card { margin-top: 18px; text-align: left; color: #fff; border-radius: 22px; padding: 20px; background: linear-gradient(135deg, #1F2937, #111827); position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.pay-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(var(--accent), transparent 70%); opacity: .55; }
.pay-card .num { font-size: 22px; font-weight: 800; letter-spacing: 2px; margin: 16px 0 6px; font-variant-numeric: tabular-nums; }
.pay-card .holder { opacity: .75; font-weight: 600; text-transform: uppercase; font-size: 13px; }
.pay-card .amount { font-size: 15px; margin-top: 14px; }
.pay-card .copy { position: relative; z-index: 1; margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 700; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--warning); }
.upload { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 22px; border-radius: 18px; border: 2px dashed var(--border); background: var(--surface); color: var(--muted); font-weight: 650; text-align: center; width: 100%; }
.upload svg { width: 30px; height: 30px; color: var(--accent); }

/* ----------------------------------------------------------------- profile */
.profile-hero { text-align: center; padding: 22px 16px 6px; }
.profile-hero .logo { width: 84px; height: 84px; border-radius: 28px; margin: 0 auto 12px; font-size: 38px; }
.profile-hero h2 { margin: 0; font-size: 23px; font-weight: 800; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials .btn { flex: 1; min-width: 120px; }
.me-card { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 21px; flex: none; }
.bonus-box { margin-left: auto; text-align: right; }
.bonus-box b { display: block; font-size: 17px; color: var(--accent); }
.admin-entry { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; color: #fff; padding: 18px; border-radius: var(--radius); background: linear-gradient(135deg, #111827, #374151); box-shadow: var(--shadow-lg); margin-top: 12px; }
.admin-entry .ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #FDB022; }

/* ------------------------------------------------------------------- admin */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.stat .v { font-size: 21px; font-weight: 800; margin-top: 4px; letter-spacing: -.4px; }
.stat.hl { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.stat.hl .l { color: rgba(255, 255, 255, .85); }
.a-order { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.a-order .meta { font-size: 13px; color: var(--muted); margin-top: 8px; display: grid; gap: 4px; }
.a-order .meta div { display: flex; gap: 8px; align-items: flex-start; }
.a-order .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.a-order .acts .btn { flex: 1; min-width: 110px; }
.btn > span, .btn { text-overflow: ellipsis; }
.receipt-img { width: 100%; border-radius: 16px; margin-top: 10px; background: var(--surface-2); }

/* ------------------------------------------------------------------ toast */
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); z-index: 200; transform: translate(-50%, -150%); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 15px; background: var(--text); color: var(--bg); font-weight: 650; font-size: 14px; box-shadow: var(--shadow-lg); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }
.toast.ok { background: var(--success); color: #fff; }

/* --------------------------------------------------------------- skeleton */
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sh 1.2s infinite linear; border-radius: 14px; }
@keyframes sh { to { background-position: -200% 0; } }
.web-note { margin: 12px 16px 0; }
