/* Mobile Menu Styles */

/* Hide mobile menu button on desktop */
.mobile-menu-btn {
    display: none;
}

/* Hamburger Button */
.hamburger-btn {
    background: var(--apple-glass-bg, rgba(255, 255, 255, 0.25));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--apple-glass-border, rgba(255, 255, 255, 0.18));
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    position: relative;
    overflow: hidden;
}

.hamburger-btn:hover {
    background: var(--apple-blue, #007AFF);
    transform: scale(1.05);
}

.hamburger-btn span {
    width: 18px;
    height: 2px;
    background: var(--text-color, #2c3e50);
    border-radius: 1px;
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

.hamburger-btn:hover span {
    background: white;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--apple-white, #ffffff);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--apple-light-gray, #F2F2F7);
}

.mobile-menu-header h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color, #2c3e50);
    margin: 0;
}

.close-mobile-menu {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-color, #2c3e50);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

.close-mobile-menu:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Links */
.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu-links li:last-child {
    border-bottom: none;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text-color, #2c3e50);
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
    position: relative;
    overflow: hidden;
}

.mobile-menu-links a::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.1), transparent);
    transition: var(--apple-transition, 0.3s cubic-bezier(0.4, 0, 0.2, 1));
}

.mobile-menu-links a:hover::before {
    right: 100%;
}

.mobile-menu-links a:hover {
    background: rgba(0, 122, 255, 0.05);
    color: var(--apple-blue, #007AFF);
    padding-right: 25px;
}

.mobile-menu-links a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: var(--apple-blue, #007AFF);
}

.mobile-menu-links a span {
    flex: 1;
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: block;
    }
    
    /* Hide desktop links */
    .desktop-links {
        display: none !important;
    }
    
    /* Adjust header layout for mobile */
    .header-content .container {
        padding: 0 15px;
    }
    
    .left-header {
        gap: 10px;
    }
    
    /* Make mobile menu full width on small screens */
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
    }
    
    .mobile-menu-header {
        padding: 15px;
    }
    
    .mobile-menu-links a {
        padding: 15px;
        font-size: 15px;
    }
}

/* Animation for hamburger button when menu is active */
.mobile-menu.active ~ .header .hamburger-btn span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active ~ .header .hamburger-btn span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active ~ .header .hamburger-btn span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Smooth transitions for all elements */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {
    .cart-button,
    .search-button,
    .hamburger-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .mobile-menu {
        background: #1C1C1E;
        color: #FFFFFF;
    }
    
    .mobile-menu-header {
        background: #2C2C2E;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-links li {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
    
    .mobile-menu-links a {
        color: #FFFFFF;
    }
}