/* Tallizen 商品篩選器 — PC 左側欄 / 手機抽屜 */

.tz-shop-layout {
	display: grid;
	grid-template-columns: 248px minmax(0, 1fr);
	gap: 30px;
	align-items: start;
}

/* ---------- 面板 (PC 側欄) ---------- */
.tz-filters-wrap {
	position: relative;
}
.tz-filter-panel {
	position: sticky;
	top: 88px;
	background: #fff;
	border: 1px solid #E7E3DC;
	border-radius: 14px;
	padding: 2px 16px 16px;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	scrollbar-width: thin;
}
.tz-filter-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0 10px;
	border-bottom: 1px solid #F0EDE7;
}
.tz-filter-title {
	font-size: 19px;
	font-weight: 800;
	color: #2A2620;
	letter-spacing: .02em;
}
.tz-filter-close {
	display: none;
	background: none;
	border: 0;
	font-size: 30px;
	line-height: 1;
	color: #6B6155;
	cursor: pointer;
	padding: 0 4px;
}

/* ---------- 手機按鈕 (PC 隱藏) ---------- */
.tz-filter-open {
	display: none;
	align-items: center;
	gap: 7px;
	width: 100%;
	padding: 11px 16px;
	background: #14504A;
	color: #fff;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	margin-bottom: 14px;
}
.tz-filter-open-icon {
	width: 15px;
	height: 12px;
	border-top: 2px solid #fff;
	border-bottom: 2px solid #fff;
	position: relative;
	flex: 0 0 auto;
}
.tz-filter-open-icon::after {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 100%;
	border-top: 2px solid #fff;
}
.tz-filter-backdrop {
	display: none;
}

/* ---------- Accordion 區塊 ---------- */
.tz-filter-block {
	border-bottom: 1px solid #F0EDE7;
}
.tz-filter-block:last-of-type {
	border-bottom: 0;
}
.tz-filter-summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	font-size: 15px;
	font-weight: 700;
	color: #2A2620;
}
.tz-filter-summary::-webkit-details-marker {
	display: none;
}
.tz-filter-plus {
	position: relative;
	width: 13px;
	height: 13px;
	flex: 0 0 auto;
}
.tz-filter-plus::before,
.tz-filter-plus::after {
	content: "";
	position: absolute;
	background: #6B6155;
}
.tz-filter-plus::before {
	left: 0;
	top: 5.5px;
	width: 13px;
	height: 2px;
}
.tz-filter-plus::after {
	left: 5.5px;
	top: 0;
	width: 2px;
	height: 13px;
	transition: transform .2s;
}
.tz-filter-block[open] .tz-filter-plus::after {
	transform: scaleY(0);
}
.tz-filter-body {
	padding: 0 0 14px;
}

/* ---------- 選項 ---------- */
.tz-filter-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: 14px;
	color: #4C554F;
	cursor: pointer;
	line-height: 1.4;
}
.tz-filter-item input[type="checkbox"],
.tz-filter-item input[type="radio"] {
	width: 15px;
	height: 15px;
	margin: 0;
	flex: 0 0 auto;
	accent-color: #14504A;
	cursor: pointer;
}
.tz-filter-name {
	flex: 1 1 auto;
	min-width: 0;
}
.tz-filter-count {
	flex: 0 0 auto;
	font-size: 12px;
	color: #A09788;
	background: #F6F3EC;
	border-radius: 10px;
	padding: 1px 8px;
}
.tz-filter-sub {
	padding-left: 22px;
	font-size: 13.5px;
}
.tz-filter-sub .tz-filter-name::before {
	content: "· ";
	color: #A09788;
}

/* ---------- 尺碼 (數字 chip 格) ---------- */
.tz-filter-sizes {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 7px;
}
.tz-filter-size {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 7px 2px;
	border: 1px solid #DCD6CA;
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	line-height: 1.2;
	color: #4C554F;
	cursor: pointer;
	user-select: none;
	transition: border-color .15s, background .15s, color .15s;
}
.tz-filter-size input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}
.tz-filter-size:hover {
	border-color: #14504A;
}
.tz-filter-size.is-on,
.tz-filter-size input[type="checkbox"]:checked ~ .tz-filter-size-n {
	color: #fff;
}
.tz-filter-size.is-on {
	background: #14504A;
	border-color: #14504A;
}
.tz-filter-size-n {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.tz-filter-size-c {
	font-size: 11px;
	color: #A09788;
	font-variant-numeric: tabular-nums;
}
.tz-filter-size.is-on .tz-filter-size-c {
	color: rgba(255, 255, 255, .75);
}
.tz-filter-size input[type="checkbox"]:focus-visible ~ .tz-filter-size-n {
	outline: 2px solid #14504A;
	outline-offset: 2px;
}

/* ---------- 價格 ---------- */
.tz-filter-price {
	display: flex;
	align-items: center;
	gap: 8px;
}
.tz-filter-price input {
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #DCD6CA;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	color: #2A2620;
	background: #fff;
}
.tz-filter-price input:focus {
	outline: none;
	border-color: #14504A;
}
.tz-filter-dash {
	color: #A09788;
	flex: 0 0 auto;
}
.tz-filter-hint {
	margin: 8px 0 0;
	font-size: 12px;
	color: #A09788;
}

/* ---------- 動作列 ---------- */
.tz-filter-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #F0EDE7;
}
.tz-filter-clear {
	font-size: 14px;
	color: #6B6155;
	text-decoration: underline;
	flex: 0 0 auto;
}
.tz-filter-apply {
	flex: 1 1 auto;
	padding: 11px 16px;
	background: #14504A;
	color: #fff;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}
.tz-filter-apply:hover {
	background: #0E3F3A;
}

/* ---------- 已選篩選提示 ---------- */
.tz-filter-selected {
	display: none;
}

/* ---------- 手機 ---------- */
@media (max-width: 1024px) {
	.tz-shop-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	.tz-filter-open {
		display: flex;
	}
	.tz-filter-panel {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 10050;
		max-height: none;
		border-radius: 0;
		border: 0;
		padding: 0 18px 28px;
		display: none;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	.tz-filter-panel.is-open {
		display: block;
	}
	.tz-filter-head {
		position: sticky;
		top: 0;
		background: #fff;
		z-index: 2;
		padding: 16px 0 12px;
	}
	.tz-filter-close {
		display: block;
	}
	.tz-filter-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, .45);
		z-index: 10040;
	}
	.tz-filter-backdrop[hidden] {
		display: none;
	}
	.tz-filter-item {
		font-size: 15px;
		padding: 8px 0;
	}
	.tz-filter-sizes {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
	.tz-filter-size {
		padding: 9px 2px;
		font-size: 14px;
	}
	.tz-filter-actions {
		position: sticky;
		bottom: 0;
		background: #fff;
		padding-bottom: 6px;
	}
}
