/* Botri Shop Header Styles - Responsive with Light/Dark Themes */
@import url('themes/_variables.css');
@import Url('shared/bottleeffect.css');
/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}



body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Header Container */
.header-content {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    direction: rtl;
    width: 100%;
}


/* Header Top Section */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

/* Logo and Slogan */
.logo-slogan {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.logo-link {
    background-image: var(--logo-url);
    background-size: contain;
    background-repeat: no-repeat;
    height: 100px;
    width: 150px;
    object-fit: contain;
    display: flex;
    align-items: center;
}



.slogan {
    color: var(--text-secondary);
    font-size: 1.9rem;
    font-style: italic;
    margin: 0;
    filter: drop-shadow(0 0 8px var(--accent-color));
}

/* Action Icons */
.action-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.has-dropdown {
    position: relative;
}

.user-dropdown-btn, .user-account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .user-dropdown-btn:hover, .user-account-btn:hover {
        background: var(--accent-color);
        color: white;
        transform: translateY(-2px);
    }

.user-dropdown-menu {
    position: absolute;
    top: 50px;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
    align-content: center;
    align-items: center;
    text-align: center;
   
}
    


.user-dropdown-menu li:nth-child(1) a {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
    .user-dropdown-menu li:nth-last-child(-n+1) a {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }



.has-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu li {
    list-style: none;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    gap: 10px;
}

    .user-dropdown-menu a:hover {
        background: var(--accent-color);
        color: white;
    }

.user-dropdown-menu .logout-item a {
    color: #e53e3e;
    border-bottom: none;
}

    .user-dropdown-menu .logout-item a:hover {
        background: #e53e3e;
        color: white;
    }

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .theme-toggle:hover {
        background: var(--accent-color);
        color: white;
        transform: translateY(-2px);
    }

    .theme-toggle .fa-sun {
        display: none;
    }

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

/* Navigation Container */
.nav-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Search Container - Bottle Shape */
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.h-search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 25px 8px 8px 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

    .h-search-input:focus {
        box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
        border-radius: 8px 25px 25px 8px;
    }

    .h-search-input::placeholder {
        color: var(--text-secondary);
    }

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    cursor: pointer;
}


/* Animation Delays for Nav Items */

/* Responsive Design */
@media (max-width: 1024px) {
    .header-top {
        padding: 1rem;
    }


    .logo-slogan {
        min-width: 250px;
    }

    .slogan {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {


    .header-top {
        flex-direction: row;
        text-align: center;
        gap: 1.5rem;
    }

    .logo-slogan {
        justify-content: center;
        min-width: auto;
    }



    .search-container {
        width: 100%;
        order: 2;
    }


    .action-icons {
        justify-content: center;
    }

    .user-dropdown-menu {
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .has-dropdown:hover .user-dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 640px) {

    .logo {
        height: 40px;
    }



    .action-icons {
        gap: 0.5rem;
    }

    .user-dropdown-btn span, .user-account-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 0.75rem;
    }

    .h-search-input {
        padding: 0.6rem 2.5rem 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .search-icon {
        right: 0.75rem;
    }



    .cart-icon, .theme-toggle {
        width: 35px;
        height: 35px;
    }

  
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }

    [data-theme="dark"] {
        --border-color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .nav-item {
        animation: none;
        opacity: 1;
    }
}

/* JavaScript Theme Toggle Helper */
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.nav-list {
    display:none;
}

.user-menu {
    display: none;
}

.has-dropdown {
   
    display: none;
}
.basket-container{
    display: none;
}
@media (min-width:780px) {
    .user-menu {
        display: flex;
    }

    .has-dropdown {
        display: block;
    }
    .basket-container {
        display:block;
    }
    /* Shopping Cart */
    .cart-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.3s ease;
    }

        .cart-icon:hover {
            background: var(--accent-color);
            color: white;
            transform: translateY(-2px);
        }

    .cart-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #e53e3e;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }


    /* Navigation Menu */
    .nav-list {
            display: flex;
            flex-direction: row;
            list-style: none;
            gap: 0.5rem;
            flex-wrap: wrap;
            font-size: 1.2REM;
            filter: drop-shadow(0 0 8px var(--accent-color));
            font-style: oblique;
            direction: rtl;
        }

        .nav-item {
            position: relative;
        }

        .nav-link {
            display: flex;
            flex-direction: row;
            padding: 0.5rem 1rem;
            color: var(--text-primary);
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            font-weight: 500;
        }

            .nav-link:hover {
                background: var(--accent-color);
                color: white;
                transform: translateY(-2px);
            }

                .nav-link:hover .arrow {
                    padding-left: 10px;
                    transform: rotate(90deg);
                }


        .arrow {
            display: block;
            color:var(--text-primary);
            position: relative;
            font-size: 10px;
            padding-top: 10px;
        }
        /* Dropdown Menu */
    .dropdown-menu {
        position: absolute;
        display: none;
        top: 100%;
        left: 0;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: var(--shadow);
        min-width: 200px;
        opacity: 1;
        visibility: visible;
        transform: translateY(-100px);
        transition: all 1.3s ease;
        z-index: 20;
        text-align: center;
        align-content: center;
        align-items: center;
        padding: 0;
        margin:0;
        font-size: 1rem;
    }

    .dropdown-sub {
        position: absolute;
        right: 100%;
        margin-top: -30px;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: var(--shadow);
        min-width: 200px;
        opacity: 1;
        visibility: visible;
        display: none;
        transform: translateX(-100px);
        transition: all 2.3s ease;
        z-index: 20;
        text-align: center;
        align-content: center;
        align-items: center;
        padding: 0;
    }
    .dropdown-menu li:nth-child(1) a {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

        .dropdown-menu li:nth-last-child(-n+1) a {
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
        }


    .dropdown-sub li:nth-child(1) a {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
      
    }

    .dropdown-sub li:nth-last-child(-n+1) a {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
      
    }

        /* برای دسکتاپ - hover */
        .nav-item.has-dropdown:hover .dropdown-menu,
        .has-dropdown-sub:hover .dropdown-sub {
            opacity: 1;
            z-index: 20;
            display: block;
            visibility: visible;
            transform: translateY(0);
        }

        .has-dropdown-sub:hover .dropdown-sub {
            transform: translateX(0);
        }

      
        .dropdown-menu li {
            list-style: none;
           
        }

    .dropdown-menu a {
        display: flex;
        flex-direction: row;
        padding: 0.75rem 1rem;
        text-align: center;
        align-content: center;
        align-items: center;
        border-radius:0;
        color: var(--text-primary);
        text-decoration: none;
        border-bottom: 1px solid var(--border-color);
        transition: all 0.3s ease;
        margin:0;
    }

            .dropdown-menu a:hover {
                background: var(--accent-color);
                color: white;
            }

      
    }



   