:root {
  --green: #0f7a4f; --green-d: #0a5c3b; --green-l: #e6f4ec; --sun: #ffc83d; --sun-d: #8a5a00;
  --ink: #17231d; --muted: #5d6b63; --line: #e3e9e5; --bg: #f6f8f6; --card: #fff; --red: #c4372b;
  --r: 14px; --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 14px rgb(0 0 0 / .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.logo svg { width: 36px; height: 36px; }
.logo span { display: flex; flex-direction: column; line-height: 1; }
.logo b { font-size: 21px; letter-spacing: -.5px; }
.logo small { font-size: 13px; color: var(--green); font-weight: 700; margin-top: 2px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; height: 42px; min-width: 0; }
.search:focus-within { border-color: var(--green); background: #fff; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; outline: 0; background: none; width: 100%; min-width: 0; font-size: 15px; }
.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; }
.cart-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* hero */
.hero { display: grid; gap: 18px; padding-top: 26px; padding-bottom: 8px; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.hero h1 { margin: 0; font-size: clamp(27px, 6vw, 44px); line-height: 1.08; letter-spacing: -.02em; }
.hero h1 span { color: var(--green); }
.lede { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.perks li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.perks li b { display: block; }
.perks li small { color: var(--muted); }
.perks .ico { font-size: 20px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.2fr 1fr; align-items: center; padding-top: 40px; } }

.preview-note { margin-top: 14px; }
.preview-note, .notice { background: #fff6dc; border: 1px solid #f3dc9b; color: var(--sun-d); border-radius: 10px; padding: 9px 12px; font-size: 14px; }

/* categories */
.cats { display: flex; gap: 8px; overflow-x: auto; padding-top: 18px; padding-bottom: 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.cats button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

/* product grid */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 10px; }
.list-head h2 { margin: 0; font-size: 20px; }
.list-head span { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 6px; position: relative; box-shadow: var(--shadow); }
.thumb { aspect-ratio: 1; border-radius: 10px; background: var(--green-l); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb .emoji { font-size: 46px; }
.save { position: absolute; top: 16px; left: 16px; background: var(--sun); color: #3d2a00; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.card h3 { margin: 2px 0 0; font-size: 14.5px; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .ar { font-size: 13px; color: var(--muted); margin-top: -3px; }
.card .unit { font-size: 12.5px; color: var(--muted); }
.price-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; }
.price b { font-size: 17px; }
.price s { color: var(--muted); font-size: 13px; margin-left: 4px; }
.add { border: 0; background: var(--green); color: #fff; border-radius: 10px; height: 38px; padding: 0 14px; font-weight: 700; font-size: 14px; }
.add:hover { background: var(--green-d); }
.qty { display: flex; align-items: center; border: 1.5px solid var(--green); border-radius: 10px; overflow: hidden; height: 38px; }
.qty button { width: 34px; height: 100%; border: 0; background: var(--green-l); color: var(--green-d); font-size: 19px; font-weight: 700; }
.qty span { min-width: 26px; text-align: center; font-weight: 700; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }

/* how it works */
.how { margin-top: 38px; }
.how h2 { font-size: 20px; }
.how ol { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.how li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 14px 52px; position: relative; }
.how li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--green-l); color: var(--green-d); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.how b, .how span { display: block; }
.how span { color: var(--muted); font-size: 14px; }

.foot { margin-top: 40px; padding: 24px 0 110px; border-top: 1px solid var(--line); background: #fff; }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.foot small { color: var(--muted); }

/* floating cart bar (mobile) */
.cart-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 14px; background: var(--green); color: #fff; padding: 14px 18px; font-size: 15px; box-shadow: 0 8px 24px rgb(15 122 79 / .35); max-width: 560px; margin: 0 auto; }

/* cart sheet */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-bg { position: absolute; inset: 0; background: rgb(0 0 0 / .4); }
.sheet-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%); background: #fff; display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 19px; }
.x { border: 0; background: var(--bg); width: 38px; height: 38px; border-radius: 10px; font-size: 24px; line-height: 1; }
.sheet-body { overflow-y: auto; padding: 14px 16px 30px; flex: 1; }
.line { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line .mini { width: 48px; height: 48px; border-radius: 8px; background: var(--green-l); display: grid; place-items: center; overflow: hidden; font-size: 24px; }
.line .mini img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.line-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.line-name small { display: block; color: var(--muted); font-weight: 400; }
.line .qty { height: 32px; }
.line .qty button { width: 28px; font-size: 16px; }
.totals { margin: 14px 0; display: grid; gap: 4px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 18px; font-weight: 800; padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }
.progress { background: var(--green-l); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--green-d); }
.bar { height: 6px; background: #fff; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
form.checkout { display: grid; gap: 10px; margin-top: 16px; }
form.checkout h3 { margin: 6px 0 0; font-size: 16px; }
label.f { display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; }
label.f input, label.f select, label.f textarea { font-weight: 400; border: 1px solid #cfd8d3; border-radius: 10px; padding: 11px 12px; font-size: 16px; background: #fff; width: 100%; }
label.f input:focus, label.f select:focus, label.f textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.btn { border: 0; border-radius: 12px; background: var(--green); color: #fff; font-weight: 800; padding: 15px; font-size: 16px; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--green-l); color: var(--green-d); }
.btn.wa { background: #25d366; color: #073b1c; }
.err { color: var(--red); font-size: 14px; }
.cod { font-size: 13px; color: var(--muted); text-align: center; }
.done { text-align: center; padding-top: 20px; }
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green-l); color: var(--green); font-size: 34px; display: grid; place-items: center; margin: 0 auto 10px; }
.done h3 { margin: 0 0 4px; font-size: 21px; }
.done p { color: var(--muted); margin: 6px 0; }
.done .btn { margin-top: 10px; }
.empty-cart { text-align: center; color: var(--muted); padding: 40px 0; }
.reorder { margin-top: 12px; }
@media (min-width: 900px) { .cart-bar { display: none !important; } .foot { padding-bottom: 30px; } }
