/* ═══════════════════════════════════════════════════════════════════════
   متجرك.شوب — أنماط واجهة المتجر
   ═══════════════════════════════════════════════════════════════════════
   ⚠️ لا Tailwind هنا. النسخة السابقة كانت تحمّل cdn.tailwindcss.com: سكربت
   بحجم ~300 كيلوبايت يبني الأنماط داخل متصفح كل زائر بعد تحميل الصفحة
   (وميض بلا تنسيق + بطء على الهواتف). Tailwind نفسها تحذّر من استعماله
   في موقع حقيقي. هذه الورقة مكتوبة يدوياً وتُحمَّل مرة واحدة ثم تُخزَّن.

   لون المتجر: --p (ثلاثية RGB) و --on-p (لون النص فوقه)، تُضبط من
   الإعداد primary_color بواسطة applyBrand() في store-1-core.js.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --p: 37 99 235;
    --on-p: #fff;
    /* نسخة مقروءة من لون المتجر للنص والأيقونات والحدود (تُحسب في index.html).
       لا تستعمل rgb(var(--p)) كلون نص: الألوان الفاتحة (الأصفر) تختفي على الأبيض. */
    --p-ink-l: 37 99 235;
    --p-ink-d: 96 165 250;
    --p-ink: var(--p-ink-l);
    --bg: #f6f6f7;
    --surface: #ffffff;
    --surface-2: #f3f4f6;
    --line: #e7e7ea;
    --line-strong: #d4d4d8;
    --text: #0f0f12;
    --text-2: #3f3f46;
    --muted: #71717a;
    --faint: #a1a1aa;
    --ok: #16a34a;
    --ok-bg: #f0fdf4;
    --warn: #d97706;
    --warn-bg: #fffbeb;
    --bad: #dc2626;
    --bad-bg: #fef2f2;
    --wa: #25d366;
    --r: 16px;
    --r-sm: 12px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -12px rgba(0, 0, 0, .12);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .35);
    --header-h: 76px;
    --container: 1280px;
}
.dark {
    --p-ink: var(--p-ink-d);
    --bg: #09090b;
    --surface: #131316;
    --surface-2: #1b1b1f;
    --line: #26262b;
    --line-strong: #34343b;
    --text: #fafafa;
    --text-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #71717a;
    --ok: #4ade80;
    --ok-bg: rgba(74, 222, 128, .1);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, .1);
    --bad: #f87171;
    --bad-bg: rgba(248, 113, 113, .1);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .9);
}

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid rgb(var(--p-ink)); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (max-width: 640px) { .container { padding: 0 14px; } }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.clamp-1, .clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; } .clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }

/* ─── أزرار وحقول ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 20px; border-radius: var(--r-sm);
    font-weight: 800; font-size: 14px; white-space: nowrap;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
    transition: transform .15s, filter .15s, background .15s, border-color .15s;
}
.btn:hover { border-color: var(--text-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: rgb(var(--p)); color: var(--on-p); border-color: transparent; }
.btn-primary:hover { filter: brightness(.93); border-color: transparent; }
.btn-dark { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-dark:hover { filter: brightness(1.15); border-color: transparent; }
.btn-wa { background: var(--wa); color: #fff; border-color: transparent; }
.btn-wa:hover { filter: brightness(.95); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.icon-btn {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; position: relative;
    color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .fa-solid, .icon-btn .fa-regular, .icon-btn .fa-brands { font-size: 18px; }
.count-badge {
    position: absolute; top: 3px; left: 3px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: rgb(var(--p)); color: var(--on-p);
    font-size: 10px; font-weight: 800; line-height: 18px; text-align: center;
    border: 2px solid var(--surface);
}
.count-badge.pop { animation: pop .4s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }

.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 800; color: var(--text-2); margin-bottom: 6px; }
.input, .select, .textarea {
    width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-sm);
    background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
    font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: rgb(var(--p-ink)); box-shadow: 0 0 0 4px rgb(var(--p-ink) / .15); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.field-error { color: var(--bad); font-size: 12px; font-weight: 700; margin-top: 4px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > .input { padding-right: 42px; }

.chip {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--text-2);
    transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip i { font-size: 13px; opacity: .85; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.5; }
.badge-p { background: rgb(var(--p)); color: var(--on-p); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-soft { background: var(--surface-2); color: var(--text-2); }

/* ─── شريط الإعلان والرأس ───────────────────────────────────────────── */
.announce { background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; text-align: center; padding: 8px 40px; position: relative; }
.announce b { color: rgb(var(--p-ink-d)); }
.dark .announce b { color: rgb(var(--p-ink-l)); }
.announce .x { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px; opacity: .6; }
.announce .x:hover { opacity: 1; }
.announce-track { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }

.header {
    position: sticky; top: 0; z-index: 80; height: var(--header-h);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .2s;
}
.header.scrolled { box-shadow: 0 6px 24px -14px rgba(0, 0, 0, .25); }
.header-in { height: 100%; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; height: 100%; flex-shrink: 0; }
.logo img { height: 54px; width: auto; max-width: 230px; object-fit: contain; }
.logo .logo-text { font-weight: 900; font-size: 20px; }
.header-search { flex: 1; max-width: 520px; margin: 0 auto; }
.header-search .input { height: 44px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.header-search .input:focus { background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
@media (max-width: 860px) {
    .header-search { display: none; }
    .logo img { height: 44px; max-width: 170px; }
    .hide-m { display: none !important; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }

/* القائمة المنسدلة للإشعارات */
.dropdown {
    position: absolute; top: calc(100% + 10px); left: 0; width: 360px; max-width: calc(100vw - 24px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow-lg); z-index: 90; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s;
}
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 900; }
.dropdown-body { max-height: 60vh; overflow-y: auto; padding: 8px; }
@media (max-width: 640px) { .dropdown { position: fixed; top: calc(var(--header-h) + 8px); left: 12px; right: 12px; width: auto; } }
.notif-item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; }
.notif-item:hover { background: var(--surface-2); }
.notif-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--p-ink)); flex-shrink: 0; margin-top: 8px; }

/* ─── الأقسام العامة ────────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section + .section { padding-top: 0; }
@media (max-width: 640px) { .section { padding: 40px 0; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: rgb(var(--p-ink)); margin-bottom: 6px; }
.h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 16px; margin-top: 6px; max-width: 620px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 48px); }

/* ─── الهيرو ─────────────────────────────────────────────────────────── */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } .hero-text { text-align: center; } .hero-ctas { justify-content: center; } .hero-badge { margin-inline: auto; } }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 800; margin-bottom: 18px; width: fit-content; }
.hero-badge .pulse { width: 22px; height: 22px; border-radius: 50%; background: rgb(var(--p) / .15); display: grid; place-items: center; }
.hero-badge .pulse::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--p-ink)); box-shadow: 0 0 0 0 rgb(var(--p-ink) / .6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgb(var(--p-ink) / 0); } 100% { box-shadow: 0 0 0 0 rgb(var(--p-ink) / 0); } }
.hero-title { font-size: clamp(34px, 5.4vw, 64px); font-weight: 900; line-height: 1.18; letter-spacing: -.02em; }
.hero-title .accent, .hero-title span { color: rgb(var(--p-ink)); }
.hero-desc { color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); margin: 18px 0 28px; max-width: 560px; }
@media (max-width: 960px) { .hero-desc { margin-inline: auto; } }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 560px; width: 100%; justify-self: center; }
.float-card { position: absolute; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; animation: float 6s ease-in-out infinite; }
.float-card i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; }
.float-card small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.float-card.a { bottom: 8%; right: -18px; }
.float-card.b { top: 8%; left: -18px; animation-delay: -3s; }
.float-card.c { top: 54%; left: -26px; animation-delay: -1.5s; }

/* ── رسم الهيرو (أيقونات التسوق) ── */
.hv { position: absolute; inset: 0; container-type: size; }
.hv-bg { position: absolute; inset: 0; border-radius: 32px; overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgb(var(--p) / .22), transparent 58%), radial-gradient(circle at 85% 15%, rgb(var(--p) / .12), transparent 35%), radial-gradient(var(--line) 1.3px, transparent 1.3px) 0 0 / 22px 22px;
    -webkit-mask: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%); mask: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%); }
.hv-ring { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1.5px dashed rgb(var(--p-ink) / .28); transform: translate(-50%, -50%); animation: hvSpin 60s linear infinite; }
.hv-ring.r1 { width: min(80%, 107cqh); aspect-ratio: 1; }
.hv-ring.r2 { width: min(56%, 75cqh); aspect-ratio: 1; animation-direction: reverse; animation-duration: 45s; border-style: dotted; }
.hv-core { position: absolute; top: 50%; left: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-6deg); border-radius: 30%;
    background: linear-gradient(140deg, rgb(var(--p)), rgb(var(--p) / .78)); color: var(--on-p); display: grid; place-items: center; align-content: center; gap: 6px;
    box-shadow: 0 30px 60px -22px rgb(var(--p) / .75), inset 0 1px 0 rgb(255 255 255 / .35); }
.hv-core > i { font-size: clamp(56px, 9vw, 104px); filter: drop-shadow(0 8px 14px rgb(0 0 0 / .18)); }
.hv-count { font-size: 13px; font-weight: 800; background: rgb(0 0 0 / .14); padding: 3px 12px; border-radius: 999px; }
.hv-count b { font-size: 15px; }
.hv-chip { position: absolute; width: 13%; aspect-ratio: 1; border-radius: 30%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    display: grid; place-items: center; color: rgb(var(--p-ink)); font-size: clamp(18px, 2.4vw, 28px); animation: float 6s ease-in-out infinite; }
.hv-chip.c1 { top: 4%; left: 43.5%; }
.hv-chip.c2 { top: 28%; right: 3%; animation-delay: -1s; }
.hv-chip.c3 { bottom: 24%; right: 7%; animation-delay: -2s; color: #db2777; }
.hv-chip.c4 { bottom: 3%; left: 43.5%; animation-delay: -3s; color: #e11d48; }
.hv-chip.c5 { top: 30%; left: 3%; animation-delay: -4s; }
.hv-sticker { position: absolute; top: 9%; right: 12%; width: 21%; aspect-ratio: 1; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; align-content: center;
    transform: rotate(12deg); box-shadow: 0 14px 30px -10px rgb(220 38 38 / .7); outline: 2px dashed rgb(255 255 255 / .55); outline-offset: -7px; line-height: 1.05; animation: hvPop 4s ease-in-out infinite; }
.hv-sticker small { font-size: 11px; font-weight: 700; opacity: .9; }
.hv-sticker b { font-size: clamp(16px, 2.4vw, 24px); font-weight: 900; }
@keyframes hvSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes hvPop { 50% { transform: rotate(6deg) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .hv-ring, .hv-chip, .hv-sticker, .float-card { animation: none; } }
@media (max-width: 640px) { .float-card { display: none; } .hero-visual { aspect-ratio: 4 / 3; } }
@keyframes float { 50% { transform: translateY(-10px); } }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
@media (max-width: 860px) { .trust { grid-template-columns: repeat(2, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.trust-item i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--p) / .1); color: rgb(var(--p-ink)); font-size: 17px; flex-shrink: 0; }
.trust-item b { display: block; font-size: 14px; line-height: 1.4; }
.trust-item span { font-size: 12px; color: var(--muted); }

/* ─── المنتجات ───────────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input-icon { flex: 1; min-width: 220px; }
.toolbar .select { width: auto; min-width: 150px; height: 44px; font-size: 14px; }
.toolbar .icon-btn { border: 1px solid var(--line-strong); height: 44px; width: 44px; background: var(--surface); }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 14px; scroll-snap-type: x proximity; }
.cats .chip { scroll-snap-align: start; }
.result-meta { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.grid.dense { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.dense { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid, .grid.dense { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 760px) { .grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }

.card {
    position: relative; display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s; cursor: pointer;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s, transform .5s; }
.card-media img.alt { opacity: 0; }
@media (hover: hover) { .card:hover .card-media img.main.has-alt { opacity: 0; } .card:hover .card-media img.alt { opacity: 1; } .card:hover .card-media img.main:not(.has-alt) { transform: scale(1.05); } }
.card-badges { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; align-items: flex-start; }
.card-fav { position: absolute; top: 10px; left: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); display: grid; place-items: center; color: var(--text-2); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); transition: transform .15s, color .15s; }
.card-fav:hover { transform: scale(1.08); }
.card-fav.on { color: #e11d48; }
.card-quick { position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 2; opacity: 0; transform: translateY(8px); transition: .2s; }
@media (hover: hover) { .card:hover .card-quick { opacity: 1; transform: none; } }
.card-quick .btn { width: 100%; height: 40px; font-size: 13px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 11px; font-weight: 800; color: var(--faint); }
.card-title { font-size: 14px; font-weight: 800; line-height: 1.5; min-height: 42px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.price { font-weight: 900; font-size: 17px; white-space: nowrap; }
.price small { font-size: 12px; font-weight: 700; color: var(--muted); }
.price-old { font-size: 12px; color: var(--faint); text-decoration: line-through; white-space: nowrap; }
.price-tbd { font-size: 12px; font-weight: 800; color: var(--warn); }
.card-add { width: 38px; height: 38px; border-radius: 11px; background: rgb(var(--p)); color: var(--on-p); display: grid; place-items: center; flex-shrink: 0; transition: filter .15s, transform .15s; }
.card-add:hover { filter: brightness(.92); }
.card-add:active { transform: scale(.94); }
.card-add.in { background: var(--ok); color: #fff; }
.card.oos .card-media img { filter: grayscale(1); opacity: .55; }
.card.oos .card-add { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
.grid.dense .card-body { padding: 8px 10px 10px; }
.grid.dense .card-title { font-size: 12px; min-height: 36px; }
.grid.dense .price { font-size: 14px; }
.grid.dense .card-add { width: 32px; height: 32px; border-radius: 9px; }
.grid.dense .card-cat, .grid.dense .card-quick { display: none; }
@media (max-width: 760px) { .card-body { padding: 10px; } .card-title { font-size: 13px; } .price { font-size: 15px; } .card-add { width: 34px; height: 34px; } .card-fav { width: 32px; height: 32px; } }

.watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 1; }
.watermark img { position: static !important; width: 55% !important; height: auto !important; opacity: .07 !important; filter: grayscale(1); transform: rotate(-14deg); }
.dark .watermark img { opacity: .12 !important; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.skel-card .skeleton:first-child { aspect-ratio: 1 / 1; border-radius: 0; }

.empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r); }
.empty i { font-size: 34px; color: var(--faint); margin-bottom: 12px; display: block; }
.empty b { display: block; font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 16px; }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; font-size: 13px; color: var(--muted); }
.progress { width: 220px; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: rgb(var(--p-ink)); border-radius: 4px; }

/* شرائط أفقية (الأكثر مبيعاً / جديد / ذات صلة) */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 1100px) { .rail { grid-auto-columns: calc((100% - 2 * 18px) / 3); } }
@media (max-width: 760px) { .rail { grid-auto-columns: 44%; gap: 10px; } }
.rail-nav { display: flex; gap: 6px; }
.rail-nav .icon-btn { border: 1px solid var(--line-strong); width: 40px; height: 40px; }

/* ─── صاحب المتجر، الأرقام، لماذا نحن، الخطوات، الآراء ────────────── */
.founder { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; text-align: center; gap: 24px; } }
.founder-img { width: 220px; height: 220px; border-radius: 28px; object-fit: cover; background: var(--surface-2); margin: 0 auto; }
.founder-role { color: rgb(var(--p-ink)); font-weight: 800; margin: 4px 0 16px; }
.founder-title { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.founder-desc { color: var(--text-2); }
.founder .btn { margin-top: 20px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); padding: 28px 20px; text-align: center; }
.stat b { display: block; font-size: clamp(28px, 4vw, 40px); font-weight: 900; line-height: 1.2; }
.stat span { color: var(--muted); font-weight: 700; font-size: 14px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.feature i { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgb(var(--p) / .1); color: rgb(var(--p-ink)); font-size: 20px; margin-bottom: 14px; }
.feature b { display: block; font-size: 16px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 900; margin-bottom: 14px; }
.step b { display: block; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14px; }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .reviews { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .reviews { grid-template-columns: 1fr; } }
.review { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.stars { color: #f59e0b; font-size: 13px; display: flex; gap: 2px; }
.review p { color: var(--text-2); font-size: 14px; flex: 1; }
.review-by { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: rgb(var(--p) / .12); color: rgb(var(--p-ink)); flex-shrink: 0; }
.review-by span { color: var(--muted); display: block; font-size: 12px; }

.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { transition: transform .25s; color: var(--muted); }
.faq details[open] summary i { transform: rotate(180deg); }
.faq details > div { padding: 0 20px 18px; color: var(--text-2); }

.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.contact-card h3 { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.contact-card p { color: var(--text-2); display: flex; align-items: center; gap: 10px; }

/* ─── التذييل والتنقل السفلي ─────────────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer h4 { font-size: 14px; font-weight: 900; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a, .footer-links button { color: var(--muted); font-size: 14px; text-align: right; transition: color .15s; }
.footer-links a:hover, .footer-links button:hover { color: var(--text); }
.footer-brand img { height: 44px; width: auto; max-width: 180px; object-fit: contain; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 360px; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); transition: .15s; }
.socials a:hover { background: rgb(var(--p)); color: var(--on-p); border-color: transparent; }
.pay-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-badges span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: 13px; color: var(--muted); }
.footer-bottom a { color: rgb(var(--p-ink)); font-weight: 800; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 70; display: none; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
@media (max-width: 860px) { .bottom-nav { display: grid; } body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); } }
.bottom-nav button, .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0; position: relative; }
.bottom-nav i { font-size: 19px; }
.bottom-nav .active { color: var(--text); }
.bottom-nav .count-badge { top: -2px; left: calc(50% - 22px); }
.bottom-nav .wa i { color: var(--wa); }

.fab { position: fixed; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); transition: transform .2s, opacity .2s; }
.fab:hover { transform: scale(1.06); }
.fab-wa { right: 22px; bottom: 22px; background: var(--wa); color: #fff; font-size: 28px; }
.fab-top { left: 22px; bottom: 22px; width: 46px; height: 46px; background: var(--surface); border: 1px solid var(--line); color: var(--text); opacity: 0; pointer-events: none; }
.fab-top.show { opacity: 1; pointer-events: auto; }
@media (max-width: 860px) { .fab-wa { display: none; } .fab-top { bottom: calc(78px + env(safe-area-inset-bottom)); left: 14px; } }

/* ─── النوافذ، اللوحات الجانبية ─────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 210; background: var(--surface); display: flex; flex-direction: column; visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s, visibility .3s; }
.sheet.open { visibility: visible; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sheet-head h3 { font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { border-top: 1px solid var(--line); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); flex-shrink: 0; background: var(--surface); }

/* درج جانبي (السلة يساراً، القائمة يميناً) */
.drawer-left { top: 0; bottom: 0; left: 0; width: min(440px, 100vw); transform: translateX(-100%); border-right: 1px solid var(--line); }
.drawer-right { top: 0; bottom: 0; right: 0; width: min(320px, 88vw); transform: translateX(100%); border-left: 1px solid var(--line); }
.drawer-left.open, .drawer-right.open { transform: none; }

/* نافذة وسطى (ورقة سفلية على الهاتف) */
.modal { left: 50%; top: 50%; width: min(var(--mw, 560px), calc(100vw - 32px)); max-height: min(88vh, 900px); border-radius: 24px; transform: translate(-50%, -46%) scale(.98); opacity: 0; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal.open { transform: translate(-50%, -50%); opacity: 1; }
@media (max-width: 640px) {
    .modal { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; transform: translateY(100%); opacity: 1; }
    .modal.open { transform: none; }
    .modal::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); z-index: 3; }
}

/* ─── صفحة المنتج (نافذة) ───────────────────────────────────────────── */
.pd { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .pd { grid-template-columns: 1fr; } }
.pd-gallery { background: var(--surface-2); padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.pd-main { position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.pd-main > img { width: 100%; height: 100%; object-fit: contain; }
.pd-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 92%, transparent); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.pd-nav.prev { right: 10px; } .pd-nav.next { left: 10px; }
.pd-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.pd-thumbs button { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; flex-shrink: 0; background: var(--surface); }
.pd-thumbs button.on { border-color: rgb(var(--p-ink)); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 640px) { .pd-info { padding: 20px; } .pd-gallery { padding: 22px 12px 12px; } }
.pd-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; line-height: 1.35; }
.pd-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pd-price .price { font-size: 32px; }
.pd-price .price-old { font-size: 17px; }
.pd-desc { color: var(--text-2); white-space: pre-line; font-size: 15px; }
.pd-desc a { color: rgb(var(--p-ink)); text-decoration: underline; }
.var-group b { display: block; font-size: 14px; margin-bottom: 8px; }
.var-group b em { font-style: normal; color: var(--muted); font-weight: 700; }
.var-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.var-opt { min-width: 48px; height: 42px; padding: 0 16px; border-radius: 11px; border: 1.5px solid var(--line-strong); font-weight: 800; font-size: 14px; transition: .15s; }
.var-opt:hover { border-color: var(--text-2); }
.var-opt.on { border-color: rgb(var(--p-ink)); background: rgb(var(--p) / .1); box-shadow: inset 0 0 0 1px rgb(var(--p-ink)); }
.var-group.missing .var-opt { border-color: var(--bad); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; height: 48px; overflow: hidden; }
.qty button { width: 44px; height: 100%; display: grid; place-items: center; color: var(--text-2); }
.qty button:hover { background: var(--surface-2); }
.qty span { min-width: 36px; text-align: center; font-weight: 900; }
.qty.sm { height: 34px; border-radius: 10px; }
.qty.sm button { width: 32px; font-size: 12px; }
.qty.sm span { min-width: 26px; font-size: 14px; }
.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-actions .btn-primary { flex: 1; min-width: 160px; }
.pd-meta { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface-2); font-size: 14px; }
.pd-meta div { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.pd-meta i { width: 20px; color: rgb(var(--p-ink)); text-align: center; }
.pd-related { padding: 24px 28px 28px; border-top: 1px solid var(--line); }
.pd-close { position: absolute; top: 14px; left: 14px; z-index: 5; background: var(--surface); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); border-radius: 50%; }

/* ─── السلة وإتمام الطلب ────────────────────────────────────────────── */
.steps-bar { display: flex; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 800; color: var(--faint); }
.steps-bar span { display: flex; align-items: center; gap: 6px; }
.steps-bar span.on { color: var(--text); }
.steps-bar i.n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-style: normal; font-size: 11px; }
.steps-bar span.on i.n { background: rgb(var(--p)); color: var(--on-p); }
.ship-progress { margin: 16px 20px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; font-weight: 700; }
.ship-progress .bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.ship-progress .bar span { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .4s; }
.cart-list { padding: 8px 20px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; cursor: pointer; }
.cart-item .ci-title { font-weight: 800; font-size: 14px; line-height: 1.45; }
.cart-item .ci-var { font-size: 12px; color: var(--muted); }
.cart-item .ci-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.cart-item .ci-remove { color: var(--faint); font-size: 13px; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.cart-item .ci-remove:hover { color: var(--bad); background: var(--bad-bg); }
.summary { display: grid; gap: 8px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.summary .total { font-size: 18px; font-weight: 900; color: var(--text); padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.summary .disc { color: var(--ok); }
.promo { display: flex; gap: 8px; }
.promo .input { height: 44px; text-transform: uppercase; }
.checkout { padding: 16px 20px 24px; display: grid; gap: 16px; }
.checkout h4 { font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; transition: .15s; }
.opt:hover { border-color: var(--line-strong); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex-shrink: 0; display: grid; place-items: center; }
.opt:has(input:checked) { border-color: rgb(var(--p-ink)); background: rgb(var(--p) / .06); }
.opt:has(input:checked) .radio { border-color: rgb(var(--p-ink)); }
.opt:has(input:checked) .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--p-ink)); }
.opt .opt-t { font-weight: 800; font-size: 14px; flex: 1; }
.opt .opt-s { font-size: 12px; color: var(--muted); display: block; font-weight: 600; }
.opt > i { color: var(--muted); font-size: 18px; }
.bank { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.bank-head { padding: 10px 14px; background: var(--surface-2); font-size: 13px; font-weight: 800; }
.bank-row { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.bank-row b { display: block; }
.bank-row .v { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; direction: ltr; text-align: left; }
.bank-row .v button { color: var(--muted); padding: 4px; }
.success { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.success .check { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 38px; animation: pop .5s ease; }
.success .order-no { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); font-weight: 900; font-family: ui-monospace, Menlo, Consolas, monospace; direction: ltr; }
.success p { color: var(--muted); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: rgb(var(--p-ink)); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* قائمة الجوال */
.menu-list { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-weight: 700; text-align: right; }
.menu-list button:hover, .menu-list a:hover { background: var(--surface-2); }
.menu-list button.active { background: var(--surface-2); color: rgb(var(--p-ink)); }
.menu-list i { width: 22px; text-align: center; color: var(--muted); }
.menu-sep { font-size: 12px; font-weight: 800; color: var(--faint); padding: 14px 14px 6px; }

/* التتبع */
.track-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.track-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.track-steps span { height: 5px; border-radius: 5px; background: var(--line); }
.track-steps span.on { background: var(--ok); }
.track-steps.bad span.on { background: var(--bad); }

/* التكبير */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0, 0, 0, .92); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 8px; user-select: none; }
.lightbox .icon-btn { position: absolute; color: #fff; background: rgba(255, 255, 255, .1); width: 48px; height: 48px; border-radius: 50%; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.lightbox .lb-close { top: 18px; left: 18px; }
.lightbox .lb-prev { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 800; font-size: 14px; opacity: .8; }

/* الإشعارات المنبثقة والتثبيت */
.toast-wrap { position: fixed; z-index: 500; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
@media (max-width: 860px) { .toast-wrap { bottom: calc(80px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 800; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .25s ease; }
.toast i { font-size: 16px; }
.toast .t-ok { color: #4ade80; } .toast .t-bad { color: #f87171; }
.toast a, .toast button { color: rgb(var(--p-ink-d)); font-weight: 900; margin-inline-start: 6px; }
.dark .toast a, .dark .toast button { color: rgb(var(--p-ink-l)); }
.dark .toast { background: #fafafa; color: #0a0a0a; }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

.install { position: fixed; z-index: 65; right: 20px; bottom: 90px; width: 330px; max-width: calc(100vw - 28px); padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; animation: toastIn .3s ease; }
.install img { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; object-fit: cover; }
.install b { display: block; font-size: 14px; }
.install span { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .install { right: 14px; left: 14px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* شاشات الصيانة / قريباً */
.gate { position: fixed; inset: 0; z-index: 1000; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 16px; }
.gate img { height: 70px; width: auto; object-fit: contain; }
.gate h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 900; }
.gate p { color: var(--muted); max-width: 520px; font-size: 17px; }
.gate i.big { font-size: 56px; color: rgb(var(--p-ink)); }

.rich a { color: rgb(var(--p-ink)); text-decoration: underline; }
.prose h3 { font-size: 16px; font-weight: 900; margin: 18px 0 6px; color: var(--text); }
.prose p, .prose li { color: var(--text-2); font-size: 14px; }
.prose ul { list-style: disc; padding-right: 20px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
