/* ==========================================================
   دكانك — صفحة "منيو" (Dukanak Menu Landing)
   تستخدم حصراً متغيرات نظام التصميم الحالي (style.css) —
   لا ألوان جديدة على مستوى الصفحة، حتى تبقى الهوية واحدة
   ويعمل الوضع الداكن تلقائياً. ثيمات المطاعم داخل المعاينات
   فقط لها لوحاتها الخاصة (معزولة داخل .mtheme-*).
   ========================================================== */

/* ---------- كشف العناصر عند التمرير (نمط الصفحة الرئيسية) ---------- */
.mreveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.mreveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .mreveal { opacity: 1; transform: none; } }

/* ================= الهيرو ================= */
.menu-hero {
    position: relative;
    padding: 84px 0 96px;
    overflow: hidden;
}
.menu-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 320px at 12% 8%, var(--stamp-soft), transparent 70%),
        radial-gradient(520px 300px at 88% 90%, var(--gold-soft), transparent 70%);
    pointer-events: none;
}
/* أيقونات مطعمية خافتة تسبح بالخلفية */
.menu-hero .mh-float {
    position: absolute; font-size: 26px; opacity: .14; user-select: none;
    animation: mhFloat 9s ease-in-out infinite;
    pointer-events: none;
}
@keyframes mhFloat { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(5deg); } }

.menu-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.menu-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    line-height: 1.25;
    color: var(--ink);
    letter-spacing: -.02em;
    margin: 16px 0 18px;
}
.menu-hero h1 em { font-style: normal; color: var(--stamp); }
.menu-hero .lead { color: var(--sage); font-size: 1.1rem; max-width: 520px; margin-bottom: 26px; }

.menu-hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.menu-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 999px; padding: 7px 15px;
    font-size: .85rem; font-weight: 600; color: var(--paper);
    box-shadow: var(--shadow-xs);
}
.menu-chip i { font-style: normal; }

.menu-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- مجسّم الهاتف + QR ---- */
.menu-hero-visual { position: relative; display: flex; justify-content: center; }
.mphone {
    width: min(280px, 72vw);
    border-radius: 38px;
    background: var(--ink);
    padding: 12px;
    box-shadow: var(--shadow-lg), 0 30px 60px rgba(20,35,28,.14);
    transform: rotate(-4deg);
    animation: mphoneIn 1s var(--ease) both;
}
@keyframes mphoneIn { from { opacity: 0; transform: rotate(-4deg) translateY(30px); } to { opacity: 1; transform: rotate(-4deg) translateY(0); } }
.mphone-screen {
    background: var(--canvas);
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 9 / 18.5;
    display: flex; flex-direction: column;
}
.mphone-notch { height: 20px; display: flex; justify-content: center; padding-top: 7px; }
.mphone-notch i { width: 70px; height: 6px; border-radius: 6px; background: var(--line-2); }
.mphone-head { padding: 12px 14px 8px; }
.mphone-head b { font-family: var(--font-display); color: var(--ink); font-size: .95rem; display: block; }
.mphone-head span { font-size: .68rem; color: var(--sage); font-family: var(--font-mono); }
.mphone-cats { display: flex; gap: 6px; padding: 4px 14px 10px; }
.mphone-cats i {
    font-style: normal; font-size: .62rem; font-weight: 700; color: var(--sage);
    border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--ink-2);
}
.mphone-cats i.on { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.mphone-items { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; flex: 1; }
.mphone-item {
    display: flex; gap: 9px; align-items: center;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 13px; padding: 8px;
    box-shadow: var(--shadow-xs);
}
.mphone-item .ph { width: 40px; height: 40px; border-radius: 10px; background: var(--stamp-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.mphone-item b { display: block; font-size: .7rem; color: var(--ink); }
.mphone-item span { font-size: .6rem; color: var(--sage); display: block; }
.mphone-item em { font-style: normal; margin-inline-start: auto; font-family: var(--font-mono); font-size: .68rem; color: var(--stamp); font-weight: 600; white-space: nowrap; }

.mqr {
    position: absolute; bottom: 6%; inset-inline-start: 2%;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transform: rotate(5deg);
    animation: mqrIn 1s .25s var(--ease) both;
}
@keyframes mqrIn { from { opacity: 0; transform: rotate(5deg) translateY(20px); } to { opacity: 1; transform: rotate(5deg) translateY(0); } }
.mqr svg { width: 84px; height: 84px; display: block; margin: 0 auto 8px; color: var(--ink); }
.mqr b { font-size: .72rem; color: var(--paper); display: block; }
.mqr span { font-size: .62rem; color: var(--sage); font-family: var(--font-mono); }

/* شارة "طلب جديد" تطفو فوق الهاتف */
.mhero-toast {
    position: absolute; top: 8%; inset-inline-end: 0;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 999px; padding: 9px 16px;
    display: flex; align-items: center; gap: 9px;
    box-shadow: var(--shadow-md);
    font-size: .8rem; font-weight: 700; color: var(--ink);
    animation: mhFloat 7s 1s ease-in-out infinite;
}
.mhero-toast i { font-style: normal; }

/* ================= كيف تعمل (خط زمني أفقي) ================= */
.msteps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    position: relative;
}
.msteps::before {
    content: '';
    position: absolute; top: 34px; right: 8%; left: 8%;
    border-top: 2px dashed var(--line-2);
    z-index: 0;
}
.mstep {
    position: relative; z-index: 1;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px 16px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.mstep:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.mstep-icon {
    width: 52px; height: 52px; margin: 0 auto 14px;
    border-radius: 15px; background: var(--stamp-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    transition: transform .25s var(--ease);
}
.mstep:hover .mstep-icon { transform: scale(1.1) rotate(-5deg); }
.mstep-num {
    position: absolute; top: -12px; inset-inline-start: 14px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--stamp); color: #fff;
    font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-color);
}
.mstep h3 { font-family: var(--font-display); font-size: .98rem; color: var(--ink); margin-bottom: 6px; }
.mstep p { color: var(--sage); font-size: .8rem; line-height: 1.6; }

/* ================= المميزات ================= */
.mfeatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 16px;
}
.mfeature {
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px 20px;
    box-shadow: var(--shadow-xs);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.mfeature:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.mfeature i {
    font-style: normal; font-size: 22px;
    width: 44px; height: 44px; border-radius: 13px;
    background: var(--gold-soft);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    transition: transform .25s var(--ease);
}
.mfeature:nth-child(3n) i { background: var(--stamp-soft); }
.mfeature:hover i { transform: scale(1.1) rotate(4deg); }
.mfeature h3 { font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); margin-bottom: 5px; }
.mfeature p { color: var(--sage); font-size: .86rem; line-height: 1.65; }

/* ================= قصة الطلب (Scroll Story) ================= */
.mstory { position: relative; background: var(--canvas-2); }
.mstory-track { height: calc(var(--msteps, 8) * 78vh); position: relative; }
.mstory-sticky {
    position: sticky; top: 0; height: 100vh;
    display: flex; align-items: center; overflow: hidden;
}
.mstory-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: center; width: 100%;
}
.mstory-phone-wrap { display: flex; justify-content: center; position: relative; }
.mstory-phone-wrap .mphone { transform: none; animation: none; width: min(260px, 66vw); }

.mstory-screens { position: relative; flex: 1; }
.mstory-screen {
    position: absolute; inset: 0;
    padding: 14px 12px;
    opacity: 0; transform: translateY(16px) scale(.98);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
    pointer-events: none;
    display: flex; flex-direction: column; gap: 10px;
    overflow: hidden;
}
.mstory-screen.is-on { opacity: 1; transform: none; }

.mstory-steps { position: relative; min-height: 300px; }
.mstory-step {
    position: absolute; inset: 0 auto auto 0; width: 100%;
    opacity: 0; transform: translateY(24px);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
    pointer-events: none;
}
.mstory-step.is-on { opacity: 1; transform: none; pointer-events: auto; }
.mstory-step h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.8vw, 2.15rem);
    color: var(--ink); letter-spacing: -.02em;
    margin: 12px 0 14px; line-height: 1.3;
}
.mstory-step p { color: var(--sage); font-size: 1.04rem; max-width: 440px; }
.mstory-num {
    font-family: var(--font-mono); color: var(--gold);
    font-size: .85rem; letter-spacing: .12em; display: block; margin-bottom: 6px;
}
.mstory-dots { display: flex; gap: 7px; margin-bottom: 20px; }
.mstory-dot { width: 22px; height: 4px; border-radius: 3px; background: var(--line-2); transition: background .4s var(--ease), width .4s var(--ease); }
.mstory-dot.is-active { background: var(--stamp); width: 38px; }
.mstory-dot.is-done { background: var(--gold); }

/* عناصر شاشات القصة */
.mscr-card {
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: 13px; padding: 12px; box-shadow: var(--shadow-xs);
    font-size: .74rem; color: var(--paper);
}
.mscr-card b { color: var(--ink); font-size: .78rem; }
.mscr-big { font-size: 44px; text-align: center; margin: 8px 0 2px; }
.mscr-center { text-align: center; }
.mscr-status {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--gold-soft); color: var(--gold);
    border-radius: 999px; padding: 4px 12px;
    font-size: .66rem; font-weight: 700; font-family: var(--font-mono);
}
.mscr-status.ok { background: #E9F7EE; color: #17683f; }
.mscr-bar { height: 7px; border-radius: 6px; background: var(--ink-3); overflow: hidden; }
.mscr-bar i { display: block; height: 100%; width: 0; background: var(--stamp); border-radius: 6px; transition: width 1.2s var(--ease) .2s; }
.is-on .mscr-bar i { width: var(--w, 70%); }
.mscr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mscr-qty { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); }
.mscr-qty i { font-style: normal; width: 20px; height: 20px; border-radius: 6px; background: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; }

/* ================= معرض الثيمات ================= */
.mthemes { position: relative; }
.mthemes-viewport { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 10px 28px 26px; scrollbar-width: none; }
.mthemes-viewport::-webkit-scrollbar { display: none; }
.mthemes-track { display: flex; gap: 20px; width: max-content; }
.mtheme-card {
    width: 290px; scroll-snap-align: center; flex-shrink: 0;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
    cursor: pointer;
}
.mtheme-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.mtheme-preview { height: 205px; overflow: hidden; position: relative; }
.mtheme-preview .mtp-scale { transform: scale(.62); transform-origin: top right; width: 161.3%; height: 161.3%; pointer-events: none; }
[dir="ltr"] .mtheme-preview .mtp-scale { transform-origin: top left; }
.mtheme-preview::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 65%, rgba(20,35,28,.16));
    opacity: 0; transition: opacity .3s var(--ease);
}
.mtheme-card:hover .mtheme-preview::after { opacity: 1; }
.mtheme-meta { padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.mtheme-meta .mtype { font-family: var(--font-mono); font-size: .68rem; color: var(--gold); letter-spacing: .08em; display: block; margin-bottom: 3px; }
.mtheme-meta h3 { font-family: var(--font-display); font-size: 1.08rem; color: var(--ink); margin-bottom: 4px; }
.mtheme-meta p { color: var(--sage); font-size: .82rem; line-height: 1.6; margin-bottom: 13px; }
.mtheme-demo-btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1.5px solid var(--line-2); border-radius: 999px;
    padding: 7px 18px; font-size: .82rem; font-weight: 700; color: var(--paper);
    transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.mtheme-card:hover .mtheme-demo-btn { border-color: var(--stamp); color: var(--stamp); }
.mthemes-nav { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.mthemes-nav button {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid var(--line-2); background: var(--ink-2);
    font-size: 1.1rem; color: var(--paper);
    transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.mthemes-nav button:hover { border-color: var(--stamp); color: var(--stamp); transform: translateY(-2px); }

/* ================= نافذة العرض التجريبي ================= */
.mdemo-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(20, 35, 28, .55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.mdemo-overlay.is-open { display: flex; animation: mdemoFade .3s var(--ease); }
@keyframes mdemoFade { from { opacity: 0; } to { opacity: 1; } }
.mdemo-window {
    background: var(--canvas); border-radius: var(--radius-lg);
    width: min(1060px, 100%); height: min(86vh, 780px);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: mdemoUp .35s var(--ease);
}
@keyframes mdemoUp { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.mdemo-bar {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 18px; border-bottom: 1px solid var(--line);
    background: var(--ink-2);
}
.mdemo-bar b { font-family: var(--font-display); color: var(--ink); font-size: .95rem; }
.mdemo-devices { display: flex; gap: 6px; margin-inline-start: auto; }
.mdemo-devices button {
    border: 1px solid var(--line); border-radius: 999px;
    padding: 5px 14px; font-size: .78rem; font-weight: 700; color: var(--sage);
    transition: all .2s var(--ease);
}
.mdemo-devices button.on { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.mdemo-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--line); color: var(--paper); font-size: 1rem;
    transition: all .2s var(--ease);
}
.mdemo-close:hover { border-color: var(--stamp); color: var(--stamp); }
.mdemo-stage { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 22px; background: var(--canvas-2); }
.mdemo-frame {
    width: 100%; max-width: 100%; height: max-content; min-height: 100%;
    border-radius: 14px; overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid var(--line);
    transition: max-width .35s var(--ease);
    background: #fff;
}
.mdemo-frame.dev-tablet { max-width: 640px; }
.mdemo-frame.dev-mobile { max-width: 380px; }

/* ================= محرك معاينة ثيمات المطاعم =================
   يعكس حرفياً بنية قالب العرض المطعمي الحقيقي "resto" بالمنصة
   (themes/resto/): شريط طاولة، هيدر، شريط أقسام لاصق، هيرو، بطاقات
   أصناف أفقية بشارات، فوتر، وسلة. كل ثيم يمرّر هويته بمتغيرات r-*
   المعزولة — لا تمس نظام دكانك. */
.mtheme-site {
    --r-primary: #B4532A; --r-secondary: #7C3A1D; --r-bg: #FAF6EF;
    --r-surface: #F1EADD; --r-text: #2B211A; --r-btn-text: #FFFFFF;
    --r-radius: 12px; --r-font: 'Cairo', sans-serif;
    background: var(--r-bg); color: var(--r-text);
    font-family: var(--r-font);
    min-height: 100%; direction: rtl;
}
.mtheme-site * { box-sizing: border-box; }

/* الشريط العلوي + شارة الطاولة */
.mtheme-site .mt-strip {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    background: var(--r-secondary); color: var(--r-btn-text);
    font-size: .72rem; padding: 6px 18px;
}
.mtheme-site .mt-table {
    background: var(--r-primary); color: var(--r-btn-text);
    border-radius: 999px; padding: 2px 12px; font-weight: 800; white-space: nowrap;
}

/* الهيدر */
.mtheme-site .mt-head {
    display: flex; align-items: center; gap: 14px; padding: 13px 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--r-text) 12%, transparent);
}
.mtheme-site .mt-logo { font-weight: 800; font-size: 1.15rem; color: var(--r-primary); }
.mtheme-site .mt-nav { display: flex; gap: 14px; margin-inline-start: auto; font-size: .76rem; color: color-mix(in srgb, var(--r-text) 65%, transparent); }
.mtheme-site .mt-nav span { cursor: pointer; }

/* شريط الأقسام اللاصق */
.mtheme-site .mt-catbar {
    position: sticky; top: 0; z-index: 4;
    display: flex; gap: 7px; overflow-x: auto; padding: 9px 18px;
    background: color-mix(in srgb, var(--r-bg) 92%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid color-mix(in srgb, var(--r-text) 10%, transparent);
    scrollbar-width: none;
}
.mtheme-site .mt-catbar::-webkit-scrollbar { display: none; }
.mtheme-site .mt-cat {
    flex-shrink: 0; border: 1.5px solid color-mix(in srgb, var(--r-text) 16%, transparent);
    background: var(--r-surface); color: var(--r-text);
    border-radius: 999px; padding: 6px 15px;
    font-size: .76rem; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: all .2s ease; white-space: nowrap;
}
.mtheme-site .mt-cat.on, .mtheme-site .mt-cat:hover {
    background: var(--r-primary); border-color: var(--r-primary); color: var(--r-btn-text);
}

/* الهيرو */
.mtheme-site .mt-hero {
    text-align: center; padding: 32px 18px 28px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--r-primary) 14%, var(--r-bg)), var(--r-bg));
}
.mtheme-site .mt-kicker {
    display: inline-block; font-size: .7rem; font-weight: 800; color: var(--r-primary);
    border: 1.5px solid color-mix(in srgb, var(--r-primary) 45%, transparent);
    background: color-mix(in srgb, var(--r-primary) 8%, transparent);
    border-radius: 999px; padding: 4px 14px; margin-bottom: 10px;
}
.mtheme-site .mt-hero h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.mtheme-site .mt-hero p { color: color-mix(in srgb, var(--r-text) 65%, transparent); font-size: .82rem; margin: 0 auto 16px; max-width: 380px; }
.mtheme-site .mt-btn, .mtheme-site .t-btn {
    display: inline-block; background: var(--r-primary, var(--t-acc)); color: var(--r-btn-text, var(--t-acc-ink));
    border-radius: min(calc(var(--r-radius, var(--t-radius)) + 999px), 999px);
    padding: 9px 24px; font-weight: 800; font-size: .8rem; cursor: pointer; border: none; font-family: inherit;
}

/* البحث */
.mtheme-site .mt-search { padding: 14px 18px 0; }
.mtheme-site .mt-search input {
    width: 100%; border: 1px solid color-mix(in srgb, var(--r-text) 14%, transparent);
    border-radius: min(var(--r-radius), 20px); background: var(--r-surface); color: var(--r-text);
    padding: 9px 15px; font-size: .78rem; font-family: inherit; outline: none;
    transition: border-color .2s ease;
}
.mtheme-site .mt-search input:focus { border-color: var(--r-primary); }
.mtheme-site .mt-search input::placeholder { color: color-mix(in srgb, var(--r-text) 45%, transparent); }
.mtheme-site .mt-empty { padding: 24px 18px 30px; text-align: center; font-size: .8rem; color: color-mix(in srgb, var(--r-text) 55%, transparent); }

/* بطاقات الأصناف الأفقية — قلب هوية القالب */
.mtheme-site .mt-items {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px; padding: 16px 18px 22px;
}
.mdemo-frame.dev-mobile .mt-items, .mtheme-preview .mt-items { grid-template-columns: 1fr; }
.mdemo-frame.dev-tablet .mt-items { grid-template-columns: repeat(2, 1fr); }
.mtheme-site .mt-item {
    display: flex; gap: 11px; cursor: pointer;
    background: var(--r-surface);
    border: 1px solid color-mix(in srgb, var(--r-text) 10%, transparent);
    border-radius: calc(var(--r-radius) + 6px);
    padding: 10px; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mtheme-site .mt-item:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--r-primary) 55%, transparent);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--r-text) 14%, transparent);
}
.mtheme-site .mt-item-img {
    width: 66px; min-height: 66px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
    background: color-mix(in srgb, var(--r-primary) 10%, var(--r-surface));
    border-radius: calc(var(--r-radius) + 2px);
}
.mtheme-site .mt-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.mtheme-site .mt-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mtheme-site .mt-item-top b { font-size: .82rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtheme-site .mt-item-top em { font-style: normal; flex-shrink: 0; font-weight: 800; color: var(--r-primary); font-family: var(--font-mono); font-size: .74rem; }
.mtheme-site .mt-item-desc {
    font-size: .68rem; line-height: 1.55;
    color: color-mix(in srgb, var(--r-text) 60%, transparent);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mtheme-site .mt-badges, .t-sheet .rb { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.mtheme-site .rb, .t-sheet .rb {
    display: inline-block; font-style: normal; font-size: .58rem; font-weight: 700;
    color: color-mix(in srgb, var(--r-text, #333) 70%, transparent);
    background: color-mix(in srgb, var(--r-text, #333) 7%, transparent);
    border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.mtheme-site .rb-veg, .t-sheet .rb-veg { background: rgba(47,158,95,.15); color: #2f9e5f; }
.mtheme-site .rb-spice, .t-sheet .rb-spice { background: rgba(224,82,45,.13); }
.mtheme-site .rb-cta {
    margin-inline-start: auto;
    background: var(--r-primary); color: var(--r-btn-text);
    transition: transform .2s ease;
}
.mtheme-site .mt-item:hover .rb-cta { transform: translateX(-3px); }

/* الفوتر */
.mtheme-site .mt-foot {
    display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    border-top: 1px solid color-mix(in srgb, var(--r-text) 10%, transparent);
    background: var(--r-surface);
    padding: 16px 18px; font-size: .68rem;
    color: color-mix(in srgb, var(--r-text) 60%, transparent);
}

/* شريط السلة العائم */
.mtheme-site .mt-cartbar {
    position: sticky; bottom: 12px; z-index: 5;
    display: flex; align-items: center; gap: 10px;
    margin: 0 18px 14px; width: calc(100% - 36px);
    background: var(--r-primary); color: var(--r-btn-text);
    border: none; border-radius: min(calc(var(--r-radius) + 8px), 22px);
    padding: 12px 16px; cursor: pointer;
    font-family: inherit; font-size: .82rem; font-weight: 800;
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
    animation: mdemoUp .3s var(--ease);
}
.mtheme-site .mt-cartbar[hidden] { display: none; }
.mtheme-site .mt-cart-count {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: var(--r-btn-text); color: var(--r-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 800;
}
.mtheme-site .mt-cart-total { font-style: normal; margin-inline-start: auto; font-family: var(--font-mono); }

/* ---- الوضع الراقي (mt-fine): بنية قالب "ريستو فاين" ---- */
.mtheme-site.mt-fine .mt-head {
    flex-direction: column; gap: 8px; padding: 20px 18px 14px; text-align: center;
}
.mtheme-site.mt-fine .mt-logo { letter-spacing: .14em; color: var(--r-text); }
.mtheme-site.mt-fine .mt-nav { margin-inline-start: 0; justify-content: center; letter-spacing: .06em; }
.mtheme-site.mt-fine .mt-rule {
    display: block; width: 46px; height: 1px; margin: 2px auto;
    background: color-mix(in srgb, var(--r-primary) 70%, transparent);
    position: relative;
}
.mtheme-site.mt-fine .mt-rule::after {
    content:''; display:inline-block; width:10px; height:10px; background-color:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2.7%2010.3a2.41%202.41%200%200%200%200%203.41l7.59%207.59a2.41%202.41%200%200%200%203.41%200l7.59-7.59a2.41%202.41%200%200%200%200-3.41l-7.59-7.59a2.41%202.41%200%200%200-3.41%200Z%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain; mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2.7%2010.3a2.41%202.41%200%200%200%200%203.41l7.59%207.59a2.41%202.41%200%200%200%203.41%200l7.59-7.59a2.41%202.41%200%200%200%200-3.41l-7.59-7.59a2.41%202.41%200%200%200-3.41%200Z%22%20fill%3D%22black%22%20stroke%3D%22none%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain; position:absolute; top:-7px; left:50%; transform:translateX(-50%);
    color: var(--r-primary); font-size: 7px; background: var(--r-bg); padding: 0 5px;
}
.mtheme-site.mt-fine .mt-fine-table { font-size: .62rem; letter-spacing: .1em; color: var(--r-primary); font-weight: 600; }
.mtheme-site.mt-fine .mt-catbar { justify-content: center; background: var(--r-bg); }
.mtheme-site.mt-fine .mt-cat { background: transparent; border: none; border-bottom: 1.5px solid transparent; border-radius: 0; letter-spacing: .04em; }
.mtheme-site.mt-fine .mt-cat.on, .mtheme-site.mt-fine .mt-cat:hover { background: transparent; color: var(--r-primary); border-bottom-color: var(--r-primary); }
.mtheme-site.mt-fine .mt-hero { background: var(--r-bg); padding: 40px 18px 34px; }
.mtheme-site.mt-fine .mt-kicker { border: none; background: transparent; letter-spacing: .3em; font-size: .64rem; }
.mtheme-site.mt-fine .mt-hero h1 { letter-spacing: .02em; }
.mtheme-site.mt-fine .mt-btn { background: transparent; color: var(--r-primary); border: 1.5px solid var(--r-primary); border-radius: 0; letter-spacing: .1em; }
.mtheme-site.mt-fine .mt-items { grid-template-columns: 1fr !important; gap: 0; max-width: 480px; margin: 0 auto; padding-top: 6px; }
.mtheme-site.mt-fine .mt-fine-item {
    display: flex; flex-direction: column; gap: 4px; cursor: pointer;
    background: transparent; border: none; border-bottom: 1px solid color-mix(in srgb, var(--r-text) 10%, transparent);
    border-radius: 0; padding: 13px 4px;
    transition: background .2s ease, padding .2s ease;
}
.mtheme-site.mt-fine .mt-fine-item:hover { background: color-mix(in srgb, var(--r-primary) 6%, transparent); padding-inline: 10px; transform: none; box-shadow: none; }
.mtheme-site.mt-fine .mt-fine-line { display: flex; align-items: baseline; gap: 8px; }
.mtheme-site.mt-fine .mt-fine-line b { font-size: .84rem; font-weight: 700; }
.mtheme-site.mt-fine .mt-fine-mark { font-style: normal; font-size: .6rem; }
.mtheme-site.mt-fine .mt-fine-leader { flex: 1; min-width: 18px; border-bottom: 2px dotted color-mix(in srgb, var(--r-text) 26%, transparent); transform: translateY(-3px); }
.mtheme-site.mt-fine .mt-fine-line em { font-style: normal; font-weight: 700; color: var(--r-primary); font-family: var(--font-mono); font-size: .76rem; white-space: nowrap; }
.mtheme-site.mt-fine .mt-fine-meta { font-size: .6rem; color: color-mix(in srgb, var(--r-text) 48%, transparent); }
.mtheme-site.mt-fine .mt-foot { justify-content: center; text-align: center; background: var(--r-bg); letter-spacing: .06em; }

/* ورقة الصنف / إتمام الطلب (تشترك بمتغيرات t-* الممرَّرة من الديمو) */
.t-sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 320; padding: 20px; }
.t-sheet {
    background: var(--t-bg); color: var(--t-ink);
    width: min(420px, 100%); border-radius: min(var(--t-radius), 24px);
    padding: 22px; font-family: var(--t-font); box-shadow: 0 20px 50px rgba(0,0,0,.3);
    animation: mdemoUp .3s var(--ease);
}
.t-sheet .t-img { height: 120px; border-radius: min(var(--t-radius), 18px); display: flex; align-items: center; justify-content: center; font-size: 52px; background: color-mix(in srgb, var(--t-acc) 12%, var(--t-surface)); margin-bottom: 14px; }
.t-sheet h4 { font-family: var(--t-display); margin: 0 0 4px; font-size: 1.1rem; }
.t-sheet p { color: var(--t-mut); font-size: .82rem; margin: 0 0 16px; }
.t-sheet .t-btn { background: var(--t-acc); color: var(--t-acc-ink); border-radius: min(var(--t-radius), 999px); }
.t-sheet .t-co-list { display: flex; flex-direction: column; margin-bottom: 4px; max-height: 200px; overflow: auto; }
.t-sheet .t-co-line {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--t-line); font-size: .84rem;
}
.t-sheet .t-co-line em { font-style: normal; font-family: var(--font-mono); color: var(--t-acc); font-weight: 700; white-space: nowrap; }
.t-sheet .t-co-total { border-bottom: none; font-weight: 800; margin-bottom: 14px; }
.t-sheet h4 + .t-co-list { margin-top: 10px; }

/* ================= AI Builder ================= */
.mai-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(30px, 5vw, 70px); align-items: center;
}
.mai-steps { display: flex; flex-direction: column; gap: 0; }
.mai-step { display: flex; gap: 16px; position: relative; padding-bottom: 26px; }
.mai-step::before { content: ''; position: absolute; top: 40px; bottom: 0; inset-inline-start: 19px; border-inline-start: 2px dashed var(--line-2); }
.mai-step:last-child { padding-bottom: 0; }
.mai-step:last-child::before { display: none; }
.mai-dot {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: var(--ink-2); border: 1px solid var(--line-2);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    box-shadow: var(--shadow-xs); position: relative; z-index: 1;
}
.mai-step b { font-family: var(--font-display); color: var(--ink); display: block; font-size: 1.02rem; }
.mai-step span { color: var(--sage); font-size: .88rem; }

.mai-visual {
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-md);
}
.mai-logo-drop {
    border: 2px dashed var(--line-2); border-radius: var(--radius);
    padding: 22px; text-align: center; color: var(--sage); font-size: .86rem;
    margin-bottom: 18px;
}
.mai-logo-drop b { display: block; font-size: 30px; margin-bottom: 4px; }
.mai-scan { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: .82rem; color: var(--paper); }
.mai-scan .mscr-bar { flex: 1; }
.mai-swatches { display: flex; gap: 8px; margin-bottom: 18px; }
.mai-swatches i {
    width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
    transform: scale(0); transition: transform .45s var(--ease);
}
.is-in .mai-swatches i { transform: scale(1); }
.is-in .mai-swatches i:nth-child(2) { transition-delay: .12s; }
.is-in .mai-swatches i:nth-child(3) { transition-delay: .24s; }
.is-in .mai-swatches i:nth-child(4) { transition-delay: .36s; }
.mai-result {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--gold-soft); border-radius: var(--radius);
    padding: 14px 16px; font-size: .84rem; color: var(--ink); font-weight: 700;
}

/* ================= لوحة التحكم ================= */
.mdash-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 5vw, 60px); align-items: center; }
.mdash-list { display: flex; flex-direction: column; gap: 12px; }
.mdash-point {
    display: flex; align-items: center; gap: 13px;
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 13px 16px;
    box-shadow: var(--shadow-xs); font-weight: 600; color: var(--paper); font-size: .92rem;
    transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.mdash-point:hover { transform: translateX(-4px); box-shadow: var(--shadow-sm); }
[dir="ltr"] .mdash-point:hover { transform: translateX(4px); }
.mdash-point i { font-style: normal; font-size: 18px; }
.mdash-mock {
    background: var(--ink-2); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.mdash-mock .device-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--ink-3); }
.mdash-mock .device-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mdash-body { padding: 18px; display: grid; gap: 12px; }
.mdash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mdash-stat { background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.mdash-stat span { font-size: .68rem; color: var(--sage); display: block; }
.mdash-stat strong { font-family: var(--font-mono); color: var(--ink); font-size: 1.05rem; }
.mdash-orders-live { display: flex; flex-direction: column; gap: 8px; }
.mdash-order {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--canvas); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 13px; font-size: .78rem; color: var(--paper);
}
.mdash-order em { font-style: normal; font-family: var(--font-mono); font-size: .68rem; border-radius: 999px; padding: 3px 10px; background: var(--gold-soft); color: var(--gold); white-space: nowrap; }
.mdash-order em.ok { background: #E9F7EE; color: #17683f; }
.mdash-order em.new { background: var(--stamp-soft); color: var(--stamp); }

/* ================= الأسعار: باقتا المنيو ================= */
.mplans-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px; max-width: 860px; margin: 0 auto;
}
.plan-features li.mno { opacity: .5; }
.plan-features li.mno::before { content:''; display:inline-block; width:.72em; height:.72em; background-color:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%206%206%2018%22%2F%3E%3Cpath%20d%3D%22m6%206%2012%2012%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain; mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%206%206%2018%22%2F%3E%3Cpath%20d%3D%22m6%206%2012%2012%22%2F%3E%3C%2Fsvg%3E") no-repeat center/contain; background-color: var(--sage); background: var(--ink-3); -webkit-mask-size:.72em; mask-size:.72em; }

/* ================= استجابة ================= */
@media (max-width: 1024px) {
    .msteps { grid-template-columns: repeat(3, 1fr); gap: 26px 14px; }
    .msteps::before { display: none; }
}
@media (max-width: 900px) {
    .menu-hero-grid, .mai-grid, .mdash-wrap { grid-template-columns: 1fr; }
    .menu-hero-visual { margin-top: 20px; }
    .mstory-track { height: auto; }
    .mstory-sticky { position: static; height: auto; padding: 60px 0; }
    .mstory-grid { grid-template-columns: 1fr; }
    .mstory-phone-wrap { display: none; }
    .mstory-steps { min-height: 0; display: flex; flex-direction: column; gap: 34px; }
    .mstory-step { position: static; opacity: 1; transform: none; pointer-events: auto; }
    .mstory-dots { display: none; }
    .mdash-wrap .mdash-mock { order: 2; }
}
@media (max-width: 640px) {
    .msteps { grid-template-columns: 1fr 1fr; }
    .mplans-grid { grid-template-columns: 1fr; }
    .mqr { padding: 10px; }
    .mqr svg { width: 62px; height: 62px; }
    .mdemo-stage { padding: 10px; }
}
@media (max-width: 420px) {
    .msteps { grid-template-columns: 1fr; }
}
