/* 筛选侧边栏样式 */
/* 筛选栏框架 */
.filter-container {
    width: 100%;                    /* 占满父容器 */
    max-width: 400px;              /* 最大宽度限制 */
    min-width: 225px;              /* 最小宽度 */
    margin: 0 auto;                /* 水平居中 */
    padding: 0 15px;               /* 左右内边距 */
    box-sizing: border-box;
}

/* 筛选栏容器 */
.filter-sidebar {
    width: 100%;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    padding: 10px 20px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 自定义滚动条样式 */
.filter-sidebar::-webkit-scrollbar {
    width: 6px; /* 滚动条宽度 */
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1; /* 滚动条轨道颜色 */
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1; /* 滚动条滑块颜色 */
    border-radius: 3px;
    transition: background 0.2s ease;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1; /* 悬停时滚动条颜色 */
}

/* 筛选组 */
.filter-group {
    position: relative;
    user-select: none;
    margin-bottom: 18px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

/* 筛选组标头 */
.filter-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    justify-content: space-between;
    width: 100%;
    gap: 5px;
    cursor: pointer;
}

.filter-header .marker {
    width: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 18px;
}

/* 筛选组标题 */
.filter-group-title {
    font-size: clamp(0.94rem, calc(0.848rem + 0.446vw), 1.56rem);
    font-weight: 500;
    line-height: clamp(30px, 10vw, 60px);
    flex: 1;
    min-width: 0;
}

/* 展开缩放箭头 */
.arrow-wrap {
    display: flex;
    flex-shrink: 0; /* 防止箭头被压缩 */
    align-items: center;
    justify-content: center;
    width: 24px; /* 固定宽度 */
    height: 24px; /* 固定高度 */
}

.arrow-wrap svg {
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* 箭头状态 */
.filter-group .arrow-down { 
    display: none; 
}

.filter-group.collapsed .arrow-up { 
    display: none; 
}

.filter-group.collapsed .arrow-down { 
    display: inline; 
}

/* 收起时隐藏内容 */
.filter-group.collapsed .filter-items,
.filter-group.collapsed .show-more-btn,
.filter-group.collapsed .show-less-btn {
    display: none !important;
}

/* 分割线 */
.divider {
    position: relative;
    top: -10px;
    margin-bottom: 10px;
}

.filter-group .divider[data-role="bottom"] {
    display: none !important;
}

/* 筛选项列表 */
.filter-items {
    margin-top: 10px;
    margin-bottom: 12px;
}

/* 筛选项 */
.filter-item {
    display: flex;
    align-items: center;
    line-height: clamp(30px, 10vw, 50px);
    padding: 0 15px 0 15px;
    justify-content: space-between;
    margin-bottom: clamp(5px, 5vw, 12px);
    background-color: #f5f5f5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-item:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.filter-item:last-child {
    margin-bottom: 0;
}

.filter-item:hover {
    background-color: #ebebeb;
}

/* 激活状态 */
.filter-item.active {
    border-color: #4481F9;
    background-color: #4481F9;
    color: #fff;
    font-weight: 500;
}

.filter-item.active:hover {
    border-color: #4481F9;
    background-color: #4481F9;
    color: #fff;
}

/* 筛选项标题 */
.filter-title {
    font-size: clamp(1.56rem, calc(1.473rem + 0.446vw), 2.19rem);
    font-weight: 700;
    margin-bottom: 30px;
}

/* 筛选项名 */
.filter-name {
    font-size: clamp(0.88rem, calc(0.839rem + 0.179vw), 1.13rem);
}

/* 筛选项计数 */
.filter-count {
    font-size: clamp(0.75rem, calc(0.714rem + 0.179vw), 1.00rem);
    color: #666;
    background-color: #f5f5f5;
    padding: clamp(2px, 1vw, 4px) clamp(4px, 2vw, 8px);
    border-radius: 50%;
    line-height: 1.2;
}

.filter-item.active .filter-count {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 显示更多/收起按钮 */
.show-more-btn, 
.show-less-btn {
    width: 100%;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #E0E7FF;
    background: #F7FAFF;
    color: #3366FF;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    outline: none;
    transition: all 0.18s ease;
    margin-top: 12px;
}

.show-more-btn:hover, 
.show-less-btn:hover {
    background: #ECF2FF;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(68, 129, 249, 0.15);
}

.show-more-btn:active, 
.show-less-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 默认隐藏收起按钮 */
.show-less-btn { 
    display: none; 
}
