/* ============================================================
   كرم المختار — customer menu. ONE theme: elegant photo menu
   (Classic typography × Gallery photos). Palette: beige / red / black.
   <html data-mode="light|dark">  — light is beige, dark is black/cream.
   ============================================================ */

/* ---------------- PALETTE ---------------- */
:root, [data-mode="light"] {
    --bg: #efe4cd; --bg-2: #e7d9bc; --surface: #fbf6ec; --card: #fbf7ee; --card-2: #f0e6d1;
    --line: rgba(43,32,18,.12); --line-strong: rgba(43,32,18,.2);
    --text: #211c15; --muted: #6d604b; --muted-2: #9a8a70;
    --accent: #cf2a1c; --accent-ink: #fff; --gold: #cf2a1c; --tag-ink: #fff; --ok: #1f9d6b;
    --chip-on-bg: #211c15; --chip-on-ink: #f4ead2;
    --topbar-bg: rgba(251,246,236,.86); --catbar-bg: rgba(239,228,205,.72); --control-bg: rgba(43,32,18,.06);
    --logo-bg: radial-gradient(120% 120% at 50% 20%, #ffffff, #ede1c9);
    --grab: rgba(43,32,18,.22); --overlay: rgba(30,22,12,.42);
    --bezel-1: #16110d; --bezel-2: #2c2420;
    --page-glow: radial-gradient(120% 78% at 50% -8%, rgba(207,42,28,.10), transparent 58%), radial-gradient(90% 60% at 100% 102%, rgba(43,32,18,.05), transparent 60%);
}
[data-mode="dark"] {
    --bg: #100d0b; --bg-2: #17130f; --surface: #191510; --card: #221c15; --card-2: #2e271d;
    --line: rgba(255,255,255,.10); --line-strong: rgba(255,255,255,.18);
    --text: #f6eede; --muted: #beb097; --muted-2: #877658;
    --accent: #f04a35; --accent-ink: #fff; --gold: #f04a35; --tag-ink: #fff; --ok: #3ad198;
    --chip-on-bg: #f6eede; --chip-on-ink: #17130f;
    --topbar-bg: rgba(16,13,11,.85); --catbar-bg: rgba(12,10,8,.6); --control-bg: rgba(255,255,255,.07);
    --logo-bg: radial-gradient(120% 120% at 50% 20%, #2e271d, #14100c);
    --grab: rgba(255,255,255,.5); --overlay: rgba(0,0,0,.66);
    --bezel-1: #060504; --bezel-2: #201a12;
    --page-glow: radial-gradient(120% 80% at 50% -8%, rgba(240,74,53,.17), transparent 60%);
}

:root {
    --app-w: 460px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --font: "Cairo", "Inter", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;
    --font-head: "El Messiri", "Amiri", serif;
}
[dir="ltr"] { --font: "Inter", "Cairo", ui-sans-serif, system-ui, sans-serif; --font-head: "Playfair Display", "Amiri", Georgia, serif; }
/* Kurdish (Sorani) needs a font with the extended letters (ۆ ێ ڵ ڕ ە). */
html[lang="ku"] { --font: "Vazirmatn", "Cairo", sans-serif; --font-head: "Vazirmatn", "Amiri", sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
    font-family: var(--font); color: var(--text);
    background: var(--bg); background-image: var(--page-glow);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ---------------- LOADING SPLASH (orbit) ---------------- */
.loader { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: var(--bg); background-image: var(--page-glow); transition: opacity .55s ease, visibility .55s; }
.loader.hide { opacity: 0; visibility: hidden; }
.loader__box { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader__mark { position: relative; width: 116px; height: 116px; display: grid; place-items: center; }
.loader__logo { width: 90px; height: 90px; background: center / contain no-repeat; filter: drop-shadow(0 12px 26px rgba(0,0,0,.4)); animation: ldBreathe 2.2s ease-in-out infinite; }
[data-mode="dark"] .loader__logo { background-image: url(/images/icon-dark.png); }
[data-mode="light"] .loader__logo { background-image: url(/images/icon.png); }
.loader__ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 62%, var(--accent) 90%, transparent 100%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); animation: ldSpin 1s linear infinite; }
.loader__name { font-family: var(--font-head); font-size: 25px; font-weight: 700; letter-spacing: .5px; color: var(--text); opacity: 0; animation: ldFade .7s ease forwards .2s; }
.loader__bar, .loader__dots { display: none; }
@keyframes ldSpin { to { transform: rotate(360deg); } }
@keyframes ldBreathe { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: .92; } }
@keyframes ldFade { to { opacity: 1; } }

/* ---------------- PHONE SHELL ---------------- */
.app { position: relative; width: 100%; max-width: var(--app-w); height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bg-2), var(--bg)); overflow: hidden; isolation: isolate; }
/* Desktop: just constrain the width and separate it from the page — no phone frame. */
@media (min-width: 540px) {
    .app { border-inline: 1px solid var(--line); box-shadow: 0 0 60px -18px rgba(0,0,0,.35); }
}

/* ---------------- TOPBAR ---------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; background: var(--topbar-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); z-index: 30; }
.topbar__end { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand__logo { width: 58px; height: 44px; border-radius: 13px; object-fit: contain; padding: 5px; background: var(--logo-bg); box-shadow: 0 0 0 1px var(--line-strong), 0 8px 20px -8px rgba(0,0,0,.5); }
.brand__txt { min-width: 0; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .3px; line-height: 1.1; }
.brand__tag { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.modebtn { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; color: var(--text); background: var(--control-bg); border: 1px solid var(--line); transition: .16s; }
.modebtn:active { transform: scale(.94); }
.modebtn svg { width: 18px; height: 18px; }
.lang { position: relative; flex: 0 0 auto; }
.lang__btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 12px; background: var(--control-bg); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; font-weight: 700; line-height: 1; transition: .16s; }
.lang__btn:active { transform: scale(.97); }
.lang__btn svg { width: 15px; height: 15px; opacity: .85; }
.lang__chev { width: 10px !important; height: 10px !important; opacity: .65; transition: transform .2s; }
.lang.open .lang__chev { transform: rotate(180deg); }
.lang__menu { position: absolute; top: calc(100% + 7px); inset-inline-end: 0; z-index: 45; min-width: 152px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 15px; box-shadow: 0 22px 46px -16px rgba(0,0,0,.35); opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top; pointer-events: none; transition: .16s ease; }
.lang.open .lang__menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lang__opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 11px; border-radius: 10px; text-align: start; font-size: 14px; font-weight: 600; color: var(--text); transition: .14s; }
.lang__opt:hover { background: var(--card-2); }
.lang__opt.on { color: var(--accent); font-weight: 800; }
.lang__opt svg { width: 16px; height: 16px; margin-inline-start: auto; opacity: 0; }
.lang__opt.on svg { opacity: 1; }

/* ---------------- CATEGORY BAR ---------------- */
.catbar { display: flex; gap: 8px; padding: 11px 14px; overflow-x: auto; scrollbar-width: none; background: var(--catbar-bg); border-bottom: 1px solid var(--line); z-index: 25; }
.catbar::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); transition: .18s; flex: 0 0 auto; }
.chip__i { font-size: 15px; line-height: 1; }
.chip.on { background: var(--chip-on-bg); color: var(--chip-on-ink); border-color: var(--chip-on-bg); font-weight: 700; }

/* ---------------- SCROLL ---------------- */
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { width: 0; }
.section { padding: 8px 14px 4px; scroll-margin-top: 6px; }
.section:first-child { padding-top: 14px; }
.footer { text-align: center; color: var(--muted-2); font-size: 11.5px; padding: 26px 0 calc(104px + var(--safe-b)); }

/* ---------------- ELEGANT PHOTO MENU ---------------- */
.mhead { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 8px 16px; }
.mhead__line { flex: 1; max-width: 74px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 26%, transparent)); }
.mhead__line:last-child { background: linear-gradient(90deg, color-mix(in srgb, var(--text) 26%, transparent), transparent); }
.mhead__t { font-family: var(--font-head); font-size: 22px; font-weight: 700; letter-spacing: .4px; text-align: center; }

.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcard { display: flex; flex-direction: column; text-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .12s, border-color .18s; box-shadow: 0 8px 20px -14px rgba(0,0,0,.5); }
.mcard:active { transform: scale(.98); }
.mcard__media { position: relative; aspect-ratio: 4 / 3; background: var(--card-2); }
.mcard__media img { width: 100%; height: 100%; object-fit: cover; }
.mcard__tag { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; box-shadow: 0 4px 12px -3px rgba(0,0,0,.5); }
.mcard__info { padding: 9px 12px 11px; }
.mcard__name { font-family: var(--font-head); font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard__price { margin-top: 3px; font-size: 13.5px; font-weight: 800; color: var(--accent); }
.mcard__price .mut { font-family: var(--font); font-size: 10px; color: var(--muted-2); font-weight: 600; }
.mcard__price .cur { font-family: var(--font); font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------------- SCRIM + SHEETS (shared) ---------------- */
.scrim { position: absolute; inset: 0; z-index: 40; background: var(--overlay); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .28s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 50; max-height: 92%; display: flex; flex-direction: column; background: var(--surface); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line-strong); box-shadow: 0 -30px 60px -20px rgba(0,0,0,.4); transform: translateY(101%); transition: transform .34s cubic-bezier(.22,1,.36,1); overflow: hidden; }
.sheet.on { transform: translateY(0); }
.sheet__grab { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 6; width: 42px; height: 5px; border-radius: 999px; background: var(--grab); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sheet__scroll { overflow-y: auto; overflow-x: hidden; padding-bottom: 8px; }
.sheet__scroll::-webkit-scrollbar { width: 0; }
.isheet__hero { position: relative; height: 306px; background: var(--card-2); overflow: hidden; }
.isheet__img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.isheet__hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, transparent 22%, transparent 55%, var(--surface)); }
.isheet__close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 4; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); display: grid; place-items: center; color: #fff; }
.isheet__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.42); backdrop-filter: blur(6px); display: grid; place-items: center; color: #fff; transition: background .16s, transform .1s; }
.isheet__nav:active { transform: translateY(-50%) scale(.9); }
.isheet__nav svg { width: 19px; height: 19px; }
.isheet__nav--prev { left: 10px; }
.isheet__nav--next { right: 10px; }
.isheet__dots { position: absolute; bottom: 44px; inset-inline: 0; display: flex; gap: 6px; justify-content: center; z-index: 4; }
.isheet__dot { width: 7px; height: 7px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.45); transition: .2s; }
.isheet__dot.on { background: #fff; width: 20px; border-radius: 999px; }
.isheet__body { padding: 4px 18px 0; margin-top: -34px; position: relative; z-index: 2; }
.isheet__tag { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.isheet__name { font-family: var(--font-head); font-size: 25px; font-weight: 700; line-height: 1.2; }
.isheet__desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 8px; }
.opt__label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin: 18px 0 9px; }
.variants { display: flex; flex-direction: column; gap: 8px; }
.variant { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); transition: .16s; text-align: start; width: 100%; }
.variant.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.variant__radio { width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--muted-2); flex: 0 0 auto; display: grid; place-items: center; transition: .16s; }
.variant.on .variant__radio { border-color: var(--accent); }
.variant.on .variant__radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.variant__name { font-weight: 700; font-size: 14.5px; flex: 1; }
.variant__price { font-weight: 800; font-size: 14.5px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.stepper button { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); color: var(--text); font-size: 0; transition: .14s; }
.stepper button::before { content: ""; position: absolute; inset: 0; margin: auto; width: 13px; height: 2.5px; border-radius: 2px; background: currentColor; }
.stepper button[data-q="1"]::after, .stepper button[data-cq="1"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 2.5px; height: 13px; border-radius: 2px; background: currentColor; }
.stepper button:active { transform: scale(.9); }
.stepper button:disabled { opacity: .3; }
.stepper__n { min-width: 32px; text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.isheet__qtyrow { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 4px; }
.isheet__qtyrow span { font-weight: 700; font-size: 15px; }
.sheet__foot { padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); flex: 0 0 auto; }
.btn { width: 100%; height: 54px; border-radius: 16px; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 16px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 26px -10px var(--accent); transition: transform .12s, opacity .2s; }
.btn svg { flex: 0 0 auto; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; box-shadow: none; }
.btn--wa { background: #25d366; color: #fff; box-shadow: 0 12px 26px -10px #25d366; }
.btn__price { margin-inline-start: auto; background: rgba(0,0,0,.22); padding: 6px 12px; border-radius: 11px; font-size: 14px; font-weight: 800; }
.btn__count { margin-inline-end: auto; background: rgba(0,0,0,.22); min-width: 30px; text-align: center; padding: 6px 11px; border-radius: 11px; font-size: 14px; font-weight: 800; }
.cartbar { position: absolute; inset-inline: 12px; bottom: calc(12px + var(--safe-b)); z-index: 35; height: 58px; border-radius: 17px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--accent) 80%, transparent); transform: translateY(160%); transition: transform .32s cubic-bezier(.22,1,.36,1); }
.cartbar.on { transform: translateY(0); }
.cartbar__badge { background: rgba(0,0,0,.25); min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.cartbar__txt { font-weight: 700; font-size: 14.5px; }
.cartbar__total { margin-inline-start: auto; font-weight: 800; font-size: 15px; }
.cartbar__go { background: rgba(0,0,0,.2); border-radius: 12px; padding: 9px 13px; font-weight: 800; font-size: 14px; }
.sheet__title { font-family: var(--font-head); font-size: 21px; font-weight: 700; padding: 24px 18px 12px; display: flex; align-items: center; gap: 10px; }
.sheet__title .muted { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 600; margin-inline-start: auto; }
.line { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.line__img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--card-2); flex: 0 0 auto; box-shadow: 0 0 0 1px var(--line); }
.line__body { flex: 1; min-width: 0; }
.line__name { font-weight: 700; font-size: 14.5px; }
.line__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.line__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.line__price { font-weight: 800; font-size: 14px; color: var(--accent); }
.summary__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.summary__row--total { color: var(--text); font-weight: 800; font-size: 18px; }
.field { padding: 4px 18px 12px; }
.field__label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.field__label .req { color: var(--accent); }
.input { width: 100%; height: 50px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); color: var(--text); font-size: 15.5px; padding: 0 14px; transition: .16s; }
.input:focus { outline: none; border-color: var(--accent); background: var(--card-2); }
.input.err { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input::placeholder { color: var(--muted-2); }
.input--area { height: auto; min-height: 86px; padding: 12px 14px; line-height: 1.5; resize: none; }
.loc { width: 100%; min-height: 56px; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: start; background: var(--card); border: 1.5px dashed var(--line-strong); transition: .16s; }
.loc.on { border-style: solid; border-color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); }
.loc__i { width: 38px; height: 38px; border-radius: 11px; background: var(--card-2); display: grid; place-items: center; font-size: 19px; flex: 0 0 auto; }
.loc.on .loc__i { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.loc__t { font-weight: 700; font-size: 14px; }
.loc__s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.loc__spin { margin-inline-start: auto; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: absolute; inset-inline: 20px; top: 16px; z-index: 70; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); border-radius: 14px; padding: 13px 16px; font-size: 13.5px; font-weight: 600; text-align: center; box-shadow: 0 20px 40px -14px rgba(0,0,0,.4); transform: translateY(-140%); transition: transform .3s cubic-bezier(.22,1,.36,1); }
.toast.on { transform: translateY(0); }
.toast.err { border-color: var(--accent); }
.toast.ok { border-color: var(--ok); }
.spin { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
