/* SAMURAI Anime Store - Mobile Navigation CSS */

/* Mobile Navigation Styles */
@media (max-width: 650px) {
    /* Reorder navbar elements for mobile */
    .navbar {
        display: flex;
        justify-content: center; /* Center the logo */
        position: relative; /* For absolute positioning of menu toggle */
    }
    
    /* Move logo to center */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Move hamburger menu to left */
    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1002;
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: var(--light-text);
        transition: var(--transition-fast);
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--dark-bg);
        flex-direction: column;
        padding: 2rem 0;
        transition: all 0.4s ease;
        z-index: 999;
        gap: 1.5rem;
    }
    
    .nav-menu.active {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        font-size: 1.2rem;
        padding: 1rem 0;
        width: 100%;
        display: block;
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    /* Position nav icons to the right */
    .nav-icons {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        display: flex;
        gap: 0.75rem;
    }
    
    /* Add some space at the bottom of the page when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Use the muted purple colors for navigation elements */
    .nav-menu a:hover, .nav-menu a.active {
        color: var(--accent-primary); /* #9370DB - Soft purple */
    }
    
    .nav-menu a::after {
        background: linear-gradient(90deg, #9370DB, #6c5ce7); /* Soft purple to muted purple */
    }
    
    /* Add animation for menu items */
    .nav-menu.active li {
        animation: fadeInRight 0.5s ease forwards;
        animation-delay: calc(0.1s * var(--item-index, 0));
        opacity: 0;
    }
    
    @keyframes fadeInRight {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Smaller screens adjustments */
    @media (max-width: 576px) {
        .navbar {
            padding: 0 1rem;
            height: 60px;
        }
        
        .logo a {
            font-size: 1.5rem;
        }
        
        .nav-menu {
            top: 60px;
            height: calc(100vh - 60px);
        }
    }
}
