/* ======================================= */
/* الكود الكامل لملف main-index.css (إصلاح الفراغ العلوي للقائمة) */
/* ======================================= */

* {margin:0;padding:0;box-sizing:border-box;font-family:'Cairo',sans-serif;}
html, body {margin:0;padding:0;height:100%;overflow-x:hidden;background:#f0f8ff;}

/* --- 1. Header & Logo (الترتيب الثابت) --- */

header {
    position:fixed;top:0;left:0;right:0;z-index:1000;
    background:linear-gradient(135deg,#0077b6,#00b4d8);
    padding:15px 5%;box-shadow:0 8px 30px rgba(0,0,0,0.3);
    /* تثبيت Flexbox لترتيب الشعار والقائمة */
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.logo {
    font-size:28px;font-weight:900;color:#fff;
    display:flex;align-items:center;gap:18px;
    order: 1; /* الشعار يمين */
}

.logo img {
    height:60px;border-radius:18px;box-shadow:0 12px 35px rgba(0,0,0,0.5);transition:0.5s;
}

.logo img:hover {
    transform:scale(1.15) rotate(8deg);
    box-shadow:0 20px 50px rgba(0,0,0,0.7);
}

.nav-container {
    position:relative;
    order: 2; /* القائمة وزر الهمبرغر يسار */
}

/* زر القائمة المنسدلة (Hamburger) */
.hamburger {
    display:none; /* إخفاؤه افتراضياً على سطح المكتب */
    background:none;border:none;color:#fff;font-size:36px;cursor:pointer;z-index:1001;transition:0.5s;
}

.hamburger.active {
    transform:rotate(90deg);
}

.close-menu {
    position:absolute;top:20px;left:20px;background:none;border:none;color:#fff;font-size:40px;cursor:pointer;z-index:1002;display:none;
}

/* --- 2. قائمة سطح المكتب (Desktop Navigation) --- */

nav {
    display:flex;gap:35px;
}

nav a {
    color:#fff;text-decoration:none;font-weight:bold;font-size:18px;position:relative;transition:0.4s;
}

nav a::after {
    content:'';position:absolute;bottom:-10px;left:50%;width:0;height:4px;background:#fff;border-radius:50px;transition:0.4s;transform:translateX(-50%);
}

nav a:hover::after {
    width:100%;
}

/* --- 3. السلايدر (Slider Spacing Fix) --- */

.slider-container {
    margin-top:0 !important;
    padding-top:80px !important; 
    height:calc(100vh - 80px);
    position:relative;
    overflow:hidden;
}

/* --- 4. ستايل زر أضف إلى السلة --- */

.add-to-cart {
    background:linear-gradient(135deg,#0077b6,#00b4d8);
    color:#fff;
    padding:15px 30px;
    border:none;
    border-radius:50px;
    cursor:pointer;
    font-weight:900;
    font-size:18px;
    transition:0.4s;
    box-shadow:0 10px 30px rgba(0,119,182,0.4);
    position:relative;
    overflow:hidden;
    display:inline-block;
    text-decoration:none;
}
.add-to-cart:hover {
    transform:translateY(-5px);
    box-shadow:0 20px 50px rgba(0,119,182,0.6);
}
.add-to-cart::before {
    content:'';
    position:absolute;
    top:50%;left:50%;
    width:0;height:0;
    background:rgba(255,255,255,0.3);
    border-radius:50%;
    transform:translate(-50%,-50%);
    transition:0.6s;
}
.add-to-cart:active::before {
    width:300px;height:300px;
}

/* ======================================= */
/* 5. قائمة الجوال (Mobile Navigation) - التعديل الفعلي والنهائي */
/* ======================================= */

@media (max-width:992px) {
    /* **التعديل الحاسم** لفرض الترتيب على الـ HEADER */
    header {
        display: flex !important; 
        justify-content: space-between !important;
        align-items: center !important;
        flex-direction: row !important; 
        padding: 15px 5% !important; 
    }
    
    /* إظهار زر الهمبرغر */
    .hamburger {display:block !important;}
    
    /* تصغير اللوغو قليلاً */
    .logo {font-size:24px;gap:12px;}
    .logo img {height:50px;}
    
    /* القائمة الجانبية (تنسدل من اليسار) */
    #main-nav {
        position:fixed !important;
        top:0 !important; /* **إصلاح الفراغ العلوي** */
        left:-280px !important; 
        width:280px !important;
        height:100vh !important;
        
        background:linear-gradient(135deg,#0077b6,#00b4d8) !important;
        padding:100px 30px 30px; /* الحفاظ على مسافة داخلية من الأعلى للمحتوى */
        transition:left 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        z-index:999;
        box-shadow:10px 0 50px rgba(0,0,0,0.5);
        flex-direction:column;
        display:flex; 
        gap:0;
    }
    
    /* عند تفعيل القائمة */
    #main-nav.active {
        left:0 !important; /* تحريك القائمة للظهور على اليسار */
    }
    
    /* إظهار زر الإغلاق */
    .close-menu {
        display:block !important;
    }
    
    /* تنسيق روابط القائمة الجانبية */
    #main-nav a {
        padding:25px;margin:12px 0;background:rgba(255,255,255,0.15);border-radius:20px;text-align:center;font-size:20px;backdrop-filter:blur(15px);border:1px solid rgba(255,255,255,0.2);
    }
    
    #main-nav a:hover {
        background:#fff; /* لون أبيض ناصع عند المرور */
        color:#0077b6; /* لون النص أزرق */
        transform:translateX(5px); 
        box-shadow:0 15px 40px rgba(0,180,216,0.4);
    }
    
    .slider-container {padding-top:70px !important;height:calc(100vh - 70px);}
}

/* --- 6. تأثير التغطية (Overlay Effect) --- */

body.nav-open::before {
    content:'';position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.75);z-index:998;transition:0.4s;backdrop-filter:blur(10px);
}


.glow-title {
    /* (الستايلات الأساسية الموجودة لديك) */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); 
    position: relative; 
    
    /* 💡 [التعديل الحاسم] إضافة !important لإجبار الحركة على العمل */
    animation: glitchEffect 1.5s infinite alternate ease-in-out !important;
}

/* 💡 تأكد من وجود تعريف الحركة (Keyframes) */
@keyframes glitchEffect {
    0% {
        transform: translate(0);
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    }
    20% {
        transform: translate(-3px, 2px);
        text-shadow: -2px 0 1px rgba(255, 0, 0, 0.8), 2px 0 1px rgba(0, 255, 255, 0.8);
    }
    40% {
        transform: translate(2px, -3px);
        text-shadow: -2px 0 1px rgba(255, 0, 0, 0.8), 2px 0 1px rgba(0, 255, 255, 0.8);
    }
    60% {
        transform: translate(-1px, 1px);
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    }
    80% {
        transform: translate(1px, -2px);
        text-shadow: -2px 0 1px rgba(255, 0, 0, 0.8), 2px 0 1px rgba(0, 255, 255, 0.8);
    }
    100% {
        transform: translate(0);
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    }
}