/*!
Theme Name: Anxin
Theme URI: https://www.wpzhiku.com/
Author: Wenprise Co., LTD
Author URI: https://www.wpzhiku.com
Description: WordPress Flashfox Theme
Version: 1.0.0
Template: kadence
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: flashfox
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.

FlashFox is based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

.woocommerce-product-search select{
    padding-left: .75em;
}

.site-header .wp-block-columns{
    margin-bottom: 0;
}

.site-header .kt-blocks-info-box-text{
    white-space: nowrap;
}

/* Parts 分类列表样式优化 */
.rs-parts-list {
    margin: 0;
    padding: 0 !important;
    list-style: none;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.rs-parts-list .parts {
    border-bottom: 1px solid #e5e7eb;
}

.rs-part-heading{
    font-size: 18px;
    padding: 8px 16px;
    background: #f5f2ff;
}

.rs-parts-list .parts:last-child {
    border-bottom: none;
}

.rs-parts-list .parts > ul{
    margin: 0;
    padding: 0;
}

/* 主分类标题 */
.rs-parts-list > li > ul > li.cat-item {
    position: relative;
}

.rs-parts-list > li > ul > li.cat-item > a {
    display: block;
    padding: 16px 20px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* 为有子分类的项目添加展开/折叠图标 */
.rs-parts-list > li > ul > li.cat-item:has(.children) > a:after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #6b7280;
}

.rs-parts-list > li > ul > li.cat-item.expanded:has(.children) > a:after {
    transform: translateY(-50%) rotate(0deg);
}

/* 二级分类 */
.rs-parts-list .children {
    margin: 0;
    padding: 0;
    list-style: none;
    background: #f9fafb;
    display: none; /* 默认隐藏 */
    transition: all 0.3s ease;
}

.rs-parts-list .cat-item.expanded > .children {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.rs-parts-list .children .cat-item > a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

/* 为二级分类有子分类的项目添加图标 */
.rs-parts-list .children .cat-item:has(.children) > a {
    cursor: pointer;
}

.rs-parts-list .children .cat-item:has(.children) > a:after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 0.3s ease;
    font-size: 10px;
    color: #9ca3af;
}

.rs-parts-list .children .cat-item.expanded:has(.children) > a:after {
    transform: translateY(-50%) rotate(0deg);
}

.rs-parts-list .children .cat-item > a:hover {
    background: #ffffff;
    border-left-color: #009bda;
    color: #009bda;
    padding-left: 44px;
}

.rs-parts-list .children .cat-item > a:hover:before {
    background: #009bda;
    transform: translateY(-50%) scale(1.2);
}

.rs-parts-list .children .cat-item.current-cat > a {
    background: #009bda15;
    border-left-color: #009bda;
    color: #009bda;
    font-weight: 600;
}

.rs-parts-list .children .cat-item.current-cat > a:before {
    background: #009bda;
}

/* 三级分类 */
.rs-parts-list .children .children {
    background: #f3f4f6;
    display: none; /* 默认隐藏 */
}

.rs-parts-list .cat-item.expanded > .children .children {
    display: block;
}

.rs-parts-list .children .children .cat-item > a {
    padding: 10px 20px 10px 60px;
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
}

.rs-parts-list .children .children .cat-item > a:before {
    left: 44px;
    width: 4px;
    height: 4px;
    background: #d1d5db;
}

.rs-parts-list .children .children .cat-item > a:hover {
    background: #ffffff;
    color: #374151;
    border-left-color: #f59e0b;
    padding-left: 64px;
}

.rs-parts-list .children .children .cat-item > a:hover:before {
    background: #f59e0b;
}

/* 分类标题样式 */
.rs-parts-list > li {
    font-weight: 700;
    font-size: 18px;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .rs-parts-list {
        border-radius: 0;
        box-shadow: none;
    }
    
    .rs-parts-list > li > ul > li.cat-item > a {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .rs-parts-list .children .cat-item > a {
        padding: 10px 16px 10px 32px;
        font-size: 14px;
    }
    
    .rs-parts-list .children .cat-item > a:before {
        left: 20px;
    }
    
    .rs-parts-list .children .children .cat-item > a {
        padding: 8px 16px 8px 48px;
        font-size: 13px;
    }
    
    .rs-parts-list .children .children .cat-item > a:before {
        left: 36px;
    }
    
    .rs-parts-list > li {
        padding: 16px;
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

.rs-parts-list .children {
    animation: slideIn 0.3s ease-out;
}

/* 滚动条样式 */
.rs-parts-list::-webkit-scrollbar {
    width: 6px;
}

.rs-parts-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.rs-parts-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.rs-parts-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}