/* --- ستايلات عامة للـ Nav (لأجهزة الديسكتوب بشكل افتراضي) --- */
#main-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* ستايل قائمة الروابط للديسكتوب */
.desktop-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* لعرض الروابط أفقياً على الديسكتوب */
}

.desktop-nav-list li a {
    color: rgb(41, 41, 41);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s ease;
}

.desktop-nav-list li a:hover {
    background-color: #27272718;
}

/* إخفاء أيقونة الهامبرغر افتراضيًا على الشاشات الكبيرة (الديسكتوب) */
.hamburger-icon {
    display: none;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 30px;
    flex-direction: row-reverse;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* --- ستايل الحاوية المنسدلة (تطبيقها يكون فقط على الجوال) --- */
.dropdown-menu {
    position: fixed;
    top: 0;
    right: -250px; /* مخفية تمامًا خارج الشاشة على اليمين */
    width: 250px; /* العرض عند الفتح */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-x: hidden;
    transition: right 0.5s ease; /* انتقال زر الـ right */
    z-index: 2000; /* أعلى z-index لضمان ظهورها فوق كل شيء */
    display: flex;
    flex-direction: column;
    padding-top: 60px; /* مسافة من الأعلى لزر الإغلاق */
}

.dropdown-menu.active {
    right: 0; /* تتحرك لتظهر بالكامل */
}

/* ستايل زر الإغلاق (X) داخل القائمة المنسدلة */
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 36px;
    color: #818181;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #f1f1f1;
}

/* ستايل الروابط داخل القائمة المنسدلة (على الجوال) */
.mobile-nav-list { /* الكلاس الجديد لقائمة الجوال */
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: column; /* جعل الروابط عمودية */
    width: 100%;
    margin-top: 20px; /* مسافة عن زر الإغلاق */
}

.mobile-nav-list li {
    text-align: center;
    width: 100%;
}

.mobile-nav-list li a {
    padding: 15px 0;
    text-decoration: none;
    font-size: 20px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.mobile-nav-list li a:hover {
    color: #000000;
    background-color: #575757;
}


/* --- Media Query للشاشات الصغيرة (الجوال) --- */
@media (max-width: 768px) {
    /* إخفاء روابط الديسكتوب */
    .desktop-nav-list {
        display: none;
    }

    /* إظهار أيقونة الهامبرغر على الجوال */
    .hamburger-icon {
    display: contents;
    position: absolute;
    top: 10px;
    right: 20px;
}

    /* ممكن تعديل الـ #nav لو عايز الأيقونة في مكان محدد */
    #main-nav-container {
        justify-content: flex-end; /* لتبقى أيقونة الهامبرغر على اليمين */
    }
}

/* ستايلات لـ Header */
.header {
    background-color: #ffffff;
    color: rgb(34, 34, 34);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; /* لو عايز الهيدر يفضل ثابت في الأعلى */
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.icons {
    display: flex;
    align-items: center;
}
.cart-icon {
    color: white;
    text-decoration: none;
    position: relative;
    font-size: 24px;
    margin-left: 20px;
}
.cart-count {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    top: -8px;
    right: -8px;
}