/* WooCommerce Auto Categories Menu - Styles */

:root {
    --wac-primary-color: #FED700;
    --wac-text-color: #333;
    --wac-border-color: #e0e0e0;
    --wac-hover-bg: #f5f5f5;
    --wac-white: #ffffff;
}

/* Main Wrapper */
.wac-wrapper {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    z-index: 100;
}

/* Desktop Menu Container */
.wac-menu-container {
    background: var(--wac-white);
    border: 1px solid var(--wac-border-color);
    border-radius: 4px;
    overflow: visible;
    position: relative;
    z-index: 100;
}

/* Menu Header */
.wac-menu-header {
    background: var(--wac-primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wac-menu-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--wac-text-color);
}

.wac-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: var(--wac-text-color);
    padding: 0;
    width: 32px;
    height: 32px;
}

/* Main Menu */
.wac-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 100;
}

.wac-menu-item {
    position: relative;
    border-bottom: 1px solid var(--wac-border-color);
    z-index: 100;
}

.wac-menu-item:last-child {
    border-bottom: none;
}

.wac-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: var(--wac-text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.wac-menu-link:hover {
    background: var(--wac-hover-bg);
    color: var(--wac-text-color);
    padding-left: 25px;
}

.wac-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

/* Submenu */
.wac-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 250px;
    background: var(--wac-white);
    border: 1px solid var(--wac-border-color);
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.wac-has-children:hover > .wac-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.wac-submenu .wac-menu-item {
    border-bottom: none;
    z-index: 1000;
}

.wac-submenu .wac-menu-link {
    padding: 8px 20px;
}

.wac-submenu .wac-menu-link:hover {
    background: var(--wac-primary-color);
    color: var(--wac-text-color);
}

/* Nested Submenus */
.wac-submenu .wac-submenu {
    left: 100%;
    top: 0;
}

/* Mega Menu Styles */
.wac-see-all {
    background: #f9f9f9;
}

.wac-see-all-link {
    font-weight: 600;
    color: var(--wac-text-color) !important;
}

.wac-mega-menu {
    position: absolute;
    left: 100%;
    bottom: 0;
    min-width: 900px;
    max-width: 1100px;
    background: var(--wac-white);
    border: 1px solid var(--wac-border-color);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 25px;
    max-height: 600px;
    overflow-y: auto;
}

.wac-see-all:hover > .wac-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.wac-mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.wac-mega-column {
    min-width: 0;
}

.wac-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wac-mega-item {
    margin-bottom: 15px;
}

.wac-mega-link {
    display: block;
    color: var(--wac-text-color);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.wac-mega-link:hover {
    color: #000;
}

.wac-mega-sublist {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
}

.wac-mega-sublist li {
    margin-bottom: 5px;
}

.wac-mega-sublist a {
    display: block;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    padding: 3px 0;
    padding-left: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.wac-mega-sublist a:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--wac-primary-color);
}

.wac-mega-sublist a:hover {
    color: var(--wac-text-color);
    padding-left: 16px;
}

/* Hide limited items wrapper on mobile */
.wac-menu-item-limited {
    list-style: none;
}

.wac-menu-item-limited > .wac-menu-item {
    margin: 0;
    padding: 0;
}

/* Scrollbar for mega menu */
.wac-mega-menu::-webkit-scrollbar {
    width: 6px;
}

.wac-mega-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wac-mega-menu::-webkit-scrollbar-thumb {
    background: var(--wac-primary-color);
    border-radius: 3px;
}

.wac-mega-menu::-webkit-scrollbar-thumb:hover {
    background: #e5c600;
}

/* Mobile Toggle Button - Always visible on mobile */
.wac-mobile-toggle {
    display: none; /* Hidden on desktop */
}

@media screen and (max-width: 768px) {
    .wac-mobile-toggle {
        display: block !important; /* Force display on mobile */
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 9999 !important;
    }
}

.wac-menu-icon {
    background: var(--wac-primary-color);
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 45px;
}

.wac-menu-icon:hover {
    opacity: 0.9;
}

.wac-menu-icon span {
    display: block !important;
    width: 25px !important;
    height: 3px !important;
    background: var(--wac-text-color) !important;
    margin: 3px 0 !important;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.wac-menu-icon span:first-child {
    margin-top: 0 !important;
}

.wac-menu-icon span:last-child {
    margin-bottom: 0 !important;
}


/* Overlay */
.wac-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wac-overlay.active {
    opacity: 1;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Show our custom mobile toggle */
    .wac-mobile-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 9999;
    }
    
    
    .wac-menu-container {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        overflow-y: auto;
        z-index: 9998;
        transition: left 0.3s ease;
        border: none;
        border-radius: 0;
    }
    
    .wac-menu-container.active {
        left: 0;
    }
    
    .wac-close-btn {
        display: block;
    }
    
    .wac-overlay {
        display: block;
        z-index: 9997;
    }
    
    /* Mobile Submenu Behavior */
    .wac-submenu {
        position: static;
        opacity: 0;
        visibility: hidden;
        height: 0;
        overflow: hidden;
        transform: none;
        border: none;
        box-shadow: none;
        background: #f9f9f9;
        padding: 0;
        transition: all 0.3s ease;
    }
    
    .wac-has-children.active > .wac-submenu {
        opacity: 1;
        visibility: visible;
        height: auto;
        padding: 5px 0;
    }
    
    .wac-submenu .wac-menu-link {
        padding-left: 35px;
    }
    
    .wac-submenu .wac-submenu .wac-menu-link {
        padding-left: 50px;
    }
    
    .wac-arrow {
        transform: rotate(90deg);
    }
    
    .wac-has-children.active > .wac-menu-link .wac-arrow {
        transform: rotate(-90deg);
    }
}

/* Scrollbar Styling for Mobile Menu */
@media screen and (max-width: 768px) {
    .wac-menu-container::-webkit-scrollbar {
        width: 6px;
    }
    
    .wac-menu-container::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .wac-menu-container::-webkit-scrollbar-thumb {
        background: var(--wac-primary-color);
        border-radius: 3px;
    }
    
    .wac-menu-container::-webkit-scrollbar-thumb:hover {
        background: #e5c600;
    }
}