/* The Fresh Pack store. Plain CSS, no build step. No inline styles anywhere (the CSP forbids them). */
/* Arabic: Cairo (SIL Open Font License), self-hosted because the CSP allows fonts only from this site. */
@font-face { font-family: "Cairo"; font-weight: 400; font-display: swap; src: url("/fonts/cairo-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Cairo"; font-weight: 700; font-display: swap; src: url("/fonts/cairo-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
:root {
  --bg: #fbf8f2; --surface: #fff; --surface-2: #f4efe5; --ink: #1c2b24; --muted: #5d6b64; --line: #e6e0d3;
  --brand: #2a7a4f; --brand-strong: #1f6540; --brand-soft: #e4f2e9; --on-brand: #fff;
  --accent: #e8833a; --danger: #b93a2c; --warn: #96650f; --warn-bg: #fdf3dc; --ok: #22703f;
  --shadow: 0 1px 2px rgba(28, 43, 36, .06), 0 6px 20px rgba(28, 43, 36, .06);
  --radius: 14px; --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101814; --surface: #18231d; --surface-2: #1f2d25; --ink: #eaf2ed; --muted: #a2b3aa; --line: #2b3b32;
    --brand: #4aa877; --brand-strong: #63c08f; --brand-soft: #1d3628; --on-brand: #0d1a12;
    --accent: #f0994f; --danger: #ef7a6c; --warn: #f0c060; --warn-bg: #3a2f14; --ok: #6fd09a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; } a { color: var(--brand-strong); } img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 8px; top: 0; transform: translateY(-200%); background: var(--brand); color: var(--on-brand); padding: .6em 1em; z-index: 100; border-radius: 0 0 8px 8px; }
.skip:focus { transform: translateY(0); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 640px; } .center { text-align: center; } .pad { padding-block: 64px; }
.section { padding-block: 32px; } .mt { margin-top: 20px; } .mb { margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .danger { color: var(--danger); } .warn { color: var(--warn); } .ok { color: var(--ok); }
.big-emoji { font-size: 3rem; margin: 0 0 .25em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lead-sm { margin-top: -6px; max-width: 60ch; }

/* header */
.announce { background: var(--brand); color: var(--on-brand); text-align: center; font-size: .875rem; padding: 6px 12px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--brand-strong); text-decoration: none; }
.brand svg { width: 34px; height: 34px; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a, .nav .linklike { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav .linklike:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); background: var(--surface-2); }
.badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: var(--surface-2); border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-strong); cursor: pointer; text-decoration: underline; }
.linklike.danger { color: var(--danger); }
@media (max-width: 820px) {
  .menu-btn { display: flex; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a, .nav .linklike { padding: 12px; text-align: start; }
  .cart-btn { margin-inline-start: auto; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 2px solid var(--brand); background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .05s, background .15s; }
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--brand-strong); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.ghost.danger { color: var(--danger); border-color: var(--danger); }
.btn.light { background: #fff; color: var(--brand-strong); border-color: #fff; }
.btn.lg { padding: 14px 28px; font-size: 1.05rem; } .btn.sm { padding: 6px 14px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.loading { opacity: .7; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .btn-col { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: center; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip.on, .chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip small { font-weight: 500; opacity: .75; font-size: .72rem; }
.chip.warn { border-color: var(--danger); background: var(--danger); color: #fff; }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #fff; }
.tag-sale { background: var(--accent); } .tag-out { background: #6b7280; } .tag-low { background: var(--warn); }

/* cards + product grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.pimg { position: relative; display: block; aspect-ratio: 1; background: var(--surface-2); }
.pimg img, .ph { width: 100%; height: 100%; object-fit: cover; }
.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); color: color-mix(in srgb, var(--brand) 55%, transparent); aspect-ratio: 1; }
.ph svg { width: 40%; }
.pbody { padding: 14px 16px 6px; flex: 1; }
.pbody h3 { margin: 2px 0 6px; } .pbody h3 a { color: var(--ink); text-decoration: none; }
.pcat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-decoration: none; font-weight: 700; }
.price s { color: var(--muted); font-weight: 400; } .price strong { color: var(--ink); font-size: 1.1rem; } .price.big strong { font-size: 1.6rem; }
.product .btn { margin: 8px 16px 16px; width: calc(100% - 32px); }
.toolbar { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 12px 0 20px; align-items: center; }
.search { display: flex; gap: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.empty { text-align: center; padding: 48px 16px; }

/* home */
.hero { background: linear-gradient(180deg, var(--brand-soft), var(--bg)); padding-block: 48px 24px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--brand-strong); font-size: .8rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.hl { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; } .cta-row.center { justify-content: center; }
.ticks { list-style: none; padding: 0; display: flex; gap: 8px 20px; flex-wrap: wrap; color: var(--muted); font-weight: 600; }
.ticks li::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: clamp(2rem, 6vw, 3.5rem); text-align: center; }
.hero-art span { background: var(--surface); border-radius: 24px; padding: 16px 0; box-shadow: var(--shadow); }
.hero-art span:nth-child(2n) { transform: translateY(14px); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: .9rem; margin-inline-end: 6px; }
.step .num { margin-bottom: 10px; }
.band { background: var(--brand); color: var(--on-brand); border-radius: 22px; padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.band h2 { margin-bottom: .2em; } .band p { margin: 0; max-width: 56ch; opacity: .92; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { display: none; } }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; } .field > span { font-weight: 700; font-size: .9rem; }
.field.inline { grid-template-columns: auto 1fr; align-items: center; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
input[type=file] { border: 0; padding: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.notice { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.pay-card { border: 2px solid var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 12px 16px; } .pay-card p { margin: 4px 0 0; }
.pay-note { background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .inline-form input:not([type=checkbox]) { width: auto; flex: 1 1 140px; }
.inline-form .narrow-input, .narrow-input { width: 90px !important; flex: 0 0 90px !important; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { width: 38px; height: 38px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 52px; border: 0; text-align: center; padding: 6px 0; border-radius: 0; box-shadow: none; }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0; }

/* product page */
.crumbs { font-size: .9rem; margin-bottom: 14px; color: var(--muted); }
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.pdp-img { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.pdp-img img, .pdp-img .ph { width: 100%; height: 100%; object-fit: cover; }
.desc p { color: var(--muted); }
@media (max-width: 760px) { .pdp { grid-template-columns: 1fr; } }

/* cart, checkout, summary */
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart-grid { grid-template-columns: minmax(0, 1fr); } }
.lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.line.bad { border-color: var(--danger); }
.thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 1; } .thumb img, .thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.line-main h3 { margin: 0 0 2px; } .line-main h3 a { color: var(--ink); text-decoration: none; }
.line-actions { display: flex; gap: 14px; align-items: center; margin-top: 8px; } .line-total { font-weight: 800; }
.summary h2 { margin-bottom: .6em; } .summary .btn { margin-top: 10px; }
.sticky { position: sticky; top: 84px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 12px 0; }
.totals dt { color: var(--muted); } .totals dd { margin: 0; text-align: end; font-weight: 600; }
.totals .grand { color: var(--ink); font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mini > li { display: flex; justify-content: space-between; gap: 12px; }
.blend-details { font-size: .85rem; color: var(--muted); } .blend-details summary { cursor: pointer; color: var(--brand-strong); }
.blend-details ul { margin: 6px 0 0; padding-inline-start: 18px; }

/* orders */
.order-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .order-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: .02em; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 20px; }
address { font-style: normal; line-height: 1.6; }
.progress { list-style: none; display: flex; padding: 0; margin: 18px 0 24px; gap: 4px; }
.progress li { flex: 1; text-align: center; font-size: .8rem; color: var(--muted); font-weight: 600; position: relative; padding-top: 22px; }
.progress .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.progress li::before { content: ""; position: absolute; top: 6px; inset-inline-start: -50%; width: 100%; height: 3px; background: var(--line); }
.progress li:first-child::before { display: none; }
.progress li.done .dot, .progress li.done::before { background: var(--brand); } .progress li.now { color: var(--brand-strong); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { border-inline-start: 3px solid var(--brand); padding-inline-start: 12px; }
.badge-status { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.s-pending { background: var(--warn-bg); color: var(--warn); } .s-confirmed { background: #dbeafe; color: #1e4fa3; } .s-out_for_delivery { background: #ede0fb; color: #6b32b0; }
.s-delivered { background: var(--brand-soft); color: var(--ok); } .s-cancelled { background: #fbe1de; color: var(--danger); }
.success { text-align: center; padding: 24px 0; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; } .tab.on { color: var(--brand-strong); border-color: var(--brand); }
.rows { list-style: none; padding: 0; margin: 0; } .row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); } .row:last-child { border: 0; } .right { text-align: end; }
.blend-card.bad { border-color: var(--danger); } .mix { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; } .mix li { display: grid; }

/* blend builder */
.builder-page .bp-head { margin-bottom: 4px; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.steps-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.step-card h2, .list-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.num-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: .9rem; }
.list-head { display: flex; justify-content: space-between; align-items: center; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mode { border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; cursor: pointer; align-items: flex-start; min-height: 64px; }
.mode:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.mode small { display: block; color: var(--muted); }
.recipes { display: grid; gap: 6px; margin-bottom: 12px; min-width: 0; }
.recipes-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.recipes-row::-webkit-scrollbar { display: none; }
.recipes .chip { white-space: nowrap; flex: none; flex-direction: row; min-height: 40px; }
.acc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.grp { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); border-inline-start: 6px solid hsl(var(--h) 45% 55%); }
.grp.on { background: color-mix(in srgb, hsl(var(--h) 60% 50%) 6%, var(--surface)); }
.grp.bad { border-color: var(--danger); }
.grp-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 0; background: transparent; font: inherit; color: var(--ink); cursor: pointer; text-align: start; }
.grp-head:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.grp-ico { font-size: 1.6rem; width: 36px; text-align: center; }
.grp-title { flex: 1; display: grid; line-height: 1.25; min-width: 0; }
.grp-title small { color: var(--muted); font-size: .8rem; }
.grp-sum { font-weight: 800; font-size: 1.05rem; color: hsl(var(--h) 50% 38%); min-width: 2.2em; text-align: end; }
:root[data-theme="dark"] .grp-sum, .grp.on .grp-sum { color: var(--ink); }
.chev { width: 10px; height: 10px; border-inline-end: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); margin-inline: 6px 2px; transition: transform .2s; }
.grp-head[aria-expanded="true"] .chev { transform: rotate(-135deg); }
.grp-body { border-top: 1px solid var(--line); }
.ing { padding: 12px 14px 6px; border-bottom: 1px solid var(--line); border-inline-start: 4px solid transparent; --c: hsl(var(--h) 55% 46%); }
.ing:last-child { border-bottom: 0; }
.ing.on { border-inline-start-color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.ing-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ing-name { display: grid; line-height: 1.25; min-width: 0; }
.ing-name small { color: var(--muted); font-size: .8rem; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); flex: none; }
.stepper button { width: 38px; height: 44px; border: 0; background: transparent; font-size: 1.3rem; color: var(--brand-strong); cursor: pointer; border-radius: 10px; }
.stepper button:hover:not(:disabled) { background: var(--brand-soft); }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper .num { width: 40px; border: 0; padding: 0; text-align: end; font-weight: 800; font-size: 1.05rem; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; background: transparent; box-shadow: none; -moz-appearance: textfield; appearance: textfield; }
.stepper .num::-webkit-outer-spin-button, .stepper .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .pct { font-weight: 700; color: var(--muted); margin-inline-end: 2px; }
.ing.on .stepper { border-color: var(--c); }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 4px 0 0; padding: 0; border: 0; box-shadow: none; touch-action: pan-y; --p: 0%; --track: color-mix(in srgb, var(--ink) 14%, transparent); cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(to right, var(--c) var(--p), var(--track) var(--p)); }
:root[dir="rtl"] .slider::-webkit-slider-runnable-track { background: linear-gradient(to left, var(--c) var(--p), var(--track) var(--p)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--c); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.slider::-moz-range-track { height: 10px; border-radius: 999px; background: var(--track); }
.slider::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--c); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--c); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.slider:focus-visible { outline-offset: 4px; }
.ing-note { margin: 2px 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: .85rem; }

/* summary card (desktop: sticky column; phone: bottom sheet) */
.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.summary-card h2 { margin-bottom: .6em; }
.grip, .sheet-close, .mbar, .sheet-backdrop { display: none; }
.ring-row { display: flex; align-items: center; gap: 16px; margin: 6px 0 12px; }
.ring { width: 96px; height: 96px; flex: none; }
.ring .bg { stroke: color-mix(in srgb, var(--ink) 12%, transparent); }
.ring .fg { stroke: var(--accent); transition: stroke-dasharray .25s; }
.ring.ok .fg { stroke: var(--ok); }
.ring-text { display: grid; }
.ring-text strong { font-size: 1.9rem; line-height: 1.1; }
.meter { display: flex; height: 12px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin: 6px 0 12px; }
.meter span { width: var(--w); background: hsl(var(--h) 50% 50%); }
.mix { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: .92rem; }
.mix li { display: flex; justify-content: space-between; gap: 10px; }
.hints ul { margin: 8px 0; padding-inline-start: 18px; color: var(--warn); font-size: .875rem; }

@media (max-width: 960px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder-page { padding-bottom: 96px; }
  .summary-card { position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 90; max-height: 88dvh; border-radius: 22px 22px 0 0; border-bottom: 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); visibility: hidden; transition: transform .28s ease, visibility 0s .28s; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); }
  .summary-card.open { transform: none; visibility: visible; transition: transform .28s ease; }
  .grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
  .sheet-close { display: grid; place-items: center; position: absolute; top: 10px; inset-inline-end: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 1.5rem; line-height: 1; color: var(--ink); cursor: pointer; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); }
  .sheet-backdrop[hidden] { display: none; }
  body.sheet-open { overflow: hidden; }
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .14); }
  .mbar-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
  .ring.mini { width: 46px; height: 46px; }
  .mbar-text { display: grid; line-height: 1.2; min-width: 0; }
  .mbar-text strong { font-size: .98rem; }
  .mbar-text small { color: var(--muted); font-size: .85rem; }
  .mbar .btn { flex: none; padding-inline: 20px; min-height: 48px; }
  .toasts { bottom: 90px; }
  .step-card { padding: 16px; }
  .ing-main { flex-wrap: nowrap; }
  .stepper button { width: 40px; height: 44px; }
}
@media (max-width: 560px) {
  .step-card h2 { margin-bottom: .5em; }
  .mode { padding: 10px 12px; min-height: 0; gap: 8px; }
  .mode small { font-size: .78rem; }
  .bp-head h1 { font-size: 1.6rem; }
  .lead-sm { font-size: .92rem; }
}
@media (max-width: 340px) {
  .modes { grid-template-columns: 1fr; }
  .mbar .btn { padding-inline: 14px; font-size: .95rem; }
}

/* sticky action bars (cart, checkout) and phone polish */
.stickybar { display: none; }
button, .btn, .chip, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px) {
  .stickybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, .14); }
  .sb-total { display: grid; line-height: 1.2; min-width: 0; }
  .sb-total small { color: var(--muted); font-size: .8rem; }
  .sb-total strong { font-size: 1.15rem; }
  .stickybar .btn { min-height: 48px; padding-inline: 26px; flex: none; }
  .has-stickybar { padding-bottom: 96px; }
  .inline-submit, .inline-cta { display: none; }
  .toasts { bottom: 84px; }
}
@media (max-width: 600px) {
  .btn { min-height: 46px; }
  .chip { min-height: 40px; }
  .section { padding-block: 22px; }
  h1 { font-size: 1.65rem; }
  /* compact two-column product grid */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product .pbody { padding: 10px 12px 4px; }
  .product h3 { font-size: .95rem; margin-bottom: 4px; }
  .product .price strong { font-size: 1rem; }
  .product .btn { margin: 6px 10px 12px; width: calc(100% - 20px); padding: 9px 8px; font-size: .9rem; }
  .pcat { font-size: .68rem; }
  .tag { top: 6px; inset-inline-start: 6px; font-size: .68rem; padding: 2px 8px; }
  /* cart lines: total drops under the controls instead of being pushed off-screen */
  .line { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 10px; }
  .line-total { grid-column: 2; justify-self: end; font-size: 1.05rem; }
  .line-actions { flex-wrap: wrap; gap: 10px; }
  .card { padding: 16px; }
  .section-head { margin-bottom: 10px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .toolbar .chip { flex: none; flex-direction: row; }
  .search { width: 100%; }
  .hero { padding-block: 32px 12px; }
  .cta-row .btn { flex: 1 1 100%; }
  .pdp { gap: 16px; }
  .buy-row .btn { flex: 1; }
}

/* admin */
.admin { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: start; }
.admin-nav { display: grid; gap: 4px; position: sticky; top: 84px; }
.admin-nav a { padding: 9px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.admin-nav a:hover { background: var(--surface-2); } .admin-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }
.admin-main { min-width: 0; display: grid; gap: 18px; align-content: start; }
@media (max-width: 800px) { .admin { grid-template-columns: 1fr; } .admin-nav { display: flex; overflow-x: auto; position: static; } .admin-nav a { white-space: nowrap; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 16px; } .stat p { margin: 0; } .stat-num { font-size: 1.6rem; font-weight: 800; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .num { text-align: end !important; }
.table.tight td { padding: 6px 0; border: 0; }
.thumb-sm { width: 52px; } .thumb-sm img, .thumb-sm .ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.thumb-md { width: 120px; height: 120px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; flex: none; } .thumb-md img, .thumb-md .ph { width: 100%; height: 100%; object-fit: cover; }
.img-edit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .zone-name { width: 150px; }
.cat-form { margin-bottom: 10px; }

/* footer, toast, misc */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 48px; padding-top: 32px; }
.foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 24px; } .foot h4 { margin-bottom: .4em; } .foot a { display: block; padding: 2px 0; }
.copy { padding-block: 20px; font-size: .85rem; }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr; } }
.toasts { position: fixed; bottom: 20px; inset-inline: 0; display: grid; place-items: center; z-index: 200; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); max-width: min(92vw, 520px); animation: pop .2s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
[aria-busy="true"] { opacity: .5; transition: opacity .2s .15s; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .announce, .admin-nav, .no-print, .toasts { display: none !important; } body { background: #fff; color: #000; } .admin { display: block; } .card { box-shadow: none; } }

/* language switch + password toggle */
.lang-btn { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); cursor: pointer; }
.lang-btn:hover { background: var(--surface-2); }
.pw { position: relative; display: block; }
.pw input { padding-inline-end: 64px; }
.pw-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--brand-strong); font: inherit; font-size: .85rem; font-weight: 700; padding: 6px 8px; cursor: pointer; }
.field-hint { font-size: .85rem; color: var(--muted); }

/* Arabic / right-to-left */
:root[lang="ar"] body { font-family: "Cairo", var(--font); line-height: 1.7; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3, :root[lang="ar"] h4 { letter-spacing: 0; line-height: 1.35; }
:root[dir="rtl"] .eyebrow { letter-spacing: 0; }
:root[dir="rtl"] .pcat { letter-spacing: 0; }
:root[dir="rtl"] .table th { letter-spacing: 0; }
/* Emails, phone numbers, order numbers, passwords and numeric inputs stay left-to-right inside RTL forms. */
:root[dir="rtl"] :is(input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[name="number"], input[data-ltr]) { direction: ltr; text-align: right; }
:root[dir="rtl"] .qty input { text-align: center; }
bdi, .ltr { unicode-bidi: isolate; }
/* Directional arrows in running text are part of the translated strings; nothing else needs flipping. */
