/* شيفت منيو — شكل صفحة المحل. الألوان كلها من هوية المحل (متغيرات)، ألوان سادة من غير تدرجات.
   القواعد: السعر واضح وكبير، زرار الإضافة كبير وسهل للصباع (44px+)، العدد ظاهر على كل صنف، والطلب دايماً ظاهر تحت. */
.sm { --r: 18px; --ok: #1FA855; background: var(--bg); color: var(--ink); font-family: 'Cairo', system-ui, sans-serif; min-height: 100%; position: relative; padding-bottom: 130px; container-type: inline-size; }
.sm * { box-sizing: border-box; }
.sm [hidden] { display: none !important; }
.sm button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.sm .ic { width: 16px; height: 16px; vertical-align: -3px; margin-inline-end: 4px; flex: none; }

/* ── الواجهة ── */
.sm-hero { position: relative; display: flex; gap: 18px; align-items: center; padding: 34px 20px 26px; background-color: var(--surface); background-image: var(--pattern); background-size: 120px; border-bottom: 1px solid var(--line); overflow: hidden; }
.sm-hero-art { width: 104px; height: 104px; flex: none; color: var(--accent); background: var(--bg); border: 1.5px solid var(--line); border-radius: 28px; padding: 14px; }
.sm-hero-art svg { width: 100%; height: 100%; }
.sm-hero-text { min-width: 0; }
.sm-kicker { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .3px; }
.sm h1 { font-family: var(--head-font), 'Cairo', sans-serif; font-size: clamp(28px, 7vw, 40px); line-height: 1.15; margin: 4px 0 6px; font-weight: 400; }
.sm-tag { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.sm-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13.5px; }
.sm-meta span { display: inline-flex; align-items: center; }
.sm-free { color: var(--ok) !important; font-weight: 800; }

/* ── البحث والأقسام (ثابتين فوق) ── */
.sm-sticky { position: sticky; top: 0; z-index: 6; background: var(--bg); border-bottom: 1px solid var(--line); }
.sm-search { display: flex; align-items: center; gap: 4px; margin: 12px 16px 0; padding: 0 14px; height: 46px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); }
.sm-search:focus-within { border-color: var(--accent); }
.sm-search .ic { width: 19px; height: 19px; }
.sm-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 500 15.5px 'Cairo', sans-serif; outline: none; }
.sm-search input::placeholder { color: var(--muted); }
.sm-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.sm-tabs::-webkit-scrollbar { display: none; }
.sm-tab { flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 700 14px 'Cairo', sans-serif; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.sm-tab.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ── الأقسام ── */
.sm-body { padding: 4px 16px 0; max-width: 760px; margin: 0 auto; }
.sm-sec { padding-top: 18px; scroll-margin-top: 130px; }
.sm-sec h2 { font-family: var(--head-font), 'Cairo', sans-serif; font-weight: 400; font-size: 24px; margin: 6px 0 12px; display: flex; align-items: center; gap: 10px; }
.sm-sec h2 small { order: 3; font: 600 12.5px 'Cairo', sans-serif; color: var(--muted); }
.sm-sec h2::after { content: ''; order: 2; flex: 1; height: 1.5px; background: var(--line); }

/* الأكثر طلباً: صف كروت كبيرة يتسحب بالعرض */
.sm-toprow { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -16px; padding-inline: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sm-toprow::-webkit-scrollbar { display: none; }
.sm-top { position: relative; flex: none; width: 148px; scroll-snap-align: start; text-align: start; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, transform .12s; }
.sm-top:active { transform: scale(.97); }
.sm-top.has { border-color: var(--accent); }
.sm-top-art { width: 54px; height: 54px; color: var(--accent); margin-bottom: 6px; }
.sm-top-art svg { width: 100%; height: 100%; }
.sm-top b { font-size: 15px; line-height: 1.35; min-height: 40px; }
.sm-top-p { font-weight: 800; color: var(--accent); font-size: 15px; }
.sm-top-plus { position: absolute; top: 10px; inset-inline-end: 10px; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.sm-top.pop .sm-top-plus { animation: smpop .35s ease; }

/* كارت الصنف */
.sm-list { display: grid; gap: 10px; }
.sm-item { display: flex; gap: 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; transition: border-color .15s; }
.sm-item.has { border-color: var(--accent); }
.sm-img { width: 88px; height: 88px; object-fit: cover; border-radius: 14px; flex: none; }
.sm-item-main { min-width: 0; flex: 1; }
.sm-item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.sm-item h3 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.4; }
.sm-badge { font-size: 11.5px; font-weight: 800; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.sm-incart { font-size: 11.5px; font-weight: 800; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 8px; line-height: 21px; }
.sm-item p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.sm-sizes { display: grid; gap: 8px; margin-top: 10px; }
.sm-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 6px 12px 6px 6px; padding-inline: 12px 6px; cursor: pointer; transition: border-color .15s; }
.sm-opt.has { border-color: var(--accent); }
.sm-opt-lbl { display: flex; align-items: baseline; gap: 8px; }
.sm-size { color: var(--muted); font-weight: 700; font-size: 13.5px; }
.sm-price { font-weight: 800; font-size: 16.5px; }
.sm-step { display: flex; align-items: center; gap: 2px; }
.sm-step button { width: 40px; height: 40px; border-radius: 11px; border: 0; background: var(--accent); color: var(--on-accent); font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: transform .1s; }
.sm-step button:active { transform: scale(.9); }
.sm-step .sm-minus, .sm-step span { display: none; }
.sm-opt.has .sm-minus, .sm-step.on button:first-child { display: grid; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.sm-opt.has .sm-step span, .sm-step.on span { display: block; min-width: 30px; text-align: center; font-weight: 800; font-size: 16px; }
.sm-opt.pop .sm-add { animation: smpop .35s ease; }
@keyframes smpop { 40% { transform: scale(1.25); } }
.sm-empty, .sm-noresult { color: var(--muted); text-align: center; padding: 40px 10px; }
.sm-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 0 10px; }
.sm-foot b { color: var(--ink); }

/* ── تحت: شريط التوصيل ببلاش + زرار الطلب ── */
.sm-bottom { position: fixed; z-index: 20; inset-inline: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; display: grid; gap: 6px; }
.sm-progress { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 13.5px; }
.sm-progress b { color: var(--accent); }
.sm-progress.done b { color: var(--ok); }
.sm-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 6px; }
.sm-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s ease; }
.sm-progress.done .sm-bar i { background: var(--ok); }
.sm-cartbar { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border: 0; border-radius: 18px; background: var(--accent); color: var(--on-accent); font: 800 16.5px 'Cairo', sans-serif; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.sm-cartbar.bump { animation: smbump .4s ease; }
@keyframes smbump { 30% { transform: translateY(-4px) scale(1.02); } }
.sm-count { min-width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--on-accent); color: var(--accent); font-size: 15px; }
.sm-total { margin-inline-start: auto; }

/* تكمّل طلبك؟ */
.sm-upsell { background: var(--surface); border: 1.5px solid var(--accent); border-radius: 18px; padding: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); animation: smup .25s ease; }
.sm-up-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.sm-up-x { border: 0; background: none; color: var(--muted); font: 700 13px 'Cairo', sans-serif; cursor: pointer; padding: 6px; }
.sm-up-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sm-up-row::-webkit-scrollbar { display: none; }
.sm-sug { flex: none; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 14px; padding: 6px 6px 6px 12px; padding-inline: 12px 6px; cursor: pointer; font-size: 14px; }
.sm-sug span { color: var(--muted); font-weight: 700; font-size: 13px; }
.sm-sug i { font-style: normal; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 18px; }

/* ── شيت الطلب ── */
.sm-sheet { position: fixed; z-index: 30; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sm-sheet-card { width: 100%; max-width: 560px; max-height: 92%; overflow: auto; background: var(--bg); color: var(--ink); border-radius: 24px 24px 0 0; padding: 18px 18px 22px; animation: smup .22s ease; }
@keyframes smup { from { transform: translateY(30px); } }
.sm-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sm-sheet-head h2 { margin: 0; font-family: var(--head-font), 'Cairo', sans-serif; font-weight: 400; font-size: 26px; }
.sm-back { display: inline-flex; align-items: center; gap: 2px; height: 42px; padding: 0 12px 0 14px; padding-inline: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 14px 'Cairo', sans-serif; cursor: pointer; }
.sm-back .ic { width: 18px; height: 18px; margin: 0; }
.sm-sheet-head { gap: 10px; }
.sm-line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t p" "t s"; align-items: center; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sm-line-txt { grid-area: t; } .sm-line-t { grid-area: p; text-align: end; } .sm-line .sm-step { grid-area: s; }
.sm-line small { color: var(--muted); }
.sm-lp { color: var(--muted); font-size: 13px; }
.sm-line .sm-step button { width: 36px; height: 36px; font-size: 19px; }
.sm-sum { display: flex; justify-content: space-between; padding: 14px 0 6px; font-size: 19px; }
.sm-more { margin: 6px 0 4px; }
.sm-more > b { display: block; font-size: 14.5px; margin-bottom: 8px; }
.sm-form { display: grid; gap: 10px; margin: 12px 0 14px; }
.sm-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sm-seg span { display: flex; align-items: center; justify-content: center; text-align: center; padding: 11px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 800; font-size: 14px; cursor: pointer; }
.sm-seg input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sm-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-in { width: 100%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 12px 14px; font: 500 15.5px 'Cairo', sans-serif; }
.sm-in::placeholder { color: var(--muted); }
.sm-in:focus { outline: none; border-color: var(--accent); }
.sm-in.bad { border-color: #D93025; background: #FDECEA; color: #1a1a1a; }
.sm-send { width: 100%; height: 58px; border: 0; border-radius: 16px; background: #1FA855; color: #fff; font: 800 16.5px 'Cairo', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 16px; }
.sm-send .ic { width: 22px; height: 22px; }
.sm-send b { margin-inline-start: auto; background: rgba(255,255,255,.2); border-radius: 10px; padding: 2px 10px; }
.sm-hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

/* ─── أسلوب «فخم»: عناوين في النص وخطوط رفيعة ─── */
.sm[data-style=luxe] .sm-hero { flex-direction: column; text-align: center; padding: 42px 20px 30px; }
.sm[data-style=luxe] .sm-hero-art { border-radius: 50%; width: 110px; height: 110px; border-width: 1px; }
.sm[data-style=luxe] .sm-meta { justify-content: center; }
.sm[data-style=luxe] .sm-sec h2 { justify-content: center; font-size: 26px; }
.sm[data-style=luxe] .sm-sec h2::before { content: ''; flex: 1; height: 1px; background: var(--line); }
.sm[data-style=luxe] .sm-sec h2::after { height: 1px; }
.sm[data-style=luxe] .sm-sec h2 small { display: none; }
.sm[data-style=luxe] .sm-item { border-radius: 6px; border-width: 1px; }
.sm[data-style=luxe] .sm-opt, .sm[data-style=luxe] .sm-step button, .sm[data-style=luxe] .sm-tab, .sm[data-style=luxe] .sm-top { border-radius: 6px; }
.sm[data-style=luxe] .sm-kicker { letter-spacing: 2px; }

/* ─── أسلوب «تقيل»: هيدر بلون المحل وخط عريض ─── */
.sm[data-style=bold] .sm-hero { background-color: var(--accent); color: var(--on-accent); border: 0; }
.sm[data-style=bold] .sm-hero .sm-kicker, .sm[data-style=bold] .sm-hero .sm-meta, .sm[data-style=bold] .sm-hero .sm-tag { color: var(--on-accent); opacity: .9; }
.sm[data-style=bold] .sm-hero .sm-free { color: var(--on-accent) !important; text-decoration: underline; }
.sm[data-style=bold] .sm-hero-art { background: transparent; border-color: currentColor; color: var(--on-accent); border-width: 2px; }
.sm[data-style=bold] h1 { font-size: clamp(32px, 8vw, 46px); }
.sm[data-style=bold] .sm-sec h2 { font-size: 28px; }

/* ─── أسلوب «فريش»: كروت مدورة ─── */
.sm[data-style=fresh] { --r: 24px; }
.sm[data-style=fresh] .sm-hero-art { border-radius: 50%; }
.sm[data-style=fresh] .sm-opt { border-radius: 999px; }
.sm[data-style=fresh] .sm-step button { border-radius: 50%; }

/* المنيو في مساحة ضيقة (موبايل أو المعاينة) */
@container (max-width: 430px) {
  .sm-hero { gap: 14px; padding: 24px 16px 20px; }
  .sm-hero-art { width: 70px; height: 70px; border-radius: 20px; padding: 10px; }
  .sm[data-style=luxe] .sm-hero-art { width: 80px; height: 80px; }
  .sm h1 { font-size: 30px; }
  .sm[data-style=bold] h1 { font-size: 34px; }
  .sm-meta { font-size: 12.5px; }
  .sm-sec h2 { font-size: 22px; }
}
@media (min-width: 720px) { .sm-list { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .sm * { animation: none !important; transition: none !important; } }
/* مساحة ضيقة جداً (موبايل صغير أو صورة الموبايل في صفحة الموقع): الرسمة فوق الاسم */
@container (max-width: 300px) {
  .sm-hero { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 14px 16px; }
  .sm-hero-art, .sm[data-style=luxe] .sm-hero-art { width: 54px; height: 54px; border-radius: 16px; padding: 8px; }
  .sm[data-style=luxe] .sm-hero { align-items: center; }
  .sm h1, .sm[data-style=bold] h1 { font-size: 26px; }
  .sm-meta { gap: 2px 10px; }
}

.sm-err { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #FDECEA; color: #B3261E; font-weight: 800; font-size: 14px; }

.sm-logo { padding: 0 !important; overflow: hidden; background: var(--surface); }
.sm-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sm-top-img { width: 100%; height: 86px; object-fit: cover; border-radius: 12px; margin-bottom: 6px; }

/* العروض: كروت بلون المحل، أول حاجة في المنيو */
.sm-offrow { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sm-offrow::-webkit-scrollbar { display: none; }
.sm-offer { position: relative; flex: 0 0 min(78%, 300px); scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start;
  padding: 16px 16px 14px; border-radius: 20px; border: 0; background: var(--accent); color: var(--on-accent); font-family: inherit; cursor: pointer; min-height: 150px; }
.sm-offer:only-child { flex-basis: 100%; }
.sm-off-tag { background: var(--on-accent); color: var(--accent); font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; }
.sm-off-t { font-size: 19px; font-weight: 800; line-height: 1.35; margin-top: 4px; }
.sm-off-d { font-size: 13.5px; opacity: .88; line-height: 1.5; }
.sm-off-p { margin-top: auto; display: flex; align-items: baseline; gap: 8px; padding-top: 6px; }
.sm-off-p b { font-size: 22px; font-weight: 800; }
.sm-off-p s { opacity: .7; font-size: 14px; }
.sm-off-end { font-size: 12px; opacity: .8; }
.sm-offer .sm-top-plus { position: absolute; bottom: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: var(--on-accent); color: var(--accent); font-size: 22px; font-weight: 800; }
.sm-offer.has .sm-top-plus { font-size: 17px; }
.sm-offer.pop { animation: smpop .28s ease; }

/* افتتاحية المنيو: لوجو المحل على لونه */
.sm-splash { position: fixed; inset: 0; z-index: 100; background: var(--sp-bg); color: var(--sp-on); display: grid; place-items: center;
  font-family: 'Cairo', sans-serif; transition: transform .6s cubic-bezier(.7,0,.2,1), opacity .6s; cursor: pointer; }
.sm-splash.out { transform: translateY(-100%); opacity: .4; }
.sm-sp-in { text-align: center; padding: 24px; }
.sm-sp-logo { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 36px; background: #fff; display: grid; place-items: center; overflow: hidden;
  animation: spLogo .9s cubic-bezier(.2,1.4,.4,1) both; }
.sm-sp-logo img { width: 100%; height: 100%; object-fit: contain; }
.sm-sp-letter { font-size: 64px; font-weight: 800; color: var(--sp-bg); }
.sm-splash h1 { margin: 0; font-size: 30px; font-weight: 800; animation: spUp .6s .35s ease both; }
.sm-splash p { margin: 6px 0 0; font-size: 15px; opacity: .85; animation: spUp .6s .5s ease both; }
@keyframes spLogo { from { transform: scale(.4); opacity: 0; } }
@keyframes spUp { from { transform: translateY(14px); opacity: 0; } }
