/*
 * Piloto DEV: prateleira de produtos mais larga e compacta.
 * Escopo intencionalmente limitado ao template de arquivo de produtos.
 */
body.post-type-archive-product .elementor-location-archive > .e-con-boxed > .e-con-inner,
body.search-results .elementor-location-archive > .e-con-boxed > .e-con-inner {
	width: 100% !important;
	max-width: min(100%, 1520px) !important;
}

body.post-type-archive-product .unica-results-wrap,
body.search-results .unica-results-wrap {
	max-width: 1520px !important;
	padding-inline: 12px !important;
}

body.unica-product-taxonomy .elementor-location-archive > .e-con-boxed > .e-con-inner {
	width: 100% !important;
	max-width: min(100%, 1520px) !important;
}

body.unica-product-taxonomy .unica-results-wrap {
	max-width: 1520px !important;
	padding-inline: 12px !important;
}

/* Remove a placa cinza artificial sem alterar a proporcao da foto. */
body:is(.post-type-archive-product, .search-results, .unica-product-taxonomy)
	:is(#unica-density-image-priority, [id^="unica-archive-"], [id^="unica-search-"])
	.u-img img {
	background: transparent !important;
	border-radius: 0 !important;
}

@media (min-width: 1600px) {
	body.post-type-archive-product .unica-results-grid,
	body.search-results .unica-results-grid,
	body.unica-product-taxonomy .unica-results-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1280px) and (max-width: 1599px) {
	body.post-type-archive-product .unica-results-grid,
	body.search-results .unica-results-grid,
	body.unica-product-taxonomy .unica-results-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1024px) and (max-width: 1279px) {
	body.post-type-archive-product .unica-results-grid,
	body.search-results .unica-results-grid,
	body.unica-product-taxonomy .unica-results-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 761px) and (max-width: 1023px) {
	body.post-type-archive-product .unica-results-grid,
	body.search-results .unica-results-grid,
	body.unica-product-taxonomy .unica-results-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 761px) {
	body.unica-product-taxonomy .unica-results-grid {
		gap: 14px !important;
	}

	body.unica-product-taxonomy .unica-card {
		border-radius: 10px !important;
		box-shadow: 0 4px 14px rgba(19, 36, 62, 0.055) !important;
	}

	body.unica-product-taxonomy .unica-card:hover {
		transform: translateY(-2px) !important;
		box-shadow: 0 9px 24px rgba(19, 36, 62, 0.11) !important;
	}

	body.unica-product-taxonomy .unica-card .u-img {
		height: 184px !important;
		padding: 4px 8px 2px !important;
	}

	body.unica-product-taxonomy .unica-card .u-img img {
		max-height: 178px !important;
	}

	body.unica-product-taxonomy .unica-card .u-body {
		padding: 0 10px 10px !important;
	}

	body.unica-product-taxonomy .unica-card .u-title {
		min-height: 32px !important;
		margin: 2px 0 6px !important;
		font-size: 13px !important;
		line-height: 1.2 !important;
	}

	body.unica-product-taxonomy .unica-card .u-price-row {
		gap: 4px 6px !important;
		margin-bottom: 3px !important;
	}

	body.unica-product-taxonomy .unica-card .u-price {
		font-size: 20px !important;
	}

	body.unica-product-taxonomy .unica-card .u-pix-badge {
		padding: 3px 6px !important;
		font-size: 9px !important;
	}

	body.unica-product-taxonomy .unica-card .u-installments {
		margin-bottom: 6px !important;
		font-size: 11px !important;
	}

	body.unica-product-taxonomy .unica-card .u-reseller-line {
		margin-bottom: 8px !important;
		padding: 6px 7px !important;
		border-radius: 8px !important;
	}

	body.unica-product-taxonomy .unica-card .u-reseller-label {
		font-size: 8.5px !important;
	}

	body.unica-product-taxonomy .unica-card .u-reseller-price {
		font-size: 13.5px !important;
	}

	body.unica-product-taxonomy .unica-card .u-reseller-benefit {
		margin-top: 4px !important;
		padding-top: 4px !important;
		font-size: 9.5px !important;
	}

	body.unica-product-taxonomy .unica-card .u-reseller-discount {
		padding: 3px 4px !important;
		font-size: 8.5px !important;
	}

	body.unica-product-taxonomy .unica-card .u-buy {
		min-height: 36px !important;
		border-radius: 8px !important;
		font-size: 13px !important;
	}
}

@media (min-width: 761px) {
	body.post-type-archive-product .unica-results-grid,
	body.search-results .unica-results-grid {
		gap: 14px !important;
	}

	body.post-type-archive-product .unica-card,
	body.search-results .unica-card {
		border-radius: 10px !important;
		box-shadow: 0 4px 14px rgba(19, 36, 62, 0.055) !important;
	}

	body.post-type-archive-product .unica-card:hover,
	body.search-results .unica-card:hover {
		transform: translateY(-2px) !important;
		box-shadow: 0 9px 24px rgba(19, 36, 62, 0.11) !important;
	}

	body.post-type-archive-product .unica-card .u-img,
	body.search-results .unica-card .u-img {
		height: 184px !important;
		padding: 4px 8px 2px !important;
	}

	body.post-type-archive-product .unica-card .u-img img,
	body.search-results .unica-card .u-img img {
		max-height: 178px !important;
	}

	body.post-type-archive-product .unica-card .u-body,
	body.search-results .unica-card .u-body {
		padding: 0 10px 10px !important;
	}

	body.post-type-archive-product .unica-card .u-title,
	body.search-results .unica-card .u-title {
		min-height: 32px !important;
		margin: 2px 0 6px !important;
		font-size: 13px !important;
		line-height: 1.2 !important;
	}

	body.post-type-archive-product .unica-card .u-price-row,
	body.search-results .unica-card .u-price-row {
		gap: 4px 6px !important;
		margin-bottom: 3px !important;
	}

	body.post-type-archive-product .unica-card .u-price,
	body.search-results .unica-card .u-price {
		font-size: 20px !important;
	}

	body.post-type-archive-product .unica-card .u-pix-badge,
	body.search-results .unica-card .u-pix-badge {
		padding: 3px 6px !important;
		font-size: 9px !important;
	}

	body.post-type-archive-product .unica-card .u-installments,
	body.search-results .unica-card .u-installments {
		margin-bottom: 6px !important;
		font-size: 11px !important;
	}

	body.post-type-archive-product .unica-card .u-reseller-line,
	body.search-results .unica-card .u-reseller-line {
		margin-bottom: 8px !important;
		padding: 6px 7px !important;
		border-radius: 8px !important;
	}

	body.post-type-archive-product .unica-card .u-reseller-label,
	body.search-results .unica-card .u-reseller-label {
		font-size: 8.5px !important;
	}

	body.post-type-archive-product .unica-card .u-reseller-price,
	body.search-results .unica-card .u-reseller-price {
		font-size: 13.5px !important;
	}

	body.post-type-archive-product .unica-card .u-reseller-benefit,
	body.search-results .unica-card .u-reseller-benefit {
		margin-top: 4px !important;
		padding-top: 4px !important;
		font-size: 9.5px !important;
	}

	body.post-type-archive-product .unica-card .u-reseller-discount,
	body.search-results .unica-card .u-reseller-discount {
		padding: 3px 4px !important;
		font-size: 8.5px !important;
	}

	body.post-type-archive-product .unica-card .u-buy,
	body.search-results .unica-card .u-buy {
		min-height: 36px !important;
		border-radius: 8px !important;
		font-size: 13px !important;
	}

	/*
	 * O shortcode de busca gera um ID dinamico com regras de alta prioridade.
	 * Este seletor preserva duas colunas reais para rotulo e valor, inclusive
	 * quando o preco passa de tres para quatro digitos.
	 */
	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-line {
		padding: 7px 6px !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-top {
		grid-template-columns: minmax(0, 1fr) auto !important;
		column-gap: 7px !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-label {
		min-width: 0 !important;
		font-size: 8px !important;
		letter-spacing: -0.1px !important;
		white-space: nowrap !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-value,
	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-price {
		white-space: nowrap !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-price {
		font-size: 13px !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-benefit {
		grid-template-columns: minmax(0, 1fr) auto !important;
		column-gap: 6px !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-benefit > span:first-child {
		min-width: 0 !important;
		font-size: 9px !important;
		white-space: nowrap !important;
	}

	body.search-results :is(#unica-density-priority, [id^="unica-search-"]) .u-reseller-discount {
		font-size: 8px !important;
		white-space: nowrap !important;
	}
}
