/* File: assets/css/header-responsive.css */

/*--------------------------------------------------------------
# Header Responsive Styles
--------------------------------------------------------------*/

/* Base styles remain in style.css - this file contains only responsive adjustments */

/* Desktop styles (default) */
.site-header {
    padding: 0.75rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1010;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--theme-transition);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 2rem;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Mobile menu toggle button - hidden by default */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    position: relative;
    z-index: 1020;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Cart icon for mobile - new addition */
.cart-icon-mobile {
    display: none;
    position: relative;
    margin-right: 1rem;
}

.cart-icon-mobile a {
    color: var(--text-color);
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Additional desktop-specific styles */
    .mobile-account-links {
        display: none;
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Adjust logo size slightly */
    .logo img {
        max-height: 40px;
    }
    
    /* Hide desktop nav items */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 1.5rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1015;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .nav-menu a {
        width: 100%;
        display: block;
    }
    
    /* Hide desktop search and social icons */
    .search-box,
    .social-icons-header {
        display: none;
    }
    
    /* Show mobile cart icon */
    .cart-icon-mobile {
        display: block;
    }
    
    /* Handle active mobile menu toggle */
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Mobile account links in nav menu */
    .mobile-account-links {
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-light);
    }
    
    .mobile-account-links a {
        display: flex;
        align-items: center;
        padding: 0.5rem 0;
        color: var(--text-color);
    }
    
    .mobile-account-links a i {
        margin-right: 0.5rem;
        width: 20px;
        text-align: center;
    }
    
    /* Mobile search form */
    .mobile-search-form {
        width: 100%;
        margin: 1rem 0;
    }
    
    .mobile-search-form form {
        display: flex;
        width: 100%;
    }
    
    .mobile-search-form input {
        flex: 1;
        padding: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 4px 0 0 4px;
        background-color: var(--bg-light);
    }
    
    .mobile-search-form button {
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 0 1rem;
        border-radius: 0 4px 4px 0;
    }
    
    /* Add overlay when mobile menu is open */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1010;
    }
    
    .menu-overlay.active {
        display: block;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    /* Further reduce logo size */
    .logo img {
        max-height: 35px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    /* Adjust header padding */
    .site-header {
        padding: 0.5rem 0;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Minimal logo size for very small screens */
    .logo img {
        max-height: 30px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    /* Narrower mobile menu */
    .nav-menu {
        width: 260px;
    }
}