/**
 * WC Category Menu Widget Styles
 * Default styling for multi-level parent hierarchy
 */

/* Base menu styling */
.wc-category-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Multi-Column Layout */
.wc-category-menu.column-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Default gap, can be overridden by Elementor controls */
}

.wc-category-menu.column-layout > li {
    flex: 1;
    min-width: 200px; /* Minimum column width */
}

/* Disable flex when column-count is used to avoid unequal widths */
.wc-category-menu.column-layout.has-column-count > li {
    flex: none;
    width: auto;
}

/* Responsive adjustments for column layout */
@media (max-width: 768px) {
    .wc-category-menu.column-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .wc-category-menu.column-layout > li {
        flex: none;
        min-width: auto;
    }
}

/* Parent categories (any level that has children) - PROMINENT STYLING */
.wc-category-menu .has-children > a {
    font-weight: 700; /* Bold */
    font-size: 1em; /* Same size as children */
    color: #333; /* Darker color */
    text-decoration: none;
    display: block;
    padding: 8px 0;
}

.wc-category-menu .has-children > a:hover {
    color: #0073aa; /* Primary blue on hover */
}

/* Child categories (leaf nodes with no children) - SUBTLE STYLING */
.wc-category-menu .no-children > a {
    font-weight: 400; /* Normal weight */
    font-size: 1em; /* Same size as parents */
    color: #666; /* Lighter color */
    text-decoration: none;
    display: block;
    padding: 6px 0;
}

.wc-category-menu .no-children > a:hover {
    color: #0073aa; /* Primary blue on hover */
}

/* Nested category lists */
.wc-category-menu .child-categories {
    list-style: none;
    margin: 0;
    padding: 0;
    /* Column count controlled by Elementor depth level controls */
}

/* When indentation is disabled for specific depth levels */
.wc-category-menu.no-depth-2-indent > li .child-categories {
    margin-left: 0 !important;
}

.wc-category-menu.no-depth-3-indent > li .child-categories .child-categories {
    margin-left: 0 !important;
}

.wc-category-menu.no-depth-4-indent > li .child-categories .child-categories .child-categories {
    margin-left: 0 !important;
}

/* Clean hierarchy without borders */
.wc-category-menu ul {
    margin-left: 0;
    padding-left: 0;
}

/* Remove any extra styling for top level */
.wc-category-menu > li > .child-categories {
    margin-left: 0;
    padding-left: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wc-category-menu .has-children > a {
        padding: 6px 0;
    }
    
    .wc-category-menu .no-children > a {
        padding: 4px 0;
    }
}

/* When indentation is disabled, ensure no margin on mobile too */
@media (max-width: 768px) {
    .wc-category-menu.no-depth-2-indent > li .child-categories {
        margin-left: 0 !important;
    }
    
    .wc-category-menu.no-depth-3-indent > li .child-categories .child-categories {
        margin-left: 0 !important;
    }
    
    .wc-category-menu.no-depth-4-indent > li .child-categories .child-categories .child-categories {
        margin-left: 0 !important;
    }
}
