/* ===== Top Bar ===== */
.top-bar {
    background-color: var(--primary-red);
    text-align: center;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

/* ===== Navbar Base ===== */
.navbar {
    background-color: rgba(13, 13, 13, 0.98);
    padding: 12px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

.logo img {
    height: 48px;
    display: block;
    transition: height 0.3s;
}

/* ===== Navigation Links (Desktop) ===== */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    text-transform: uppercase;
    transition: color 0.3s;
    color: var(--text-light);
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* ===== Dropdown Menu (Shop) ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(20, 20, 20, 0.98);
    min-width: 200px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
    z-index: 1000;
    border-top: 2px solid var(--primary-red);
    border-radius: 0 0 6px 6px;
    padding: 8px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    text-transform: capitalize;
    transition: 0.2s;
}

.dropdown-menu a:hover {
    background-color: #282828;
    color: var(--primary-red);
}

body.rtl .dropdown-menu {
    left: auto;
    right: 0;
}

/* ===== Nav Actions (Search, Lang, Cart, Socials) ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap; /* يمنع نزول أي عنصر في سطر جديد */
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 3px 10px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-red);
    box-shadow: 0 0 8px rgba(230, 0, 0, 0.3);
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 4px 6px;
    width: 120px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: width 0.3s ease;
}

.search-box input:focus {
    width: 180px;
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.2s;
}

.search-box button:hover {
    color: var(--primary-red);
}

/* Language Button */
.lang-btn {
    background: none;
    border: 1px solid var(--text-light);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: 0.3s;
    white-space: nowrap;
}

.lang-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    font-size: 1.3rem;
    color: #fff;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-red);
    color: white;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 50%;
    font-weight: bold;
}

body.rtl .cart-count {
    right: auto;
    left: -10px;
}

/* Socials in Nav */
.nav-socials {
    display: flex;
    gap: 12px;
    border-right: 1px solid #333;
    padding-right: 12px;
}

body.rtl .nav-socials {
    border-right: none;
    border-left: 1px solid #333;
    padding-right: 0;
    padding-left: 12px;
}

.nav-socials a {
    color: var(--text-light);
    font-size: 1.1rem;
    transition: 0.2s;
}

.nav-socials a:hover {
    color: var(--primary-red);
}

/* Hamburger Toggle Icon */
.menu-toggle {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 2px;
}

/* ===================================================
   📱 MOBILE & TABLET RESPONSIVE (الموبايل)
   =================================================== */
/* ==========================================
   Navbar موبايل - لوجو شمال / عناصر وسط / همبرجر يمين
========================================== */
@media (max-width: 900px) {

    .nav-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    /* 1. اللوجو على الشمال */
    .logo,
    .nav-logo {
        order: 1 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
    .logo img,
    .nav-logo img {
        height: 36px !important;
        width: auto !important;
        display: block !important;
    }

    /* 2. باقي العناصر في النص (سيرش + لغة + سلة) */
    .nav-actions {
        order: 2 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 1 auto !important;
        gap: 8px !important;
        margin: 0 6px !important;
    }

    /* السيرش في النص */
    .search-box,
    .search-form {
        display: flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        max-width: 160px !important;
        margin: 0 !important;
    }
    .search-box input,
    .search-form input {
        width: 100% !important;
        font-size: 16px !important; /* يمنع الزووم */
        padding: 7px 10px !important;
        box-sizing: border-box !important;
    }
    .search-box input:focus,
    .search-form input:focus {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* زر اللغة */
    .lang-btn,
    #lang-toggle,
    #langToggleBtn {
        flex: 0 0 auto !important;
        font-size: 13px !important;
        padding: 5px 8px !important;
        white-space: nowrap !important;
    }

    /* أيقونة السلة */
    .cart-icon,
    a.cart-icon {
        flex: 0 0 auto !important;
        font-size: 1.15rem !important;
        position: relative !important;
    }

    /* إخفاء السوشيال في الموبايل */
    .nav-socials {
        display: none !important;
    }

    /* 3. الهامبرجر على اليمين */
    .menu-toggle,
    #mobile-menu,
    .hamburger,
    #hamburgerBtn {
        order: 3 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        margin-left: 4px !important;
        font-size: 1.35rem !important;
        color: #ffffff !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
        padding: 4px !important;
    }

    /* إخفاء لينكات الديسكتوب */
    .nav-links {
        display: none;
    }
    .nav-links.active {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(15,15,15,0.98) !important;
        padding: 20px !important;
        z-index: 999 !important;
        border-top: 2px solid #E60000 !important;
    }
}


/* ==========================================
   تنسيق الشريط العلوي (Top Bar)
========================================== */
.top-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 15px !important;
    background-color: #b30000 !important; /* لون احمر */
    border-bottom: 1px solid #222 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    z-index: 1001 !important;
    position: relative !important;
}

.top-bar-text {
    flex: 1 !important;
    text-align: center !important;
}

.top-bar-text p {
    margin: 0 !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

.top-bar-socials {
    display: flex !important;
    gap: 15px !important;
}

.top-bar-socials a {
    color: #ffffff !important;
    font-size: 16px !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.top-bar-socials a:hover {
    color: #ffffff !important; /* اللون الأحمر عند التمرير */
}

.top-bar-lang button {
    background: transparent !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

.top-bar-lang button:hover {
    background: #E60000 !important;
    color: #ffffff !important;
}

/* التجاوب مع الموبايل */
@media (max-width: 768px) {
    .top-bar {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    .top-bar-text {
        font-size: 10px !important;
        padding: 0 8px !important;
    }
    .top-bar-socials {
        gap: 10px !important;
    }
    .top-bar-socials a {
        font-size: 14px !important;
    }
}