/* === MOBILE MENU STYLES === */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle .hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--gcid-primary-color, #333);
    transition: all 0.3s ease;
    transform-origin: center;
    border-radius: 1px;
}

.mobile-menu-toggle .hamburger-line:nth-child(1) {
    margin-bottom: 5px;
}

.mobile-menu-toggle .hamburger-line:nth-child(2) {
    margin-bottom: 5px;
}

/* Animation when active */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Mobile Menu Container */
.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

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

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    min-height: 60px;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    color: var(--gcid-primary-color, #007cba);
}

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 20px 0;
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    margin: 0;
    padding: 0;
}

.mobile-menu-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-nav > ul > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-nav a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-menu-nav a:hover {
    background-color: #f8f9fa;
    color: var(--gcid-primary-color, #007cba);
    padding-left: 25px;
}

/* Submenu styles */
.mobile-menu-nav ul ul {
    background-color: #f8f9fa;
}

.mobile-menu-nav ul ul a {
    padding-left: 40px;
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

.mobile-menu-nav ul ul a:hover {
    padding-left: 45px;
    color: var(--gcid-primary-color, #007cba);
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.mobile-account-info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.mobile-account-info span {
    font-weight: 500;
}

.mobile-menu-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart widget adjustments in mobile menu */
.mobile-menu-footer .incom-cart-widget {
    margin: 0;
}

.mobile-menu-footer .incom-cart-widget a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: var(--gcid-primary-color, #007cba);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.mobile-menu-footer .incom-cart-widget a:hover {
    background-color: var(--gcid-primary-color-dark, #005a87);
}

.mobile-menu-footer .incom-cart-widget svg {
    stroke: #fff;
    margin-right: 8px;
}

.mobile-menu-footer .cart-count-circle {
    margin-left: 8px !important;
}

/* Responsive breakpoints */
@media (max-width: 980px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide desktop navigation */
    .et_pb_row_1_tb_header {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .mobile-menu-container {
        width: 100%;
        max-width: 100%;
    }
}

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

/* Additional mobile menu wrapper styles */
.incom-mobile-menu {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Accessibility improvements */
.mobile-menu-toggle:focus,
.mobile-menu-close:focus {
    outline: 2px solid var(--gcid-primary-color, #007cba);
    outline-offset: 2px;
}

.mobile-menu-nav a:focus {
    outline: 2px solid var(--gcid-primary-color, #007cba);
    outline-offset: -2px;
}

/* Animation improvements */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu-container.active {
    animation: slideInFromRight 0.3s ease;
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .mobile-menu-container {
        background-color: #1a1a1a;
        color: #fff;
    }
    
    .mobile-menu-header {
        border-bottom-color: #333;
    }
    
    .mobile-menu-nav a {
        color: #fff;
    }
    
    .mobile-menu-nav a:hover {
        background-color: #333;
    }
    
    .mobile-menu-nav ul ul {
        background-color: #2a2a2a;
    }
    
    .mobile-menu-nav ul ul a {
        color: #ccc;
    }
    
    .mobile-menu-footer {
        border-top-color: #333;
    }
    
    .mobile-account-info {
        color: #ccc;
    }
    
    .mobile-menu-close {
        color: #fff;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-menu-toggle .hamburger-line {
        background-color: #000;
    }
    
    .mobile-menu-container {
        border: 2px solid #000;
    }
    
    .mobile-menu-nav a {
        border-bottom: 1px solid #ccc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle .hamburger-line,
    .mobile-menu-overlay,
    .mobile-menu-container,
    .mobile-menu-nav a {
        transition: none;
    }
    
    .mobile-menu-container.active {
        animation: none;
    }
}
