/* Basic frontend styling for Ultra Product Filter. */

.upf-filter {
	display: grid;
	gap: 18px;
	padding: 0;
	margin: 0 0 24px;
	background: transparent;
	border: 0;
	border-radius: 0;
}

.upf-fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.upf-fieldset legend {
	margin: 0 0 10px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: #332f29;
}

.upf-mobile-control {
	display: none;
}

.upf-search-refine {
	display: grid;
	gap: 10px;
}

.upf-fieldset--search .upf-search-refine {
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
}

.upf-search-input {
	width: 100%;
	min-height: 46px;
	border: 1px solid #cfc7bc;
	border-radius: 8px;
	background: #fff;
	padding: 0 16px;
	font-size: 14px;
	color: #332f29;
}

.upf-search-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
}

.upf-search-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.upf-search-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 6px 10px 6px 12px;
	border-radius: 999px;
	background: #f5efe7;
	border: 1px solid #e4d7c6;
	color: #332f29;
	font-size: 13px;
	line-height: 1.2;
}

.upf-search-tag-label {
	display: inline-flex;
	align-items: center;
}

.upf-search-tag-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	background: rgb(235, 119, 0);
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
}

.upf-search-tag-remove:hover,
.upf-search-tag-remove:focus-visible {
	background: #332f29;
	color: #fff !important;
}

.upf-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	gap: 8px;
	white-space: nowrap;
}

.upf-search-submit-icon {
	display: none !important;
	align-items: center;
	justify-content: center;
}

.upf-search-submit-icon svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.upf-search-submit,
.upf-fieldset--search .upf-search-submit,
.upf-search-actions .upf-search-submit {
	border: 1px solid rgb(235, 119, 0) !important;
	background: rgb(235, 119, 0) !important;
	background-image: none !important;
	color: #fff !important;
	text-shadow: none !important;
	text-indent: 0 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}

.upf-search-submit:hover,
.upf-search-submit:focus-visible,
.upf-search-submit:active,
.upf-fieldset--search .upf-search-submit:hover,
.upf-fieldset--search .upf-search-submit:focus-visible,
.upf-fieldset--search .upf-search-submit:active,
.upf-search-actions .upf-search-submit:hover,
.upf-search-actions .upf-search-submit:focus-visible,
.upf-search-actions .upf-search-submit:active {
	border-color: rgb(235, 119, 0) !important;
	background: rgb(235, 119, 0) !important;
	color: #fff !important;
	box-shadow: none !important;
}

.upf-search-submit::before,
.upf-search-submit::after,
.upf-fieldset--search .upf-search-submit::before,
.upf-fieldset--search .upf-search-submit::after,
.upf-search-actions .upf-search-submit::before,
.upf-search-actions .upf-search-submit::after {
	content: none !important;
	display: none !important;
	background: none !important;
	background-image: none !important;
}

.upf-mobile-select {
	width: 100%;
	min-height: 46px;
	border: 1px solid #cfc7bc;
	border-radius: 8px;
	background: #fff;
	padding: 0 16px;
	font-size: 14px;
	color: #332f29;
}

.upf-choice-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.upf-choice-grid--stacked {
	flex-direction: column;
	align-items: flex-start;
}

.upf-choice-grid--stacked:not(.is-expanded) .upf-choice--collapsed {
	display: none;
}

.upf-toggle-more {
	display: inline-flex;
	align-items: center;
	margin-top: 10px;
	padding: 10px 16px;
	border: 1px solid rgb(235, 119, 0) !important;
	border-radius: 4px;
	background: #fff !important;
	color: rgb(235, 119, 0) !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none !important;
}

.upf-toggle-more:hover,
.upf-toggle-more:focus-visible {
	background: rgb(235, 119, 0) !important;
	border-color: rgb(235, 119, 0) !important;
	color: #fff !important;
	text-decoration: none !important;
}

.upf-choice {
	position: relative;
	display: flex;
	width: 100%;
}

.upf-choice--stacked {
	display: flex;
	width: 100%;
}

.upf-choice input {
	position: static;
	opacity: 1;
	pointer-events: auto;
	margin: 3px 10px 0 0;
	flex: 0 0 auto;
}

.upf-choice span {
	display: inline-block;
	min-height: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #332f29;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: none;
}

.upf-choice--stacked span {
	width: 100%;
}

.upf-choice input:focus-visible + span,
.upf-choice span:hover {
	color: #111;
	text-decoration: underline;
}

.upf-results-count {
	margin: 0;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.2;
}

body.upf-active-view .woocommerce-result-count {
	display: none !important;
}

.upf-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin: 0 0 28px;
}

.upf-toolbar .upf-results-count {
	flex: 1 1 auto;
}

body.upf-active-view form.woocommerce-ordering {
	margin: 0 !important;
	flex: 0 0 auto;
}

body.upf-active-view form.woocommerce-ordering .orderby {
	min-width: 280px;
	min-height: 46px;
	border: 1px solid #cfc7bc;
	border-radius: 8px;
	background: #fff;
	padding: 0 16px;
}

#upf-products.is-loading,
.upf-filter.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

#upf-products,
#upf-pagination {
	clear: both;
	width: 100%;
}

.upf-empty {
	padding: 18px;
	background: #faf7f2;
	border: 1px dashed #d6cec3;
}

#upf-pagination .woocommerce-pagination {
	margin-top: 20px;
}

.upf-nojs-submit {
	align-self: end;
	min-height: 46px;
	padding: 0 18px;
	border: 0;
	background: #111;
	color: #fff;
	border-radius: 6px;
}

.upf-shortcode-wrap .products {
	margin-top: 0;
}

#upf-products .products {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

#upf-products .products > li.product {
	min-width: 0;
}

body.upf-active-view #upf-products .addcart_price_div {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 45px;
}

body.upf-active-view #upf-products .addcart_price_div > a,
body.upf-active-view #upf-products .addcart_price_div > .woocommerce-loop-product__buttons {
	order: 2;
}

body.upf-active-view #upf-products .addcart_price_div > a,
body.upf-active-view #upf-products .addcart_price_div > .woocommerce-loop-product__buttons,
body.upf-active-view #upf-products .addcart_price_div > span.price {
	width: 46%;
}

body.upf-active-view #upf-products .addcart_price_div > span.price {
	order: 1;
	display: flex;
	flex-direction: column !important;
	flex-wrap: wrap;
	align-items: flex-start !important;
	gap: 0 !important;
	margin-bottom: 0 !important;
}

body.upf-active-view #upf-products .addcart_price_div > span.price ins {
	order: 1;
}

body.upf-active-view #upf-products .addcart_price_div > span.price del {
	order: 2;
	font-size: 12px !important;
}

body.upf-active-view #upf-products .woocommerce-loop-product__buttons a.add_to_cart_button,
body.upf-active-view #upf-products .woocommerce-loop-product__buttons a.product_type_simple,
body.upf-active-view #upf-products .addcart_price_div > a.add_to_cart_button,
body.upf-active-view #upf-products .addcart_price_div > a.product_type_simple,
body.upf-active-view #upf-products .addcart_price_div > a.product_type_variable,
body.upf-active-view #upf-products a.upf-icon-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	min-width: 88px;
	height: 38px;
	min-height: 38px;
	padding: 10px 18px;
	font-size: 0 !important;
	color: transparent !important;
	line-height: 0 !important;
	text-indent: -9999px;
	overflow: hidden;
	position: relative;
}

body.upf-active-view #upf-products .woocommerce-loop-product__buttons a.add_to_cart_button::before,
body.upf-active-view #upf-products .woocommerce-loop-product__buttons a.product_type_simple::before,
body.upf-active-view #upf-products .addcart_price_div > a.add_to_cart_button::before,
body.upf-active-view #upf-products .addcart_price_div > a.product_type_simple::before,
body.upf-active-view #upf-products .addcart_price_div > a.product_type_variable::before,
body.upf-active-view #upf-products a.upf-icon-button::before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1' stroke='%23FFFFFF' fill='none'/%3E%3Ccircle cx='20' cy='21' r='1' stroke='%23FFFFFF' fill='none'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6' stroke='%23FFFFFF' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

@media (max-width: 1024px) {
	body.upf-active-view form.woocommerce-ordering .orderby {
		min-width: 0;
		width: 100%;
	}
}

@media (max-width: 767px) {
	.filter_col .elementor-widget-shortcode {
		display: block !important;
		flex: 0 0 100% !important;
		max-width: 100% !important;
		margin: 0 0 14px !important;
	}

	.filter_col .elementor-widget-button.elementor-hidden-desktop {
		display: none !important;
	}

	.upf-mobile-control {
		display: block;
	}

	.upf-toggle-more {
		display: none !important;
	}

	#upf-category,
	#upf-brand,
	#upf-model,
	#upf-price {
		display: none;
	}

	.upf-fieldset legend,
	.upf-fieldset--price {
		display: none !important;
	}

	.upf-filter {
		gap: 12px;
		margin-bottom: 18px;
	}

	.upf-fieldset {
		display: grid;
		gap: 8px;
	}

	.upf-search-actions {
		width: 100%;
		min-width: 0;
	}

	.upf-fieldset--search .upf-search-refine {
		grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr);
		align-items: stretch;
		column-gap: 10px;
		row-gap: 10px;
	}

	.upf-search-input {
		min-width: 0;
	}

	.upf-search-submit {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		min-width: 0 !important;
		height: 46px;
		min-height: 46px;
		padding: 0 14px !important;
		gap: 8px !important;
		border-radius: 8px !important;
	}

	.upf-search-submit-text {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
	}

	.upf-fieldset legend {
		margin-bottom: 6px;
	}

	.upf-toolbar {
		clear: both;
		margin-top: 14px;
		align-items: center;
		flex-wrap: wrap;
		gap: 12px;
	}

	.upf-toolbar .upf-results-count {
		flex: 1 1 140px;
		font-size: 16px;
	}

	body.upf-active-view form.woocommerce-ordering {
		flex: 1 1 190px;
		width: min(100%, 210px);
		margin-left: auto !important;
	}

	body.upf-active-view form.woocommerce-ordering .orderby {
		width: 100%;
		min-width: 0 !important;
		max-width: 100% !important;
		font-size: 14px;
		padding: 0 14px;
	}

	body.upf-active-view #upf-products li.product {
		height: auto !important;
	}

	body.upf-active-view #upf-products .addcart_price_div,
	body.upf-active-view #upf-products .stock-status {
		position: static !important;
		left: auto !important;
		right: auto !important;
		top: auto !important;
		bottom: auto !important;
	}

	body.upf-active-view #upf-products .addcart_price_div {
		margin-top: 10px !important;
	}

	body.upf-active-view #upf-products .stock-status {
		display: inline-block !important;
		margin-top: 10px !important;
	}
}
