:root {
    --gold-color: #d4af37;
    --dark-bg: #1a1a1a;
    --text-white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    width: 100%;
    max-width: 100vw; /* يمنع تجاوز عرض الشاشة نهائياً */
    overflow-x: hidden; /* يقص أي عنصر يخرج عن الحدود */
    box-sizing: border-box;
}

.main-header {
    background-color: var(--dark-bg);
    padding: 15px 0;
    border-bottom: 2px solid var(--gold-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* القائمة */
.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
}

.nav-menu a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.nav-menu a:hover {
    color: var(--gold-color);
}

/* الشعار */
.logo img {
    height: 120px; /* يمكنك تعديل الحجم حسب الرغبة */
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
    border-radius: 10px;
}

/* الأدوات */
.header-tools {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-tools a {
    color: var(--gold-color);
    font-size: 1.2rem;
    position: relative;
}

.badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
}

/* تصميم شريط البحث */
.search-overlay {
    display: none; /* مخفي افتراضياً */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background-color: var(--dark-bg);
    z-index: 2000;
    border-bottom: 2px solid var(--gold-color);
    animation: slideDown 0.3s ease-out;
}

.search-container {
    max-width: 800px;
    margin: 25px auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.luxury-search-form {
    width: 100%;
    display: flex;
    border-bottom: 1px solid #111;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    background: #2a2a2a;
    border: 1px solid var(--gold-color);
    color: white;
    border-radius: 25px; /* حواف دائرية لليمين */
    outline: none;
}

.search-container button {
    padding: 13px 45px;
    background: var(--gold-color);
    border: none;
    color: var(--dark-bg);
    border-radius: 25px; /* حواف دائرية لليسار */
    cursor: pointer;
}

.close-search {
    position: relative;
    bottom: 5px;
    color: var(--gold-color);
    font-size: 35px;
    margin-right: 20px;
    cursor: pointer;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}


/* --- إعدادات التجاوب (Responsive Settings) --- */

@media (max-width: 768px) {
    .container {
        flex-wrap: wrap; /* السماح للعناصر بالنزول لسطر جديد إذا ضاق المساحة */
        padding: 10px;
    }

    /* تصغير الشعار في الجوال */
    .logo img {
        height: 70px;
    }

    /* تحويل القائمة إلى قائمة مخفية أو مرصوفة */
    .nav-menu {
        order: 3; /* نقل القائمة للأسفل */
        width: 100%;
        margin-top: 15px;
        display: none; /* سنحتاج لـ JavaScript لإظهارها عند الضغط على زر */
    }

    .nav-menu ul {
        flex-direction: column; /* جعل الروابط فوق بعضها */
        gap: 10px;
        text-align: center;
        background: rgba(255, 255, 255, 0.05);
        padding: 10px;
        border-radius: 8px;
    }

    /* إظهار زر القائمة (Hamburger Menu) في الجوال فقط */
    .menu-toggle {
        display: block !important;
        color: var(--gold-color);
        font-size: 1.5rem;
        cursor: pointer;
        gap: 40px;
    }
}

/* إخفاء زر القائمة في الشاشات الكبيرة */
.menu-toggle {
    display: none;
}

.user-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    direction: rtl;
}

/* تنسيق رسالة الترحيب */
.welcome-msg {
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    color: #555; /* لون رمادي غامق للنص العادي */
}

.welcome-msg b {
    color: #c5a059; /* اللون الذهبي لاسم الزبون */
    font-weight: 700;
}

/* زر لوحة التحكم */
.btn-dashboard-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111;
    background: #f9f9f9;
    padding: 7px 15px;
    border: 1px solid #eee;
    border-radius: 2px; /* زوايا حادة للفخامة */
    transition: 0.3s ease;
}

.btn-dashboard-icon:hover {
    background: #111;
    color: #c5a059;
    border-color: #111;
}

.btn-dashboard-icon i {
    font-size: 0.9rem;
}

/* زر الخروج */
.btn-logout-minimal {
    color: #cc0000;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-logout-minimal:hover {
    transform: scale(1.1);
}

/* التجاوب مع الجوال (إخفاء النص وإبقاء الأيقونة) */
@media (max-width: 768px) {
    .welcome-msg { display: none; }
    .btn-dashboard-icon span { display: none; }
}
