
/* الشريط العلوي - تم تعديل الترتيب الطبقي هنا */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 5%;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1040; /* تم تخفيض من 1050 إلى 1040 */
    box-shadow: var(--shadow-medium);
}

.top-nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 6px;
}

.top-nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang a{
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 6px;

}
.lang a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* شريط التنقل الرئيسي */
.main-navbar {
    position: fixed;
    top: 35px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: hsl(var(--surface-color));
    padding: 12px 5%;
    box-shadow: var(--shadow-medium);
    z-index: 1050; /* تم رفع من 1040 إلى 1050 */
    transition: var(--transition);
}

.main-navbar-scrolled {
    padding: 8px 5%;
    box-shadow: var(--shadow-heavy);
}

/* الشعار - تم تحسين التصميم */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.moodex-navbar-logo {
    margin-top: -5px;
    height: 60px;
    width: auto;
    max-height: 70px;
    transition: height 0.3s ease;
}

.logo-text {
    font-weight: 600;
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 10px;
}

/* شريط البحث للجوال */
.mobile-search {
    display: none;
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    padding: 10px 5%;
    background: hsl(var(--surface-color));
    z-index: 1030;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-container {
    display: flex;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid hsl(var(--border-color));
}

.search-container input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    outline: none;
    background: hsl(var(--surface-color));
}

.search-container button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0 25px;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button:hover {
    background: var(--gradient-accent);
}
/* شريط التصنيفات العام */
.sub-navbar {
    position: fixed;
    top: 120px;
    left: 0;
    right: 0;
    background: hsl(var(--surface-color));
    box-shadow: var(--shadow-light);
    z-index: 1020;
    padding: 10px 5%;
    transition: var(--transition);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

/* Scrollbar إخفاء */
.sub-navbar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* عند تمرير الصفحة */
.sub-navbar.scrolled {
    top: 110px;
    box-shadow: var(--shadow-medium);
}

/* Wrapper */
.sub-navbar-wrapper {
    overflow-x: auto;
    white-space: nowrap;
}

/* قائمة العناصر */
.moodex-subnav {
    display: flex;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    list-style: none;
    justify-content: flex-start;
    gap: 10px;
}

/* عنصر كل تصنيف */
.moodex-subnav li {
    flex: 0 0 auto;
}

/* الرابط */
.moodex-subnav-link {
    color: hsl(var(--text-primary)) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    border-radius: 20px;
    margin: 0 5px;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

/* Hover */
.moodex-subnav-link:hover {
    background: hsl(var(--background-color));
}

/* Active */
.moodex-subnav-link.active-category {
    background: var(--gradient-primary);
    color: white !important;
}

.moodex-subnav-link.active-category::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: hsl(var(--primary-color));
    border-radius: 50%;
}

/* RTL/LTR */
.sub-navbar.rtl {
    direction: rtl;
}

.sub-navbar.ltr {
    direction: ltr;
}

        
/* أزرار التنقل */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: hsl(var(--text-primary));
    text-decoration: none;
    font-size: 12px;
    min-width: 60px;
    transition: var(--transition);
}

.nav-icon i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: var(--transition);
}

.nav-icon:hover {
    color: hsl(var(--primary-color));
}

.nav-icon:hover i {
    transform: translateY(-3px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: 15px;
    background: hsl(var(--danger-color));
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: hsl(var(--primary-color));
    cursor: pointer;
    margin-left: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* التكيف مع الشاشات الصغيرة */
@media (max-width: 992px) {
    .top-navbar {
        padding: 8px 3%;
        font-size: 12px;
    }
    
    .main-navbar {
        padding: 12px 3%;
    }
    
    .sub-navbar {
        padding: 10px 3%;
        top: 85px;
    }
    
    .nav-right .nav-text {
        display: none;
    }
    
    .nav-icon {
        min-width: auto;
    }
    
    .top-nav-links a {
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    .top-nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .mobile-search {
        display: block;
        top: 135px;
    }
    
    .sub-navbar {
        top: 130px;
        padding: 8px 3%;
    }
    
    .sub-navbar-scrolled {
        top: 60px;
    }
    
    .search-container.w-50.d-none.d-md-flex {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .top-navbar > div:first-child {
        font-size: 11px;
    }
    
    .main-navbar {
        top: 30px;
    }
    
    .sub-navbar {
        top: 100px;
    }
    
    .cart-count {
        right: 10px;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .moodex-navbar-logo {
        height: 50px;
    }
}

/* تحسينات إضافية */
.demo-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.demo-content h2 {
    color: hsl(var(--primary-color));
    margin-bottom: 20px;
    text-align: center;
}

.demo-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}
        @keyframes logo-bounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-10px);
            }
            60% {
                transform: translateY(-5px);
            }
        }
        @keyframes rotate-logo {
            0% {
                transform: rotate(0deg);
            }
            50% {
                transform: rotate(360deg);
            }
            100% {
                transform: rotate(0deg);
            }
        }