:root {
  --brand: #e8590c;
  --brand-dark: #c2410c;
  --brand-soft: #fff1e8;
  --ink: #17181f;
  --muted: #6b7080;
  --line: #ececf1;
  --bg: #f7f6f3;
  --card: #fff;
  --ok: #2f9e44;
  --danger: #e03131;
  --radius: 18px;
  --shadow: 0 10px 30px -18px rgba(20, 20, 40, .35);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Cairo", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; padding-bottom: 96px; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1100px, 100% - 28px); margin-inline: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* header */
.s-head { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.s-head__in { display: flex; align-items: center; gap: 12px; height: 64px; }
.s-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; min-width: 0; }
.s-brand i { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.s-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-head__actions { margin-inline-start: auto; display: flex; gap: 8px; }
.icon-btn { border: 1px solid var(--line); background: var(--card); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; font-size: 1.15rem; text-decoration: none; position: relative; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.badge-dot { position: absolute; top: -6px; inset-inline-end: -6px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #e6f6ea; color: var(--ok); }
.status-pill.closed { background: #fde8e8; color: var(--danger); }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* hero + search */
.s-hero { padding: 22px 0 8px; }
.s-hero h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; }
.search { position: relative; margin-top: 14px; }
.search input { width: 100%; height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); padding: 0 48px 0 44px; font-size: 1rem; outline: none; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search > i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }
.search .clear { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 8px; }

.closed-banner { margin-top: 14px; background: #fde8e8; color: #a51d1d; border-radius: 14px; padding: 12px 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; }

/* categories bar */
.cats { position: sticky; top: 64px; z-index: 20; background: var(--bg); padding: 10px 0; }
.cats__in { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.cats__in::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); padding: 7px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; white-space: nowrap; font-size: .95rem; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* sections + items */
.cat-sec { padding-top: 14px; scroll-margin-top: 130px; }
.cat-sec h2 { margin: 6px 0 12px; font-size: 1.3rem; font-weight: 800; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.item { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; transition: transform .15s, box-shadow .15s; text-align: start; width: 100%; }
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item__name { font-weight: 800; font-size: 1.02rem; margin: 0; }
.item__desc { color: var(--muted); font-size: .86rem; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 800; color: var(--brand-dark); }
.price small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.item__img { width: 104px; height: 104px; border-radius: 14px; object-fit: cover; flex: none; background: var(--brand-soft); }
.item__ph { width: 104px; height: 104px; border-radius: 14px; flex: none; background: linear-gradient(135deg, var(--brand-soft), #ffe0cc); display: grid; place-items: center; color: var(--brand); font-size: 2.2rem; }
.add-btn { width: 34px; height: 34px; border-radius: 11px; border: 0; background: var(--brand); color: #fff; font-size: 1.2rem; display: grid; place-items: center; cursor: pointer; flex: none; }
.in-cart { font-size: .78rem; font-weight: 800; color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }

/* sheet (item modal / cart) */
.backdrop { position: fixed; inset: 0; background: rgba(15, 15, 25, .5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 60; background: var(--card); inset-inline: 0; bottom: 0; max-height: 92vh; border-radius: 24px 24px 0 0; display: flex; flex-direction: column; transform: translateY(105%); transition: transform .25s ease; }
.sheet.show { transform: none; }
@media (min-width: 720px) {
  .sheet { inset-inline: auto; left: 50%; bottom: auto; top: 50%; width: 560px; border-radius: 24px; transform: translate(-50%, -45%) scale(.97); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; max-height: 88vh; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
}
.sheet__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sheet__head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; flex: 1; }
.sheet__body { overflow-y: auto; padding: 0 18px 18px; flex: 1; }
.sheet__foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.x-btn { border: 0; background: #f1f1f4; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: grid; place-items: center; }
.sheet__img { width: calc(100% + 36px); margin: 0 -18px 12px; max-height: 260px; object-fit: cover; }
.opt-group { margin-top: 16px; }
.opt-group__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.opt-group__head b { font-size: 1rem; }
.req { font-size: .75rem; font-weight: 700; background: #f1f1f4; color: var(--muted); padding: 2px 8px; border-radius: 999px; }
.req.need { background: #fde8e8; color: var(--danger); }
.opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 8px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.opt span { flex: 1; font-weight: 600; }
.opt em { font-style: normal; font-weight: 700; color: var(--muted); font-size: .9rem; }
.notes { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; resize: vertical; min-height: 60px; outline: none; }
.notes:focus { border-color: var(--brand); }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; flex: none; }
.stepper button { width: 42px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.stepper button:disabled { opacity: .3; }
.stepper span { min-width: 34px; text-align: center; font-weight: 800; font-size: 1.05rem; }
.stepper.sm button { width: 32px; height: 32px; font-size: 1rem; }
.stepper.sm span { min-width: 26px; font-size: .95rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none; transition: background .15s, opacity .15s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: #f1f1f4; color: var(--ink); }
.btn-ok { background: #25d366; color: #fff; }
.btn-block { flex: 1; width: 100%; }
.btn-sm { height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 11px; }

/* cart bar */
.cart-bar { position: fixed; z-index: 40; inset-inline: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 10px 10px 18px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); cursor: pointer; border: 0; width: calc(100% - 28px); text-align: start; }
.cart-bar__count { background: var(--brand); width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; flex: none; }
.cart-bar__label { flex: 1; font-weight: 800; }
.cart-bar__total { font-weight: 800; background: rgba(255, 255, 255, .12); padding: 8px 14px; border-radius: 12px; }

.cart-line { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__name { font-weight: 800; }
.cart-line__meta { color: var(--muted); font-size: .84rem; }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.link-btn { border: 0; background: none; color: var(--danger); font-size: .82rem; cursor: pointer; padding: 0; }

/* checkout */
.co-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; padding: 18px 0; }
@media (max-width: 860px) { .co-grid { grid-template-columns: 1fr; } }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.box h3 { margin: 0 0 12px; font-size: 1.08rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.box h3 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; display: grid; place-items: center; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 5px; }
.field label small { font-weight: 500; color: var(--muted); }
.input { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 13px; padding: 0 14px; outline: none; background: #fff; }
textarea.input { height: auto; min-height: 76px; padding: 10px 14px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.err { border-color: var(--danger); }
.err-msg { color: var(--danger); font-size: .82rem; margin-top: 4px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

.map-wrap { position: relative; }
.map { height: 340px; border-radius: 14px; border: 1px solid var(--line); z-index: 1; }
.geo-search { position: relative; margin-bottom: 10px; }
.geo-results { position: absolute; z-index: 10; inset-inline: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; max-height: 290px; overflow-y: auto; }
.geo-results button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.geo-results button:hover, .geo-results button.on { background: var(--brand-soft); }
.geo-results b { display: block; font-size: .95rem; }
.geo-results small { color: var(--muted); }
.locate-btn { position: absolute; z-index: 5; bottom: 14px; inset-inline-start: 14px; }
.zone-info { margin-top: 10px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: .92rem; display: flex; gap: 8px; align-items: center; }
.zone-info.ok { background: #e6f6ea; color: #1f7a33; }
.zone-info.bad { background: #fde8e8; color: #a51d1d; }
.zone-info.wait { background: #f1f1f4; color: var(--muted); }
.pick-hint { position: absolute; z-index: 5; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(23, 24, 31, .85); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 700; pointer-events: none; white-space: nowrap; }

.pay-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 10px; cursor: pointer; }
.pay-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pay-opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.pay-opt i { font-size: 1.5rem; color: var(--brand); }
.pay-opt b { display: block; }
.pay-opt small { color: var(--muted); }

.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { border-top: 1.5px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.2rem; font-weight: 800; }
.sum-row.disc { color: var(--ok); font-weight: 700; }
.coupon { display: flex; gap: 8px; }
.coupon .input { text-transform: uppercase; }
.alert { padding: 12px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 12px; }
.alert-err { background: #fde8e8; color: #a51d1d; }
.alert-ok { background: #e6f6ea; color: #1f7a33; }
.sticky-side { position: sticky; top: 80px; }

/* tracking */
.track-hero { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; text-align: center; margin: 18px 0 14px; }
.track-hero .big-ic { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; font-size: 2.2rem; background: var(--brand-soft); color: var(--brand); }
.track-hero h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.steps { display: flex; justify-content: space-between; position: relative; margin: 26px 4px 6px; }
.steps::before { content: ""; position: absolute; top: 15px; inset-inline: 16px; height: 4px; background: var(--line); border-radius: 4px; }
.steps .bar { position: absolute; top: 15px; inset-inline-start: 16px; height: 4px; background: var(--brand); border-radius: 4px; transition: width .4s; }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 20%; font-size: .78rem; font-weight: 700; color: var(--muted); }
.step i { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: .95rem; }
.step.done { color: var(--ink); }
.step.done i { border-color: var(--brand); background: var(--brand); color: #fff; }
.step.now i { box-shadow: 0 0 0 6px var(--brand-soft); }
.inv-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.inv-line small { color: var(--muted); display: block; }

/* toast */
.toast { position: fixed; z-index: 80; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 700; opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100% - 28px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.s-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 30px 0 10px; }
