/* Mobile Menu Styles */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-drawer.active {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e1e1e;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.mobile-menu-close:hover {
    background: #f0f0f0;
    color: #f26a30;
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-menu-main-links {
    margin-bottom: 30px;
}

.mobile-menu-main-links a,
.mobile-menu-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1e1e1e;
    font-weight: 600;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.mobile-menu-main-links a:hover,
.mobile-menu-footer a:hover {
    background: #f5f5f5;
}

.mobile-menu-main-links a i,
.mobile-menu-footer a i {
    color: #f26a30;
    width: 20px;
    text-align: center;
}

.mobile-menu-categories {
    margin-bottom: 20px;
}

.mobile-menu-categories h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e1e1e;
    padding: 0 16px;
}

.mobile-menu-category {
    margin-bottom: 8px;
}

.mobile-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1e1e1e;
    font-weight: 600;
    transition: background 0.2s;
}

.mobile-category-link:hover {
    background: #f5f5f5;
}

.mobile-submenu-toggle {
    color: #999;
    font-size: 12px;
    transition: transform 0.2s;
}

.mobile-submenu-toggle.active {
    transform: rotate(-90deg);
}

.mobile-submenu {
    display: none;
    padding-right: 20px;
    margin-top: 8px;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    display: block;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.2s;
}

.mobile-submenu a:hover {
    background: #f5f5f5;
    color: #f26a30;
}

.mobile-menu-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Mobile menu button styling */
.wd-header-mobile-nav button {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.wd-header-mobile-nav button:hover {
    color: #f26a30;
}

.wd-header-mobile-nav .wd-tools-icon {
    font-size: 20px;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-menu-drawer {
        width: 90%;
    }
    
    .mobile-menu-header {
        padding: 16px;
    }
    
    .mobile-menu-content {
        padding: 16px;
    }
    
    .mobile-menu-main-links a,
    .mobile-menu-footer a,
    .mobile-category-link {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* Bottom navigation bar for mobile (replaces hamburger menu) */
.mobile-bottom-nav {
    display: none; /* Hidden by default (desktop) */
}

@media (max-width: 1024px) {
    /* Hide hamburger button on mobile */
    .wd-header-mobile-nav {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex; /* Show on mobile */
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        height: 70px;
        background: #ffffff;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.16);
        z-index: 9999;
        border-radius: 16px 16px 0 0;
        padding: 6px 8px 8px;
    }

    .mobile-bottom-nav-inner {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
        padding: 0 4px;
    }

    .mobile-bottom-nav a {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: #6b7280;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.2;
        padding: 4px 2px;
    }
    
    .mobile-bottom-nav a span:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        text-align: center;
        font-size: 9.5px;
    }

    .mobile-bottom-nav a .nav-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f3f4f6;
        color: #f26a30;
        font-size: 13px;
        flex-shrink: 0;
    }

    .mobile-bottom-nav a.active {
        color: #111827;
    }

    .mobile-bottom-nav a.active .nav-icon {
        background: #fee2e2;
        color: #f26a30;
    }

    /* Prevent content from being hidden behind bottom nav */
    body {
        padding-bottom: 78px;
    }
    
    /* Responsive adjustments for very small screens */
    @media (max-width: 375px) {
        .mobile-bottom-nav {
            height: 68px;
            padding: 5px 4px 6px;
        }
        
        .mobile-bottom-nav-inner {
            gap: 2px;
            padding: 0 2px;
        }
        
        .mobile-bottom-nav a {
            gap: 2px;
            padding: 3px 1px;
        }
        
        .mobile-bottom-nav a span:last-child {
            font-size: 9px;
        }
        
        .mobile-bottom-nav a .nav-icon {
            width: 22px;
            height: 22px;
            min-width: 22px;
            min-height: 22px;
            font-size: 12px;
        }
        
        body {
            padding-bottom: 76px;
        }
    }
}

