/* ================= 滑块通用样式 产品页筛选框中的三级滑块================= */
.slider-filter-wrapper {
    position: relative;
    width: 100%;
    padding: 3px 0;
}

.slider-filter {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    padding: 3px 2px;
    gap: 4px;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 滑块选项样式 - 统一字体大小 */
.slider-option {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px; /* 统一字体大小 */
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    text-align: center;
    min-height: 32px;
    margin: 0;
    line-height: 1.2;
}

.slider-option:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}

.slider-option.active {
    background-color: #354e33;
    color: white;
    border-color: #354e33;
    font-weight: 500;
}

/* 隐藏滚动条但保持滚动功能 */
.slider-filter::-webkit-scrollbar {
    height: 1px;
}

.slider-filter::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 1px;
}

.slider-filter::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 1px;
}

.slider-filter::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .slider-filter-wrapper {
        padding: 2px 0;
    }
    
    .slider-filter {
        padding: 2px 2px;
        gap: 3px;
    }
    
    .slider-option {
        padding: 3px 8px;
        font-size: 13px; /* 移动端稍微小一点，但保持可读性 */
        min-height: 30px;
    }
    
    /* 移动端筛选行间距 */
    #mobileCategoryFilterContainer,
    #mobileSubFilterContainer {
        margin-bottom: 8px;
    }
}

/* 桌面端滑块优化 */
@media (min-width: 769px) {
    .slider-filter-wrapper {
        margin-bottom: 12px;
    }
    
    .slider-option {
        padding: 4px 10px;
        font-size: 14px; /* 桌面端保持14px */
        min-height: 32px;
    }
    
    #thirdFilterContainer {
        margin-bottom: 12px;
    }
}

/* 滑块导航箭头 */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    opacity: 0.8;
    transition: all 0.3s;
}

.slider-nav:hover {
    opacity: 1;
    background-color: #f8f8f8;
}

.slider-nav.prev {
    left: 2px;
}

.slider-nav.next {
    right: 2px;
}

.slider-nav i {
    font-size: 12px;
    color: #333;
}

/* 移动端和桌面端显示控制 */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* 桌面端筛选组样式调整 */
.item_filter_group {
    margin-bottom: 12px;
}

.item_filter_group .de_form {
    padding-top: 3px;
}

/* 优化隐藏时的边距 */
#subFilterContainer[style*="display: none"],
#mobileSubFilterContainer[style*="display: none"],
#thirdFilterContainer[style*="display: none"] {
    margin-bottom: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    border: none !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block;
    }
    
    .col-lg-2 {
        display: none;
    }
    
    .col-lg-10 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* 移动端字体统一优化 */
    .de_checkbox label {
        font-size: 14px !important;
    }
}



/* 一级筛选链接样式 */
.category-link {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    padding-left: 5px;
}

.category-link:hover {
    color: #354e33;
    text-decoration: underline;
}

/* 当checkbox选中时，链接样式 */
.de_checkbox input[type="checkbox"]:checked + label .category-link {
    color: #354e33;
    font-weight: 600;
}

/* 移动端滑块链接样式 */
.slider-option a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.slider-option.active a {
    color: white;
}