.wc-category-nav {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Container Styling */
.wc-category-nav li {
    margin: 0 0 5px 0;
    padding: 0;
    position: relative;
}

/* Button-like Link Styling */
.wc-category-nav a,
.wc-category-nav .cat-name {
    color: #00aa63;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}

/* Button-like Link Styling */
.wc-category-nav a {
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 15px 10px 40px; /* Extra left padding for toggle button */
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0;
    position: relative;
    font-weight: 500;
}

.wc-category-nav a:hover {
    background: #f0f0f0;
    color: #2c3338;
    border-color: #c3c4c7;
}

/* Toggle Button Styling */
.wc-category-nav li.has-children > .toggle-btn {
    display: block;
    position: absolute;
    left: 1px; /* Align with button border */
    top: 1px; /* Align with button border */
    width: 32px;
    height: calc(100% - 2px); /* Account for button borders */
    background: #f0f0f0;
    border: none;
    border-right: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease;
}

/* Toggle Button Icon */
.wc-category-nav li.has-children > .toggle-btn:after {
    content: '+';
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #666;
}

.wc-category-nav li.has-children.is-expanded > .toggle-btn:after {
    content: '−'; /* Using a proper minus sign */
}

/* Toggle Button Hover */
.wc-category-nav li.has-children > .toggle-btn:hover {
    background: #e4e4e4;
}

/* Count Badge */
.wc-category-nav .count {
    color: #00aa63;
    font-size: 12px;
    margin-left: 5px;
}

/* Subcategories Styling */
.wc-category-nav .children {
    display: none;
    margin: 5px 0 5px 20px;
    padding: 0;
    list-style: none;
}

/* Regular category background */
.wc-category-nav .cat-parent-header,
.wc-category-nav li:not(.has-children) > a {
    background: #f8f8f8;
    border: 1px solid #ddd;
}

/* Current/Active Category Styling */
.wc-category-nav .current-cat > .cat-parent-header,
.wc-category-nav .current-cat > a,
.wc-category-nav .current-cat-parent > .cat-parent-header {
    background: #dddddd !important; /* Even darker grey for active categories */
    color: #000000 !important;
    border-color: #cccccc;
    font-weight: bold;
}

/* Current category name */
.wc-category-nav .current-cat > .cat-parent-header .cat-name,
.wc-category-nav .current-cat > a,
.wc-category-nav .current-cat-parent > .cat-parent-header .cat-name {
    color: #000000 !important;
}

/* Make parent categories of current category also show darker background */
.wc-category-nav .current-cat-parent > .cat-parent-header {
    background: #dddddd !important;
}

/* Current category elements */
.wc-category-nav .current-cat > .cat-parent-header .count,
.wc-category-nav .current-cat > a .count,
.wc-category-nav .current-cat-parent > .cat-parent-header .count {
    color: #000000 !important;
}

.wc-category-nav .current-cat.has-children > .cat-parent-header::after,
.wc-category-nav .current-cat-parent.has-children > .cat-parent-header::after {
    color: #000000 !important;
}

.wc-category-nav .current-cat > .cat-parent-header .view-cat::before,
.wc-category-nav .current-cat-parent > .cat-parent-header .view-cat::before {
    color: #000000 !important;
}

/* Hover states - keep the dark background for active categories */
.wc-category-nav .current-cat > .cat-parent-header:hover,
.wc-category-nav .current-cat > a:hover,
.wc-category-nav .current-cat-parent > .cat-parent-header:hover {
    background: #dddddd !important;
}

/* Regular hover state for non-active categories */
.wc-category-nav .cat-parent-header:hover,
.wc-category-nav li:not(.has-children) > a:hover {
    background: #f0f0f0;
}

/* Depth Levels */
.wc-category-nav .children .cat-item {
    margin-bottom: 3px;
}

.wc-category-nav .children a {
    font-size: 13px;
    padding: 8px 15px 8px 40px;
    background: #fafafa;
}

.wc-category-nav .children .children a {
    font-size: 12px;
    padding: 7px 15px 7px 40px;
    background: #fcfcfc;
}

/* Hover Effects */
.wc-category-nav a:hover .count {
    background: #dadada;
}

.wc-category-nav .current-cat > a:hover {
    background: #45a049;
}

/* Active States */
.wc-category-nav li.is-expanded > .toggle-btn {
    background: #e4e4e4;
}

/* Animation */
.wc-category-nav .children {
    transition: all 0.3s ease-in-out;
}

/* Responsive Design */
@media (max-width: 767px) {
    .wc-category-nav a,
    .wc-category-nav .cat-name {
        font-size: 13px;
    }

    .wc-category-nav .count {
        font-size: 11px;
    }

    .wc-category-nav a {
        padding: 8px 12px 8px 36px;
    }

    .wc-category-nav li.has-children > .toggle-btn {
        width: 28px;
    }

    .wc-category-nav .children a {
        font-size: 12px;
        padding: 7px 12px 7px 36px;
    }
}

/* Empty Categories */
.wc-category-nav .cat-item:empty {
    display: none;
}

/* Loading State */
.wc-category-nav.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Parent Category Header */
.wc-category-nav .cat-parent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #00aa63;
}

.wc-category-nav .cat-parent-header:hover {
    background: #f0f0f0;
    color: #00aa63;
}

.wc-category-nav .cat-parent-header .cat-name {
    flex-grow: 1;
    padding-right: 30px;
}

/* View Category Link */
.wc-category-nav .cat-link {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    position: relative;
}

.wc-category-nav .cat-link:hover {
    background: #f0f0f0;
}

.wc-category-nav .view-cat::before {
    content: '→';
    font-size: 14px;
    color: #00aa63;
}

/* Child Categories */
.wc-category-nav li:not(.has-children) > a {
    padding: 10px 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: block;
}

/* Expanded State Indicator */
.wc-category-nav .has-children > .cat-parent-header::after {
    content: '+';
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #00aa63;
}

.wc-category-nav .has-children.is-expanded > .cat-parent-header::after {
    content: '−';
    color: #00aa63;
}

/* Hover States */
.wc-category-nav a:hover,
.wc-category-nav .cat-parent-header:hover,
.wc-category-nav .cat-link:hover .view-cat::before {
    color: #00aa63;
}

/* Parent Category Styling */
.wc-category-nav .has-children > .cat-parent-header {
    transition: all 0.2s ease;
}

.wc-category-nav .has-children > .cat-parent-header .cat-name {
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

/* Hover state for parent categories */
.wc-category-nav .has-children > .cat-parent-header:hover .cat-name,
.wc-category-nav .has-children > .cat-parent-header:hover .count,
.wc-category-nav .has-children > .cat-parent-header:hover::after,
.wc-category-nav .has-children > .cat-parent-header:hover .view-cat::before {
    color: #000000 !important;
}

/* Subcategory hover */
.wc-category-nav li:not(.has-children) > a:hover {
    color: #000000 !important;
    font-weight: 600 !important;
}

.wc-category-nav li:not(.has-children) > a:hover .count {
    color: #000000 !important;
}

/* Keep active categories black */
.wc-category-nav .current-cat > .cat-parent-header,
.wc-category-nav .current-cat > a,
.wc-category-nav .current-cat-parent > .cat-parent-header,
.wc-category-nav .current-cat > .cat-parent-header:hover .cat-name,
.wc-category-nav .current-cat-parent > .cat-parent-header:hover .cat-name {
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Regular subcategories stay the same size */
.wc-category-nav li:not(.has-children) > a {
    font-size: 14px;
    font-weight: normal;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .wc-category-nav .has-children > .cat-parent-header .cat-name {
        font-size: 15px !important;
    }
    
    .wc-category-nav li:not(.has-children) > a {
        font-size: 13px;
    }
}

/* Regular subcategory links */
.wc-category-nav li:not(.has-children) > a {
    font-size: 14px;
    font-weight: normal;
    transition: all 0.2s ease;
}

/* Hover state for subcategories */
.wc-category-nav li:not(.has-children) > a:hover {
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Make sure the count also changes color on hover */
.wc-category-nav li:not(.has-children) > a:hover .count {
    color: #000000 !important;
}

/* Keep active subcategories black */
.wc-category-nav .current-cat > a,
.wc-category-nav .current-cat > a:hover {
    color: #000000 !important;
    font-weight: 600 !important;
} 