/* Techzu Product Filter */
.tzf {
	--tzf-accent: #9a6a2a;
	--tzf-bg: #f6f2ec;
	--tzf-head-bg: #ffffff;
	--tzf-text: #1d1b19;
	--tzf-muted: #7a736c;
	--tzf-label: #6f6760;
	--tzf-border: #e5dfd7;
	--tzf-control-bg: #ffffff;
	--tzf-radius: 6px;
	--tzf-badge-bg: #f3e9da;
	--tzf-badge-text: #8a642c;
	--tzf-control-h: 48px;
	--tzf-drawer-w: 380px;
	position: relative;
	font-size: 15px;
	line-height: 1.4;
	color: var(--tzf-text);
	box-sizing: border-box;
}
.tzf *, .tzf *::before, .tzf *::after { box-sizing: border-box; }

/* ---------- Panel ---------- */
.tzf-panel {
	position: relative;
	background: var(--tzf-bg);
	border: 1px solid var(--tzf-border);
	border-radius: 10px;
	overflow: hidden;
	margin: 0 0 24px;
}
.tzf-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	background: var(--tzf-head-bg);
	border-bottom: 1px solid var(--tzf-border);
}
.tzf-head__icon { color: var(--tzf-accent); display: inline-flex; }
.tzf-head__title { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.tzf-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--tzf-badge-bg);
	color: var(--tzf-badge-text);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	line-height: 1.4;
}
.tzf-close {
	margin-left: auto;
	width: 38px; height: 38px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--tzf-border);
	background: #fff;
	color: var(--tzf-text);
	cursor: pointer;
	padding: 0;
	transition: background .15s, border-color .15s;
}
.tzf-close:hover { border-color: var(--tzf-text); }

.tzf-body {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 22px;
	padding: 22px 18px;
}
.tzf--cols-2 .tzf-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tzf--cols-3 .tzf-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tzf--cols-4 .tzf-body { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tzf-label {
	display: block;
	margin: 0 0 9px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tzf-label);
}

/* ---------- Dropdown ---------- */
.tzf-select { position: relative; }
.tzf-select select,
.tzf-ms__toggle {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: var(--tzf-control-h);
	margin: 0;
	padding: 0 44px 0 16px;
	border: 1px solid var(--tzf-border);
	border-radius: var(--tzf-radius);
	background: var(--tzf-control-bg);
	color: var(--tzf-text);
	font: inherit;
	font-size: 15px;
	line-height: calc(var(--tzf-control-h) - 2px);
	cursor: pointer;
	box-shadow: none;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	background-image: none;
}
.tzf-select select.is-empty,
.tzf-ms__toggle.is-empty { color: var(--tzf-muted); }
.tzf-select select option { color: var(--tzf-text); }
.tzf-select select:hover, .tzf-ms__toggle:hover { border-color: #cfc6bb; }
.tzf-select select:focus-visible,
.tzf-ms__toggle:focus-visible,
.tzf-ms[open] .tzf-ms__toggle {
	border-color: var(--tzf-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--tzf-accent) 18%, transparent);
}
.tzf-chevron {
	position: absolute;
	right: 16px; top: 50%;
	transform: translateY(-50%);
	color: var(--tzf-muted);
	pointer-events: none;
	transition: transform .2s;
}

/* ---------- Multi-select dropdown ---------- */
.tzf-ms { position: relative; }
.tzf-ms__toggle { display: block; list-style: none; position: relative; user-select: none; }
.tzf-ms__toggle::-webkit-details-marker { display: none; }
.tzf-ms__toggle::marker { content: ""; }
.tzf-ms__text { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tzf-ms[open] .tzf-chevron { transform: translateY(-50%) rotate(180deg); }
.tzf-ms__menu {
	position: absolute;
	z-index: 30;
	left: 0; right: 0; top: calc(100% + 6px);
	max-height: 280px;
	overflow: auto;
	padding: 6px;
	background: #fff;
	border: 1px solid var(--tzf-border);
	border-radius: var(--tzf-radius);
	box-shadow: 0 12px 28px rgba(30, 20, 10, .12);
}
.tzf-ms__menu .tzf-opt { padding: 8px 10px; border-radius: 4px; }
.tzf-ms__menu .tzf-opt:hover { background: var(--tzf-bg); }

/* ---------- Checkbox / radio list ---------- */
.tzf-list { display: flex; flex-direction: column; gap: 2px; }
.tzf-opt {
	display: flex; align-items: center; gap: 10px;
	padding: 6px 0;
	cursor: pointer;
	margin: 0;
	font-size: 15px;
	color: var(--tzf-text);
}
.tzf-opt input, .tzf-pill input, .tzf-swatch input {
	position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.tzf-opt__box {
	flex: 0 0 18px;
	width: 18px; height: 18px;
	border: 1.5px solid #c9c0b5;
	background: #fff;
	border-radius: 4px;
	position: relative;
	transition: all .15s;
}
.tzf-opt__box--radio { border-radius: 50%; }
.tzf-opt input:checked + .tzf-opt__box { background: var(--tzf-accent); border-color: var(--tzf-accent); }
.tzf-opt input:checked + .tzf-opt__box--check::after {
	content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.tzf-opt input:checked + .tzf-opt__box--radio::after {
	content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff;
}
.tzf-opt input:focus-visible + .tzf-opt__box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tzf-accent) 25%, transparent); }
.tzf-opt__name { flex: 1; }
.tzf-count {
	margin-left: auto;
	font-size: 12px;
	color: var(--tzf-muted);
}

/* ---------- Buttons / pills ---------- */
.tzf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tzf-pill {
	position: relative;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 14px;
	margin: 0;
	border: 1px solid var(--tzf-border);
	border-radius: 999px;
	background: #fff;
	font-size: 14px;
	cursor: pointer;
	transition: all .15s;
}
.tzf-pill:hover { border-color: #cfc6bb; }
.tzf-pill.is-checked, .tzf-pill:has(input:checked) {
	background: var(--tzf-text); border-color: var(--tzf-text); color: #fff;
}
.tzf-pill.is-checked .tzf-count, .tzf-pill:has(input:checked) .tzf-count { color: rgba(255,255,255,.7); }
.tzf-pill:has(input:focus-visible) { outline: 2px solid var(--tzf-accent); outline-offset: 2px; }
.tzf-pill .tzf-count { margin-left: 0; }

/* ---------- Colour swatches ---------- */
.tzf-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.tzf-swatch {
	position: relative;
	display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
	margin: 0;
	cursor: pointer;
}
.tzf-swatch__dot {
	width: 34px; height: 34px;
	border-radius: 50%;
	background:
		linear-gradient(var(--tzf-sw, transparent), var(--tzf-sw, transparent)),
		repeating-conic-gradient(#e7e1d9 0 25%, #fff 0 50%) 50% / 10px 10px;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
	outline: 2px solid transparent;
	outline-offset: 2px;
	transition: outline-color .15s, transform .15s;
}
.tzf-swatch:hover .tzf-swatch__dot { transform: scale(1.06); }
.tzf-swatch.is-checked .tzf-swatch__dot,
.tzf-swatch:has(input:checked) .tzf-swatch__dot { outline-color: var(--tzf-text); }
.tzf-swatch:has(input:focus-visible) .tzf-swatch__dot { outline-color: var(--tzf-accent); }
.tzf-swatch__name {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.tzf-swatch .tzf-count { margin: 0; font-size: 11px; }

/* ---------- Show more ---------- */
.tzf-is-more { display: none !important; }
.tzf-field.is-expanded .tzf-is-more { display: flex !important; }
.tzf-field.is-expanded .tzf-pills .tzf-is-more,
.tzf-field.is-expanded .tzf-swatches .tzf-is-more { display: inline-flex !important; }
.tzf-more {
	margin-top: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--tzf-accent);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ---------- Footer ---------- */
.tzf-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 0 18px 20px;
}
.tzf.tzf-js:not(.tzf-submit-button) .tzf-foot:not(:has(.tzf-reset)) { display: none; }
.tzf-reset {
	color: var(--tzf-text);
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.tzf-apply {
	display: block;
	flex: 1;
	height: var(--tzf-control-h);
	border: 0;
	border-radius: var(--tzf-radius);
	background: var(--tzf-text);
	color: #fff;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}
.tzf-apply:hover { background: var(--tzf-accent); }
.tzf.tzf-js:not(.tzf-submit-button) .tzf-apply { display: none; }

/* ---------- Loading ---------- */
.tzf-spinner {
	display: none;
	position: absolute; top: 22px; right: 70px;
	width: 18px; height: 18px;
	border: 2px solid var(--tzf-border);
	border-top-color: var(--tzf-accent);
	border-radius: 50%;
	animation: tzf-spin .7s linear infinite;
}
.tzf--panel .tzf-spinner { right: 18px; }
.tzf.is-loading .tzf-spinner { display: block; }
body.tzf-loading .tzf-results,
body.tzf-loading ul.products,
body.tzf-loading .wp-block-woocommerce-product-collection { opacity: .45; pointer-events: none; transition: opacity .2s; }
@keyframes tzf-spin { to { transform: rotate(360deg); } }

/* ---------- Trigger button (drawer) ---------- */
.tzf-trigger {
	display: none;
	align-items: center; gap: 8px;
	height: 44px;
	padding: 0 16px;
	margin: 0 0 18px;
	border: 1px solid var(--tzf-border);
	border-radius: var(--tzf-radius);
	background: #fff;
	color: var(--tzf-text);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
}
.tzf-trigger .tzf-icon { color: var(--tzf-accent); width: 20px; height: 20px; }
.tzf-trigger__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 10px;
	background: var(--tzf-accent);
	color: #fff;
	font-size: 12px;
}
.tzf-overlay {
	position: fixed; inset: 0; z-index: 99998;
	background: rgba(20, 15, 10, .4);
	opacity: 0; visibility: hidden;
	transition: opacity .25s, visibility .25s;
}

/* Drawer styles – applied always for layout="drawer", and on mobile for layout="auto" */
.tzf--drawer .tzf-trigger { display: inline-flex; }
.tzf--drawer .tzf-panel {
	position: fixed; z-index: 99999;
	top: 0; left: 0; bottom: 0;
	width: min(var(--tzf-drawer-w), 92vw);
	margin: 0;
	border-radius: 0;
	border: 0;
	display: flex; flex-direction: column;
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform .3s ease, visibility .3s;
	box-shadow: 0 0 40px rgba(0,0,0,.18);
}
.tzf--drawer .tzf-body { flex: 1; overflow-y: auto; grid-template-columns: 1fr !important; align-content: start; }
.tzf--drawer .tzf-foot { padding-top: 16px; border-top: 1px solid var(--tzf-border); background: var(--tzf-head-bg); }
.tzf--drawer.is-open .tzf-panel { transform: none; visibility: visible; }
.tzf--drawer.is-open .tzf-overlay { opacity: 1; visibility: visible; }
.tzf--auto .tzf-close { display: none; }

@media (max-width: 767px) {
	.tzf--auto .tzf-trigger { display: inline-flex; }
	.tzf--auto .tzf-close { display: inline-flex; }
	.tzf--auto .tzf-panel {
		position: fixed; z-index: 99999;
		top: 0; left: 0; bottom: 0;
		width: min(var(--tzf-drawer-w), 92vw);
		margin: 0;
		border-radius: 0;
		border: 0;
		display: flex; flex-direction: column;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform .3s ease, visibility .3s;
		box-shadow: 0 0 40px rgba(0,0,0,.18);
	}
	.tzf--auto .tzf-body { flex: 1; overflow-y: auto; grid-template-columns: 1fr !important; align-content: start; }
	.tzf--auto .tzf-foot { padding-top: 16px; border-top: 1px solid var(--tzf-border); background: var(--tzf-head-bg); }
	.tzf--auto.is-open .tzf-panel { transform: none; visibility: visible; }
	.tzf--auto.is-open .tzf-overlay { opacity: 1; visibility: visible; }
	.tzf--cols-2 .tzf-body, .tzf--cols-3 .tzf-body, .tzf--cols-4 .tzf-body { grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.tzf--cols-3 .tzf-body, .tzf--cols-4 .tzf-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.tzf-drawer-open { overflow: hidden; }
