/* 筛选控件统一样式 - 覆盖所有筛选框 */

/* ===== 基础容器 ===== */
.filter-section {
    margin-bottom: 6px !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.item {
    margin-bottom: 6px;
}

/* ===== 筛选标题 - 增大2号 ===== */
.filter-section h3,
.item h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
    padding: 3px 0;
}

/* ===== 通用文字和数字样式 ===== */
/* 所有筛选项文字 */
.view-by-item a,
.two-column-item a,
.myCategory dt.filter-item-with-clear > a:first-child,
.mainColorLink,
.gift-item dl dt a,
.sub-category-item a {
    font-family: Arial, sans-serif;
    font-size: 14px !important;
    color: #333;
    text-decoration: none;
}

/* 所有数字（包括括号） */
.count,
.colorCount,
.view-by-item a span.count,
.two-column-item a span.count,
.myCategory dt.filter-item-with-clear > a:first-child span.count,
.sub-category-item a span.count,
.mainColorLink span.colorCount,
.gift-item dl dt a span.count {
    font-family: Arial, sans-serif;
    font-size: 13px !important;
    color: #999;
}

/* ===== 悬停效果 ===== */
.view-by-item a:hover,
.two-column-item a:hover,
.myCategory dt.filter-item-with-clear > a:first-child:hover,
.mainColorLink:hover,
.gift-item dl dt a:hover,
.sub-category-item a:hover {
    color: #aa0000 !important;
}

/* ===== 选中状态 - 保持原样，不变色，不加粗，不变大 ===== */
.view-by-item a .active,
.two-column-item a .active,
.myCategory dt.filter-item-with-clear > a:first-child .active,
.mainColorLink .active,
.gift-item dl dt a .active,
.sub-category-item a .active {
    color: #333 !important;
    font-weight: normal !important;
    font-size: 14px !important;
}

/* ===== Category / Gift & Promotion 一级分类 ===== */
.myCategory dt.filter-item-with-clear,
.gift-item dl dt {
    padding: 1px 5px;
    margin: 3px 0;
    box-sizing: border-box;
}

/* ===== Category / Gift & Promotion 二级分类 ===== */
.sub-category-item {
    padding: 1px 0 1px 15px;
    margin: 3px 0;
    box-sizing: border-box;
}

.sub-category-item.filter-item-with-clear {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sub-category-item a {
    display: flex;
    align-items: center;
    flex: 1;
}

/* ===== View By / Price Range / Instock Quantity / Theme & Collection ===== */
.view-by-item,
.two-column-item {
    padding: 0 5px;
    margin: 0;
    box-sizing: border-box;
}

.view-by-item a,
.two-column-item a {
    display: block;
    padding: 3px 0;
}

/* ===== Color 筛选样式 - 去掉外框 ===== */
.mainColorList {
    display: flex;
    flex-wrap: wrap;
    padding: 5px;
}

.mainColorItem {
    position: relative;
    width: calc(50% - 4px);
    padding: 1px;
    margin: 3px 0;
    box-sizing: border-box;
}

.mainColorLink {
    display: flex;
    align-items: center;
    padding: 1px;
    text-decoration: none;
    color: #333;
    border: none !important;
    background: none !important;
}

.mainColorLink:hover {
    color: #aa0000;
    background: none !important;
    border: none !important;
}

.colorBlock {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
    margin-right: 5px;
    flex-shrink: 0;
}

.colorName {
    flex: 1;
    font-size: 14px !important;
    font-family: Arial, sans-serif;
}

/* ===== Size 筛选特殊样式 ===== */
.size-filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
}

.size-dropdown {
    font-size: 14px;
    padding: 2px 20px 2px 6px;
    height: 35px;
    line-height: 28px;
    width: 50% !important;
    flex: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: #fff;
}

.size-clear-btn,
a.size-clear-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    margin-left: 8px;
    background: #ff4444 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    position: relative;
}

.size-clear-btn:hover,
a.size-clear-btn:hover {
    background: #cc0000 !important;
    color: white !important;
}

/* ===== 清除按钮 - 缩小20% (原20px -> 16px)，X 完美居中 ===== */
.filter-clear-btn,
a.filter-clear-btn,
.myCategory .filter-clear-btn,
.filter-item-with-clear .filter-clear-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    margin-left: 6px;
    background: #ff4444 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    position: relative;
}
.filter-clear-btn::before,
a.filter-clear-btn::before {
    content: "×";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    line-height: 1;
}

.filter-clear-btn:hover,
a.filter-clear-btn:hover,
.myCategory .filter-clear-btn:hover,
.filter-item-with-clear .filter-clear-btn:hover {
    background: #cc0000 !important;
    color: white !important;
}

/* ===== 带清除按钮的容器 ===== */
.filter-item-with-clear {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== 列表布局 ===== */
.view-by-list,
.two-column-list {
    display: flex;
    flex-wrap: wrap;
    padding: 5px;
}

/* ===== 子分类列表 ===== */
.subColorList {
    margin-left: 28px;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #eee;
}

.subColorLink {
    display: block;
    padding: 3px 0;
    font-size: 14px;
    font-family: Arial, sans-serif;
    color: #333;
    text-decoration: none;
}

.subColorLink:hover {
    color: #aa0000;
}
