/* Product archive layout --------------------------------------------------- */

body.woocommerce.archive .elementor-location-archive .zst-archive-title,
body.search-results .elementor-location-archive .zst-archive-title {
	width: auto;
	margin: 0 10px 26px;
	color: #111;
	font-size: clamp(32px, 3.2vw, 50px);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.08;
}

/* The Elementor archive template originally uses a narrow sidebar. The
 * filter and product areas now occupy full rows inside the same menu-aligned
 * 1140px container. */
body.woocommerce.archive .elementor-location-archive .filter_col,
body.woocommerce.archive .elementor-location-archive .product_col,
body.search-results .elementor-location-archive .filter_col,
body.search-results .elementor-location-archive .product_col {
	width: 100% !important;
	flex: 0 0 100% !important;
}

body.woocommerce.archive .elementor-location-archive .elementor-inner-section > .elementor-container,
body.search-results .elementor-location-archive .elementor-inner-section > .elementor-container {
	flex-wrap: wrap;
}

body.woocommerce.archive .elementor-location-archive .filter_col,
body.search-results .elementor-location-archive .filter_col {
	height: auto;
}

body.woocommerce.archive .elementor-location-archive .filter_col .elementor-widget-image,
body.search-results .elementor-location-archive .filter_col .elementor-widget-image {
	display: none !important;
}

body.woocommerce.archive .filter_col .elementor-widget-shortcode,
body.search-results .filter_col .elementor-widget-shortcode {
	display: block !important;
	margin: 0 0 34px !important;
}

/* Four desktop filter columns: category, brand, model and price. */
body.woocommerce.archive .upf-filter,
body.search-results .upf-filter {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 28px;
	row-gap: 24px;
	margin: 0;
}

body.woocommerce.archive .upf-fieldset--search,
body.search-results .upf-fieldset--search {
	grid-column: 1 / -1;
}

body.woocommerce.archive .upf-fieldset,
body.search-results .upf-fieldset,
body.woocommerce.archive .upf-model-slot,
body.search-results .upf-model-slot {
	min-width: 0;
}

/* Always retain four product columns on desktop archive layouts. */
body.woocommerce.archive .elementor-wc-products ul.products,
body.search-results .elementor-wc-products ul.products,
body.woocommerce.archive #upf-products ul.products,
body.search-results #upf-products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	column-gap: 20px !important;
}

/* Product image cart action ----------------------------------------------- */

body.woocommerce.archive li.product .zst-product-media,
body.search-results li.product .zst-product-media {
	position: relative;
	margin: 0 0 6px;
	overflow: hidden;
}

body.woocommerce.archive li.product .zst-product-media-link,
body.search-results li.product .zst-product-media-link {
	display: block;
	position: relative;
}

body.woocommerce.archive li.product .zst-product-media img,
body.search-results li.product .zst-product-media img {
	display: block;
	width: 100%;
	margin: 0 !important;
}

body.woocommerce.archive li.product .zst-product-media .woocommerce-loop-product__buttons,
body.search-results li.product .zst-product-media .woocommerce-loop-product__buttons {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 4;
	margin: 0;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 160ms ease, transform 160ms ease;
	width: 40px !important;
}

body.woocommerce.archive li.product .zst-product-media:hover .woocommerce-loop-product__buttons,
body.woocommerce.archive li.product .zst-product-media:focus-within .woocommerce-loop-product__buttons,
body.search-results li.product .zst-product-media:hover .woocommerce-loop-product__buttons,
body.search-results li.product .zst-product-media:focus-within .woocommerce-loop-product__buttons {
	opacity: 1;
	transform: translateY(0);
}

body.woocommerce.archive li.product .zst-product-media .woocommerce-loop-product__buttons a,
body.search-results li.product .zst-product-media .woocommerce-loop-product__buttons a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	min-width: 40px !important;
	height: 40px !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #df7926 !important;
	box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
	color: #fff !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-indent: 0 !important;
	overflow: visible !important;
}

body.woocommerce.archive li.product .zst-product-media .woocommerce-loop-product__buttons a::before,
body.search-results li.product .zst-product-media .woocommerce-loop-product__buttons a::before {
	content: '' !important;
	display: block !important;
	position: static !important;
	width: 18px;
	height: 18px;
	transform: none !important;
	background: #fff !important;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6.2 5l.3 2h12.9l-1.7 6.1a1 1 0 0 1-1 .7H8.2L6.1 3H2V1h5.8l.4 2H22l-2.4 10.7a3 3 0 0 1-2.9 2.3H8.2a3 3 0 0 1-2.9-2.4L3.9 5H6.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6.2 5l.3 2h12.9l-1.7 6.1a1 1 0 0 1-1 .7H8.2L6.1 3H2V1h5.8l.4 2H22l-2.4 10.7a3 3 0 0 1-2.9 2.3H8.2a3 3 0 0 1-2.9-2.4L3.9 5H6.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.woocommerce.archive li.product .addcart_price_div,
body.search-results li.product .addcart_price_div {
	position: static !important;
	min-height: 0 !important;
	margin-top: 8px;
}

body.woocommerce.archive li.product .addcart_price_div > .price,
body.search-results li.product .addcart_price_div > .price {
	width: 100% !important;
}

@media (max-width: 1024px) {
	body.woocommerce.archive .upf-filter,
	body.search-results .upf-filter {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.woocommerce.archive .elementor-wc-products ul.products,
	body.search-results .elementor-wc-products ul.products,
	body.woocommerce.archive #upf-products ul.products,
	body.search-results #upf-products ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	body.woocommerce.archive .elementor-location-archive .zst-archive-title,
	body.search-results .elementor-location-archive .zst-archive-title {
		margin: 0 0 20px;
		font-size: 34px;
	}

	body.woocommerce.archive .upf-filter,
	body.search-results .upf-filter {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	body.woocommerce.archive .upf-fieldset--search,
	body.search-results .upf-fieldset--search {
		grid-column: auto;
	}

	body.woocommerce.archive .elementor-wc-products ul.products,
	body.search-results .elementor-wc-products ul.products,
	body.woocommerce.archive #upf-products ul.products,
	body.search-results #upf-products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (hover: none) {
	body.woocommerce.archive li.product .zst-product-media .woocommerce-loop-product__buttons,
	body.search-results li.product .zst-product-media .woocommerce-loop-product__buttons {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce.archive li.product .zst-product-media .woocommerce-loop-product__buttons,
	body.search-results li.product .zst-product-media .woocommerce-loop-product__buttons {
		transition: none;
	}
}
