/* YS WC Tools — 共用樣式 */
.ys-wct {
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 1.2em;
}

.ys-wct-form { display: block; }

/* === 統一 checkbox 樣式 === */
.ys-wct-checkbox-list,
.ys-wct-accordion-children,
.ys-wct-accordion {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ys-wct-checkbox-item,
.ys-wct-accordion-item {
	padding: 0;
	border-bottom: 1px solid #f0f0f0;
}

.ys-wct-checkbox-item:last-child,
.ys-wct-accordion-item:last-child {
	border-bottom: none;
}

.ys-wct-checkbox-item.is-collapsed { display: none; }

.ys-wct-checkbox-item label,
.ys-wct-accordion-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	cursor: pointer;
	font-weight: normal;
	color: inherit;
	font-size: 13px;
}

.ys-wct-checkbox-item input[type="checkbox"],
.ys-wct-accordion-label input[type="checkbox"] {
	accent-color: #6b4eff;
	width: 16px;
	height: 16px;
	margin: 0;
	flex-shrink: 0;
}

.ys-wct-checkbox-label { flex: 1; }

/* count 隱藏(品牌/分類都不顯示數字) */
.ys-wct-checkbox-count { display: none; }

/* === Brand 搜尋框 === */
.ys-wct-search-wrap { margin-bottom: 10px; }

.ys-wct-brand-search {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
	box-sizing: border-box;
}

.ys-wct-brand-search:focus {
	outline: none;
	border-color: #6b4eff;
	box-shadow: 0 0 0 2px rgba(107, 78, 255, 0.15);
}

.ys-wct-show-more {
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	padding: 8px 0 4px;
	text-decoration: underline;
	font-size: 13px;
}
.ys-wct-show-more:hover { color: #6b4eff; }

/* === Accordion (分類) === */
.ys-wct-accordion-header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ys-wct-accordion-label { flex: 1; }

.ys-wct-accordion-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 8px;
	color: #999;
	display: flex;
	align-items: center;
}

.ys-wct-chevron::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.ys-wct-accordion-item.is-expanded .ys-wct-chevron::before {
	transform: rotate(-135deg);
}

.ys-wct-accordion-children {
	padding: 0 0 8px 26px;
	display: none;
}

.ys-wct-accordion-item.is-expanded .ys-wct-accordion-children { display: block; }

/* === Price slider (修正 thumb 對齊) === */
.ys-wct-price-slider-wrap {
	position: relative;
	height: 24px;
	margin: 8px 4px 14px;
}

.ys-wct-price-track,
.ys-wct-price-track-active {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: 4px;
	border-radius: 2px;
	pointer-events: none;
}
.ys-wct-price-track {
	left: 0;
	right: 0;
	background: #e2e2e8;
}
.ys-wct-price-track-active {
	background: #6b4eff;
	left: 0;
	width: 100%;
}

.ys-wct-price-range {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 24px;
	background: transparent;
	border: none;
	margin: 0;
	padding: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.ys-wct-price-range::-webkit-slider-runnable-track {
	background: transparent;
	border: none;
	height: 24px;
}
.ys-wct-price-range::-moz-range-track {
	background: transparent;
	border: none;
	height: 24px;
}

.ys-wct-price-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 16px;
	height: 16px;
	background: #fff;
	border: 2px solid #6b4eff;
	border-radius: 50%;
	cursor: pointer;
	margin-top: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ys-wct-price-range::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	background: #fff;
	border: 2px solid #6b4eff;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ys-wct-price-inputs {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
}

.ys-wct-price-min,
.ys-wct-price-max {
	flex: 1;
	min-width: 0;
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 4px;
	outline: none;
	background: #fff;
	padding: 4px 6px;
	font-size: 12px;
	color: #222;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ys-wct-price-min:focus,
.ys-wct-price-max:focus {
	border-color: #6b4eff;
	box-shadow: 0 0 0 2px rgba(107, 78, 255, 0.12);
}

.ys-wct-price-min::-webkit-outer-spin-button,
.ys-wct-price-min::-webkit-inner-spin-button,
.ys-wct-price-max::-webkit-outer-spin-button,
.ys-wct-price-max::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.ys-wct-price-min,
.ys-wct-price-max { -moz-appearance: textfield; }

.ys-wct-price-sep { color: #999; padding: 0 2px; }

/* === Apply button === */
.ys-wct-apply {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 7px;
	border: none;
	border-radius: 6px;
	background: #6b4eff;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
}
.ys-wct-apply:hover { background: #5938e0; }

/* === Chips + Clear === */
.ys-wct-chips {
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ys-wct-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	background: #f3f0ff;
	border: 1px solid #ddd0ff;
	border-radius: 999px;
	font-size: 12px;
}

.ys-wct-chip-cat { color: #888; margin-right: 2px; }

.ys-wct-chip-remove {
	color: #999;
	text-decoration: none;
	font-size: 14px;
	line-height: 1;
	padding: 0 2px;
}
.ys-wct-chip-remove:hover { color: #c00; }

.ys-wct-clear-button {
	display: block;
	text-align: center;
	margin-top: 4px;
	padding: 9px;
	border: 1px solid #6b4eff;
	border-radius: 6px;
	color: #6b4eff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
}

.ys-wct-clear {
	padding-top: 8px;
	margin-top: 8px;
	border-top: 1px solid #f0f0f0;
}

/* 沒篩選時的空 placeholder:看不見但保持 swap target 存在 */
.ys-wct-clear-empty {
	display: none;
}
.ys-wct-clear-button:hover { background: #6b4eff; color: #fff; }
