    /* ============================================
       RESET
    ============================================ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
    body {
        font-family: 'Tajawal', sans-serif;
        background: #f0f2f5;
        color: #333;
        direction: rtl;
    }
 
    /* ============================================
       HEADER WRAPPER
    ============================================ */
    .main-header {
        position: fixed;
        top: 0; right: 0; left: 0;
        z-index: 900;
        background: #fff;
        box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    }
 
    .container2 {
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 20px;
    }
 
    /* ============================================
       TOP ROW
       ترتيب: شعار | بحث | تقويم | مدينة | عملة/لغة | مستخدم
    ============================================ */
    .main-header__top {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 64px;
        width: 100%;
    }
 
    /* --- الشعار --- */
    .main-header__logo { flex-shrink: 0; }
    .main-header__logo a { display: flex; align-items: center; text-decoration: none; }
    .main-header__logo img { height: 36px; width: auto; }
 
    /* --- شريط البحث --- */
    .main-header__search {
        flex: 1;
        min-width: 0;
    }
 
    .search-box {
        display: flex;
        align-items: center;
        background: #f0f2f5;
        border-radius: 30px;
        padding: 0 16px;
        height: 42px;
        gap: 8px;
        transition: box-shadow 0.2s, background 0.2s;
        border: 1.5px solid transparent;
    }
    .search-box:focus-within {
        background: #fff;
        border-color: #37a7f8;
        box-shadow: 0 0 0 3px rgba(55,167,248,0.12);
    }
    .search-box i { color: #aaa; font-size: 15px; flex-shrink: 0; }
    .search-box input {
        flex: 1;
        border: none;
        background: transparent;
        outline: none;
        font-family: 'Tajawal', sans-serif;
        font-size: 14px;
        color: #333;
        min-width: 0;
    }
    .search-box input::placeholder { color: #aaa; }
 
    /* أيقونة بيتا */
    .search-beta {
        font-size: 10px;
        color: #37a7f8;
        font-weight: 700;
        background: rgba(55,167,248,0.1);
        padding: 2px 6px;
        border-radius: 8px;
        flex-shrink: 0;
    }
 
    /* --- أيقونة التقويم --- */
    .main-header__calendar-btn {
        flex-shrink: 0;
        background: #f0f2f5;
        border: none;
        border-radius: 30px;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s;
        color: #555;
        font-size: 17px;
        text-decoration: none;
    }
    .main-header__calendar-btn:hover { background: #e4e8ee; }
 
    /* --- زر المدينة --- */
    .main-header__city-btn {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        background: #f0f2f5;
        border: none;
        border-radius: 30px;
        padding: 0 14px;
        height: 42px;
        cursor: pointer;
        font-family: 'Tajawal', sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: #333;
        transition: background 0.2s;
        white-space: nowrap;
    }
    .main-header__city-btn:hover { background: #e4e8ee; }
    .main-header__city-btn i { color: #37a7f8; font-size: 14px; }
 
    /* --- عملة / لغة --- */
    .main-header__locale {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        background: #f0f2f5;
        border-radius: 30px;
        padding: 0 14px;
        height: 42px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        color: #333;
        border: none;
        font-family: 'Tajawal', sans-serif;
        transition: background 0.2s;
        white-space: nowrap;
        position: relative;
    }
    .main-header__locale:hover { background: #e4e8ee; }
    .main-header__locale i { font-size: 15px; color: #666; }
 
    /* قائمة اختيار الدولة */
    .locale-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        background: white;
        border-radius: 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        min-width: 170px;
        z-index: 1000;
        overflow: hidden;
        padding: 6px 0;
    }
    .locale-dropdown.show { display: block; }
    .locale-dropdown a {
        display: block;
        padding: 10px 16px;
        text-decoration: none;
        color: #333;
        font-size: 14px;
        transition: background 0.15s;
        white-space: nowrap;
    }
    .locale-dropdown a:hover { background: #f5f8ff; color: #37a7f8; }
    .locale-dropdown a.active { color: #37a7f8; font-weight: 700; }
 
    /* --- أيقونة المستخدم --- */
    .main-header__user-btn {
        flex-shrink: 0;
        position: relative;
    }
    .user-avatar-btn {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #e4e8ee;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }
    .user-avatar-btn:hover { background: #d0d5de; }
    .user-avatar-btn i { font-size: 18px; color: #555; }
 
    /* قائمة المستخدم */
    .user-menu-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        background: white;
        border-radius: 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        min-width: 200px;
        z-index: 1000;
        overflow: hidden;
        padding: 8px 0;
    }
    .user-menu-dropdown.show { display: block; }
    .user-menu-dropdown a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 18px;
        text-decoration: none;
        color: #333;
        font-size: 14px;
        transition: background 0.15s;
    }
    .user-menu-dropdown a:hover { background: #f5f8ff; color: #37a7f8; }
    .user-menu-dropdown .um-divider {
        height: 1px;
        background: #f0f0f0;
        margin: 6px 0;
    }
    .user-menu-dropdown .um-login {
        margin: 8px 14px;
        padding: 10px;
        background: #37a7f8;
        color: white !important;
        border-radius: 10px;
        text-align: center;
        font-weight: 700;
        justify-content: center;
    }
    .user-menu-dropdown .um-login:hover { background: #1a8fd1 !important; }
 
    /* قائمة المدن */
    .city-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: white;
        border-radius: 14px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        min-width: 200px;
        z-index: 1000;
        overflow: hidden;
        padding: 6px 0;
        max-height: 320px;
        overflow-y: auto;
    }
    .city-dropdown.show { display: block; }
    .city-dropdown a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        text-decoration: none;
        color: #333;
        font-size: 14px;
        transition: background 0.15s;
    }
    .city-dropdown a:hover { background: #f5f8ff; color: #37a7f8; }
    .city-dropdown a.active { color: #37a7f8; font-weight: 700; }
 
    /* ============================================
       BOTTOM NAV
    ============================================ */
    .bottom-nav {
        border-top: 1px solid #f0f2f5;
    }
 
    .nav-list {
        display: flex;
        align-items: center;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 6px 0;
    }
    .nav-list::-webkit-scrollbar { display: none; }
 
    .nav-list a {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 8px 16px;
        text-decoration: none;
        color: #555;
        font-size: 13.5px;
        font-weight: 500;
        white-space: nowrap;
        border-radius: 30px;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }
    .nav-list a:hover,
    .nav-list a.active {
        color: #37a7f8;
        background: rgba(55,167,248,0.08);
        font-weight: 600;
    }
    .nav-list a i { font-size: 14px; }
 
    /* nav dropdown trigger */
    .nav-has-dropdown { position: relative; }
    .nav-dropdown {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        right: 0;
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        min-width: 180px;
        padding: 6px 0;
        z-index: 800;
    }
    .nav-has-dropdown:hover .nav-dropdown { display: block; }
    .nav-dropdown a {
        border-radius: 0;
        padding: 10px 16px;
        font-size: 13.5px;
    }
 
    /* ============================================
       MOBILE SEARCH OVERLAY
    ============================================ */
    .mobile-search-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0;
        background: white;
        padding: 12px 16px;
        z-index: 1001;
        gap: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        align-items: center;
    }
    .mobile-search-overlay.show { display: flex; }
    .mobile-search-overlay .search-box { flex: 1; }
    .close-search {
        background: #f0f2f5;
        border: none;
        border-radius: 20px;
        padding: 8px 14px;
        cursor: pointer;
        font-family: 'Tajawal', sans-serif;
        font-size: 13px;
    }
 
    /* زر بحث موبايل */
    .search-toggle-btn {
        display: none;
        background: #f0f2f5;
        border: none;
        border-radius: 30px;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 16px;
        color: #555;
        flex-shrink: 0;
    }
 
    /* ============================================
       LOADING
    ============================================ */
    #headerLoading {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(255,255,255,0.75);
        z-index: 9999;
        align-items: center;
        justify-content: center;
    }
    #headerLoading.show { display: flex; }
    #headerLoading .spinner {
        width: 44px; height: 44px;
        border: 3px solid #e2e8f0;
        border-top-color: #37a7f8;
        border-radius: 50%;
        animation: spin 0.75s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
 
    /* رسائل */
    .hdr-toast {
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 22px;
        border-radius: 30px;
        font-size: 14px;
        z-index: 10000;
        box-shadow: 0 4px 14px rgba(0,0,0,0.12);
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .hdr-toast.show { opacity: 1; }
    .hdr-toast.success { background: #28a745; color: white; }
    .hdr-toast.error   { background: #dc3545; color: white; }
 
    /* Preloader */
    .window-preloader {
        position: fixed; top: 0; width: 100vw; height: 100vh;
        background: #fff; z-index: 9999;
        display: flex; align-items: center; justify-content: center;
        transition: opacity 0.5s;
    }
    .window-preloader.hidden { opacity: 0; pointer-events: none; }
 
    /* body padding */
    body { padding-top: 110px; }
 
    /* ============================================
       RESPONSIVE
    ============================================ */
    @media (max-width: 992px) {
        .main-header__locale span.locale-label { display: none; }
        .main-header__locale { padding: 0 10px; }
    }
 
    @media (max-width: 768px) {
        body { padding-top: 104px; }
        .main-header__search { display: none; }
        .search-toggle-btn   { display: flex; }
        .main-header__top    { gap: 7px; }
        .main-header__city-btn .city-label { display: none; }
        .main-header__city-btn { padding: 0 10px; }
    }
 
    @media (max-width: 480px) {
        body { padding-top: 96px; }
        .main-header__top { height: 56px; gap: 5px; }
        .main-header__logo img { height: 28px; }
        .main-header__calendar-btn,
        .user-avatar-btn,
        .search-toggle-btn { width: 36px; height: 36px; }
        .main-header__city-btn { height: 36px; font-size: 13px; }
        .main-header__locale  { height: 36px; font-size: 12px; }
    }
    /* ============================================
   شاشات منبثقة للقوائم على الجوال (Modal)
   ============================================ */

/* الخلفية المظللة */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

/* محتوى النافذة المنبثقة */
.modal-content {
    background: white;
    border-radius: 24px;
    width: 85%;
    max-width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-backdrop.show .modal-content {
    transform: scale(1);
}

/* رأس النافذة */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 24px 24px 0 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.modal-close {
    background: #f0f2f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e4e8ee;
    color: #333;
}

/* قائمة الروابط داخل النافذة */
.modal-list {
    padding: 8px 0;
}

.modal-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.modal-list a:last-child {
    border-bottom: none;
}

.modal-list a:hover,
.modal-list a:active {
    background: #f5f8ff;
    color: #37a7f8;
}

.modal-list a i {
    width: 22px;
    color: #37a7f8;
    font-size: 16px;
}

.modal-list .active {
    color: #37a7f8;
    font-weight: 700;
}

/* زر تسجيل الدخول في قائمة المستخدم */
.modal-list .login-btn {
    background: #37a7f8;
    color: white;
    margin: 12px 16px;
    border-radius: 30px;
    justify-content: center;
    gap: 8px;
}

.modal-list .login-btn:hover {
    background: #1a8fd1;
    color: white;
}

.modal-list .login-btn i {
    color: white;
}

/* الفاصل */
.modal-divider {
    height: 1px;
    background: #f0f2f5;
    margin: 8px 0;
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .modal-content {
        width: 92%;
        max-width: 320px;
    }
    
    .modal-list a {
        padding: 12px 16px;
        font-size: 14px;
    }
}
/* ============================================
   أفضل حل للمسافة بين زر الإغلاق والمحتوى
   ============================================ */

.modal-header {
    justify-content: flex-end !important;
    padding: 16px 16px 0 16px !important;
    border-bottom: none !important;
}

/* إضافة مسافة عمودية بين الزر وأول عنصر */
.modal-list {
    padding-top: 12px !important;
    margin-top: 0 !important;
}

/* أو إضافة خط فاصل خفيف */
.modal-header {
    border-bottom: 1px solid #f0f2f5 !important;
    padding-bottom: 12px !important;
}

/* تعديل زر الإغلاق */
.modal-close {
    margin-bottom: 0 !important;
}