/**
 * Category Accordion CSS for WooCommerce categories
 * 
 * 优化分类导航样式，让展开/折叠指示器更加明显
 * 当前活动分类使用主题色高亮显示
 */

/* 基本样式调整 */
.product-categories {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-categories .category-item {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-categories .category-item a {
    display: block;
    padding: 10px 30px 10px 0; /* 增加右侧padding，为展开/折叠指示器留出空间 */
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.product-categories .category-item a:hover {
    color: #c4ff00;
}

/* 当前活动分类样式 */
.product-categories .category-item.active > a {
    color: #c4ff00;
    font-weight: bold;
}

/* 折叠/展开指示器样式 */
.product-categories .category-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 3px;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-categories .category-toggle:hover {
    color: #000;
    background-color: #c4ff00;
}

/* 子分类样式 */
.product-categories .subcategories {
    margin: 0;
    padding: 0 0 0 15px;
    list-style: none;
    border-top: 1px solid #f0f0f0;
    display: none; /* 默认隐藏所有子分类 */
}

.product-categories .subcategory-item {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-categories .subcategory-item:last-child {
    border-bottom: none;
}

.product-categories .subcategory-item a {
    padding: 8px 0;
    font-size: 13px;
}

/* 产品计数样式 */
.product-categories .count {
    position: absolute;
    right: 30px; /* 调整位置，避免与展开/折叠指示器重叠 */
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
    background-color: #f9f9f9;
    padding: 2px 6px;
    border-radius: 10px;
} 