/* ============================================================
   Mhmd Store — Main Stylesheet
   مطابق للنسخة التجريبية demo-store.mhmd.com
   ============================================================ */

/* ============================================================
   DAILY SITE-NOTIFICATION REMINDER
   ============================================================ */
.site-notification-reminder {
    position: fixed;
    z-index: 10010;
    right: 50%;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    width: min(92vw, 560px);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #fff;
    direction: rtl;
    background-color: var(--primary);
    background-image: linear-gradient(125deg, var(--primary-light), var(--primary));
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .25);
    transform: translate(50%, 2%);
    animation: site-notification-reminder-enter .28s ease-out both;
}

.site-notification-reminder[hidden] {
    display: none !important;
}

.site-notification-reminder__message {
    display: flex;
    align-items: center;
    gap: 11px;
}

.site-notification-reminder__logo {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.site-notification-reminder__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-notification-reminder__message p {
    flex: 1;
    margin: 0;
    color: inherit;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.55;
}

.site-notification-reminder__message p i {
    margin-inline-end: 3px;
}

.site-notification-reminder__actions {
    display: flex;
    gap: 10px;
    direction: ltr;
}

.site-notification-reminder__actions button {
    min-height: 40px;
    flex: 1 1 0;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    direction: rtl;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease, background-color .18s ease;
}

.site-notification-reminder__actions button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.site-notification-reminder__actions button:active {
    transform: translateY(0);
}

.site-notification-reminder__actions button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
}

.site-notification-reminder__later {
    color: #fff;
    background: rgba(255, 255, 255, .18);
    background: color-mix(in srgb, var(--primary) 74%, #fff 26%);
    border-color: rgba(255, 255, 255, .13) !important;
}

.site-notification-reminder__enable {
    color: #07391f;
    background: #24c96a;
}

.site-notification-reminder__actions button:disabled {
    cursor: wait;
    opacity: .7;
}

.site-notification-reminder-toast {
    position: fixed;
    z-index: 10011;
    right: 50%;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    width: min(92vw, 560px);
    padding: 10px 14px;
    color: #fff;
    background-color: #12385a;
    background-image: linear-gradient(110deg, #123c63, #0e3150);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 17px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
    opacity: 0;
    transform: translate(50%, 12px);
    transition: opacity .22s ease, transform .22s ease;
}

.site-notification-reminder-toast.is-visible {
    opacity: 1;
    transform: translate(50%, 0);
}

.site-notification-reminder-toast[data-type="warning"] {
    border-color: rgba(255, 210, 90, .65);
}

@keyframes site-notification-reminder-enter {
    from { opacity: 0; transform: translate(50%, calc(12px + 2%)); }
    to { opacity: 1; transform: translate(50%, 2%); }
}

@media (max-width: 480px) {
    .site-notification-reminder {
        width: calc(100vw - 28px);
        padding: 13px;
        border-radius: 17px;
    }

    .site-notification-reminder__message p {
        font-size: 15px;
    }

    .site-notification-reminder__actions button {
        min-height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-notification-reminder {
        animation: none;
    }

    .site-notification-reminder__actions button {
        transition: none;
    }

    .site-notification-reminder-toast {
        transition: none;
    }
}

/* ============================================================
   VARIABLES — Light Theme
   ============================================================ */
:root {
    --primary:        #082C49;
    --primary-light:  #0a3d68;
    --secondary:      #DC3545;
    --accent:         #005685;
    /* Light surface palette matched to Vantom's current light-theme tokens. */
    --bg:             #ffffff;
    --bg-secondary:   #f3f4f6;
    --bg-card:        #ffffff;
    --text:           #0f172a;
    --text-muted:     #64748b;
    --border:         #e5e7eb;
    --navbar-bg:      #082C49;
    --sidebar-bg:     #ffffff;
    --shadow:         0 2px 15px rgba(0,0,0,.10);
    --shadow-hover:   0 8px 30px rgba(0,0,0,.15);
    --radius:         12px;
    --radius-sm:      8px;
    --transition:     all .3s ease;
}

/* ============================================================
   DARK THEME  (data-theme="dark" on <html>)
   ============================================================ */
[data-theme="dark"] {
    --bg:           #090909;
    --bg-secondary: #090909;
    --bg-card:      #1a1c1f;
    --text:         #eef4fb;
    --text-muted:   #a8b6c8;
    --border:       #2c2f33;
    /* Keep the top bar and the dark bottom bar tied to the store brand. */
    --navbar-bg:    var(--primary);
    --sidebar-bg:   #0b0f14;
    --shadow:       0 2px 15px rgba(0,0,0,.4);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.5);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* تبديل الثيم فورياً بدون تحريك عشرات الخلفيات والحدود */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

/* اترك حركة زر الثيم ناعمة أثناء تبديل الوضع */
html.theme-switching .theme-switch__track {
    transition: all .3s !important;
}
html.theme-switching .theme-switch__knob {
    transition: transform .3s ease, color .3s, background .3s, box-shadow .3s !important;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    transition: background .3s, color .3s;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent); }
img { max-width: 100%; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar         { width: 6px; }
::-webkit-scrollbar-track   { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb   { background: var(--primary); border-radius: 3px; }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
/* Loader — logo centered INSIDE spinner ring (matches demo) */
#loader-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.60);
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    /* الإخفاء السريع مثل TON STORE؛ لا نحجب الصفحة أثناء تحميل الصور */
    transition: none;
}
[data-theme="dark"] #loader-overlay {
    background: rgba(13,17,23,.70);
}
#loader-overlay.hide {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.loader-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader-logo {
    width: 60px;
    height: 60px;
    position: absolute;
    object-fit: contain;
}
.spinner-ring {
    width: 100px;
    height: 100px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 0; left: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LAYOUT — body is d-flex (Bootstrap class)
   Sidebar on RIGHT (first child in RTL flex-row)
   MainContent on LEFT (flex-grow-1)
   ============================================================ */
#sidebar {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    min-height: 100vh;
     --sidebar-lower-shift: 2vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 0;
    background: var(--sidebar-bg);
    z-index: 100;
    flex-shrink: 0;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    scrollbar-width: none;
}
#sidebar::-webkit-scrollbar       { width: 0; height: 0; display: none; }

#mainContent {
    flex: 1;
    min-width: 0;
    /*
     * `hidden` creates a scroll container in some browsers and prevents
     * the sticky header from tracking the page scroll. `clip` keeps the
     * horizontal clipping without changing the vertical scroll context.
     */
    overflow-x: clip;
}

/* Mobile — sidebar slides in from right */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        min-width: 280px;
        height: 100%;
        z-index: 1050;
        box-shadow: -4px 0 24px rgba(0,0,0,.18);
        transform: translateX(100%);
        will-change: transform;
        transition: transform .24s cubic-bezier(.22,1,.36,1);
    }
    #sidebar.open { transform: translateX(0); }
}

/* Sidebar backdrop overlay */
#sidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    /* Keep the outside-click layer without adding any visual dimming. */
    background: transparent;
    z-index: 1049;
    transition: none;
}
#sidebarOverlay.active { display: block; }

/* ============================================================
   HEADER — New Design (matches SHAMS4STORE screenshot)
   ============================================================ */

/* Legacy fallback — kept so any remaining .bg-dark1 refs don't break */
.bg-dark1 { background: var(--navbar-bg) !important; }

/* ── Outer shell ── */
.site-header {
    background: var(--navbar-bg);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* ── Dark mode support ── */
[data-theme="dark"] .site-header,
[data-bs-theme="dark"] .site-header {
    background: var(--navbar-bg) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.45) !important;
}
html[data-theme="dark"] .site-header {
    background: var(--navbar-bg) !important;
}
[data-theme="dark"] .site-header__inner,
[data-bs-theme="dark"] .site-header__inner {
    background: transparent !important;
}
[data-theme="dark"] .site-header__bell-badge { border-color: #0f4f0f; }

/* ── Inner row ── */
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    /* تقليل ارتفاع الشريط العلوي بنسبة 2% إضافية (57.358px → 56.211px). */
    height: 56.211px;
    direction: ltr;
    box-sizing: border-box;
}

/* ── Brand ── */
.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    min-width: 0;
    margin-left: 0;
}
.site-header__brand--with-back {
    gap: 4px;
}
.site-header__back {
    display: inline-flex;
    width: 38px;
    height: 42px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background .2s ease, transform .15s ease;
}
.site-header__back svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.site-header__back:hover,
.site-header__back:focus-visible {
    background: rgba(255,255,255,.16);
    color: #fff;
}
.site-header__back:active {
    transform: translateX(-2px);
}
.site-header__logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.site-header__logo {
    width: 58px;
    height: 46px;
    display: block;
    object-fit: contain;
    object-position: center;
}
.site-header__name {
    font-family: 'Tajawal', 'Arial Black', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: .12em;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

/* ── Actions ── */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
}

/* ── Bell ── */
.site-header__bell {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .2s;
    flex-shrink: 0;
    position: relative;
    top: -2px;
    text-decoration: none;
}
.site-header__bell:hover { background: rgba(255,255,255,.15); }
.site-header__bell svg {
    fill: #8f8f8f;
}
.site-header__bell-img {
    width: 18.50px;
    height: 18.50px;
    object-fit: contain;
    display: block;
    opacity: 1;
    filter: grayscale(100%);
}
.site-header__bell-fallback {
    color: #8f8f8f;
    font-size: 22px;
    line-height: 1;
    opacity: 1;
}
.site-header__bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 9px;
    height: 9px;
    background: #e03a3a;
    border-radius: 50%;
    border: 1.5px solid #1a7a1a;
    display: none;
}
.site-header__bell-badge.active { display: block; }

/* ── Admin notifications link on the main site header ── */
.admin-notification-widget {
    display: flex;
    align-items: center;
}
.admin-notification-bell {
    position: relative;
}
.admin-notification-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    top: -3px;
    right: -4px;
    border: 2px solid var(--navbar-bg, #1a7a1a);
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font: 800 10px/1 'Tajawal', sans-serif;
    white-space: nowrap;
}
.admin-notification-count.is-visible {
    display: flex;
}
.user-notification-widget {
    position: relative;
    display: flex;
    align-items: center;
}
.user-notification-bell .site-header__bell-img {
    width: 23px;
    height: 20px;
    object-fit: fill;
    filter: none;
}
.user-notification-count.is-visible {
    display: flex;
}
.user-notification-panel {
    position: absolute;
    top: 42px;
    inset-inline-end: 0;
    z-index: 500;
    width: min(340px, calc(100vw - 24px));
    overflow: hidden;
    direction: rtl;
    text-align: right;
    background: #fff;
    color: #172033;
    border: 1px solid #e6ebf0;
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .20);
}
.user-notification-panel[hidden] {
    display: none;
}
.user-notification-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef1f4;
    font-size: 14px;
}
.user-notification-panel__head button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #087d19;
    font: 700 11px 'Tajawal', sans-serif;
    cursor: pointer;
}
.user-notification-list {
    max-height: 360px;
    overflow-y: auto;
}
.user-notification-empty {
    padding: 30px 16px;
    color: #7b8794;
    font-size: 13px;
    text-align: center;
}
.user-notification-item {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 10px;
    padding: 13px 14px;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: right;
    cursor: pointer;
    transition: background .16s ease;
}
.user-notification-item:last-child {
    border-bottom: 0;
}
.user-notification-item:hover,
.user-notification-item.is-unread {
    background: #f5fbf6;
}
.user-notification-item__icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: #eaf7ee;
    color: #16803b;
    font-size: 14px;
}
.user-notification-item__content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}
.user-notification-item__content strong {
    overflow: hidden;
    color: #1d2633;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-notification-item__content > span {
    color: #596575;
    font-size: 12px;
    line-height: 1.55;
    white-space: normal;
}
.user-notification-item__content time {
    color: #8b95a5;
    font-size: 10px;
}
.user-notification-widget.is-open .site-header__bell {
    background: rgba(255,255,255,.15);
}
.user-notifications-page {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 26px 16px 110px;
    direction: rtl;
}
.user-notifications-page__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.user-notifications-page__intro h1 {
    margin: 0;
    color: #202124;
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 800;
}
.user-notification-page-mark-all {
    border: 0;
    padding: 8px 0;
    background: transparent;
    color: #087d19;
    font: 700 12px 'Tajawal', sans-serif;
    cursor: pointer;
}
.user-notifications-page__card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}
.user-notifications-page__card .user-notification-list {
    max-height: none;
}
.admin-notification-panel {
    width: 100%;
    overflow: hidden;
    direction: rtl;
    text-align: right;
    background: #fff;
    color: #172033;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.admin-notification-panel[hidden] {
    display: none;
}
.admin-notification-panel--page {
    max-width: none;
    margin: 0;
}
.admin-notifications-page {
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 110px;
    direction: rtl;
}
.admin-notifications-page__intro {
    display: block;
    margin-bottom: 34px;
}
.admin-notifications-page__intro h1 {
    margin: 0;
    color: #202124;
    font-size: clamp(28px, 6vw, 34px);
    font-weight: 400;
    line-height: 1.15;
    text-align: right;
}
.admin-notification-panel__head {
    display: none;
}
.admin-notification-mark-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #087c18;
    font: 700 11px 'Tajawal', sans-serif;
    cursor: pointer;
}
.admin-notification-filters {
    display: grid;
    grid-template-areas: "search to from";
    grid-template-columns: 50px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 62px;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    padding: 0;
    background: #fff;
    direction: ltr;
}
.admin-notification-filter {
    position: relative;
    display: block;
    min-width: 0;
    box-sizing: border-box;
    padding-top: 10px;
    direction: rtl;
}
.admin-notification-filter--from {
    grid-area: from;
}
.admin-notification-filter--to {
    grid-area: to;
}
.admin-notification-filter span {
    position: absolute;
    z-index: 1;
    top: 0;
    inset-inline-end: 14px;
    display: block;
    padding: 0 5px;
    background: #fff;
    color: #8b929a;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
}
.admin-notification-filter input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 10px 12px 5px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    outline: 0;
    background: #fff;
    color: #30343a;
    font: 400 13px 'Tajawal', sans-serif;
    direction: ltr;
    text-align: center;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    transition: border-color .2s, box-shadow .2s;
}
.admin-notification-filter input:focus {
    border-color: #0a7d19;
    box-shadow: 0 0 0 3px rgba(10, 125, 25, .10);
}
.admin-notification-search {
    display: grid;
    grid-area: search;
    place-items: center;
    width: 50px;
    min-width: 50px;
    height: 50px;
    margin-bottom: 1px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #087d19;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(8, 125, 25, .20);
    transition: transform .2s, background .2s;
}
.admin-notification-search img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.admin-notification-search:hover {
    background: #066914;
    transform: translateY(-1px);
}
.admin-notification-list {
    max-height: none;
    min-height: 300px;
    overflow-y: auto;
    border-top: 0;
}
.admin-notification-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 32px 0;
    color: #303030;
    font-size: 16px;
    text-align: center;
}

@media (max-width: 640px) {
    .admin-notifications-page {
        width: 100%;
        padding: 25px 15px 110px;
    }
    .admin-notifications-page__intro {
        margin-bottom: 34px;
    }
    .admin-notification-filters {
        grid-template-areas: "search to from";
        grid-template-columns: 50px minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: 62px;
        gap: 10px;
    }
    .admin-notification-filter {
        min-width: 0;
    }
    .admin-notification-search {
        grid-area: search;
    }
}
.admin-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #eef1f4;
    transition: background .16s ease, transform .16s ease;
}
.admin-notification-item:hover {
    background: #f5f8fc;
}
.admin-notification-item.is-unread {
    background: #f8fbff;
}
.admin-notification-item__icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-top: 1px;
    border: 1px solid #dceaf8;
    border-radius: 13px;
    background: #edf6ff;
    color: #1267c7;
    font-size: 19px;
}
.admin-notification-item__content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}
.admin-notification-item__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.admin-notification-item__topline strong {
    min-width: 0;
    overflow: hidden;
    color: #1d2633;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-notification-item__type {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eaf7ee;
    color: #16803b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}
.admin-notification-item__body {
    color: #596575;
    font-size: 12px;
    line-height: 1.65;
}
.admin-notification-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #8b95a5;
    font-size: 10px;
}
.admin-notification-item__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #087d19;
    font-size: 10px;
    font-weight: 700;
}
.admin-notification-item__meta i {
    font-size: 15px;
    line-height: 1;
}
.admin-notification-item__content time {
    color: inherit;
    font-size: inherit;
}
.admin-notification-item__arrow {
    align-self: center;
    flex: 0 0 auto;
    color: #a8b2bf;
    font-size: 18px;
}
.admin-notification-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 32px 0;
    color: #3e3e3e;
    font-size: 16px;
    text-align: center;
}
html[data-theme="dark"] .admin-notification-panel {
    background: var(--bg-card, #1c2128);
    color: var(--text, #e6edf3);
    border-color: var(--border, #30363d);
}
html[data-theme="dark"] .admin-notification-panel__head,
html[data-theme="dark"] .admin-notification-item {
    border-color: var(--border, #30363d);
}
html[data-theme="dark"] .admin-notification-panel__head,
html[data-theme="dark"] .admin-notification-filters,
html[data-theme="dark"] .admin-notification-filter span,
html[data-theme="dark"] .admin-notification-filter input {
    background: var(--bg-card, #1c2128);
}
html[data-theme="dark"] .admin-notification-panel__head h2,
html[data-theme="dark"] .admin-notification-filter input {
    color: var(--text, #e6edf3);
}
html[data-theme="dark"] .admin-notification-filter input {
    border-color: var(--border, #30363d);
}
html[data-theme="dark"] .admin-notification-list {
    border-color: var(--border, #30363d);
}
html[data-theme="dark"] .admin-notification-empty {
    color: var(--text-muted, #8b949e);
}
html[data-theme="dark"] .admin-notification-item:hover {
    background: #252f3e;
}
html[data-theme="dark"] .admin-notification-item.is-unread {
    background: #1f2a3a;
}
html[data-theme="dark"] .admin-notification-item__icon {
    background: #20324a;
    border-color: #2b6f9a;
    color: #8fc7ff;
}
html[data-theme="dark"] .admin-notifications-page__intro h1 {
    color: var(--text, #e6edf3);
}
html[data-theme="dark"] .admin-notification-filter span {
    color: var(--text-muted, #8b949e);
}
html[data-theme="dark"] .admin-notification-filter input::placeholder {
    color: #718096;
}
html[data-theme="dark"] .admin-notification-item__topline strong {
    color: var(--text, #e6edf3);
}
html[data-theme="dark"] .admin-notification-item__body {
    color: #b5c0cf;
}
html[data-theme="dark"] .admin-notification-item__meta {
    color: #8b98a8;
}
html[data-theme="dark"] .admin-notification-item__arrow {
    color: #8090a3;
}
html[data-theme="dark"] .admin-notification-item__type {
    background: rgba(34, 197, 94, .16);
    color: #86efac;
}
html[data-theme="dark"] .admin-notification-item.is-unread {
    background: #1b3655;
}
html[data-theme="dark"] .admin-notification-item__content span {
    color: #b7c3d4;
}
@media (max-width: 575.98px) {
    .admin-notification-panel {
        position: fixed;
        top: 68px;
        inset-inline: 12px;
        width: auto;
        max-height: calc(100vh - 82px);
    }
    .admin-notification-panel__head {
        padding-inline: 18px;
    }
    .admin-notification-filters {
        gap: 7px;
        padding-inline: 12px;
    }
    .admin-notification-filter input {
        font-size: 12px;
        padding-inline: 8px;
    }
    .admin-notification-search {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }
    .admin-notification-panel--page {
        position: static;
        inset: auto;
        width: 100%;
        max-height: none;
    }
    .admin-notification-panel--page .admin-notification-filters {
        padding-inline: 0;
    }
    .admin-notification-panel--page .admin-notification-search {
        grid-area: search;
        width: 50px;
        height: 50px;
    }
}

/* ── Avatar ── */
.site-header__avatar {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    object-fit: contain;
    background: #000;
    display: block;
    flex-shrink: 0;
}


/* ── مربع مستوى العميل ── */
.site-header__tier-wrap {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    display: flex;
    justify-content: center;
    top: -2px;
    /* يضع مركز المربع تماماً بين الجرس وزر + */
    transform: translateX(-5.5px);
}
.site-header__vip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    border: 1px solid rgba(255,255,255,.65);
    padding: 0;
    text-decoration: none;
}
.site-header__vip-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.site-header__vip-text {
    font-family: 'Arial Black', sans-serif;
    font-size: 0.42rem;
    font-weight: 900;
    color: #d4af37;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: 1;
}
.site-header__tier-menu {
    position: absolute;
    z-index: 1300;
    top: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%);
    width: 190px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    background: #fff;
    color: #202124;
    box-shadow: 0 10px 26px rgba(0,0,0,.2);
    text-align: center;
}
.site-header__tier-menu-title {
    color: #888;
    font-size: .72rem;
    margin-bottom: 4px;
}
.site-header__tier-name {
    color: #111;
    font-size: .95rem;
    font-weight: 800;
    margin-bottom: 0;
}
.site-header__tier-link {
    color: var(--primary, #066509);
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
}

/* نافذة مستوى العميل بكامل الشاشة */
body.header-tier-modal-open { overflow: hidden; }
.header-tier-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #292929;
    font-family: 'Tajawal', sans-serif;
}
.header-tier-modal[hidden] { display: none; }
.header-tier-modal__topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 52px;
    background: var(--navbar-bg, #05002d);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}
.header-tier-modal__close {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}
.header-tier-modal__body {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 52px 42px 120px;
}
.header-tier-modal__intro {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    direction: ltr;
}
.header-tier-modal__intro h1 {
    flex: 1;
    margin: 0;
    color: #292929;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    text-align: right;
}
.header-tier-modal__logo {
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 50%;
    background: #05002d;
    flex: 0 0 auto;
}
.header-tier-modal__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.header-tier-modal__divider {
    height: 1px;
    margin: 24px 0 20px;
    background: #606060;
}
.header-tier-modal__copy {
    margin: 0;
    color: #303030;
    font-size: 1.05rem;
    line-height: 2;
    text-align: right;
}
.header-tier-modal__current {
    margin-top: 28px;
    text-align: right;
}
.header-tier-modal__current-name {
    display: block;
    margin-bottom: 10px;
    color: #a0a3ad;
    font-size: 1rem;
    font-weight: 700;
}
.header-tier-modal__progress {
    height: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #b8b6dc;
}
.header-tier-modal__progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #aaa8d1;
}
.header-tier-modal__numbers {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: #777;
    font-size: .82rem;
}
.header-tier-modal__numbers strong { color: #444; }
[data-theme="dark"] .header-tier-modal {
    background: var(--bg-card, #181a1d);
    color: #f1f3f5;
}
[data-theme="dark"] .header-tier-modal__intro h1,
[data-theme="dark"] .header-tier-modal__copy { color: #f1f3f5; }
[data-theme="dark"] .header-tier-modal__divider { background: #59606b; }
@media (max-width: 575.98px) {
    .header-tier-modal__body { padding: 48px 42px 110px; }
    .header-tier-modal__copy { font-size: .98rem; }
}

/* صفحة مستوى العميل المستقلة */
.tier-page {
    width: min(100%, 520px);
    min-height: calc(100vh - 64px);
    margin: 0 auto;
    padding: 52px 42px 130px;
    color: #292929;
    font-family: 'Tajawal', sans-serif;
}
.tier-page__intro {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    direction: ltr;
}
.tier-page__intro h1 {
    flex: 1;
    margin: 0;
    color: #292929;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    text-align: right;
}
.tier-page__logo {
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 50%;
    background: #05002d;
    flex: 0 0 auto;
}
.tier-page__logo img { width: 100%; height: 100%; object-fit: contain; }
.tier-page__divider {
    height: 1px;
    margin: 24px 0 20px;
    background: #606060;
}
.tier-page__copy {
    margin: 0;
    color: #303030;
    font-size: 1.05rem;
    line-height: 2;
    text-align: right;
}
.tier-page__current { margin-top: 28px; text-align: right; }
.tier-page__tier-row {
    display: block;
    margin-top: 28px;
}
.tier-page__tier-row > .tier-page__current { margin-top: 0; }
.tier-page__current-name {
    display: block;
    margin-bottom: 10px;
    color: #a0a3ad;
    font-size: 1rem;
    font-weight: 700;
}
.tier-page__progress {
    height: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbeafe;
}
.tier-page__progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #2f73d9;
}
.tier-page__numbers {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: #777;
    font-size: .82rem;
}
.tier-page__numbers strong { color: #444; }
.tier-page__next {
    margin: 14px 0 0;
    color: #777;
    font-size: .84rem;
    line-height: 1.7;
    text-align: right;
}
.tier-page__levels {
    display: block;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e3e3e3;
}
.tier-page__levels h2 {
    margin: 0 0 14px;
    color: #333;
    font-size: 1.08rem;
    font-weight: 800;
    text-align: right;
}
.tier-page__level {
    width: 100%;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.tier-page__level .tier-page__current-name {
    margin-bottom: 0;
}
.tier-page__level .tier-page__level-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}
.tier-page__level .tier-page__level-icon {
    order: -1;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    font-size: 1.25rem;
}
.tier-page__level-image {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
}
.tier-page__level .tier-page__progress {
    height: 15px;
}
.tier-page__level .tier-page__numbers {
    margin-top: 9px;
}
.tier-page__level .tier-page__level-head,
.tier-page__level .tier-page__level-progress,
.tier-page__level .tier-page__level-rule {
    display: flex;
}
/*
 * لا تُستخدم بطاقة مختلفة للمستويات؛ كل مستوى يعيد نفس قالب الذهبي
 * (اسم رمادي، شريط بنفس الارتفاع، ثم أرقام التقدم).
 */
.tier-page__level.is-current {
    padding: 0;
    border: 1px solid #ececf2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 24, 40, .04);
}
.tier-page__level.is-current {
    border-color: #aaa8d1;
    background: #f6f5ff;
}
.tier-page__level-icon {
    width: 25px;
    text-align: center;
    font-size: 1.15rem;
}
.tier-page__level-head {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 27px;
}
.tier-page__level-name {
    color: #a0a3ad;
    font-size: 1rem;
    font-weight: 700;
}
.tier-page__level-rule {
    margin-top: 6px;
    color: #888;
    font-size: .75rem;
    text-align: left;
}
.tier-page__level b {
    padding: 3px 7px;
    border-radius: 999px;
    background: #aaa8d1;
    color: #fff;
    font-size: .65rem;
    white-space: nowrap;
}
.tier-page__level-percent {
    margin-inline-start: auto;
    color: #666;
    font-size: .72rem;
    direction: ltr;
}
.tier-page__level-progress {
    height: 15px;
    overflow: hidden;
    margin: 7px 0 0;
    border-radius: 999px;
    background: #b8b6dc;
}
.tier-page__level-progress span {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    transition: width .35s ease;
}
[data-theme="dark"] .tier-page { color: #f1f3f5; }
[data-theme="dark"] .tier-page__intro h1,
[data-theme="dark"] .tier-page__copy { color: #f1f3f5; }
[data-theme="dark"] .tier-page__divider { background: #59606b; }
[data-theme="dark"] .tier-page__levels { border-color: #39414c; }
[data-theme="dark"] .tier-page__levels h2,
[data-theme="dark"] .tier-page__level-name { color: #c4c8d1; }
[data-theme="dark"] .tier-page__level { border-color: #39414c; background: #20242b; box-shadow: none; }
[data-theme="dark"] .tier-page__tier-row > .tier-page__current {
    border-color: #39414c;
    background: #20242b;
    box-shadow: none;
}
[data-theme="dark"] .tier-page__level.is-current { background: #2b2a43; }
[data-theme="dark"] .tier-page__level-percent { color: #bbc2cd; }
[data-theme="dark"] .tier-page__level-progress { background: #3a3b50; }
@media (max-width: 575.98px) {
    .tier-page { padding: 48px 42px 120px; }
    .tier-page__copy { font-size: .98rem; }
}
[data-theme="dark"] .site-header__tier-menu {
    background: #181a1d;
    border-color: #363a40;
    color: #f1f3f5;
}
[data-theme="dark"] .site-header__tier-name { color: #f1f3f5; }

/* ── Plus button ── */
.site-header__plus {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    flex-shrink: 0;
    padding: 0;
    cursor: pointer;
    position: relative;
    top: -2px;
}
.site-header__plus:hover { opacity: .8; transform: scale(1.1); }
.site-header__plus-ico {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
}

/* ── Balance ── */
.site-header__balance {
    font-family: 'Tajawal', sans-serif;
    font-size: 12.6px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    letter-spacing: .01em;
    line-height: 1;
    padding: 0 2px;
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}

/* ── Guest Login Button ── */
.site-header__guest-login {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    flex-shrink: 0;
    padding: 0;
    cursor: pointer;
}
.site-header__guest-login:hover { opacity: .8; transform: scale(1.1); }

/* ── Hamburger ── */
.site-header__hamburger {
    background: transparent;
    border: none;
    width: 32px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background .2s;
    flex-shrink: 0;
    position: relative;
    top: -2px;
}
.site-header__hamburger svg {
    width: 24px;
    height: 24px;
    display: block;
}
.site-header__hamburger:hover {
    background: rgba(255,255,255,.15);
}

/* ── Responsive ── */
@media (max-width: 400px) {
    .site-header__inner    { padding: 0 4px; gap: 4px; }
    .site-header__logo     { width: 58px; height: 40px; }
    .site-header__brand--with-back { gap: 3px; }
    .site-header__back { width: 34px; height: 40px; flex-basis: 34px; }
    .site-header__back svg { width: 23px; height: 23px; }
    .site-header__balance  { font-size: 12.6px; }
    .site-header__actions  { gap: 4px; }
    .site-header__bell-img { width: 18.50px; height: 18.50px; }
    .site-header__avatar   { width: 36px; height: 36px; }
    .site-header__plus     { width: 14px; height: 14px; }
}

/* ============================================================
   SIDEBAR — قسم إضافة الرصيد وطرق الدفع
   ============================================================ */

.sb-balance-section {
    margin: 8px 0 4px;
    direction: rtl;
}

/* بطاقة الائتمان المصغّرة */
.sb-credit-card {
    width: 100%;
    background: linear-gradient(135deg, #6b3fa0 0%, #4a9dad 60%, #2ec4a7 100%);
    border-radius: 16px;
    padding: 18px 16px 14px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(74,157,173,.30);
}
.sb-credit-card::before,
.sb-credit-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .12;
    background: #fff;
}
.sb-credit-card::before { width: 140px; height: 140px; top: -50px; left: -30px; }
.sb-credit-card::after  { width: 100px; height: 100px; bottom: -35px; right: -20px; }

.sb-cc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.sb-cc-chip { width: 36px; height: 36px; opacity: .9; filter: brightness(1.4); }
.sb-cc-name { color: #fff; font-size: .92rem; font-weight: 700; text-align: right; }
.sb-cc-bottom { position: relative; z-index: 1; }
.sb-cc-label { color: rgba(255,255,255,.82); font-size: .82rem; display: block; text-align: right; }

/* عنوان طرق الدفع */
.sb-pay-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-muted, #888);
    margin: 0 2px 8px;
    text-align: center;
}

/* شبكة طرق الدفع */
.sb-pay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 6px;
}

.sb-pay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 4px 8px;
    background: var(--pc, #1a72e8);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    /* نفس أبعاد بلاطات المنتجات: خلية مربعة مهما تغيّر عرض القائمة */
    aspect-ratio: 1 / 1;
    min-height: 0;
}
.sb-pay-card:hover  { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.sb-pay-card:active { opacity: .8; transform: scale(.97); }

.sb-pay-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.sb-pay-name {
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: .67rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

/* ── Responsive: tighten on small screens ── */
@media (max-width: 400px) {
    .site-header__inner  { padding: 0 4px; gap: 4px; }
    .site-header__plus-ico { width: 14px; height: 14px; }
    .site-header__balance { font-size: 12.6px; }
}

/* ── Legacy header classes (unused but kept for compat) ── */
.header-row   { gap: 0; padding: 0 6px; min-height: 52px; }
.header-item  { padding: 0 3px; }
.logo-link    { display: inline-flex; align-items: center; padding: 0 !important; text-decoration: none; }
.logo-img     { height: 40px; width: auto; display: block; object-fit: contain; }
.menu-btn     { background: transparent; border: none; color: #fff; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; padding: 0; text-decoration: none; flex-shrink: 0; }
.menu-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.account-btn  { color: #fff; }
.account-btn:hover { color: #fff; }
.v-btn__content { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.v-icon { display: inline-flex; align-items: center; justify-content: center; }
.v-icon__svg { width: 22px; height: 22px; fill: currentColor; display: block; }

/* ============================================================
   SIDEBAR — LOGIN CARD
   ============================================================ */
.login-card {
    background: linear-gradient(135deg, #082C49 0%, #0a3d68 100%);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 4px 0 6px;
}
.login-card .login-card__title h3 {
    color: #fff;
    font-size: 0.93rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.login-card .login-card__text p {
    color: rgba(255,255,255,.75);
    font-size: 0.77rem;
    margin-bottom: 0;
    line-height: 1.4;
}
.login-card__actions { padding-top: 6px; }

.login-btn {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 14px !important;
    transition: all .25s;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.login-primary-btn {
    background: #005685 !important;
    border-color:  #005685 !important;
    color: #fff !important;
}
.login-primary-btn:hover {
    background: #004570 !important;
    border-color:  #004570 !important;
}
.google-btn {
    background: rgba(255,255,255,.10) !important;
    border: 1px solid rgba(255,255,255,.30) !important;
    color: #fff !important;
}
.google-btn:hover {
    background: rgba(255,255,255,.22) !important;
}
.google-icon-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.google-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}
.google-text { font-size: 0.82rem; }

/* ============================================================
   SIDEBAR — USER CARD (NEW DESIGN)
   ============================================================ */

/* ── بطاقة الضيف ── */
.sb-guest {
    background: #0f2647;
    border-radius: 24px;
    margin: 6px 0 16px;
    padding: 22px 18px 30px;
    box-shadow: 0 6px 24px rgba(0,0,0,.28);
    direction: rtl;
    text-align: right;
}
.sb-guest + .sb-hr {
    margin: 20px -8px 4%;
}
.sb-guest__title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}
.sb-guest__hint {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(255,255,255,.70);
    margin-bottom: 14px;
    line-height: 1.5;
}
.sb-login-btn {
    display: block;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    height: 40px;
    padding: 0 14px;
    line-height: 40px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    margin-bottom: 8px;
    transition: background .2s, transform .15s;
    box-shadow: 0 3px 14px rgba(40,167,69,.35);
}
.sb-login-btn:hover  { background: #218838; color: #fff; transform: translateY(-1px); }
.sb-login-btn:active { transform: translateY(0); }
.sb-register-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    height: 40px;
    padding: 0 14px;
    line-height: 1;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    transition: background .2s, transform .15s;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.sb-register-btn:hover { background: #f1f1f1; color: #111; transform: translateY(-1px); }

/* ── بطاقة المستخدم الموقع ── */
.sb-user-card {
    padding: 12px 10px 14px;
    direction: rtl;
}

.sb-avatar,
.sb-user-info {
    position: relative;
    top: 0;
    transform: translateY(-12px);
}
#sidebar > .sb-user-card + .sb-hr,
#sidebar > .sb-guest + .sb-hr {
    margin-top: 12px;
}

/* الأفاتار */
.sb-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-bottom: 10px;
    overflow: hidden;
}
.sb-avatar--user {
    background: #fff;
    color: #fff;
    border: 2px solid #e5e5e5;
    box-shadow: 0 3px 10px rgba(0,0,0,.20);
}
.sb-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sb-default-avatar {
    display: block;
    width: 96%;
    height: 96%;
    object-fit: cover;
}

/* اسم + VIP + ID */
.sb-user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-bottom: 8px;
    direction: rtl;
}
.sb-user-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    order: 2;
}
.sb-verified-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    object-fit: contain;
    vertical-align: middle;
}
.sb-user-id {
    font-size: 0.8rem;
    color: rgba(255,255,255,.55);
}
.sb-user-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    order: 1;
}
.sb-user-tier {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #4b5563;
    background: #e5e7eb;
    white-space: nowrap;
    order: 3;
}
.sb-info-icon {
    color: #78909c;
    display: inline-flex;
    align-items: center;
    transition: color .2s;
    text-decoration: none;
}
.sb-info-icon:hover { color: #3f6878; }

/* الرصيد */
.sb-balance {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--c-balance-alt, #e05c2a);
    margin-bottom: 8px;
    position: relative;
    top: 3px;
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
[data-currency-base] {
    direction: ltr;
    unicode-bidi: isolate;
}
[data-theme="dark"] .sb-balance {
    color: #fff;
}

/* أزرار العلم */
.sb-flags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}
.sb-flag-btn {
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 30px;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.sb-flag-btn:hover {
    background: rgba(255,255,255,.22);
    transform: scale(1.08);
}

/* أيقونات الإجراءات */
.sb-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-bottom: 6px;
    padding: 0;
    transform: translateY(15%);
}
.sb-action-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}
.sb-action-btn:hover {
    background: transparent;
}
/* جميع الأيقونات نفس الحجم الثابت */
.sb-action-ico {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    display: block;
    /* وضع فاتح افتراضي: أيقونات سوداء */
    filter: brightness(0);
    opacity: .85;
    transition: opacity .2s;
}
/* وضع داكن: أيقونات بيضاء */
[data-theme="dark"] .sb-action-ico {
    filter: brightness(0) invert(1);
    opacity: .9;
}
.sb-action-btn:hover .sb-action-ico {
    opacity: 1;
}
/* أيقونة القلب تحتفظ بلونها الأحمر في كلا الوضعين */
.sb-action-btn--heart .sb-action-ico {
    filter: none !important;
    opacity: 1;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
}
.sb-action-btn--heart {
    color: #e53935;
}
.sb-action-btn--profile .sb-action-ico {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
}
.sb-action-btn--logout .sb-action-ico {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
}

/* pill العملة الثانوية */
.sb-currency-picker {
    position: relative;
    top: var(--sidebar-lower-shift);
    display: flex;
    justify-content: center;
    z-index: 3;
    width: 100%;
    margin-bottom: 0;
    padding: 0;
    box-sizing: border-box;
    transform: translateY(12px);
}
.sb-currency-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 200px;
    max-width: calc(100% - 54px);
    border: 1px solid #e3c84d;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #8a6500;
    background: #ffffad;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.35;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(115, 87, 0, .22);
    transition: background .2s, box-shadow .2s, transform .2s;
}
.sb-currency-pill:hover {
    background: #ffffad;
    box-shadow: 0 3px 9px rgba(115, 87, 0, .28);
}
.sb-currency-pill:focus-visible {
    outline: 2px solid #e3c84d;
    outline-offset: 2px;
}
.sb-currency-picker.is-open .sb-currency-pill {
    background: #ffffad;
}
.sb-currency-icon {
    flex-shrink: 0;
    fill: #8a6500;
    position: relative;
    right: -3px;
    transition: transform .1568s ease;
}
.sb-currency-pill:active .sb-currency-icon,
.sb-currency-picker.is-open .sb-currency-icon {
    transform: rotate(90deg);
}
.sb-currency-pill strong { font-weight: 800; }
.sb-currency-separator { opacity: .85; }
.sb-currency-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 50%;
    transform: translateX(50%);
    width: 100%;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(0,0,0,.14);
    z-index: 1200;
    text-align: right;
}
.sb-currency-menu-title {
    display: none;
}
.sb-currency-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #c8f0df;
    border-radius: 999px;
    padding: 6px 16px;
    margin: 4px 0;
    background: #eafff5;
    color: #145c4f;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    line-height: 1.3;
    transition: background .18s, border-color .18s, transform .18s;
}
.sb-currency-option:hover,
.sb-currency-option[aria-pressed="true"] {
    background: #d2f8e7;
    border-color: #9fe4c6;
    transform: translateY(-1px);
}
.sb-currency-option-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}
.sb-currency-option-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 800;
}
.sb-currency-option-meta {
    flex-shrink: 0;
    color: #145c4f;
    font-size: .82rem;
    font-weight: 700;
}
.sb-currency-option-meta::before {
    content: '- ';
}
.sb-currency-option-check {
    display: none;
}
[data-theme="dark"] .sb-currency-menu {
    background: #18211f;
    border-color: #2c443d;
}
[data-theme="dark"] .sb-currency-option {
    background: #173d32;
    border-color: #2f8068;
    color: #c9f8e3;
}
[data-theme="dark"] .sb-currency-option:hover,
[data-theme="dark"] .sb-currency-option[aria-pressed="true"] {
    background: #205846;
    border-color: #55b991;
}
[data-theme="dark"] .sb-currency-option-meta {
    color: #c9f8e3;
}

/* ============================================================
   SIDEBAR — SEPARATOR
   ============================================================ */
.sb-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px -8px;
    opacity: .5;
    position: relative;
    top: calc(-1% + var(--sidebar-lower-shift));
    z-index: 1;
}
.sb-currency-picker + .sb-hr {
    display: block;
    position: relative;
    z-index: 1;
    margin: -10px -8px 6px;
}
#sidebar > .sb-user-card + script + .sb-hr {
    display: block;
    position: relative;
    z-index: 1;
    margin: -10px -8px 6px;
}
.sb-nav + .sb-hr {
    margin: 16px -8px 8px;
    top: calc(-1% + var(--sidebar-lower-shift) + 3vh);
}

/* ============================================================
   SIDEBAR — NAVIGATION
   ============================================================ */
.sb-nav { list-style: none; padding: 6% 0 0; margin: 0; position: relative; top: 1.8%; transform: translateY(1vh); }
.sb-nav { margin-top: 0 !important; }
#sidebar > .sb-guest ~ .sb-nav .sb-nav-item--home,
#sidebar > .sb-guest ~ .sb-nav .sb-nav-item--about {
    position: relative;
    top: -3vh;
}
.sb-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    border-radius: var(--radius-sm);
    color: #082c49 !important;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.89rem;
    font-weight: 800;
    transition: var(--transition);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.sb-nav .nav-link:hover,
.sb-nav .nav-link:active,
.sb-nav .nav-link:focus-visible,
.sb-nav .nav-link.active {
    background: #f5f5f5;
    color: #082c49 !important;
}
.sb-nav .nav-link.active {
    background: #f1f1f1;
    border-radius: 10px;
}

[data-theme="dark"] .sb-nav .nav-link,
[data-bs-theme="dark"] .sb-nav .nav-link,
[data-theme="dark"] .sb-nav .nav-link:hover,
[data-bs-theme="dark"] .sb-nav .nav-link:hover,
[data-theme="dark"] .sb-nav .nav-link:focus-visible,
[data-bs-theme="dark"] .sb-nav .nav-link:focus-visible,
[data-theme="dark"] .sb-nav .nav-link.active,
[data-bs-theme="dark"] .sb-nav .nav-link.active {
    color: #fff !important;
}
[data-theme="dark"] .sb-nav .nav-link:hover,
[data-bs-theme="dark"] .sb-nav .nav-link:hover,
[data-theme="dark"] .sb-nav .nav-link:active,
[data-bs-theme="dark"] .sb-nav .nav-link:active,
[data-theme="dark"] .sb-nav .nav-link:focus-visible,
[data-bs-theme="dark"] .sb-nav .nav-link:focus-visible,
[data-theme="dark"] .sb-nav .nav-link.active,
[data-bs-theme="dark"] .sb-nav .nav-link.active {
    background: #33333373;
}
[data-theme="dark"] .sb-nav .nav-link.active,
[data-bs-theme="dark"] .sb-nav .nav-link.active {
    background: #3d3d3d;
}

.sb-ico {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    background: transparent;
}
.sb-support-ico img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}
.sb-ico__svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    display: block;
}
.sb-nav .nav-item:first-child .sb-ico__svg {
    width: 16px;
    height: 16px;
}
.sb-custom-ico {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}
.sb-wallet-icon {
    filter: none;
}
.sb-custom-ico--small {
    width: 14px;
    height: 14px;
}
.sb-nav .sb-balance-ico,
.sb-nav .sb-api-ico {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
}
.sb-payment-ico {
    width: 16px;
    height: 16px;
}

/* ============================================================
   SIDEBAR — THEME TOGGLE
   ============================================================ */
.theme-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 4px 8px;
    direction: rtl;
    position: relative;
    top: 4%;
}
.theme-switch {
    width: 63px;
    height: 31.155px;
    background: transparent;
    border: none;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    outline: none;
    overflow: hidden;
    box-sizing: border-box;
}
.theme-switch:focus { outline: none; box-shadow: none; }
.theme-switch__track {
    display: block;
    width: 100%;
    height: 100%;
    background: #fafafa;
    border: 1px solid rgba(180, 186, 193, .42);
    border-radius: 999px;
    transition: all .3s;
}
[data-theme="dark"] .theme-switch__track {
    background: #282c31;
    border-color: rgba(130, 139, 150, .38);
}
.theme-switch[aria-pressed="true"] .theme-switch__track {
    background: #282c31;
    border-color: rgba(130, 139, 150, .38);
}
.theme-switch__knob {
    position: absolute;
    top: 1px;
    right: 2px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .88rem;
    line-height: 1;
    color: #475569;
    transform: translateX(0);
    transition: transform .3s ease, color .3s, background .3s, box-shadow .3s;
    pointer-events: none;
}
.theme-switch[aria-pressed="false"] .theme-switch__knob {
    width: 29px;
    height: 29px;
    top: 1px;
}
.theme-switch__knob i {
    display: block;
    font-size: .88rem;
    line-height: 1;
    transform: translateY(-1px);
}
.theme-switch__knob .theme-icon {
    display: block;
    font-size: 1.027rem;
    line-height: 1;
    color: #000;
    transform: translateY(-1px);
}
[data-theme="dark"] .theme-switch__knob .theme-icon {
    color: #fff;
}
.theme-switch[aria-pressed="true"] .theme-switch__knob {
    right: 2px;
    left: auto;
    transform: translateX(-31px);
    color: #475569;
    background: #303338;
}
#themeLabel {
    font-size: 0.92rem;
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    white-space: nowrap;
}

/* ============================================================
   SIDEBAR — WHATSAPP SOCIAL LINKS
   ============================================================ */
.sidebar-social {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 2px 8px;
}
.sidebar-social-link {
    width: 38px;
    height: 38px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all .25s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,211,102,.3);
}
.sidebar-social-link:hover {
    background: #1da851;
    color: #fff;
    transform: scale(1.1);
}

/* ============================================================
   SIDEBAR — NOVEX BRANDING
   ============================================================ */
.novex-logo {
    display: block;
    max-width: 100%;
    margin-inline: auto;
    object-fit: contain;
    transform: translateY(calc(-6% - 4px));
}
[data-theme="dark"] .novex-logo {
    filter: invert(1);
}

/* ============================================================
   DEMO BANNER (index.php)
   ============================================================ */
.demo-banner {
    background: #fff3cd;
    border: 2px dashed var(--secondary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
[data-theme="dark"] .demo-banner {
    background: rgba(220,53,69,.10);
}
.demo-banner .text   { color: var(--text); font-size: 0.9rem; }
.demo-banner .btns   { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
    width: 100%;
    background: var(--primary);
    border-radius: var(--radius);
    /* إبعاد الإعلان قليلاً عن الشريط المتحرك ومنع تلاصقهما */
    margin: 16px 10px 18px;
    overflow: hidden;
    position: relative;
}
.hero-slide {
    background: linear-gradient(135deg, #082C49 0%, #0a3d68 50%, #082C49 100%);
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    opacity: .6;
}
.hero-slide-content {
    position: relative;
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 20px;
}
.hero-logo svg       { color: rgba(255,255,255,.9); filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.hero-slide-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0 5px;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.hero-slide-content p {
    font-size: 1rem;
    opacity: .85;
    margin: 0;
}
.swiper-pagination-bullet        { background: rgba(255,255,255,.5) !important; }
.swiper-pagination-bullet-active { background: #fff !important; }

/* ============================================================
   MARQUEE / TICKER
   ============================================================ */
.marquee-wrap {
    background: #f1f1f1;
    border-radius: var(--radius-sm);
    margin: 0 10px 5px;
    padding: 10px 16px;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-inner {
    display: inline-block;
    animation: marquee 16s linear infinite;
    /* مطابق للصورة المرجعية: نص واضح بحجم أكبر ولون رمادي داكن */
    font-size: 1.1rem;
    color: #212528;
    font-weight: 400;
}
[data-theme="dark"] .marquee-wrap {
    background: var(--bg-secondary);
}
[data-theme="dark"] .marquee-inner {
    color: #ffffff;
}
@keyframes marquee {
    from { transform: translateX(100%); }
    to   { transform: translateX(calc(-100% - 100vw)); }
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrap { margin: 16px 10px 44px; }
.search-form { position: relative; }
.search-input {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    background: #f0f0f2;
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    font-size: .95rem;
    outline: none;
    transition: background .2s;
    direction: rtl;
    box-shadow: none;
}
/* ارتفاع أخف لشريط البحث في الواجهة الرئيسية */
.search-wrap .search-input {
    padding-top: 11px;
    padding-bottom: 11px;
}
.search-input::placeholder {
    color: #b0b3bb;
}
.search-input:focus {
    background: #e8e8eb;
    box-shadow: none;
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    padding: 12px 10px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, var(--primary), transparent);
    border-radius: 2px;
}

/* ============================================================
   CATEGORIES — Bootstrap col grid (matches demo)
   ============================================================ */
.categories-wrap { padding: 0 8px; }

/* Main categories use the same balanced grid as subcategories. */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 42px;
    padding: 0 15px 16px;
}

/* Card base for category tiles */
.category-box {
    height: auto;
    width: 30%;
    flex: 0 0 30%;
}

.category-box a.card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: .5rem;
    overflow: hidden;
    transition: transform .3s;
    height: 100%;
    background: 0 0 !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
}
.category-box a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover) !important; }

/* Category image card — self-contained block, no Bootstrap card dependency */
.category-box .category-image-card {
    display: block;
    width: 100%;
    margin-inline: auto; /* توسيط بعد التصغير */
    aspect-ratio: 1 / 1;
    border-radius: .6rem .6rem 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    transition: transform .25s, box-shadow .25s;
}
.category-box .category-image-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.category-box .category-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Category name — a standalone label, close to its image box but with a
   deliberate gap and no shared border/background between them */
.category-name-label {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-category-alt, var(--text));
    text-decoration: none;
    line-height: 1.3;
    white-space: normal;
}

/* Titles */
.category-box .card-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-category-alt, var(--accent));
    white-space: normal;
    line-height: 1.3;
}
.btn-wishlist {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    flex-shrink: 0;
}
.btn-wishlist:hover { color: var(--secondary); border-color: var(--secondary); }
.btn-wishlist.is-favorite,
.btn-wishlist.is-favorite:hover,
.modal-favorite-btn.is-favorite,
.modal-favorite-btn.is-favorite:hover {
    color: #e53935;
    border-color: #f0a4a4;
    background: #fff3f3;
}
.modal-product-title-wrap {
    min-width: 0;
    max-width: 260px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    direction: ltr;
}
#modalProductName {
    min-width: 0;
    max-width: 220px;
    font-size: 1.05rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    direction: rtl;
    text-align: right;
}
.modal-favorite-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #a7a7a7;
    cursor: pointer;
    font-size: 1.85rem;
    line-height: 1;
    transition: color .18s, opacity .18s, transform .18s;
}
.modal-favorite-btn i {
    display: block;
    font-size: 2.1rem !important;
    line-height: 1;
    transform: none;
    transform-origin: center;
}
.modal-favorite-btn:hover {
    color: #8f8f8f;
    opacity: .88;
    transform: scale(1.04);
}
.modal-favorite-btn.is-favorite,
.modal-favorite-btn.is-favorite:hover {
    border: 0;
    background: transparent;
    color: #e53935;
}
#modalFavoriteBtn.modal-favorite-btn {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}
#modalFavoriteBtn.modal-favorite-btn > i {
    font-size: 1.25rem !important;
}
.modal-favorite-btn:disabled {
    opacity: .65;
    cursor: wait;
}
/* ============================================================
   RIBBON — غير متاح (Unavailable Product)
   أضف <span class="ribbon-unavailable"></span> داخل div/a الصورة
   ============================================================ */

/* تأكد من أن حاوية الصورة تقطع الشريط */
.cat-prod-img-wrap {
    overflow: hidden;
}

/* حاوية الشريط — زاوية أعلى اليمين */
.ribbon-unavailable {
    position: absolute;
    top: 0;
    right: 0;
    width: 84px;
    height: 84px;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}

/* النص القطري */
.ribbon-unavailable::after {
    content: 'غير متوفر';
    position: absolute;
    top: 19px;
    right: -22px;
    width: 96px;
    background: #e01e8c;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.60rem;
    font-weight: 800;
    text-align: center;
    padding: 4px 0;
    transform: rotate(45deg);
    line-height: 1.5;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0,0,0,.30);
}

/* Branded fallback for products and categories without a usable image. */
.no-img-name {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-placeholder {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100%;
    min-height: 108px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    padding: .55rem .4rem;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 78%, rgba(212, 174, 67, .18) 0 12%, rgba(212, 174, 67, .06) 29%, transparent 52%),
        linear-gradient(165deg, #24233a 0%, #171927 58%, #0d101b 100%);
}
.catalog-placeholder::before,
.catalog-placeholder::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    border-radius: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}
.catalog-placeholder::before {
    bottom: 8%;
    width: 74%;
    height: 23%;
    background: rgba(229, 193, 91, .12);
    filter: blur(14px);
}
.catalog-placeholder::after {
    bottom: 11%;
    width: 52%;
    height: 10%;
    border: 1px solid rgba(235, 204, 115, .16);
    box-shadow: 0 0 16px rgba(218, 176, 65, .12);
}
.catalog-placeholder__glow {
    position: absolute;
    z-index: -1;
    inset: -25% 9% auto;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, .06), transparent 65%);
    filter: blur(12px);
}
.catalog-placeholder__badge {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1;
    text-transform: uppercase;
    color: #e0c574;
}
.catalog-placeholder__name {
    max-width: 92%;
    font-size: clamp(.9rem, 2.8vw, 1.15rem);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
    overflow-wrap: anywhere;
}
.catalog-placeholder__line {
    width: 28%;
    height: 2px;
    margin-top: .15rem;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #d8b85d, transparent);
}

/* Legacy aliases — keep existing pages working */
.price-current { font-size: 1rem; font-weight: 700; color: var(--c-price-alt, var(--primary)); }
.price-old     { font-size: .8rem; color: var(--text-muted); text-decoration: line-through; }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-detail-wrap    { padding: 20px 10px; }
.product-gallery        { border-radius: var(--radius); overflow: hidden; }
.product-gallery .main-img {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
}
.product-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery .main-img .catalog-placeholder { min-height: 300px; }
.product-info-wrap      { padding: 0 10px; }
.product-title          { font-size: 1.5rem; font-weight: 700; color: var(--c-product-alt, var(--text)); }
.product-price-wrap     { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.product-price-current  { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.product-price-old      { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }
.product-desc           { color: var(--text-muted); line-height: 1.8; }
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    background: var(--bg-secondary);
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    color: var(--text);
}
.qty-btn:hover    { background: var(--primary); color: #fff; }
.qty-input {
    width: 50px;
    height: 36px;
    border: none;
    border-right: 1px solid var(--border);
    border-left:  1px solid var(--border);
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
}

/* ============================================================
   CART
   ============================================================ */
.cart-wrap { padding: 20px 10px; }
.cart-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.cart-item:hover            { box-shadow: var(--shadow); }
.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-secondary);
    flex-shrink: 0;
    overflow: hidden;
}
.cart-item-info     { flex: 1; min-width: 0; }
.cart-item-name     { font-weight: 600; margin-bottom: 4px; }
.cart-item-price    { color: var(--primary); font-weight: 700; }
.cart-item-remove   {
    color: var(--secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    transition: var(--transition);
}
.cart-item-remove:hover { color: #a71d2a; }
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 80px;
}

/* ============================================================
   FORMS / AUTH
   ============================================================ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary);
}
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    text-align: center;
}
.auth-logo          { margin-bottom: 20px; }
.auth-logo svg      { color: var(--primary); }
.auth-title         { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }

.demo-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .85rem;
    margin-bottom: 16px;
    color: #856404;
}
[data-theme="dark"] .demo-notice {
    background: rgba(255,193,7,.1);
    color: #ffc107;
    border-color: rgba(255,193,7,.3);
}

.form-control-custom {
    width: 85%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    font-size: .95rem;
    outline: none;
    transition: var(--transition);
    direction: rtl;
    text-align: right;
}
.form-control-custom:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,86,133,.12);
}
textarea.form-control-custom { resize: vertical; min-height: 80px; }

.required-field-wrap {
    position: relative;
}
.required-field-wrap .form-control-custom {
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    padding: 25px 22px 5px;
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    font-size: 20px;
    font-weight: 700;
    transition: border-color .16s ease, box-shadow .16s ease;
    direction: ltr;
}
.required-field-wrap .form-control-custom:focus {
    border-color: #2b8eea;
    box-shadow: 0 0 0 4px rgba(43, 142, 234, .16);
}
.required-field-label {
    position: absolute;
    top: 50%;
    right: 22px;
    z-index: 1;
    color: #c1c4c9;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: right center;
    transition: transform .18s ease, top .18s ease, color .18s ease;
}
.required-field-wrap:focus-within .required-field-label,
.required-field-wrap:has(.form-control-custom:not(:placeholder-shown)) .required-field-label {
    top: 8px;
    color: #70757d;
    transform: translateY(0) scale(.84);
}

.form-label-custom {
    display: block;
    text-align: right;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}
.input-wrap    { position: relative; margin-bottom: 14px; }
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.input-icon:hover { color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm) !important;
    transition: var(--transition);
    color: #fff !important;
}
.btn-primary:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}
.btn-secondary-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 8px 20px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-secondary-outline:hover { background: var(--primary); color: #fff; }
.btn-danger-custom {
    background: var(--secondary);
    border: none;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 8px 20px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-danger-custom:hover { background: #c82333; }
.btn-demo {
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: .85rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}
.btn-demo:hover { background: #c82333; color: #fff; }
.btn-admin {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: .85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-admin:hover { background: var(--primary-light); color: #fff; }
.btn-whatsapp {
    background: #25D366;
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}
.btn-whatsapp:hover { background: #20b858; color: #fff !important; }

/* ============================================================
   SIMPLE FLOATING BUTTONS (whatsapp + chat)
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(37,211,102,.4);
    transition: var(--transition);
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); background: #20b858; color: #fff; }

.chat-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}
.chat-float:hover { background: var(--primary-light); transform: scale(1.1); }

/* ============================================================
   FAB WHEEL (footer.php)
   HTML: input.fab-checkbox → label.fab → div.fab-wheel
   ============================================================ */
.fab-wrapper {
    position: fixed;
    bottom: 22px;
    /* تحريك زر التواصل العائم نحو اليمين بنسبة 1%. */
    left: 1%;
    z-index: 998;
}
.fab-checkbox { display: none; }

.fab {
    position: relative;
    width: 65px;
    height: 65px;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: none;
    transition: all .3s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.fab:hover { background: transparent; transform: none; }

.fab-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    transition: opacity .2s ease;
}
.fab-icon-open {
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fab-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.fab-icon-close {
    z-index: 1;
    opacity: 0;
}
.fab-checkbox:checked + .fab .fab-icon-open {
    opacity: 0;
}
.fab-checkbox:checked + .fab .fab-icon-close {
    opacity: 1;
}

.fab-wheel {
    position: absolute;
    bottom: 75px;
    left: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: scale(.8) translateY(12px);
    transform-origin: bottom center;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.fab-checkbox:checked ~ .fab-wheel {
    opacity: 1;
    pointer-events: all;
    transform: scale(1) translateY(0);
}

.fab-action {
    position: relative;
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(8, 44, 73, .28);
    transition: all .25s;
}
.fab-action:hover { background: var(--primary-light); color: #fff; transform: scale(1.1); }
.fab-action-telegram,
.fab-action-instagram { background: var(--primary); box-shadow: 0 3px 10px rgba(8, 44, 73, .28); }
.fab-action-telegram:hover,
.fab-action-instagram:hover { background: var(--primary-light); }

.fab-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    background: var(--secondary);
    color: #fff;
    border-radius: 9px;
    font-size: .62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg);
}

/* ============================================================
   TOAST CONTAINER (created by JS)
   ============================================================ */
#toastContainer {
    position: fixed;
    bottom: 84px;
    left: 16px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
    pointer-events: none;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    border-radius: var(--radius);
    margin: 10px;
}
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}
.about-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.about-icon       { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; }

/* ============================================================
   ORDERS / PROFILE
   ============================================================ */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.order-card:hover   { box-shadow: var(--shadow); }
.order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}
.status-pending     { background: #fff3cd; color: #856404; }
.status-processing  { background: #cff4fc; color: #055160; }
.status-shipped     { background: #d1ecf1; color: #0c5460; }
.status-delivered   { background: #d4edda; color: #155724; }
.status-cancelled   { background: #f8d7da; color: #721c24; }

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

/* ============================================================
   ADMIN (inline styles in admin PHP files take priority)
   ============================================================ */
.admin-layout      { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 280px;
    background: var(--primary);
    color: #fff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-main        { flex: 1; background: var(--bg-secondary); }
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    transition: var(--transition);
    font-size: .9rem;
}
.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}
.admin-stat-card   {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
}
.admin-stat-num    { font-size: 2rem; font-weight: 700; color: var(--primary); }
.admin-stat-label  { color: var(--text-muted); font-size: .9rem; }
.admin-table       { background: var(--bg-card); border-radius: var(--radius-sm); overflow: hidden; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
    background: var(--bg-card);
    color: var(--text);
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-hover);
}
.modal-header  { border-bottom: 1px solid var(--border); }
.modal-footer  { border-top:    1px solid var(--border); }
.popup-link    { color: var(--accent); font-weight: 600; text-decoration: underline; font-size: .95rem; }
.popup-link:hover { color: var(--primary); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { font-family: 'Tajawal', sans-serif; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-wrap  { padding: 8px 10px; font-size: .85rem; }
.breadcrumb-item a           { color: var(--accent); }
.breadcrumb-item.active      { color: var(--text-muted); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state         { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i       { font-size: 4rem; margin-bottom: 16px; opacity: .4; display: block; }
.empty-state h4      { font-size: 1.1rem; margin-bottom: 8px; }

/* ============================================================
   PAGE FOOTER
   ============================================================ */
.page-footer {
    background: var(--primary);
    color: rgba(255,255,255,.8);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: .85rem;
}
.page-footer a { color: rgba(255,255,255,.9); }
[data-theme="dark"] .page-footer {
    background: #090909;
    color: #a8b6c8;
    border-top: 1px solid #263a52;
}
[data-theme="dark"] .page-footer a { color: #a8b6c8; }

/* ============================================================
   NO IMAGE PLACEHOLDER
   ============================================================ */
.no-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    min-height: 150px;
}
.no-img-placeholder svg { color: rgba(255,255,255,.7); width: 60%; max-width: 100px; }

/* Product tiles shared by category, search, and related-product listings. */
.cat-products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 30px;
    padding: 0 15px 16px;
}
.cat-prod-box {
    width: 30%;
    padding: 0;
    box-sizing: border-box;
}
.cat-prod-img-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: .6rem .6rem 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--primary);
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
    position: relative;
}
.cat-prod-img-wrap:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.cat-prod-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cat-prod-img-wrap .catalog-placeholder-fallback,
.cat-prod-img-wrap .catalog-placeholder {
    width: 100%;
    height: 100%;
}
.cat-prod-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-product-alt, var(--text));
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
}
.cat-prod-price {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-price-alt, var(--accent));
    margin-top: 2px;
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 576px) {
    .hero-slide           { height: 143px; }
    .hero-slider          { margin: 16px 60px 18px; width: auto; }
    .hero-slide-content h2 { font-size: 1.3rem; }
    .auth-card            { padding: 24px 16px; }
    .categories-grid      { column-gap: 0; row-gap: 42px; }
}
@media (max-width: 400px) {
    .hero-slider    { margin: 12px 56px 18px; width: auto; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .4s ease; }

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.slide-in { animation: slideInRight .4s ease; }

/* ============================================================
   DARK MODE FIXES
   ============================================================ */
[data-theme="dark"] .form-control-custom {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .search-input {
    /* لون قريب من شريط البحث في TON STORE وليس رمادياً فاتحاً */
    background: #181a1b !important;
    color: var(--text);
    border: none !important;
    box-shadow: none;
}
[data-theme="dark"] .search-input::placeholder {
    color: #555d6b;
}
[data-theme="dark"] .search-input:focus {
    background: #181a1b !important;
    border: none !important;
    box-shadow: none;
}

/* نافذة الشراء في الوضع الداكن — ألوان قريبة من المرجع مع اعتماد لون الموقع */
[data-theme="dark"] #orderModal .modal-content:not(.order-result-active) {
    background: #101010 !important;
    color: #f2f2f2 !important;
    border: 1px solid #3b3b3b !important;
}
[data-theme="dark"] #orderModal #modalProductName,
[data-theme="dark"] #orderModal .modal-body,
[data-theme="dark"] #orderModal .modal-product-title-wrap {
    color: #f2f2f2 !important;
}
[data-theme="dark"] #orderModal .floating-control,
[data-theme="dark"] #orderModal .quick-required-control {
    background: #202328 !important;
    color: #f2f2f2 !important;
    border-color: #3d424a !important;
}
[data-theme="dark"] #orderModal .floating-label,
[data-theme="dark"] #orderModal .quick-required-label,
[data-theme="dark"] #orderModal #modalProductDesc,
[data-theme="dark"] #orderModal .order-processing-status {
    color: #c5c8ce !important;
}
[data-theme="dark"] #orderModal .floating-control:focus,
[data-theme="dark"] #orderModal .quick-required-control:focus {
    border-color: #376fca !important;
    box-shadow: 0 0 0 .2rem rgba(55,111,202,.28) !important;
}
[data-theme="dark"] #orderModal #submitOrder {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
[data-theme="dark"] #orderModal #submitOrder:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}
[data-theme="dark"] #orderModal .order-cancel-btn {
    background: transparent !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}
[data-theme="dark"] #orderModal .order-cancel-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .modal-content { background: var(--bg-card); }
[data-theme="dark"] table          { color: var(--text); }
[data-theme="dark"] .table         { --bs-table-bg: var(--bg-card); color: var(--text); }
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-accent-bg: rgba(255,255,255,.03);
}
[data-theme="dark"] .btn-outline-secondary {
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .btn-outline-secondary:hover {
    background: var(--bg-secondary);
}
[data-theme="dark"] .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}
[data-theme="dark"] .demo-banner {
    background: rgba(220,53,69,.10);
}
[data-theme="dark"] .cart-summary { background: var(--bg-card); }
[data-theme="dark"] .auth-card    { background: var(--bg-card); }
[data-theme="dark"] .about-card   { background: var(--bg-card); }
[data-theme="dark"] .profile-card { background: var(--bg-card); }
[data-theme="dark"] .qty-input    { background: var(--bg); color: var(--text); }
[data-theme="dark"] .bg-dark1     { background: var(--navbar-bg) !important; }
[data-theme="dark"] .loader-logo  { filter: brightness(.85); }

/* أسماء المنتجات والأقسام تبقى واضحة فوق الخلفية الداكنة حتى مع
   وجود ألوان مخصصة محفوظة من إعدادات القالب. */
[data-theme="dark"] .category-name-label,
[data-theme="dark"] .category-box .card-title,
[data-theme="dark"] .cat-header-title,
[data-theme="dark"] .sub-cat-name,
[data-theme="dark"] .cat-prod-name,
[data-theme="dark"] .product-title,
[data-theme="dark"] .favorite-product-name,
[data-theme="dark"] .favorite-product-category {
    color: #f2f2f2 !important;
}

/* ============================================================
   LIGHT PAGE SURFACE
   Keep the page canvas white like Zein Store while preserving
   white cards, inputs, and the bottom navigation.
   ============================================================ */
html[data-theme="light"] body,
html[data-theme="light"] #mainContent {
    background-color: #ffffff !important;
}
html[data-theme="light"] .bg-body,
html[data-theme="light"] .bg-light {
    background-color: #ffffff !important;
}

/* ============================================================
   QUICK ORDER MODAL
   ============================================================ */
.bg-darks { background-color: var(--primary) !important; }
.floating-group { position: relative; }
.floating-group:has(#counterQtySelect:not(.d-none)) { z-index: 20; }
#counterQtySelect {
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: none !important;
}
.counter-qty-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: none;
    z-index: 30;
    border-radius: 0 0 18px 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}
.counter-qty-dropdown::-webkit-scrollbar { width: 0; height: 0; display: none; }
.counter-qty-dropdown.is-open { display: block; }
.counter-qty-scrollbar {
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    left: 6px;
    width: 6px;
    height: 204px;
    padding: 0;
    z-index: 31;
    pointer-events: none;
}
.counter-qty-scrollbar.is-visible { display: block; }
.counter-qty-scrollbar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(184, 188, 195, .12);
}
.counter-qty-scrollbar > span {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    min-height: 28px;
    border-radius: 999px;
    background: #b8bcc3;
    transition: transform .08s linear;
}
.counter-qty-option {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 8px 16px;
    border: 0;
    border-bottom: 0;
    background: #fff;
    color: #202124;
    font-family: 'Tajawal', sans-serif;
    font-size: .86rem;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}
.counter-qty-option:last-child { border-bottom: 0; }
.counter-qty-option:hover,
.counter-qty-option:focus-visible,
.counter-qty-option.is-selected {
    background: #f7f9fc;
    outline: none;
}
[data-theme="dark"] .counter-qty-dropdown {
    background: #202328;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .42);
}
[data-theme="dark"] .counter-qty-scrollbar::before {
    background: rgba(255, 255, 255, .10);
}
[data-theme="dark"] .counter-qty-scrollbar > span {
    background: #858c96;
}
[data-theme="dark"] .counter-qty-option {
    background: #202328;
    color: #f2f2f2;
}
[data-theme="dark"] .counter-qty-option:hover,
[data-theme="dark"] .counter-qty-option:focus-visible,
[data-theme="dark"] .counter-qty-option.is-selected {
    background: #2b3037;
    color: #ffffff;
}
.floating-control {
    height: 58px; padding-top: 24px; padding-bottom: 6px;
    font-size: 0.97rem; border-radius: 999px !important;
    background: var(--bg) !important; color: var(--text) !important;
    border-color: var(--border) !important; transition: border-color .2s;
}
#modalTotalPrice {
    direction: ltr;
    font-weight: 700;
}
.floating-control:focus {
    border-color: #86b7fe !important;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25) !important;
}
.floating-label {
    position: absolute; top: 8px; right: 18px;
    font-size: 0.72rem; color: var(--text-muted);
    pointer-events: none; font-family: 'Tajawal', sans-serif; font-weight: 600;
    transform-origin: right center;
    transition: transform .18s ease, color .18s ease;
}
#orderModal label[for="modalTotalPrice"] {
    /* إبراز كلمة الإجمالي مع لون رمادي هادئ. */
    font-size: 0.80rem;
    color: #858a92;
}
#qtyTotalRow .floating-group:focus-within .floating-label {
    color: #70757d;
    transform: translateY(-1px) scale(.90);
}
.quick-required-group {
    position: relative;
    /* رفع الحقل السفلي بصرياً بمقدار 1% من ارتفاع الشاشة. */
    transform: translateY(-1vh);
    margin-bottom: 10px;
}
.quick-required-control {
    width: 100%;
    /* تقصير الحقل السفلي قليلاً بنسبة تقارب 2%. */
    min-height: 61px;
    box-sizing: border-box;
    padding: 24px 22px 4px;
    border: 1px solid #e2e2e2 !important;
    border-radius: 999px !important;
    background: var(--bg, #fff) !important;
    /* النص المُدخل داكن بدرجة خفيفة مثل الصورة، مع بقاء التسمية رمادية. */
    color: #34363b !important;
    direction: ltr;
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.45;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.quick-required-control:focus {
    border-color: #86b7fe !important;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, .25) !important;
}
.quick-required-label {
    position: absolute;
    /* رفع الكلمة 1% إضافية قبل اللمس. */
    top: 28%;
    right: 22px;
    z-index: 1;
    /* رمادي متوسط مطابق تقريباً لتسمية الحقل في زين، وليس باهتاً جداً. */
    color: #a7a9b0;
    font-family: 'Tajawal', sans-serif;
    /* تصغير إضافي 3% قبل اللمس عن الحجم السابق (14.7px). */
    font-size: 14.26px;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: right center;
    transition: transform .18s ease, top .18s ease, color .18s ease;
}
.quick-required-group:focus-within .quick-required-label,
.quick-required-group:has(.quick-required-control:not(:placeholder-shown)) .quick-required-label {
    /* رفع الكلمة 1% إضافية عند اللمس أو وجود قيمة. */
    top: 27%;
    color: #70757d;
    /* تصغير إضافي 2% عند اللمس فوق التصغير الحالي (0.86877 × 0.98). */
    transform: translateY(-50%) scale(.8513946);
}
.order-pill-btn {
    border-radius: 999px !important; height: 52px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 0.95rem;
}
.order-cancel-btn { font-weight: 400; }
.order-processing-status {
    margin: 18px 0 2px;
    color: var(--text);
    text-align: center;
    font-family: 'Tajawal', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}
#orderModal .modal-content:not(.order-result-active) {
    border-radius: 11px !important;
    border: none;
    background: var(--bg-card);
    overflow: hidden;
}
#orderModal #modalProductPrice {
    /* لون ثابت لشارة السعر مثل الصورة المرجعية. */
    background-color: #0d3f5a !important;
    color: #fff !important;
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}
#orderModal #modalFormContent { padding-bottom: 4px; }
#orderModal #qtyTotalRow {
    /* إنزال حقلي العدد والإجمالي بصرياً بمجموع 8% عن الموضع الأصلي. */
    margin-top: 0 !important;
    padding-top: 8% !important;
}
#orderModal #dynamicFields:has(.quick-required-group) { padding-top: 6px; }


/* Keep the order result window vertically centered on mobile and desktop. */
#orderModal .order-result-dialog {
    min-height: calc(100% - (var(--bs-modal-margin) * 2));
    height: calc(100% - (var(--bs-modal-margin) * 2));
    display: flex;
    align-items: center;
}
#orderModal .order-result-dialog .modal-content {
    margin-top: 0;
    margin-bottom: 0;
}
#orderModal .order-result-dialog .modal-content:not(.order-result-active) {
    /* رفع نافذة الشراء قليلاً عن مركز الشاشة. */
    transform: translateY(-12px);
}
#orderModal .modal-content.order-result-active .modal-body {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    padding: 26px 30px 20px !important;
}
#orderModal .modal-content.order-result-active {
    border-radius: 18px !important;
    background: #fff !important;
}
#orderModal .modal-content.order-result-active #orderResult {
    display: flex !important;
    flex: 1;
    flex-direction: column;
}
#orderModal .modal-content.order-result-active .order-result-inner {
    display: flex;
    flex: 1;
    flex-direction: column;
}
#orderModal .modal-content.order-result-active .or-actions {
    margin-top: auto !important;
    padding-top: 28px;
    direction: rtl;
}

/* ============================================================
   ORDER RESULT CARD
   ============================================================ */
.or-icon-wrap {
    width: 88px; height: 88px;
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.or-icon { width: 88px; height: 88px; object-fit: contain; }

.or-box {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e6e7e9;
    padding: 13px 16px;
    text-align: right;
    margin: 0;
}
.or-box-label {
    font-size: .98rem; font-weight: 800; color: #24262a;
    margin: 0 0 5px;
}
.or-box-content {
    font-size: .98rem; color: #202226;
    font-weight: 700; line-height: 1.55; white-space: pre-line;
}
.or-copy-btn {
    background: #fff; color: #45484e;
    border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 6px 10px; font-size: .82rem;
    font-weight: 500; cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: background .15s;
}
.or-copy-btn:hover { background: #f5f7f8; }
.or-code-row {
    display: flex; align-items: center;
    justify-content: center; gap: 8px;
    margin: 0 auto 11px;
}
.or-code-text { font-size: .72rem; color: #484c52; font-weight: 700; }
.or-btn-primary,
.or-btn-secondary {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    padding: 0 12px;
    border-radius: 6px;
    font-weight: 800; font-size: .98rem;
    line-height: 1;
    text-decoration: none !important;
    font-family: 'Tajawal', sans-serif;
    transition: background .2s;
}
.or-btn-primary {
    background: #087db8; color: #fff !important;
}
.or-btn-primary:hover  { background: #066b9d; }
.or-btn-secondary {
    background: #e4ad00; color: #fff !important;
}
.or-btn-secondary:hover { background: #c89500; }
[data-theme="dark"] .or-box { background: var(--bg-card); }

#orderModal .modal-content.order-result-active #orTitle {
    margin: 0 0 11px !important;
    color: #17191d !important;
    font-size: 1.42rem !important;
    font-weight: 800 !important;
    line-height: 1.35;
}

#orderModal .modal-content.order-result-active #orSubtitle {
    margin: 0 0 15px !important;
    color: #4d5055 !important;
    font-size: .94rem !important;
    font-weight: 700;
    line-height: 1.65 !important;
}

#orderModal .modal-content.order-result-active .or-actions {
    gap: 14px;
    padding-top: 20px;
    margin-inline: 5px;
}

@media (max-width: 430px) {
    #orderModal .modal-content.order-result-active .modal-body {
        padding-right: 22px !important;
        padding-left: 22px !important;
    }
}

/* ── صفحة VIP — التصميم العمودي الجديد ── */
.tier-page__levels {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
    margin-right: -20px;
    padding-top: 0;
    border-top: 0;
    transform: translateX(-8px);
}
.tier-page__level {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    width: 100%;
    min-height: 72px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.tier-page__level-main {
    grid-column: 2;
    min-width: 0;
    padding-top: 7px;
    text-align: right;
}
.tier-page__level-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 28px;
    margin-bottom: 7px;
}
.tier-page__level .tier-page__current-name {
    margin: 0;
    color: #a0a3ad;
    font-size: 1rem;
    font-weight: 800;
}
.tier-page__level-lock {
    color: #191919;
    font-size: .95rem;
}
.tier-page__level-badge {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--tier-color, #aaa8d1);
    font-size: 2.15rem;
    box-shadow: none;
}
.tier-page__level-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}
.tier-page__level .tier-page__progress {
    height: 12px;
    border-radius: 999px;
    background: #e9e7f2;
}
.tier-page__level .tier-page__progress span {
    background: var(--tier-color, #aaa8d1);
}
.tier-page__level .tier-page__numbers {
    margin-top: 8px;
    color: #777;
    font-size: .78rem;
}
.tier-page__level .tier-page__numbers strong {
    color: #444;
}
.tier-page__completed {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
    color: #16a34a;
    font-size: .78rem;
    font-weight: 800;
}
.tier-page__completed i {
    font-size: 1rem;
}
.tier-page__level.is-completed .tier-page__current-name {
    color: #737782;
}
.tier-page__next {
    margin-top: 8px;
    color: #858792;
    font-size: .74rem;
}
.tier-page__next strong {
    color: var(--tier-color, #777);
}
.tier-page__level:not(.is-current) .tier-page__level-main { padding-top: 7px; }
.tier-page__level:not(.is-current) .tier-page__level-head {
    margin-bottom: 0;
}
.tier-page__level.is-current .tier-page__level-badge {
    box-shadow: none;
}
.tier-page__level.is-current {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
[data-theme="dark"] .tier-page__level-badge {
    background: transparent;
}
[data-theme="dark"] .tier-page__level-lock {
    color: #f1f3f5;
}
[data-theme="dark"] .tier-page__level .tier-page__progress {
    background: #3a3b50;
}
[data-theme="dark"] .tier-page__level .tier-page__numbers strong {
    color: #d7dae0;
}
@media (max-width: 575.98px) {
    .tier-page__levels { gap: 18px; }
    .tier-page__level { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
    .tier-page__level-badge { width: 64px; height: 64px; font-size: 1.9rem; }
    .tier-page__level-main { padding-top: 4px; }
    .tier-page__level:not(.is-current) .tier-page__level-main { padding-top: 4px; }
}

/* ============================================================
   تفاصيل العميل — ظاهرة في الوضعين
   ============================================================ */
.sb-user-name {
    color: #111827;
}
.sb-user-id {
    color: #4b5563;
}
[data-theme="dark"] .sb-user-name,
[data-bs-theme="dark"] .sb-user-name {
    color: #fff;
}
[data-theme="dark"] .sb-user-id,
[data-bs-theme="dark"] .sb-user-id {
    color: rgba(255,255,255,.65);
}
[data-theme="dark"] .sb-user-tier,
[data-bs-theme="dark"] .sb-user-tier {
    color: #f3f4f6;
    border-color: #6b7280;
    background: #4b5563;
}
