/* =====================================
   フィルター共通
===================================== */

.yith-wcan-filter.filter-tax {
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
}

.yith-wcan-filter.filter-tax:last-child {
    border-bottom: none;
}

/* タイトル */
.yith-wcan-filter.filter-tax .filter-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* リストリセット */
.yith-wcan-filter.filter-tax
.filter-items {
    margin: 0;
    padding: 0;
}

/* 各行 */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label {
    list-style: none;
}

/* li要素のホバー時のスタイル */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label:hover,
.yith-wcan-filter.filter-tax
.filter-item:hover,
.yith-wcan-filter.filter-tax
.filter-item.label:hover,
.yith-wcan-filter-widget
.filter-item:hover,
.yith-wcan-filter-widget
.filter-item.label:hover {
    background-color: transparent !important;
}

/* クリック領域 */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label > a,
.yith-wcan-filter.filter-tax
.filter-item > a,
.yith-wcan-filter.filter-tax
.filter-item.label > a,
.yith-wcan-filter-widget
.filter-item > a,
.yith-wcan-filter-widget
.filter-item.label > a {
    display: flex;
    align-items: center;
    padding: 8px 6px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ホバー */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label > a:hover,
.yith-wcan-filter.filter-tax
.filter-item > a:hover,
.yith-wcan-filter.filter-tax
.filter-item.label > a:hover,
.yith-wcan-filter-widget
.filter-item > a:hover,
.yith-wcan-filter-widget
.filter-item.label > a:hover,
.yith-wcan-filter-widget a:hover,
.yith-wcan-filter.filter-tax.label-design
.filter-item.label:hover > a,
.yith-wcan-filter.filter-tax
.filter-item:hover > a,
.yith-wcan-filter.filter-tax
.filter-item.label:hover > a,
.yith-wcan-filter-widget
.filter-item:hover > a,
.yith-wcan-filter-widget
.filter-item.label:hover > a {
    background-color: #009fb5 !important;
    color: #fff !important;
    border-color: #009fb5 !important;
}

/* 選択中 */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label.active > a,
.yith-wcan-filter.filter-tax.label-design
.filter-item.label.current > a,
.yith-wcan-filter.filter-tax.label-design
.filter-item.label.selected > a {
    background-color: #eee;
    font-weight: 600;
}


/* 疑似チェック */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label > a::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 1px solid #bbb;
    border-radius: 3px;
    margin-right: 8px;
    background: #fff;
}

/* 選択時 */
.yith-wcan-filter.filter-tax.label-design
.filter-item.label.active > a::before,
.yith-wcan-filter.filter-tax.label-design
.filter-item.label.current > a::before {
    background: #111;
    border-color: #111;
}


/* =====================================
   グリッドレイアウト
===================================== */

.yith-wcan-filter.filter-tax.color-design
.filter-items.filter-color {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* EC定番の4列 */
    gap: 12px;
    padding: 0;
    margin: 0;
}

/* =====================================
   各カラーチップ
===================================== */

.yith-wcan-filter.filter-tax.color-design
.filter-item.color {
    list-style: none;
    text-align: center;
}

/* クリック領域 */
.yith-wcan-filter.filter-tax.color-design
.filter-item.color > a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
}

/* =====================================
   丸いスウォッチ（色が無くても成立）
===================================== */

.yith-wcan-filter.filter-tax.color-design
.filter-item.color > a::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e5e5;   /* 色未設定でも破綻しない */
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* =====================================
   選択中（active / current / selected 対応）
===================================== */

.yith-wcan-filter.filter-tax.color-design
.filter-item.color.active > a::before,
.yith-wcan-filter.filter-tax.color-design
.filter-item.color.current > a::before,
.yith-wcan-filter.filter-tax.color-design
.filter-item.color.selected > a::before {
    outline: 2px solid #111;
    outline-offset: 2px;
}

/* =====================================
   白・薄色対策（一般EC必須）
===================================== */

.yith-wcan-filter.filter-tax.color-design
.filter-item.color.white > a::before,
.yith-wcan-filter.filter-tax.color-design
.filter-item.color.light > a::before {
    border: 1px solid #999;
}

/* =====================================
   ラベル（下に小さく）
===================================== */

.yith-wcan-filter.filter-tax.color-design
.term-label {
    line-height: 1.2;
    white-space: nowrap;
}

.yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.label {
    margin: 0;
    padding: 0;
}