.tpf-filter {
	--tpf-border: var(--ast-border-color, #e3e5e7);
	--tpf-text: var(--ast-global-color-2, #20272d);
	--tpf-muted: var(--ast-global-color-3, #68727b);
	--tpf-accent: var(--ast-global-color-0, #315f68);
	--tpf-bg: #fff;
	color: var(--tpf-text);
	font-size: 14px;
	line-height: 1.45;
}

.tpf-filter [hidden] {
	display: none !important;
}

.tpf-drawer {
	background: transparent;
}

.tpf-drawer-header {
	display: none;
}

.tpf-drawer-backdrop {
	display: none;
}

.tpf-form {
	background: var(--tpf-bg);
	border: 1px solid var(--tpf-border);
	border-radius: var(--tpf-radius, 8px);
	padding: 18px;
}

.tpf-mobile-toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid var(--tpf-accent);
	border-radius: var(--tpf-radius, 6px);
	background: var(--tpf-accent);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 800;
	min-height: 40px;
	padding: 9px 12px;
}

.tpf-mobile-toggle-icon {
	width: 12px;
	height: 12px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .18s ease;
}

.tpf-filter.is-open .tpf-mobile-toggle-icon {
	transform: rotate(225deg) translateY(-2px);
}

.tpf-section {
	border-top: 1px solid var(--tpf-border);
	margin-top: 16px;
	padding-top: 16px;
}

.tpf-actions + .tpf-section {
	margin-top: 0;
}

.tpf-title {
	color: var(--tpf-text);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0 0 10px;
}

.tpf-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.tpf-actions-bottom {
	border-top: 1px solid var(--tpf-border);
	margin-top: 18px;
	padding-top: 16px;
}

.tpf-submit,
.tpf-clear,
.tpf-more {
	align-items: center;
	border-radius: var(--tpf-radius, 6px);
	display: inline-flex;
	font: inherit;
	font-weight: 800;
	justify-content: center;
	min-height: 38px;
	padding: 9px 13px;
	text-decoration: none;
}

.tpf-submit {
	background: var(--tpf-accent);
	border: 1px solid var(--tpf-accent);
	color: #fff;
	cursor: pointer;
}

.tpf-clear,
.tpf-more {
	background: #fff;
	border: 1px solid var(--tpf-border);
	color: var(--tpf-text);
}

.tpf-more {
	cursor: pointer;
	margin-top: 8px;
	min-height: 34px;
	padding: 7px 11px;
	width: 100%;
}

.tpf-category-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tpf-category-list .tpf-category-list {
	margin-top: 3px;
}

.tpf-category-item {
	margin: 0;
}

.tpf-category-item a {
	align-items: center;
	border-radius: var(--tpf-radius, 6px);
	color: var(--tpf-text);
	display: flex;
	gap: 8px;
	justify-content: space-between;
	padding: 7px 8px;
	text-decoration: none;
}

.tpf-category-item a:hover,
.tpf-category-item a.is-active {
	background: #f5f2ed;
}

.tpf-category-item a.is-active {
	color: var(--tpf-accent);
	font-weight: 800;
}

.tpf-depth-1 > a {
	padding-left: 18px;
}

.tpf-depth-2 > a {
	padding-left: 28px;
}

.tpf-depth-3 > a,
.tpf-depth-4 > a {
	padding-left: 38px;
}

.tpf-count {
	color: var(--tpf-muted);
	font-size: 12px;
	font-weight: 600;
	margin-left: auto;
	white-space: nowrap;
}

.tpf-price-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr 1fr;
}

.tpf-price-grid label {
	display: grid;
	gap: 5px;
}

.tpf-price-grid span {
	color: var(--tpf-muted);
	font-size: 12px;
	font-weight: 700;
}

.tpf-price-grid input {
	border: 1px solid var(--tpf-border);
	border-radius: var(--tpf-radius, 6px);
	color: var(--tpf-text);
	min-height: 38px;
	padding: 8px 10px;
	width: 100%;
}

.tpf-options {
	display: grid;
	gap: 7px;
}

.tpf-option {
	align-items: flex-start;
	border-radius: var(--tpf-radius, 6px);
	cursor: pointer;
	display: flex;
	gap: 8px;
	min-height: 30px;
	padding: 4px 6px;
}

.tpf-option:hover {
	background: #f7f5f1;
}

.tpf-option input {
	accent-color: var(--tpf-accent);
	flex: 0 0 auto;
	height: 16px;
	margin-top: 3px;
	width: 16px;
}

.tpf-option-label {
	min-width: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {
	html.tpf-drawer-open,
	body.tpf-drawer-open {
		overflow: hidden;
	}

	.tpf-mobile-sort-filter {
		clear: both;
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		gap: 8px;
		align-items: stretch;
		margin: 12px 0 16px;
		width: 100%;
	}

	.tpf-mobile-sort-filter .tpf-mobile-toggle {
		display: inline-flex;
		min-width: 92px;
		width: auto;
	}

	.tpf-mobile-sort-filter .woocommerce-ordering {
		float: none;
		margin: 0;
		width: 100%;
	}

	.tpf-mobile-sort-filter .woocommerce-ordering select {
		min-height: 40px;
		width: 100%;
	}

	.tpf-filter:not(.tpf-has-toolbar-toggle) > .tpf-mobile-toggle {
		display: flex;
		margin-bottom: 10px;
	}

	.tpf-filter.tpf-js .tpf-drawer {
		background: #fff;
		box-shadow: 8px 0 30px rgba(0, 0, 0, .22);
		display: flex;
		flex-direction: column;
		height: 100dvh;
		left: 0;
		max-width: 360px;
		position: fixed;
		top: 0;
		transform: translateX(-105%);
		transition: transform .22s ease;
		width: min(88vw, 360px);
		z-index: 100001;
	}

	.tpf-filter.tpf-js.is-open .tpf-drawer {
		transform: translateX(0);
	}

	.tpf-filter.tpf-js .tpf-drawer-backdrop {
		background: rgba(0, 0, 0, .42);
		bottom: 0;
		display: block;
		left: 0;
		position: fixed;
		right: 0;
		top: 0;
		z-index: 100000;
	}

	.tpf-drawer-header {
		align-items: center;
		border-bottom: 1px solid var(--tpf-border);
		display: flex;
		flex: 0 0 auto;
		justify-content: space-between;
		min-height: 54px;
		padding: 12px 14px;
	}

	.tpf-drawer-close {
		align-items: center;
		background: #fff;
		border: 1px solid var(--tpf-border);
		border-radius: 50%;
		color: var(--tpf-text);
		cursor: pointer;
		display: inline-flex;
		font-size: 24px;
		height: 34px;
		justify-content: center;
		line-height: 1;
		padding: 0;
		width: 34px;
	}

	.tpf-filter.tpf-js .tpf-form {
		border: 0;
		border-radius: 0;
		flex: 1 1 auto;
		margin: 0;
		overflow: auto;
		padding: 14px;
	}

	.tpf-filter.tpf-js:not(.is-open) .tpf-drawer {
		visibility: hidden;
	}
}
