/* Header Styles */

.header {
    width: 100%;
    position: fixed;
    top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    transition: all 0.3s ease;
    padding: 20px 0;
}

.header.fixed {
    padding: 10px 0;
    top: 0;
    z-index: 9999;
    background-color: #502E91;
}

.header.fixed .container {
    padding: 5px 10px;
}


.header .container {
    width: 100%;
    background: #FFFFFF;
    border-radius: 290px;
    border: 1px solid #7EBE63;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    transition: all 0.3s ease;
}

/* Logo/Brand Section */
.header-logo {
    display: flex;

}




.logo-text-arabic {
    display: flex;
    gap: 6px;
}

.brand-arabic-green {
    color: #4CAF50;
    font-size: 16px;
    font-weight: 500;
    font-family: 'avenir_nextmedium';
    font-weight: 500;
}

.brand-arabic-purple {
    color: #502E91;
    font-size: 16px;
    font-weight: 600;
    font-family: 'avenir_nextmedium';
    font-weight: 500;
}

/* Navigation Menu */
.header-nav {
    margin-left: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #502E91;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: 'avenir_nextmedium';
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.current-menu-item .nav-link {
    color: #7FBD61;
}

.nav-link:hover {
    opacity: 0.8;
}

/* Utility Section */
.header-utility {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Language Selector */
.language-selector .lang-link {
    color: #502E91;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;

    font-family: "IBM Plex Sans Arabic", sans-serif;
}

.wpml-ls-legacy-list-horizontal a {
    padding: 0 !important;
}

.wpml-ls-legacy-list-horizontal a span {
    color: #502E91;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Neo Sans Arabic' !important;
}

/* Search Button */
.search-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #7FBD61;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #53d458;
}

/* Login/Register Button */
.login-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    background: #502E91;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'avenir_nextmedium';
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: #7FBD61;
}

.login-btn svg {
    flex-shrink: 0;
}

.login-btn span {
    white-space: nowrap;
}



/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: #502E91;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    gap: 4px;
    z-index: 100;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Sidebar */
.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background: #FFFFFF;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-sidebar.active {
    right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
}

.mobile-menu-logo a {
    display: flex;
    align-items: center;
}

.mobile-menu-logo img {
    width: auto;
}

.mobile-menu-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-language-selector .mobile-lang-link {
    color: #502E91;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: "IBM Plex Sans Arabic", sans-serif;
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #502E91;
    border: none;
    color: #FFFFFF;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.3s ease;
}

.mobile-menu-close:hover {
    background: #7FBD61;
}

/* Mobile Menu Search */
.mobile-menu-search {
    display: flex;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #E5E5E5;
}

.mobile-search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mobile-search-icon:hover {
    opacity: 1;
}

.mobile-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
    font-family: 'avenir_nextregular', sans-serif;
}

.mobile-search-input::placeholder {
    color: #999;
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    flex: 1;
    padding: 45px 5% 20px;
}

.mobile-menu-nav {
    flex: 1;
    padding: 45px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin: 0;
    padding: 0;
}

.mobile-nav-menu a,
.mobile-nav-link {
    display: block;
    padding: 15px 0;
    color: #502E91;
    text-decoration: none;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
    font-family: 'avenir_nextmedium', sans-serif;
    transition: background 0.3s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-link:hover {
    color: #7EBE63;
}



.mobile-nav-menu .current_page_item a {
    color: #7EBE63;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    position: absolute;
    bottom: 45px;
    left: 0;
    right: 0;
    text-align: center;
    row-gap: 18px
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #502E91;
    color: #FFFFFF;
    border: none;
    border-radius: 25px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'avenir_nextmedium', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    margin: 0 auto;
}

.mobile-Logout-btn {
    font-size: 16px;
    font-weight: 700;
    color: #ff5656;
    line-height: 25px;
    display: inline-block;
}

.mobile-login-btn:hover {
    background: #7FBD61;
}

.mobile-login-btn img {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments for tablets */
@media (max-width: 1024px) {
    .header-container {
        padding: 15px 30px;
        gap: 25px;
    }

    .nav-menu {
        gap: 20px;
    }

    .nav-link {
        font-size: 14px;
    }
}

/* Mobile Header Utility Section */
.mobile-header-utility {
    display: none;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.mobile-header-language-selector .mobile-header-lang-link {
    color: #502E91;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: "IBM Plex Sans Arabic", sans-serif;
}


.cart_icon {
    width: 48px;
    height: 48px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid #7FBD61;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart_icon img {
    position: relative;
    bottom: -2px;
    left: -1px;
}

.mobile-header-search-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #7FBD61;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 0;
}

.mobile-header-search-btn:hover {
    background: #53d458;
}

.mobile-header-search-btn img {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments for mobile - below 1000px */
@media (max-width: 1000px) {
    .header {
        top: 0;
        padding: 15px;
    }

    .header .container {
        border-radius: 58px;
        padding: 5px 10px;
        gap: 10px;
    }

    .cart_icon {
        width: 42px;
        height: 42px;
    }

    .cart_icon img {
        width: 21px;
    }

    .mobile-header-utility .mobile-header-language-selector {
        display: none !important;
    }

    .mobile-header-utility {
        gap: 10px;
    }

    /* Hide desktop navigation and utility items */
    .header-nav,
    .header-utility {
        display: none;
    }

    /* Show mobile utility and menu button */
    .mobile-header-utility {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }


    .mobile-header-search-btn {
        width: 44px;
        height: 44px;
    }

    /* Adjust logo size on mobile */

}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .header {
        padding: 10px;
    }

    .header .container {
        padding: 5px 10px;
    }

}

/* Search Bar Styles */
.searchbar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(80, 46, 145, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.searchbar-container.active {
    display: flex;
    opacity: 1;
}

.searchbar-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 0 40px;
}

.searchbar-input {
    width: 100%;
    padding: 20px 60px 20px 10px;
    font-size: 24px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #fff;
    color: #fff;
    outline: none;
    font-family: 'avenir_nextregular';
}

.searchbar-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.searchbar-close {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.searchbar-close:hover {
    color: #7FBD61;
}

@media (max-width: 768px) {
    .searchbar-wrapper {
        padding: 0 20px;
    }

    .searchbar-input {
        font-size: 18px;
        padding: 15px 50px 15px 15px;
    }

    .searchbar-close {
        font-size: 32px;
        right: 20px;
    }


}

@media (max-width: 600px) {

    .mobile-menu-nav {
        flex: 1;
        padding: 45px 5%;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }
}