.amtex-ai-filter {
	--amtex-filter-orange: #ff5a14;
	--amtex-filter-black: #171717;
	--amtex-filter-line: #d8d8d5;
	--amtex-filter-muted: #74746f;
	--amtex-catalog-edge: clamp(32px, 6.25vw, 120px);
	clear: both;
	width: auto;
	margin: 0 calc(50% - 50vw + var(--amtex-catalog-edge)) 28px;
}

.amtex-ai-filter *,
.amtex-ai-filter *::before,
.amtex-ai-filter *::after {
	box-sizing: border-box;
}

.amtex-ai-filter__toolbar {
	display: flex;
	align-items: center;
	gap: 13px;
	min-height: 52px;
	margin-bottom: 12px;
	padding: 8px 10px;
	border: 1px solid var(--amtex-filter-line);
	border-radius: 12px;
	background: #fff;
}

.amtex-ai-filter__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 36px;
	padding: 8px 15px;
	border: 1px solid var(--amtex-filter-black);
	border-radius: 999px;
	background: var(--amtex-filter-black);
	color: #fff;
	font-size: .7rem;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.amtex-ai-filter__toggle:hover,
.amtex-ai-filter__toggle:focus {
	border-color: var(--amtex-filter-orange);
	background: var(--amtex-filter-orange);
	color: #111;
}

.amtex-ai-filter__funnel {
	position: relative;
	display: inline-block;
	width: 13px;
	height: 13px;
}

.amtex-ai-filter__funnel::before {
	position: absolute;
	top: 1px;
	left: 1px;
	width: 11px;
	height: 8px;
	border: 2px solid currentColor;
	border-bottom: 0;
	clip-path: polygon(0 0, 100% 0, 65% 100%, 35% 100%);
	content: "";
}

.amtex-ai-filter__funnel::after {
	position: absolute;
	top: 8px;
	left: 5px;
	width: 3px;
	height: 4px;
	background: currentColor;
	content: "";
}

.amtex-ai-filter__active-count {
	display: none;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--amtex-filter-orange);
	color: #111;
	font-size: .62rem;
}

.amtex-ai-filter__active-count.has-value { display: inline-flex; }

.amtex-ai-filter__result-count {
	color: var(--amtex-filter-muted);
	font-size: .7rem;
}

.amtex-ai-filter__result-count .woocommerce-result-count {
	float: none;
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
}

.amtex-ai-filter__pagination {
	margin-left: auto;
	white-space: nowrap;
}

.amtex-ai-filter__pagination:empty { display: none; }

.amtex-ai-filter__pagination .woocommerce-pagination {
	float: none;
	margin: 0;
	padding: 0;
}

.amtex-ai-filter__pagination .page-numbers {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.amtex-ai-filter__pagination .page-numbers li {
	display: flex;
	align-items: center;
	justify-content: center;
	float: none;
	margin: 0;
	border: 0;
}

.amtex-ai-filter__pagination .page-numbers li .page-numbers {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box;
	min-width: 32px;
	height: 32px;
	margin: 0;
	padding: 0 9px !important;
	border: 1px solid var(--amtex-filter-line);
	border-radius: 999px;
	background: #fff;
	color: #171717;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1 !important;
	text-align: center;
	vertical-align: middle;
	text-decoration: none;
}

.amtex-ai-filter__pagination .page-numbers li a.page-numbers:hover,
.amtex-ai-filter__pagination .page-numbers li a.page-numbers:focus {
	border-color: var(--amtex-filter-orange);
	color: #171717;
}

.amtex-ai-filter__pagination .page-numbers li .page-numbers.current {
	border-color: var(--amtex-filter-orange);
	background: var(--amtex-filter-orange);
	color: #171717;
}

.amtex-ai-filter__ordering {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 0;
	color: var(--amtex-filter-muted);
	font-size: .58rem;
	font-weight: 800;
	text-transform: uppercase;
}

.amtex-ai-filter__ordering .woocommerce-ordering {
	float: none;
	margin: 0;
	padding: 0;
}

.amtex-ai-filter__ordering select {
	max-width: 245px;
	height: 36px;
	margin: 0;
	padding: 0 34px 0 13px;
	border: 1px solid var(--amtex-filter-line);
	border-radius: 999px;
	background-color: #fff;
	color: #222;
	font-size: .68rem;
	font-weight: 600;
	text-transform: none;
}

.amtex-ai-filter__layout {
	display: grid;
	grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
	align-items: start;
	gap: 14px;
}

.amtex-ai-filter.is-collapsed .amtex-ai-filter__layout {
	grid-template-columns: 0 minmax(0, 1fr);
}

.amtex-ai-filter__panel {
	min-width: 0;
	border: 1px solid var(--amtex-filter-line);
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
	opacity: 1;
	visibility: visible;
	transition: opacity .15s ease;
}

.amtex-ai-filter.is-collapsed .amtex-ai-filter__panel {
	opacity: 0;
	visibility: hidden;
}

.amtex-ai-filter__panel form { margin: 0; }

.amtex-ai-filter__panel-head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 14px;
	border-bottom: 1px solid var(--amtex-filter-line);
}

.amtex-ai-filter__panel-head .amtex-ai-filter__funnel { color: var(--amtex-filter-orange); }

.amtex-ai-filter__panel-head strong {
	font-size: .72rem;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.amtex-ai-filter__clear {
	margin-left: auto;
	color: var(--amtex-filter-muted);
	font-size: .61rem;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.amtex-ai-filter__clear:hover,
.amtex-ai-filter__clear:focus { color: var(--amtex-filter-orange); }

.amtex-ai-filter__group {
	margin: 0;
	border-bottom: 1px solid var(--amtex-filter-line);
}

.amtex-ai-filter__group:last-of-type { border-bottom: 0; }

.amtex-ai-filter__group summary {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	cursor: pointer;
	font-size: .65rem;
	font-weight: 800;
	letter-spacing: .02em;
	list-style: none;
	text-transform: uppercase;
}

.amtex-ai-filter__group summary::-webkit-details-marker { display: none; }

.amtex-ai-filter__group summary b {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	margin-left: auto;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--amtex-filter-orange);
	color: #111;
	font-size: .58rem;
}

.amtex-ai-filter__group summary i {
	position: relative;
	width: 10px;
	height: 10px;
	margin-left: auto;
}

.amtex-ai-filter__group summary b + i { margin-left: 2px; }

.amtex-ai-filter__group summary i::before,
.amtex-ai-filter__group summary i::after {
	position: absolute;
	top: 4px;
	width: 6px;
	height: 1px;
	background: currentColor;
	content: "";
	transition: transform .15s ease;
}

.amtex-ai-filter__group summary i::before { left: 0; transform: rotate(45deg); }
.amtex-ai-filter__group summary i::after { right: 0; transform: rotate(-45deg); }
.amtex-ai-filter__group[open] summary i::before { transform: rotate(-45deg); }
.amtex-ai-filter__group[open] summary i::after { transform: rotate(45deg); }

.amtex-ai-filter__options {
	display: grid;
	max-height: 320px;
	padding: 0 14px 12px;
	overflow: auto;
}

.amtex-ai-filter__options label {
	display: grid;
	grid-template-columns: 16px minmax(0, 1fr) auto;
	align-items: center;
	gap: 7px;
	min-height: 30px;
	margin: 0;
	padding: 2px 0;
	cursor: pointer;
	font-size: .7rem;
	line-height: 1.25;
}

.amtex-ai-filter__options input {
	width: 15px;
	height: 15px;
	margin: 0;
	accent-color: var(--amtex-filter-orange);
}

.amtex-ai-filter__options small {
	color: #a2a29d;
	font-size: .6rem;
}

.amtex-ai-filter__group-title {
	margin: 10px 0 4px;
	padding-top: 9px;
	border-top: 1px solid #ecece9;
	color: var(--amtex-filter-muted);
	font-size: .59rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.amtex-ai-filter__group-title:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.amtex-ai-filter__group--pills .amtex-ai-filter__options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.amtex-ai-filter__group--pills .amtex-ai-filter__options label {
	display: inline-flex;
	min-height: 29px;
	padding: 5px 10px;
	border: 1px solid var(--amtex-filter-line);
	border-radius: 999px;
	background: #fff;
	font-size: .62rem;
}

.amtex-ai-filter__group--pills .amtex-ai-filter__options label:has(input:checked) {
	border-color: var(--amtex-filter-black);
	background: var(--amtex-filter-black);
	color: #fff;
}

.amtex-ai-filter__group--pills .amtex-ai-filter__options input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.amtex-ai-filter__group--pills .amtex-ai-filter__options small { display: none; }

.amtex-ai-filter__submit {
	display: block;
	width: calc(100% - 28px);
	min-height: 38px;
	margin: 14px;
	border: 0;
	border-radius: 999px;
	background: var(--amtex-filter-orange);
	color: #111;
	font-size: .68rem;
	font-weight: 800;
	text-transform: uppercase;
}

.amtex-ai-filter__results { min-width: 0; }

.amtex-ai-filter__results::after {
	display: table;
	clear: both;
	content: "";
}

.amtex-ai-filter__results ul.products {
	width: 100%;
	margin-top: 0;
}

.amtex-ai-filter__results .woocommerce-pagination { clear: both; }

.amtex-ai-filter.is-loading .amtex-ai-filter__panel,
.amtex-ai-filter.is-loading .amtex-ai-filter__results {
	opacity: .58;
	pointer-events: none;
}

.amtex-ai-suitability {
	--amtex-ai-orange: #ff5a14;
	margin: 16px 0 20px;
	padding: 14px 15px;
	border: 1px solid #d9d9d7;
	border-radius: 14px;
	background: #fafaf8;
}

.amtex-ai-suitability > strong {
	display: block;
	margin-bottom: 10px;
	font-size: .72rem;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.amtex-ai-suitability__row {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr);
	align-items: start;
	gap: 8px;
	margin-top: 7px;
}

.amtex-ai-suitability__row > span {
	padding-top: 6px;
	color: #777;
	font-size: .66rem;
	font-weight: 700;
}

.amtex-ai-suitability__row > div {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.amtex-ai-suitability__row a {
	display: inline-flex;
	align-items: center;
	min-height: 27px;
	padding: 4px 9px;
	border: 1px solid #cececc;
	border-radius: 999px;
	background: #fff;
	color: #222;
	font-size: .64rem;
	font-weight: 700;
	text-decoration: none;
}

.amtex-ai-suitability__row a:hover,
.amtex-ai-suitability__row a:focus {
	border-color: var(--amtex-ai-orange);
	background: var(--amtex-ai-orange);
	color: #111;
}

@media (max-width: 980px) {
	.amtex-ai-filter__layout { grid-template-columns: minmax(205px, 225px) minmax(0, 1fr); }
	.amtex-ai-filter__result-count { display: none; }
	.amtex-ai-filter__ordering > span { display: none; }
	.amtex-ai-filter__ordering select { max-width: 190px; }
}

@media (max-width: 767px) {
	.amtex-ai-filter { width: 100%; margin-right: 0; margin-left: 0; }
	.amtex-ai-filter__toolbar { flex-wrap: wrap; }
	.amtex-ai-filter__pagination { order: 3; width: 100%; margin-left: 0; }
	.amtex-ai-filter__pagination .woocommerce-pagination { display: flex; justify-content: center; }
	.amtex-ai-filter__ordering { width: 100%; margin-left: 0; justify-content: space-between; }
	.amtex-ai-filter__ordering > span { display: inline; }
	.amtex-ai-filter__ordering select { max-width: min(100%, 250px); }
	.amtex-ai-filter__layout,
	.amtex-ai-filter.is-collapsed .amtex-ai-filter__layout { grid-template-columns: minmax(0, 1fr); }
	.amtex-ai-filter.is-collapsed .amtex-ai-filter__panel { display: none; }
	.amtex-ai-filter__panel { margin-bottom: 12px; }
	.amtex-ai-filter__options { max-height: none; }
	.amtex-ai-suitability__row { grid-template-columns: 1fr; }
	.amtex-ai-suitability__row > span { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.amtex-ai-filter__panel,
	.amtex-ai-filter__group summary i::before,
	.amtex-ai-filter__group summary i::after { transition: none; }
}
