/* File: assets/css/header-responsive.css — AMRIC (mobile-first) */
/* NOTE: not currently referenced by any page's $page_styles — see project notes */

/*--------------------------------------------------------------
# Header Responsive Styles
--------------------------------------------------------------*/

/* Base styles remain in style.css - this file contains only responsive adjustments */

/* Mobile styles (default/base) */
.site-header {
    padding: 0.5rem 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;
}

.logo img {
    max-height: 30px;
}

.logo-text {
    font-size: 1.1rem;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 0;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Mobile menu toggle button — visible by default on mobile */
.mobile-menu-toggle {
    display: flex;
    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;
}

.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);
}

/* Cart icon for mobile */
.cart-icon-mobile {
    display: block;
    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;
}

/* Mobile nav menu (off-canvas) */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    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 on mobile */
.search-box,
.social-icons-header {
    display: none;
}

/* 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;
}

/* Menu overlay */
.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;
}

/*--------------------------------------------------------------
# Responsive scale-up — small and above
--------------------------------------------------------------*/

/* Small devices (landscape phones, 768px and up) */
@media (min-width: 768.02px) {
    .logo img {
        max-height: 35px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .site-header {
        padding: 0.5rem 0;
    }
}

/* Medium devices (tablets, 992px and up) */
@media (min-width: 992.02px) {
    .site-header {
        padding: 0.75rem 0;
    }

    /* Hide mobile menu toggle */
    .mobile-menu-toggle {
        display: none;
    }

    .logo img {
        max-height: 45px;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 0;
        box-shadow: none;
        overflow-y: visible;
        z-index: auto;
        background-color: transparent;
    }

    .nav-menu li {
        margin-left: 2rem;
        width: auto;
        padding: 0;
    }

    .nav-menu a {
        width: auto;
        display: inline-block;
    }

    /* Show desktop search and social icons */
    .search-box,
    .social-icons-header {
        display: block;
    }

    /* Hide mobile cart icon */
    .cart-icon-mobile {
        display: none;
    }

    .mobile-account-links {
        display: none;
    }

    .mobile-search-form {
        display: none;
    }

    .menu-overlay {
        display: none !important;
    }
}