/*
 * Canonical filter/list controls.
 * Loaded after the legacy/origin CSS stack so product and dealer filters have
 * one final source of truth for layout, open states and mobile behavior.
 */

body.fc-products-listing .products_page {
	overflow: visible !important;
}

body.fc-products-listing .products_page > .grid-container {
	overflow: visible !important;
}

body.fc-products-listing .wrap_filter_product {
	position: relative !important;
	z-index: 60 !important;
	margin: 0 0 2rem !important;
	padding: 1rem 1.1rem !important;
	overflow: visible !important;
	background: rgba(255, 255, 255, 0.96) !important;
	border: 1px solid var(--fc-pl-line, #dce5df) !important;
	border-radius: 1.125rem !important;
	box-shadow: 0 12px 32px rgba(24, 49, 35, 0.055) !important;
	transform: none !important;
}

body.fc-products-listing .wrap_filter_product .filter_inner {
	height: auto !important;
	max-height: none !important;
	padding: 0 !important;
	overflow: visible !important;
}

body.fc-products-listing .product_filters {
	position: relative !important;
	z-index: 2 !important;
	display: grid !important;
	grid-template-columns: max-content max-content max-content minmax(15rem, 1fr) !important;
	align-items: center !important;
	gap: 0.65rem !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
}

body.fc-products-listing .product_filters > .filter_item {
	position: relative !important;
	z-index: 1 !important;
	min-width: 0 !important;
	margin: 0 !important;
}

body.fc-products-listing .product_filters > .filter_item.open {
	z-index: 80 !important;
}

body.fc-products-listing .product_filters .filter_item.show_filter {
	display: none !important;
}

body.fc-products-listing .product_filters .filter_title,
body.fc-products-listing .product_filters .search form input {
	box-sizing: border-box !important;
	min-height: 3rem !important;
	height: 3rem !important;
	border: 1px solid #d5ddd8 !important;
	border-radius: 0.75rem !important;
	background: #fff !important;
	color: var(--fc-pl-ink, #17241d) !important;
	-webkit-text-fill-color: var(--fc-pl-ink, #17241d) !important;
	font-size: 0.875rem !important;
	line-height: 1.3 !important;
	box-shadow: 0 2px 10px rgba(16, 26, 21, 0.05) !important;
}

body.fc-products-listing .product_filters .filter_title {
	display: inline-flex !important;
	width: max-content !important;
	max-width: 100% !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.45rem !important;
	padding: 0.65rem 1rem !important;
	cursor: pointer !important;
	white-space: nowrap !important;
}

body.fc-products-listing .product_filters .filter_title svg {
	flex: 0 0 auto !important;
	width: 1rem !important;
	height: 1rem !important;
	color: var(--fc-pl-muted, #617067) !important;
	transition: transform 0.2s ease, color 0.2s ease !important;
}

body.fc-products-listing .product_filters .filter_item.open .filter_title {
	border-color: var(--primary-color, #e60012) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #e60012) 13%, transparent) !important;
}

body.fc-products-listing .product_filters .filter_item.open .filter_title svg {
	color: var(--primary-color, #e60012) !important;
	transform: rotate(180deg) !important;
}

body.fc-products-listing .product_filters .filter_list {
	position: absolute !important;
	top: calc(100% + 0.45rem) !important;
	left: 0 !important;
	z-index: 90 !important;
	display: flex !important;
	width: min(22rem, 92vw) !important;
	min-width: 16rem !important;
	max-width: 24rem !important;
	flex-wrap: wrap !important;
	gap: 0.15rem 0.35rem !important;
	margin: 0 !important;
	padding: 0.55rem !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	background: #fff !important;
	border: 1px solid #cfd9d3 !important;
	border-radius: 0.85rem !important;
	box-shadow: 0 18px 48px rgba(16, 26, 21, 0.16) !important;
	transition: opacity 0.16s ease, visibility 0.16s ease !important;
}

body.fc-products-listing .product_filters .filter_item:hover .filter_list {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.fc-products-listing .product_filters .filter_item.open .filter_list {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

body.fc-products-listing .product_filters .filter_list .filter_value {
	flex: 1 1 calc(50% - 0.35rem) !important;
	min-width: 8.5rem !important;
	margin: 0 !important;
}

body.fc-products-listing .product_filters .filter_list .filter_value label,
body.fc-products-listing .product_sorts .sort_item label {
	display: flex !important;
	align-items: center !important;
	gap: 0.55rem !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	color: var(--fc-pl-ink, #17241d) !important;
	-webkit-text-fill-color: var(--fc-pl-ink, #17241d) !important;
	font-size: 0.875rem !important;
	line-height: 1.35 !important;
	cursor: pointer !important;
}

body.fc-products-listing .product_filters .filter_list .filter_value label {
	width: 100% !important;
	padding: 0.65rem 0.7rem !important;
	border-radius: 0.55rem !important;
}

body.fc-products-listing .product_filters .filter_list .filter_value label:hover,
body.fc-products-listing .product_filters .filter_list .filter_value label:has(input:checked),
body.fc-products-listing .product_sorts .sort_item label:has(input:checked) {
	background: rgba(230, 0, 18, 0.08) !important;
	color: #e60012 !important;
	-webkit-text-fill-color: #e60012 !important;
}

body.fc-products-listing .product_filters .filter_list input[type="radio"],
body.fc-products-listing .product_filters .filter_list input[type="checkbox"],
body.fc-products-listing .product_sorts input[type="radio"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
	appearance: none !important;
}

body.fc-products-listing .product_filters .filter_list span.custom_checkbox,
body.fc-products-listing .product_sorts span.custom_checkbox {
	position: relative !important;
	display: inline-flex !important;
	flex: 0 0 1.05rem !important;
	width: 1.05rem !important;
	min-width: 1.05rem !important;
	height: 1.05rem !important;
	margin: 0 !important;
	border: 2px solid var(--fc-pl-muted, #617067) !important;
	border-radius: 50% !important;
	background: #fff !important;
}

body.fc-products-listing .product_filters .filter_list span.custom_checkbox::before,
body.fc-products-listing .product_sorts span.custom_checkbox::before {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: 0.45rem !important;
	height: 0.45rem !important;
	content: "" !important;
	border-radius: 50% !important;
	background: var(--primary-color, #e60012) !important;
	transform: translate(-50%, -50%) scale(0) !important;
	transition: transform 0.15s ease !important;
}

body.fc-products-listing .product_filters .filter_list input:checked + span.custom_checkbox,
body.fc-products-listing .product_sorts input:checked + span.custom_checkbox {
	border-color: var(--primary-color, #e60012) !important;
}

body.fc-products-listing .product_filters .filter_list input:checked + span.custom_checkbox::before,
body.fc-products-listing .product_sorts input:checked + span.custom_checkbox::before {
	transform: translate(-50%, -50%) scale(1) !important;
}

body.fc-products-listing .product_filters .search {
	min-width: 0 !important;
}

body.fc-products-listing .product_filters .search form {
	position: relative !important;
	display: block !important;
	min-width: 0 !important;
	margin: 0 !important;
}

body.fc-products-listing .product_filters .search form input {
	width: 100% !important;
	min-width: 0 !important;
	padding: 0.65rem 2.75rem 0.65rem 1rem !important;
	text-overflow: ellipsis !important;
}

body.fc-products-listing .product_filters .search form input:focus {
	border-color: var(--primary-color, #e60012) !important;
	outline: 0 !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #e60012) 13%, transparent) !important;
}

body.fc-products-listing .product_filters .search form button {
	position: absolute !important;
	top: 50% !important;
	right: 0.35rem !important;
	display: grid !important;
	width: 2.25rem !important;
	height: 2.25rem !important;
	min-height: 0 !important;
	place-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--fc-pl-muted, #617067) !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	transform: translateY(-50%) !important;
}

body.fc-products-listing .product_sorts {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 0.75rem !important;
	margin: 1rem 0 0 !important;
	padding: 0.9rem 0.15rem 0 !important;
	border-top: 1px solid var(--fc-pl-line, #dce5df) !important;
	border-bottom: 0 !important;
}

body.fc-products-listing .product_sorts .sort {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0.5rem 0.75rem !important;
}

body.fc-products-listing .products_count,
body.fc-products-listing .product_sorts .sort > span {
	color: var(--fc-pl-muted, #617067) !important;
	-webkit-text-fill-color: var(--fc-pl-muted, #617067) !important;
	font-size: 0.875rem !important;
	line-height: 1.45 !important;
}

body.fc-products-listing .product_sorts .number_count {
	color: var(--primary-color, #e60012) !important;
	-webkit-text-fill-color: var(--primary-color, #e60012) !important;
	font-weight: 800 !important;
}

body.fc-products-listing .wrap_filter_product .show_filter_btn {
	display: none !important;
}

body.page-template-dealers section.system_page .store_filter,
body.page-template-templatesdealers-php section.system_page .store_filter {
	z-index: 80 !important;
	width: min(38.5rem, 100%) !important;
	margin: 0 auto 1.5rem !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.page-template-dealers section.system_page .store_filter .select,
body.page-template-templatesdealers-php section.system_page .store_filter .select {
	position: relative !important;
	width: 100% !important;
}

body.page-template-dealers section.system_page .store_filter .select-styled,
body.page-template-templatesdealers-php section.system_page .store_filter .select-styled {
	display: flex !important;
	align-items: center !important;
	min-height: 3.25rem !important;
	padding: 0.8rem 2.75rem 0.8rem 1rem !important;
	color: #1a2b21 !important;
	-webkit-text-fill-color: #1a2b21 !important;
	font-size: 0.9rem !important;
	font-weight: 700 !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a2b21' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 1rem center !important;
	border: 1px solid #d8e2dc !important;
	border-radius: 0.8rem !important;
	box-shadow: 0 8px 24px rgba(18, 35, 26, 0.06) !important;
}

body.page-template-dealers section.system_page .store_filter .select-styled.active,
body.page-template-templatesdealers-php section.system_page .store_filter .select-styled.active {
	border-color: var(--primary-color, #e60012) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #e60012) 13%, transparent) !important;
}

body.page-template-dealers section.system_page .store_filter .select-options,
body.page-template-templatesdealers-php section.system_page .store_filter .select-options {
	top: calc(100% + 0.45rem) !important;
	max-height: 15rem !important;
	padding: 0.35rem !important;
	background: #fff !important;
	border: 1px solid #d8e2dc !important;
	border-radius: 0.8rem !important;
	box-shadow: 0 16px 40px rgba(18, 35, 26, 0.16) !important;
}

body.page-template-dealers section.system_page .store_filter .select-options > li,
body.page-template-templatesdealers-php section.system_page .store_filter .select-options > li {
	display: flex !important;
	min-height: 2.8rem !important;
	align-items: center !important;
	margin: 0 !important;
	padding: 0.65rem 0.8rem !important;
	color: #26372d !important;
	-webkit-text-fill-color: #26372d !important;
	font-size: 0.86rem !important;
	font-weight: 600 !important;
	background: #fff !important;
	border: 0 !important;
	border-radius: 0.55rem !important;
}

body.page-template-dealers section.system_page .store_filter .select-options > li:hover,
body.page-template-dealers section.system_page .store_filter .select-options > li.active,
body.page-template-templatesdealers-php section.system_page .store_filter .select-options > li:hover,
body.page-template-templatesdealers-php section.system_page .store_filter .select-options > li.active {
	color: #137d28 !important;
	-webkit-text-fill-color: #137d28 !important;
	background: #eaf7ed !important;
}

body.page-template-dealers section.system_page .store_item .store_name,
body.page-template-templatesdealers-php section.system_page .store_item .store_name {
	color: #1c3025 !important;
	-webkit-text-fill-color: #1c3025 !important;
}

body.page-template-dealers section.system_page .store_item.active .store_name,
body.page-template-templatesdealers-php section.system_page .store_item.active .store_name {
	color: var(--primary-color, #14882b) !important;
	-webkit-text-fill-color: var(--primary-color, #14882b) !important;
}

@media only screen and (min-width: 768px) and (max-width: 1050px) {
	body.fc-products-listing .product_filters {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	body.fc-products-listing .product_filters .search {
		grid-column: 1 / -1 !important;
	}
}

@media only screen and (max-width: 767px) {
	body.fc-products-listing .products_page {
		overflow-x: hidden !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product {
		position: fixed !important;
		inset: 0 auto 0 0 !important;
		z-index: 10050 !important;
		width: min(84vw, 20rem) !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		background: #f8faf8 !important;
		border: 0 !important;
		border-right: 1px solid #dce5df !important;
		border-radius: 0 !important;
		box-shadow: 16px 0 42px rgba(18, 38, 27, 0.18) !important;
		transform: translate3d(-100%, 0, 0) !important;
		transition: transform 0.28s ease !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product.show,
	body.fc-products-listing .products_page .wrap_filter_product.filters-open {
		transform: translate3d(0, 0, 0) !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .filter_inner {
		box-sizing: border-box !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		padding: 0.8rem 0.75rem calc(1.25rem + env(safe-area-inset-bottom)) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch !important;
		overscroll-behavior-y: contain !important;
		scrollbar-width: thin !important;
		scrollbar-color: #b9c9bf transparent !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .show_filter_btn {
		position: absolute !important;
		top: clamp(8.5rem, 34vh, 18rem) !important;
		right: -7.4rem !important;
		z-index: 10051 !important;
		display: flex !important;
		width: 7.4rem !important;
		min-width: 7.4rem !important;
		height: 3.25rem !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 0.55rem !important;
		padding: 0 0.85rem !important;
		color: #fff !important;
		background: linear-gradient(145deg, #19c638, #0d9826) !important;
		border: 0 !important;
		border-radius: 0 0.9rem 0.9rem 0 !important;
		box-shadow: 7px 9px 22px rgba(10, 119, 31, 0.24) !important;
		cursor: pointer !important;
		pointer-events: auto !important;
		transform: translateY(-50%) !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product.show .show_filter_btn,
	body.fc-products-listing .products_page .wrap_filter_product.filters-open .show_filter_btn {
		right: -3.25rem !important;
		width: 3.25rem !important;
		min-width: 3.25rem !important;
		justify-content: center !important;
		gap: 0 !important;
		padding: 0 !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .show_filter_btn::after {
		display: none !important;
		content: none !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .show_filter_btn > span {
		display: block !important;
		min-width: 0 !important;
		color: #fff !important;
		-webkit-text-fill-color: #fff !important;
		font-size: 0.72rem !important;
		font-weight: 800 !important;
		line-height: 1.15 !important;
		letter-spacing: 0 !important;
		text-transform: uppercase !important;
		white-space: nowrap !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product.show .show_filter_btn > span,
	body.fc-products-listing .products_page .wrap_filter_product.filters-open .show_filter_btn > span {
		display: none !important;
	}

	body.fc-products-listing .products_page .show_filter_btn .show_filter_btn_icon {
		position: static !important;
		display: block !important;
		flex: 0 0 1.35rem !important;
		width: 1.35rem !important;
		height: 1.35rem !important;
		color: #fff !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product:not(.show):not(.filters-open) .fc-filter-close,
	body.fc-products-listing .products_page .wrap_filter_product.show .fc-filter-open,
	body.fc-products-listing .products_page .wrap_filter_product.filters-open .fc-filter-open {
		display: none !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product:not(.show):not(.filters-open) .fc-filter-open,
	body.fc-products-listing .products_page .wrap_filter_product.show .fc-filter-close,
	body.fc-products-listing .products_page .wrap_filter_product.filters-open .fc-filter-close {
		display: block !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .product_filters {
		display: block !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .product_filters .filter_item {
		margin: 0 0 0.5rem !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .product_filters .filter_title {
		width: 100% !important;
		min-height: 2.45rem !important;
		height: 2.45rem !important;
		justify-content: space-between !important;
		padding: 0.5rem 0.7rem !important;
		font-size: 0.78rem !important;
		font-weight: 700 !important;
		white-space: normal !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .product_filters .filter_list,
	body.fc-products-listing .products_page .wrap_filter_product .product_filters .filter_item:hover .filter_list {
		position: static !important;
		display: flex !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		margin: 0.3rem 0 0 !important;
		padding: 0.3rem !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		gap: 0.12rem !important;
		background: #fff !important;
		border: 1px solid #e2e9e4 !important;
		border-radius: 0.65rem !important;
		box-shadow: none !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .filter_list .filter_value {
		flex: 1 1 calc(50% - 0.15rem) !important;
		min-width: 0 !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .filter_list .filter_value label,
	body.fc-products-listing .products_page .wrap_filter_product .product_sorts .sort_item label {
		min-height: 2rem !important;
		padding: 0.38rem 0.42rem !important;
		gap: 0.4rem !important;
		font-size: 0.72rem !important;
		line-height: 1.25 !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .search {
		margin-top: 0.15rem !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .search input {
		height: 2.45rem !important;
		min-height: 2.45rem !important;
		font-size: 0.76rem !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .product_sorts {
		display: block !important;
		margin: 0.65rem 0 0 !important;
		padding: 0.65rem 0 0 !important;
		border-top: 1px solid #dfe7e1 !important;
	}

	body.fc-products-listing .products_page .wrap_filter_product .product_sorts .sort {
		display: grid !important;
		justify-content: stretch !important;
		gap: 0.25rem !important;
	}
}

/* Desktop Filter Tab Bar & Filter Value Pill Geometry */
@media (min-width: 850px) {
	html body :is(.fc-filter-tabs, .fc-prod-filter-tabs, .fc-news-filter-tabs) {
		display: inline-flex !important;
		align-items: center !important;
		padding: 6px 16px !important;
		border-radius: 9999px !important;
		gap: 6px !important;
	}

	html body :is(.fc-filter-tabs, .fc-prod-filter-tabs, .fc-news-filter-tabs) :is(.fc-tab-btn, button, a) {
		padding: 8px 20px !important;
		border-radius: 9999px !important;
		white-space: nowrap !important;
		box-sizing: border-box !important;
	}
}
