:root {
  --green: #1F5D3A;
  --green-2: #2B7A4D;
  --bg: #F6F4EE;
  --ink: #1B2A21;
  --muted: #55645A;
  --red: #C93B1F;
  --gold: #E0A100;
  --shadow: 0 1px 3px rgba(27, 42, 33, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); }
body {
  font-family: 'Plus Jakarta Sans', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
html[lang="ar"] body { font-family: 'Tajawal', 'Plus Jakarta Sans', system-ui, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
img { display: block; }
s { color: var(--muted); font-size: 12px; }

.app {
  position: relative;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.splash { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--bg); opacity: 1; visibility: visible; transition: opacity .3s ease, visibility .3s ease; }
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash img { width: min(72vw, 300px); height: auto; }
.loader { width: 28px; height: 28px; border: 3px solid #DDE8DE; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .splash, .loader { transition: none; animation: none; } }
.view { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-top: env(safe-area-inset-top); }
.screen { display: flex; flex-direction: column; min-height: 100%; }
.pad { padding: 4px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.head { padding: 16px 20px 8px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.m { color: var(--muted); font-size: 12px; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 800; }

.card { background: #fff; border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.card.row { flex-direction: row; align-items: center; gap: 12px; }
a.card { text-decoration: none; color: inherit; }
.chip { background: #fff; border-radius: 22px; min-height: 44px; padding: 0 16px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); }
.chip.on { background: var(--green); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.ib { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); position: relative; flex: none; }
.ib.green { background: var(--green); color: #fff; }
.ib.plain { background: none; box-shadow: none; }
.ib.small { width: 36px; height: 36px; }
.badge { background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; padding: 2px 6px; display: inline-block; }
.badge.green { background: var(--green); }
.add { background: var(--green); color: #fff; border-radius: 22px; min-height: 48px; padding: 0 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; flex: none; }
.add:disabled { opacity: .5; }
.add.block { width: 100%; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 0 14px; min-height: 48px; color: var(--muted); flex: 1; }
.search input { border: 0; outline: 0; flex: 1; background: none; min-width: 0; font-size: 14px; }
.brand-logo { display: block; width: 132px; height: auto; object-fit: contain; }

.hero { background: var(--green); color: #fff; border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.hero h2 { font-size: 22px; line-height: 1.2; }
.hero .tag { align-self: flex-start; background: var(--green-2); border-radius: 14px; padding: 4px 10px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hero .chip { align-self: flex-start; color: var(--green); font-weight: 700; }
.cats { display: flex; justify-content: space-between; }
.cat { text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 80px; font-size: 12px; font-weight: 600; }
.cat .ico { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.link { color: var(--green); font-weight: 700; font-size: 13px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pcard { padding: 8px 8px 12px; text-decoration: none; color: inherit; gap: 6px; }
.pimg { height: 104px; border-radius: 16px; position: relative; display: flex; align-items: center; justify-content: center; }
.pimg img { width: 100px; height: 100px; object-fit: contain; mix-blend-mode: multiply; }
.pimg .emoji { font-size: 52px; }
.pimg .badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.pimg .save { position: absolute; top: 0; inset-inline-end: 0; }
.pcard .name { font-weight: 700; font-size: 15px; padding: 0 4px; }
.pcard .meta { padding: 0 4px; display: flex; align-items: center; gap: 4px; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.price { font-weight: 800; }
.star { color: var(--gold); display: flex; }
.pcard.small { padding: 6px; align-items: center; gap: 2px; border-radius: 18px; text-align: center; }
.pcard.small .pimg { width: 100%; height: 72px; border-radius: 14px; }
.pcard.small .pimg img { width: 66px; height: 66px; }
.pcard.small .pimg .emoji { font-size: 36px; }
.pcard.small .pimg .badge { font-size: 10px; top: 6px; inset-inline-start: 6px; }
.pcard.small .name { font-size: 13px; padding: 0; }

.hero-img { height: 300px; display: flex; align-items: center; justify-content: center; position: relative; flex: none; }
.hero-img img { width: 240px; height: 240px; object-fit: contain; mix-blend-mode: multiply; }
.hero-img .emoji { font-size: 120px; }
.hero-img .back { position: absolute; top: 16px; inset-inline-start: 20px; }
.hero-img .heart { position: absolute; top: 16px; inset-inline-end: 20px; }
.hero-img .badge { position: absolute; bottom: 16px; inset-inline-start: 20px; font-size: 12px; padding: 4px 10px; }
.sheet { background: var(--bg); border-radius: 28px 28px 0 0; margin-top: -24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; flex: 1; }
.stock { color: var(--green); font-weight: 700; background: #E6F1E8; border-radius: 12px; padding: 4px 10px; font-size: 12px; }
.sticky { position: sticky; bottom: 0; background: #fff; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; box-shadow: 0 -2px 10px rgba(27, 42, 33, .06); border-radius: 24px 24px 0 0; z-index: 2; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper b { min-width: 28px; text-align: center; }
.stepper .ib { box-shadow: inset 0 0 0 1px #E3E0D5; }

.thumb { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 32px; }
.thumb img { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: multiply; }
.bar { height: 8px; background: #E6F1E8; border-radius: 6px; overflow: hidden; margin-top: 6px; }
.bar > div { height: 100%; background: var(--green); border-radius: 6px; transition: width .4s; }
.promo { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow); }
html[dir="rtl"] .promo { padding: 4px 14px 4px 4px; }
.promo input { border: 0; outline: 0; flex: 1; min-width: 0; background: none; }
.promo .add { min-height: 40px; }
.totals { display: flex; flex-direction: column; gap: 8px; }
.totals .grand { font-weight: 800; font-size: 18px; }
.err { color: var(--red); font-size: 12px; }

.header-bar { padding: 16px 20px 8px; display: flex; align-items: center; gap: 12px; }
.header-bar h1 { font-size: 20px; flex: 1; }
.rtl-flip { display: block; }
html[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.empty .big { font-size: 56px; }

.steps { display: flex; align-items: center; gap: 6px; }
.steps .st { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; color: var(--muted); }
.steps .dot { width: 24px; height: 24px; border-radius: 50%; background: #E3E0D5; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.steps .st.on { color: var(--green); }
.steps .st.on .dot { background: var(--green); }
.steps .line { flex: 1; height: 2px; background: #E3E0D5; }
.opt { cursor: pointer; border: 2px solid transparent; }
.opt.on { border-color: var(--green); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #C9C6BA; margin-inline-start: auto; flex: none; }
.opt.on .radio { border-color: var(--green); background: radial-gradient(var(--green) 45%, #fff 50%); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field input { background: #fff; border-radius: 14px; padding: 12px 14px; border: 1px solid #E3E0D5; outline: 0; }
.field input:focus { border-color: var(--green); }
.field select, .field textarea { width: 100%; background: #fff; border-radius: 14px; padding: 12px 14px; border: 1px solid #E3E0D5; color: inherit; font: inherit; outline: 0; }
.field textarea { min-height: 78px; resize: vertical; }
.field select:focus, .field textarea:focus { border-color: var(--green); }
.mgr-form { gap: 12px; }
.mgr-form h2 { margin: 0; }
.mgr-row { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
.mgr-image { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #E6F1E8; }
.mgr-order { gap: 10px; }
.mgr-lines { border-block: 1px solid #ECEAE2; padding-block: 5px; }
.mgr-order .field { width: 100%; }
.mgr-order .add { align-self: flex-start; }
.vendor-honeypot { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { margin-bottom: 6px; }
input[type="checkbox"] { accent-color: var(--green); width: 18px; height: 18px; }

.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 12px; }
.tl .rail { display: flex; flex-direction: column; align-items: center; }
.tl .tdot { width: 28px; height: 28px; border-radius: 50%; background: #E3E0D5; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.tl.done .tdot { background: var(--green); }
.tl .tline { width: 2px; flex: 1; background: #E3E0D5; min-height: 20px; }
.tl.done .tline { background: var(--green); }
.tl .txt { padding-bottom: 18px; }
.tl:last-child .tline { display: none; }
.tl:last-child .txt { padding-bottom: 0; }

.tabs { display: flex; background: #fff; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; box-shadow: 0 -2px 10px rgba(27, 42, 33, .06); flex: none; }
.tabs.hide { display: none; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab.on { color: var(--green); }
.tab .ic { position: relative; display: flex; }
.tab .badge { position: absolute; top: -8px; inset-inline-end: -12px; }

.toast { position: absolute; bottom: 90px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; opacity: 0; pointer-events: none; transition: .25s; font-weight: 600; max-width: 90%; text-align: center; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 481px) {
  body { background: #E9E6DC; }
  .app { height: min(100dvh, 900px); margin-top: max(0px, calc((100dvh - 900px) / 2)); border-radius: 28px; box-shadow: 0 10px 40px rgba(0, 0, 0, .15); }
}
