/* =====================================================================
   style.css — مطعم روما
   كل الألوان والخطوط والأنصاف والمسافات الأساسية هنا في الكتلة دي بس.
   لتغيير لون: غيّر قيمة المتغير هنا وكل الموقع يتغير. (الشرح في DESIGN-NOTES.md)
   ===================================================================== */
:root {
  /* الألوان */
  --c-yellow: #FFD21F;        /* أصفر روما: خلفية الصفحة */
  --c-red: #C8303A;           /* أحمر روما: العناوين والأزرار */
  --c-ink: #3A1418;           /* نبيذي غامق: النص والإطارات والظل */
  --c-stone: #EFE3C8;         /* حجر الكولوسيوم: شرائط الأقسام */
  --c-doodle: #E9B80C;        /* أصفر أغمق: رسومات الخلفية */
  --c-paper: #FFF9EA;         /* أبيض دافئ: ورق المنيو والفاتورة */
  --c-red-deep: #9C2029;      /* أحمر أغمق: الضغط والظل على الأحمر */
  --c-stone-deep: #DCCBA3;    /* حجر أغمق: فتحات الأقواس */
  --c-muted: #6E4F52;         /* نص ثانوي على الورق */
  --c-open: #2E7D32;          /* أخضر: مفتوح ونباتي */
  --c-scrim: rgb(58 20 24 / 0.58);   /* ستارة خلف النوافذ (من لون الحبر) */
  --c-line: rgb(58 20 24 / 0.16);    /* خطوط فاصلة خفيفة */
  --c-dots: rgb(58 20 24 / 0.42);    /* نقط التوصيل بين الاسم والسعر */

  /* الخطوط */
  --f-display: "Lalezar", "Reem Kufi", "Segoe UI", Tahoma, sans-serif;
  --f-text: "Readex Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;

  /* الأنصاف والمسافات */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 40px;
  --tap: 44px;
  --edge: 3px;                                  /* سمك إطار الأزرار والشرائط */
  --shadow-poster: 0 4px 0 var(--c-ink);       /* ظل "البوستر" الصلب */
  --shadow-poster-sm: 0 2px 0 var(--c-ink);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --focus: var(--c-ink);                        /* لون حلقة التركيز (يتبدل على الأحمر) */
}

/* ───────────── أساسيات ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--c-yellow);
  color: var(--c-ink);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.on-red { --focus: var(--c-paper); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: var(--s-5); text-align: center; font-weight: 600; }

/* ───────────── شاشة التحميل ───────────── */
.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: var(--s-3);
  background: var(--c-yellow); transition: opacity .35s var(--ease); }
.boot.is-gone { opacity: 0; pointer-events: none; }
.boot-logo { width: min(60vw, 260px); height: auto; animation: pulse 1.4s ease-in-out infinite; }
.boot-text { margin: 0; font-weight: 500; }
@keyframes pulse { 50% { transform: scale(.96); opacity: .8; } }

/* ───────────── إعلان أعلى الصفحة ───────────── */
.notice-bar { background: var(--c-red); color: var(--c-paper); padding: var(--s-2) var(--s-4); text-align: center; font-weight: 600; }
.notice-bar.is-adjust { background: var(--c-ink); color: var(--c-yellow); display: flex; gap: var(--s-3); align-items: center; justify-content: center; flex-wrap: wrap; }
.notice-bar button { min-height: var(--tap); padding: 0 var(--s-4); border: 2px solid currentColor; border-radius: var(--r-pill); background: transparent; font-weight: 600; }

/* ───────────── الرأس ───────────── */
.hero { position: relative; overflow: hidden; padding: var(--s-4) var(--s-4) 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; background: var(--c-doodle); opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 34 Q52 16 84 34 L52 92 Z'/%3E%3Ccircle cx='48' cy='44' r='4'/%3E%3Ccircle cx='60' cy='62' r='4'/%3E%3Cpath d='M130 30 L142 82 L176 82 L186 30 Z'/%3E%3Cpath d='M143 30 L146 10 M156 30 L158 8 M169 30 L172 12'/%3E%3Cpath d='M212 24 l5 12 13 1 -10 8 3 13 -11 -7 -11 7 3 -13 -10 -8 13 -1 z'/%3E%3Cpath d='M30 150 q12 -22 30 -8 t8 22 q-10 14 -26 4'/%3E%3Ccircle cx='128' cy='160' r='18'/%3E%3Cpath d='M141 173 L162 196 M158 190 a5 5 0 1 0 6 6'/%3E%3Cpath d='M190 130 h40 v12 h-40 z M194 142 q16 22 32 0'/%3E%3Cpath d='M70 210 q6 -14 14 0 q8 -14 14 0'/%3E%3Cpath d='M184 206 l6 12 M200 200 l4 14'/%3E%3C/svg%3E") 0 0 / 240px 240px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 34 Q52 16 84 34 L52 92 Z'/%3E%3Ccircle cx='48' cy='44' r='4'/%3E%3Ccircle cx='60' cy='62' r='4'/%3E%3Cpath d='M130 30 L142 82 L176 82 L186 30 Z'/%3E%3Cpath d='M143 30 L146 10 M156 30 L158 8 M169 30 L172 12'/%3E%3Cpath d='M212 24 l5 12 13 1 -10 8 3 13 -11 -7 -11 7 3 -13 -10 -8 13 -1 z'/%3E%3Cpath d='M30 150 q12 -22 30 -8 t8 22 q-10 14 -26 4'/%3E%3Ccircle cx='128' cy='160' r='18'/%3E%3Cpath d='M141 173 L162 196 M158 190 a5 5 0 1 0 6 6'/%3E%3Cpath d='M190 130 h40 v12 h-40 z M194 142 q16 22 32 0'/%3E%3Cpath d='M70 210 q6 -14 14 0 q8 -14 14 0'/%3E%3Cpath d='M184 206 l6 12 M200 200 l4 14'/%3E%3C/svg%3E") 0 0 / 240px 240px;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 980px; margin: 0 auto; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.logo { width: clamp(150px, 42vw, 240px); height: auto; transform-origin: 50% 0; animation: plank-drop .9s var(--ease) both; filter: drop-shadow(0 4px 0 var(--c-ink)); }
@keyframes plank-drop {
  0% { transform: translateY(-40px) rotate(-5deg); opacity: 0; }
  55% { transform: translateY(4px) rotate(1.5deg); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.chips { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); border: var(--edge) solid var(--c-ink); border-radius: var(--r-pill);
  background: var(--c-paper); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-poster-sm); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-open); flex: none; }
.chip.is-closed .dot { background: var(--c-red); }
.hero-body { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: end; margin-top: var(--s-4); }
.hero-copy { padding-bottom: var(--s-5); align-self: center; }
.slogan { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 9.4vw, 68px); line-height: 1.12; color: var(--c-red);
  text-shadow: 3px 3px 0 var(--c-ink); text-wrap: balance; }
.hero-meta { margin: var(--s-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-weight: 500; font-size: 15px; }
.hero-meta span, .hero-meta a { display: inline-flex; align-items: center; gap: 6px; }
.arch { width: clamp(150px, 40vw, 270px); aspect-ratio: 4 / 5; border: var(--edge) solid var(--c-ink); border-bottom: 0; border-radius: var(--r-pill) var(--r-pill) 0 0;
  overflow: hidden; background: var(--c-stone); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────── شريط البحث ───────────── */
.toolbar { position: sticky; top: 0; z-index: 10; background: var(--c-yellow); padding: var(--s-3) var(--s-4); border-block: var(--edge) solid var(--c-ink); }
.toolbar-inner { max-width: 980px; margin: 0 auto; position: relative; }
.search { width: 100%; min-height: var(--tap); padding: 0 var(--s-4) 0 var(--s-6); border: var(--edge) solid var(--c-ink); border-radius: var(--r-pill); background: var(--c-paper); }
.search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search::placeholder { color: var(--c-muted); }
.search-clear { position: absolute; inset-inline-end: 0; top: 0; width: var(--tap); height: var(--tap); border: 0; background: transparent; font-size: 22px; line-height: 1; }
.toolbar.is-quiet { padding-block: var(--s-2); }
.toolbar-title { margin: 0; font-family: var(--f-display); font-size: 22px; font-weight: 400; }

/* ───────────── لافتة المطعم مغلق ───────────── */
.closed-banner { max-width: 980px; margin: var(--s-4) var(--s-4) 0; padding: var(--s-3) var(--s-4); border: var(--edge) solid var(--c-ink); border-radius: var(--r-md);
  background: var(--c-ink); color: var(--c-yellow); box-shadow: var(--shadow-poster); }
.closed-banner strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.closed-banner p { margin: 0; }
@media (min-width: 1012px) { .closed-banner { margin-inline: auto; } }

/* ───────────── المنيو والأقسام ───────────── */
.menu { max-width: 980px; margin: 0 auto; padding: var(--s-4) var(--s-4) 120px; }
.cat { margin-bottom: var(--s-3); }
.cat-head { position: relative; display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 68px; padding: 0 var(--s-4);
  border: var(--edge) solid var(--c-ink); border-radius: var(--r-md); background: var(--c-stone); color: var(--c-ink); text-align: start;
  box-shadow: var(--shadow-poster); overflow: hidden; transition: background-color .25s var(--ease), color .25s var(--ease); }
.cat-head::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 46%; background: var(--c-stone-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='68' viewBox='0 0 30 68'%3E%3Cpath d='M5 68 V30 a10 10 0 0 1 20 0 V68 z' fill='black'/%3E%3C/svg%3E") 0 0 / 30px 68px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='68' viewBox='0 0 30 68'%3E%3Cpath d='M5 68 V30 a10 10 0 0 1 20 0 V68 z' fill='black'/%3E%3C/svg%3E") 0 0 / 30px 68px repeat-x;
  pointer-events: none; transition: background-color .25s var(--ease); }
.cat-title { position: relative; font-family: var(--f-display); font-size: 26px; line-height: 1.2; }
.cat-count { position: relative; font-size: 13px; font-weight: 600; padding: 1px 10px; border-radius: var(--r-pill); background: var(--c-paper); color: var(--c-ink); border: 2px solid var(--c-ink); }
.cat-chev { position: relative; margin-inline-start: auto; width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.cat.is-open .cat-head { background: var(--c-red); color: var(--c-paper); --focus: var(--c-paper); }
.cat.is-open .cat-head::before { background: var(--c-red-deep); }
.cat.is-open .cat-chev { transform: rotate(180deg); }
.cat-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease); }
.cat.is-open .cat-panel { grid-template-rows: 1fr; }
.cat-panel-clip { overflow: hidden; min-height: 0; }
.paper { margin: 0 var(--s-2); padding: var(--s-3) var(--s-3) var(--s-4); background: var(--c-paper); border: var(--edge) solid var(--c-ink); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
.cat:not(.is-open) .paper { visibility: hidden; }
.cat-note { margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); background: var(--c-stone); border-radius: var(--r-sm); font-size: 14px; font-weight: 500; }
.unit-note { margin: 0 0 var(--s-1); font-size: 12px; color: var(--c-muted); }

.rows { list-style: none; margin: 0; padding: 0; }
.sizehead { display: flex; align-items: center; gap: var(--s-2); padding-bottom: var(--s-1); border-bottom: 2px solid var(--c-ink); font-size: 13px; font-weight: 700; }
.sizehead .fill { flex: 1; }
.sizehead .add-gap { width: var(--tap); flex: none; }
.cols { display: grid; grid-template-columns: repeat(var(--n, 1), 3em); gap: var(--s-1); text-align: center; flex: none; }
.group-label { margin: var(--s-4) 0 0; padding-top: var(--s-2); font-family: var(--f-display); font-size: 20px; color: var(--c-red); }
.row { display: flex; align-items: center; gap: var(--s-2); border-bottom: 1px solid var(--c-line); }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-2) 0; border: 0; background: transparent; text-align: start; }
.thumb { width: 56px; height: 56px; flex: none; border: 2px solid var(--c-ink); border-radius: var(--r-sm); object-fit: cover; background: var(--c-stone); }
.row-text { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: var(--s-2); }
.row-name { font-weight: 600; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.row-name small { display: block; font-weight: 400; font-size: 13px; color: var(--c-muted); line-height: 1.4; }
.leader { flex: 1; min-width: 14px; align-self: flex-end; margin-bottom: 7px; border-bottom: 2px dotted var(--c-dots); }
.price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price s { display: block; font-weight: 400; font-size: 12px; color: var(--c-muted); }
.price.from::before { content: "من "; font-weight: 400; font-size: 12px; }
.price-note { font-size: 13px; font-weight: 600; color: var(--c-red); max-width: 9em; text-align: end; }
.cat-ref { font-size: 12px; font-weight: 400; color: var(--c-muted); display: block; }
.row.is-off .row-main { opacity: .5; }
.row.is-off .row-name { text-decoration: line-through; }
.tag-off { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); background: var(--c-ink); color: var(--c-paper); white-space: nowrap; }
.badges { display: inline-flex; flex-wrap: wrap; gap: var(--s-1); margin-inline-start: var(--s-1); vertical-align: middle; }
.badge { font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; border-radius: var(--r-sm); border: 2px solid var(--c-ink); background: var(--c-paper); }
.badge.b-new { background: var(--c-red); color: var(--c-paper); }
.badge.b-best { background: var(--c-ink); color: var(--c-yellow); }
.badge.b-offer { background: var(--c-yellow); }
.badge.b-spicy { background: var(--c-red-deep); color: var(--c-paper); }
.badge.b-veg { background: var(--c-open); color: var(--c-paper); }

.btn-add { width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; border: var(--edge) solid var(--c-ink); border-radius: 50%;
  background: var(--c-red); color: var(--c-paper); box-shadow: var(--shadow-poster-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease); --focus: var(--c-ink); }
.btn-add svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.btn-add:active { transform: translateY(2px); box-shadow: none; }
.btn-add:disabled { background: var(--c-stone-deep); color: var(--c-muted); box-shadow: none; cursor: not-allowed; }

@media (max-width: 639px) {
  .row-text.has-cols { flex-wrap: wrap; row-gap: 0; }
  .row-text.has-cols .row-name { flex: 1 1 100%; }
  .row-text.has-cols .leader { margin-bottom: 9px; }
  .row-text.has-cols .cols { margin-bottom: var(--s-1); }
}

/* ───────────── البحث: نتائج ───────────── */
.results-head { margin: 0 0 var(--s-3); font-family: var(--f-display); font-size: 22px; font-weight: 400; }
.results .paper { margin: 0; border: var(--edge) solid var(--c-ink); border-radius: var(--r-md); box-shadow: var(--shadow-poster); }
.state { margin: var(--s-6) auto; max-width: 420px; padding: var(--s-5); text-align: center; background: var(--c-paper); border: var(--edge) solid var(--c-ink); border-radius: var(--r-md); box-shadow: var(--shadow-poster); }
.state h2 { margin: 0 0 var(--s-2); font-family: var(--f-display); font-weight: 400; font-size: 26px; color: var(--c-red); }
.state p { margin: 0 0 var(--s-4); }
.state p:last-child { margin-bottom: 0; }

/* ───────────── أزرار عامة ───────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 50px; padding: 0 var(--s-5); border: var(--edge) solid var(--c-ink); border-radius: var(--r-md);
  background: var(--c-red); color: var(--c-paper); font-weight: 700; font-size: 17px; text-decoration: none; box-shadow: var(--shadow-poster); transition: transform .12s var(--ease), box-shadow .12s var(--ease); --focus: var(--c-ink); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: var(--shadow-poster-sm); }
.btn:disabled { background: var(--c-stone-deep); color: var(--c-muted); box-shadow: none; cursor: not-allowed; }
.btn.is-alt { background: var(--c-yellow); color: var(--c-ink); }
.btn.is-wide { width: 100%; }
.btn.is-small { min-height: var(--tap); padding: 0 var(--s-4); font-size: 15px; }

/* ───────────── نافذة تفاصيل الصنف (شيت من تحت) ───────────── */
.scrim { position: fixed; inset: 0; z-index: 30; background: var(--c-scrim); opacity: 0; transition: opacity .25s var(--ease); }
.scrim.is-open { opacity: 1; }
.sheet { position: fixed; z-index: 31; inset-inline: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; background: var(--c-paper);
  border-top: var(--edge) solid var(--c-ink); border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(105%); transition: transform .32s var(--ease); }
.sheet.is-open { transform: none; }
.sheet-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--s-4) var(--s-4); }
.sheet-photo { margin: 0 calc(var(--s-4) * -1) var(--s-4); aspect-ratio: 4 / 3; max-height: 42dvh; width: calc(100% + var(--s-4) * 2); object-fit: cover; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--c-stone); border-bottom: var(--edge) solid var(--c-ink); }
.sheet-close { position: sticky; top: var(--s-2); z-index: 2; float: inline-end; width: var(--tap); height: var(--tap); margin: var(--s-2) 0 0; border: var(--edge) solid var(--c-ink); border-radius: 50%; background: var(--c-paper); font-size: 22px; line-height: 1; box-shadow: var(--shadow-poster-sm); }
.sheet-grab { height: 6px; width: 48px; margin: var(--s-2) auto var(--s-3); border-radius: var(--r-pill); background: var(--c-line); }
.sheet h2 { margin: 0 0 var(--s-1); font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.2; color: var(--c-red); text-shadow: 2px 2px 0 var(--c-ink); }
.sheet-desc { margin: 0 0 var(--s-3); color: var(--c-muted); }
.sheet-price { display: flex; align-items: baseline; gap: var(--s-2); margin: var(--s-3) 0; font-size: 18px; font-weight: 700; }
.sheet-price s { font-size: 14px; font-weight: 400; color: var(--c-muted); }
.group { margin: var(--s-4) 0; padding: 0; border: 0; min-width: 0; }
.group legend { padding: 0; margin-bottom: var(--s-2); font-family: var(--f-display); font-size: 21px; }
.group legend small { font-family: var(--f-text); font-size: 13px; color: var(--c-muted); margin-inline-start: var(--s-2); }
.choices { display: grid; gap: var(--s-2); }
.choice { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-2) var(--s-3); border: 2px solid var(--c-ink); border-radius: var(--r-md); background: var(--c-paper); cursor: pointer; font-weight: 500; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice .mark { width: 22px; height: 22px; flex: none; border: 2px solid var(--c-ink); background: var(--c-paper); display: grid; place-items: center; }
.choice.is-radio .mark { border-radius: 50%; }
.choice.is-check .mark { border-radius: var(--r-sm); }
.choice .mark::after { content: ""; width: 10px; height: 10px; background: var(--c-paper); transform: scale(0); transition: transform .15s var(--ease); border-radius: inherit; }
.choice.is-on { background: var(--c-red); color: var(--c-paper); }
.choice.is-on .mark { border-color: var(--c-paper); background: var(--c-red-deep); }
.choice.is-on .mark::after { transform: scale(1); }
.choice:has(input:focus-visible) { outline: 3px solid var(--c-ink); outline-offset: 2px; }
.choice .grow { flex: 1; }
.choice .p { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.choice .p s { font-weight: 400; opacity: .75; margin-inline-end: var(--s-2); font-size: 13px; }
.field-label { display: block; margin: var(--s-4) 0 var(--s-1); font-weight: 600; }
.input, .textarea { width: 100%; min-height: var(--tap); padding: var(--s-2) var(--s-3); border: var(--edge) solid var(--c-ink); border-radius: var(--r-md); background: var(--c-paper); }
.textarea { resize: vertical; min-height: 76px; }
.input[readonly] { background: var(--c-stone); font-weight: 700; }
.input.has-error, .textarea.has-error { border-color: var(--c-red); }
.err { margin: var(--s-1) 0 0; color: var(--c-red-deep); font-weight: 600; font-size: 14px; }
.sheet-foot { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); border-top: var(--edge) solid var(--c-ink); background: var(--c-stone); }
.sheet-foot .hint { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: 14px; color: var(--c-red-deep); }
.stepper { display: inline-flex; align-items: center; border: var(--edge) solid var(--c-ink); border-radius: var(--r-pill); background: var(--c-paper); }
.stepper button { width: var(--tap); height: var(--tap); border: 0; background: transparent; font-size: 22px; font-weight: 700; border-radius: 50%; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ───────────── شريط السلة ───────────── */
.cartbar { position: fixed; z-index: 20; inset-inline: var(--s-3); bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; }
.cartbar button { width: 100%; min-height: 58px; display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); border: var(--edge) solid var(--c-ink); border-radius: var(--r-md);
  background: var(--c-red); color: var(--c-paper); font-weight: 700; font-size: 17px; text-align: start; box-shadow: var(--shadow-poster); --focus: var(--c-paper); }
.cartbar.is-empty button { background: var(--c-stone); color: var(--c-ink); --focus: var(--c-ink); }
.cartbar .count { min-width: 28px; height: 28px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--r-pill); background: var(--c-yellow); color: var(--c-ink); font-size: 15px; border: 2px solid var(--c-ink); }
.cartbar .sum { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.cartbar.is-bump button { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: translateY(-6px) scale(1.02); } 100% { transform: none; } }
.toast { position: fixed; z-index: 40; inset-inline: var(--s-4); top: calc(var(--s-3) + env(safe-area-inset-top)); max-width: 440px; margin-inline: auto; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--c-ink); color: var(--c-paper); font-weight: 600; text-align: center; opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.is-on { opacity: 1; transform: none; }

/* ───────────── الفاتورة (السلة) ───────────── */
.receipt { position: fixed; z-index: 31; inset-inline: 0; bottom: 0; top: 18px; max-width: 640px; margin-inline: auto; display: flex; flex-direction: column;
  background: var(--c-paper); border-inline: var(--edge) solid var(--c-ink); transform: translateY(105%); transition: transform .35s var(--ease); }
.receipt::before { content: ""; position: absolute; inset-inline: calc(var(--edge) * -1); top: -12px; height: 12px;
  background: conic-gradient(from 135deg at top, var(--c-paper) 90deg, transparent 0) 50% 0 / 24px 12px repeat-x; }
.receipt.is-open { transform: none; }
.receipt-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 2px dashed var(--c-ink); }
.receipt-head h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--c-red); text-shadow: 2px 2px 0 var(--c-ink); }
.receipt-close { width: var(--tap); height: var(--tap); border: var(--edge) solid var(--c-ink); border-radius: 50%; background: var(--c-paper); font-size: 22px; line-height: 1; box-shadow: var(--shadow-poster-sm); }
.receipt-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-3) var(--s-4) var(--s-5); }
.adjust { margin: 0 0 var(--s-3); padding: var(--s-3); border: var(--edge) solid var(--c-ink); border-radius: var(--r-md); background: var(--c-yellow); font-weight: 600; }
.adjust button { margin-top: var(--s-2); }
.lines { list-style: none; margin: 0; padding: 0; }
.line { padding: var(--s-3) 0; border-bottom: 1px dashed var(--c-dots); }
.line-top { display: flex; align-items: flex-start; gap: var(--s-3); }
.line-name { flex: 1; font-weight: 700; }
.line-name small { display: block; font-weight: 400; font-size: 13px; color: var(--c-muted); }
.line-total { font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.line-total small { display: block; font-weight: 500; font-size: 12px; color: var(--c-red); max-width: 7em; }
.line-tools { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2); flex-wrap: wrap; }
.line-note { flex: 1; min-width: 150px; min-height: var(--tap); padding: 0 var(--s-3); border: 2px solid var(--c-ink); border-radius: var(--r-md); background: var(--c-paper); font-size: 14px; }
.stepper.is-small { border-width: 2px; }
.link-btn { min-height: var(--tap); padding: 0 var(--s-2); border: 0; background: transparent; color: var(--c-red-deep); font-weight: 700; text-decoration: underline; }
.empty-cart { text-align: center; padding: var(--s-6) var(--s-4); }
.empty-cart h3 { margin: 0 0 var(--s-2); font-family: var(--f-display); font-weight: 400; font-size: 26px; color: var(--c-red); }
.empty-cart p { margin: 0 0 var(--s-4); }
.order-block { margin-top: var(--s-5); }
.order-block h3 { margin: 0 0 var(--s-2); font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.segs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-2); }
.seg { min-height: var(--tap); border: 2px solid var(--c-ink); border-radius: var(--r-md); background: var(--c-paper); font-weight: 600; padding: 0 var(--s-2); }
.seg[aria-pressed="true"] { background: var(--c-red); color: var(--c-paper); box-shadow: var(--shadow-poster-sm); --focus: var(--c-paper); }
.locked-note { margin: var(--s-1) 0 0; font-size: 13px; color: var(--c-muted); }
.receipt-foot { padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); border-top: 2px dashed var(--c-ink); background: var(--c-stone); }
.totals { margin: 0 0 var(--s-3); }
.totals div { display: flex; justify-content: space-between; gap: var(--s-3); padding: 2px 0; }
.totals dt { font-weight: 500; }
.totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; }
.totals .grand { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 2px dotted var(--c-ink); align-items: baseline; }
.totals .grand dt { font-family: var(--f-display); font-size: 24px; font-weight: 400; }
.totals .grand dd { font-family: var(--f-display); font-size: 28px; font-weight: 400; color: var(--c-red); }
.warn { margin: 0 0 var(--s-2); font-size: 14px; font-weight: 600; color: var(--c-red-deep); }
.preview { margin-top: var(--s-4); }
.preview summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.preview pre { margin: 0; padding: var(--s-3); background: var(--c-stone); border-radius: var(--r-md); white-space: pre-wrap; word-break: break-word; font-family: var(--f-text); font-size: 14px; }
.closed-in { margin: 0 0 var(--s-3); padding: var(--s-3); background: var(--c-ink); color: var(--c-yellow); border-radius: var(--r-md); font-weight: 600; }

/* ───────────── الفوتر ───────────── */
.foot { position: relative; background: var(--c-red); color: var(--c-paper); padding: var(--s-6) var(--s-4) 140px; --focus: var(--c-paper); }
.foot::before { content: ""; position: absolute; inset-inline: 0; top: -14px; height: 14px; background: var(--c-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='14' viewBox='0 0 36 14'%3E%3Cpath d='M0 14 V8 a9 9 0 0 1 18 0 V14 z M18 14 V8 a9 9 0 0 1 18 0 V14 z' fill='black'/%3E%3C/svg%3E") 0 100% / 36px 14px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='14' viewBox='0 0 36 14'%3E%3Cpath d='M0 14 V8 a9 9 0 0 1 18 0 V14 z M18 14 V8 a9 9 0 0 1 18 0 V14 z' fill='black'/%3E%3C/svg%3E") 0 100% / 36px 14px repeat-x; }
.foot-inner { max-width: 980px; margin: 0 auto; display: grid; gap: var(--s-5); }
.foot h2 { margin: 0 0 var(--s-2); font-family: var(--f-display); font-weight: 400; font-size: 28px; color: var(--c-yellow); }
.foot p { margin: 0; max-width: 60ch; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.foot-list a { color: inherit; }
.foot-list li { display: flex; gap: var(--s-2); align-items: center; min-height: 28px; }
.foot-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.foot .btn { box-shadow: none; border-color: var(--c-paper); background: transparent; }
.foot .btn.is-alt { background: var(--c-yellow); color: var(--c-ink); border-color: var(--c-ink); box-shadow: var(--shadow-poster-sm); }
@media (min-width: 768px) { .foot-inner { grid-template-columns: 1.2fr 1fr; } }

/* ───────────── شاشات أكبر ───────────── */
@media (min-width: 768px) {
  html { scroll-padding-top: 84px; }
  .hero { padding-top: var(--s-5); }
  .cat-title { font-size: 30px; }
  .cat-head { min-height: 76px; }
  .paper { margin: 0 var(--s-4); padding: var(--s-4) var(--s-5) var(--s-5); }
  .rows.is-two { columns: 2; column-gap: var(--s-6); }
  .rows.is-two .row { break-inside: avoid; }
  .sheet { inset-inline: 0; margin-inline: auto; max-width: 560px; bottom: 5dvh; max-height: 90dvh; border: var(--edge) solid var(--c-ink); border-radius: var(--r-lg); box-shadow: var(--shadow-poster); }
  .sheet-photo { border-radius: var(--r-lg) var(--r-lg) 0 0; margin-top: 0; }
  .receipt { top: 5dvh; bottom: 3dvh; border: var(--edge) solid var(--c-ink); border-radius: 0 0 var(--r-md) var(--r-md); }
}
@media (min-width: 900px) {
  .hero-inner { max-width: 860px; }
  .hero-body { margin-top: var(--s-4); gap: var(--s-6); }
}

/* ───────────── تقليل الحركة ───────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
