/**
 * WooCommerce catalog and product-card presentation.
 *
 * This layer changes presentation only. Product data, prices, queries,
 * availability and Magic plugin output remain owned by WooCommerce/plugins.
 */

/* Classic WooCommerce archive toolbar. */
.magic-fse-theme.woocommerce-shop .woocommerce-result-count,
.magic-fse-theme.tax-product_cat .woocommerce-result-count,
.magic-fse-theme.tax-product_tag .woocommerce-result-count,
.magic-fse-theme.tax-product_brand .woocommerce-result-count,
.magic-fse-theme.post-type-archive-product .woocommerce-result-count,
.magic-fse-theme.woocommerce-shop .woocommerce-ordering,
.magic-fse-theme.tax-product_cat .woocommerce-ordering,
.magic-fse-theme.tax-product_tag .woocommerce-ordering,
.magic-fse-theme.tax-product_brand .woocommerce-ordering,
.magic-fse-theme.post-type-archive-product .woocommerce-ordering {
	margin-bottom: clamp(1.25rem, 2vw, 2rem);
}

.magic-fse-theme .woocommerce-ordering select {
	min-height: 2.75rem;
	max-width: 100%;
	padding: 0.55rem 2.5rem 0.55rem 0.8rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--magic-fse--radius-small, 6px);
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
}

/* Classic WooCommerce loop: preserve the column count selected by WooCommerce. */
.magic-fse-theme .woocommerce ul.products {
	display: grid;
	clear: both;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.75rem);
	margin: 0;
	padding: 0;
}

.magic-fse-theme .woocommerce ul.products::before,
.magic-fse-theme .woocommerce ul.products::after {
	display: none;
}

.magic-fse-theme .woocommerce ul.products.columns-1 {
	grid-template-columns: minmax(0, 1fr);
}

.magic-fse-theme .woocommerce ul.products.columns-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.magic-fse-theme .woocommerce ul.products.columns-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.magic-fse-theme .woocommerce ul.products.columns-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.magic-fse-theme .woocommerce ul.products.columns-5 {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.magic-fse-theme .woocommerce ul.products.columns-6 {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.magic-fse-theme .woocommerce ul.products li.product,
.magic-fse-theme .wc-block-product-template .wc-block-product {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: 100%;
	flex-direction: column;
	margin: 0 !important;
	padding: clamp(0.8rem, 1.4vw, 1.15rem);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--magic-fse--radius-medium, 10px);
	background: var(--wp--preset--color--background);
	box-shadow: 0 1px 0 rgba(23, 24, 28, 0.03);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.magic-fse-theme .woocommerce ul.products li.product {
	float: none !important;
	width: auto !important;
}

@media (hover: hover) and (pointer: fine) {
	.magic-fse-theme .woocommerce ul.products li.product:hover,
	.magic-fse-theme .wc-block-product-template .wc-block-product:hover {
		border-color: var(--wp--preset--color--foreground);
		box-shadow: 0 10px 28px rgba(23, 24, 28, 0.08);
		transform: translateY(-2px);
	}
}

/* Classic product link becomes the flexible card body. */
.magic-fse-theme .woocommerce ul.products li.product .woocommerce-LoopProduct-link {
	display: flex;
	min-width: 0;
	flex: 1 1 auto;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

/* Stable media area without cropping product photography. */
.magic-fse-theme .woocommerce ul.products li.product .woocommerce-LoopProduct-link img,
.magic-fse-theme .wc-block-components-product-image img,
.magic-fse-theme .wc-block-product-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 300px;
	margin: 0 auto 1rem;
	object-fit: contain;
	object-position: center;
	background: var(--wp--preset--color--background);
}

.magic-fse-theme .wc-block-components-product-image,
.magic-fse-theme .wc-block-product-image {
	margin-bottom: 0;
}

/* Product titles: aligned cards, maximum two lines. */
.magic-fse-theme .woocommerce ul.products li.product .woocommerce-loop-product__title,
.magic-fse-theme .wc-block-components-product-title,
.magic-fse-theme .wp-block-post-title.wc-block-components-product-title {
	display: -webkit-box;
	overflow: hidden;
	min-height: 2.6em;
	margin: 0 0 0.45rem;
	color: var(--wp--preset--color--foreground);
	font-size: clamp(0.82rem, 0.95vw, 0.92rem);
	font-weight: 650;
	line-height: 1.3;
	text-wrap: balance;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.magic-fse-theme .woocommerce ul.products li.product .star-rating,
.magic-fse-theme .wc-block-components-product-rating {
	margin: 0;
	font-size: 15px;
	line-height: 1;
}

.magic-fse-theme .woocommerce ul.products li.product .star-rating::before,
.magic-fse-theme .wc-block-components-product-rating__stars::before {
	color: #d7d9dd;
}

.magic-fse-theme .woocommerce ul.products li.product .star-rating span::before,
.magic-fse-theme .wc-block-components-product-rating__stars span::before {
	color: #f59e0b;
}

.magic-fse-theme .wc-block-components-product-rating__stars svg {
	fill: #f59e0b;
	color: #f59e0b;
}

/* Prices remain untouched: presentation only. */
.magic-fse-theme .woocommerce ul.products li.product .price,
.magic-fse-theme .wc-block-components-product-price,
.magic-fse-theme .wc-block-product-price {
	margin: auto 0 0.85rem;
	color: var(--wp--preset--color--foreground);
	font-size: 0.9rem;
	font-weight: 650;
	line-height: 1.35;
}

.magic-fse-theme .woocommerce ul.products li.product .price del,
.magic-fse-theme .wc-block-components-product-price del,
.magic-fse-theme .wc-block-product-price del {
	color: var(--wp--preset--color--muted);
	font-size: 0.86em;
	font-weight: 450;
	opacity: 1;
}

.magic-fse-theme .woocommerce ul.products li.product .price ins,
.magic-fse-theme .wc-block-components-product-price ins,
.magic-fse-theme .wc-block-product-price ins {
	text-decoration: none;
}

/* Sale badges stay attached to the card. */
.magic-fse-theme .woocommerce ul.products li.product .onsale,
.magic-fse-theme .wc-block-components-product-sale-badge,
.magic-fse-theme .wc-block-grid__product-onsale {
	position: absolute;
	top: 0.75rem;
	right: auto;
	left: 0.75rem;
	z-index: 3;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0.38rem 0.58rem;
	border: 0;
	border-radius: 999px;
	background: #e32636;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 750;
	line-height: 1;
	text-transform: uppercase;
}

.magic-fse-theme .wc-block-components-product-sale-badge.magic-fse-sale-percentage span {
	color: #fff;
}

/* CTA alignment for classic loops and Product Collection. */
.magic-fse-theme .woocommerce ul.products li.product .button,
.magic-fse-theme .wc-block-components-product-button .wp-block-button__link,
.magic-fse-theme .wc-block-product-button .wp-block-button__link {
	width: 100%;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.7rem 0.9rem;
	border-radius: var(--wp--custom--magic-fse--radius-small, 6px);
	text-align: center;
}

.magic-fse-theme .wc-block-components-product-button,
.magic-fse-theme .wc-block-product-button,
.magic-fse-theme .wc-block-components-product-button .wp-block-button,
.magic-fse-theme .wc-block-product-button .wp-block-button {
	width: 100%;
	margin-top: auto;
}

/* Magic outputs already injected by their owning plugins remain within the card flow. */
.magic-fse-theme .woocommerce ul.products li.product > .magic-fse-slot,
.magic-fse-theme .wc-block-product > .magic-fse-slot {
	margin-top: 0.65rem;
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination,
.magic-fse-theme .wp-block-query-pagination {
	margin-top: clamp(2rem, 4vw, 3.5rem);
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul,
.magic-fse-theme .wp-block-query-pagination,
.magic-fse-theme .wp-block-query-pagination-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul {
	margin: 0;
	border: 0;
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li {
	border: 0;
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li span,
.magic-fse-theme .wp-block-query-pagination-numbers a,
.magic-fse-theme .wp-block-query-pagination-numbers span {
	display: inline-grid;
	width: 2.45rem;
	height: 2.45rem;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f0f1f2;
	color: var(--wp--preset--color--foreground);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a.prev,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a.next,
.magic-fse-theme .wp-block-query-pagination-previous,
.magic-fse-theme .wp-block-query-pagination-next {
	display: inline-flex;
	width: auto;
	min-width: 2.45rem;
	height: 2.45rem;
	align-items: center;
	justify-content: center;
	padding: 0 1rem;
	border: 0;
	border-radius: 999px;
	background: #f0f1f2;
	color: var(--wp--preset--color--foreground);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li span.current,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a:hover,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a:focus-visible,
.magic-fse-theme .wp-block-query-pagination-numbers .current,
.magic-fse-theme .wp-block-query-pagination-numbers a:hover,
.magic-fse-theme .wp-block-query-pagination-numbers a:focus-visible {
	background: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a.prev:hover,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a.next:hover,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a.prev:focus-visible,
.magic-fse-theme .woocommerce nav.woocommerce-pagination ul li a.next:focus-visible,
.magic-fse-theme .wp-block-query-pagination-previous:hover,
.magic-fse-theme .wp-block-query-pagination-next:hover,
.magic-fse-theme .wp-block-query-pagination-previous:focus-visible,
.magic-fse-theme .wp-block-query-pagination-next:focus-visible {
	background: #e3e5e7;
	color: var(--wp--preset--color--foreground);
}

@media (max-width: 1180px) {
	.magic-fse-theme .woocommerce ul.products.columns-4,
	.magic-fse-theme .woocommerce ul.products.columns-5,
	.magic-fse-theme .woocommerce ul.products.columns-6 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.magic-fse-theme .woocommerce ul.products,
	.magic-fse-theme .woocommerce ul.products.columns-3,
	.magic-fse-theme .woocommerce ul.products.columns-4,
	.magic-fse-theme .woocommerce ul.products.columns-5,
	.magic-fse-theme .woocommerce ul.products.columns-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}


	.magic-fse-theme .woocommerce-result-count,
	.magic-fse-theme .woocommerce-ordering {
		float: none;
		width: 100%;
	}

	.magic-fse-theme .woocommerce-ordering select {
		width: 100%;
	}
}

@media (max-width: 520px) {
	.magic-fse-theme .woocommerce ul.products,
	.magic-fse-theme .woocommerce ul.products.columns-2,
	.magic-fse-theme .woocommerce ul.products.columns-3,
	.magic-fse-theme .woocommerce ul.products.columns-4,
	.magic-fse-theme .woocommerce ul.products.columns-5,
	.magic-fse-theme .woocommerce ul.products.columns-6 {
		grid-template-columns: minmax(0, 1fr);
	}

}

@media (prefers-reduced-motion: reduce) {
	.magic-fse-theme .woocommerce ul.products li.product,
	.magic-fse-theme .wc-block-product-template .wc-block-product {
		transition: none;
	}
}

/* v0.4.0: Wishlist e comparatore verticali, separati dal badge sconto. */
.magic-fse-theme .wc-block-product-template .wc-block-product > .magic-catalog-card-actions {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;
	z-index: 5;
	display: flex;
	width: auto;
	align-items: center;
	flex-direction: column;
	gap: 0.42rem;
	margin: 0;
}

.magic-fse-theme .magic-catalog-card-actions > .magic-fse-slot {
	display: block;
	width: auto;
	min-width: 0;
	margin: 0;
}

.magic-fse-theme .magic-catalog-card-actions > .magic-fse-slot > * {
	margin: 0;
}

.magic-fse-theme .magic-catalog-card-actions > .magic-fse-slot:empty {
	display: none;
}

.magic-fse-theme .magic-fse-sale-percentage {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
	text-transform: none;
}

@media (max-width: 781px) {
	.magic-fse-theme .wc-block-product-template .wc-block-product > .magic-catalog-card-actions {
		top: 0.55rem;
		right: 0.55rem;
		gap: 0.3rem;
	}

	.magic-fse-theme .woocommerce ul.products li.product .onsale,
	.magic-fse-theme .wc-block-components-product-sale-badge,
	.magic-fse-theme .wc-block-grid__product-onsale {
		top: 0.55rem;
		left: 0.55rem;
		padding: 0.32rem 0.48rem;
		font-size: 0.67rem;
	}
}

/* 0.9.28 — card archivio senza bordo, immagine quadrata e badge sovrapposti. */
.magic-fse-catalog-archive .wc-block-product-template .wc-block-product,
.magic-fse-theme .woocommerce ul.products li.product {
	overflow: visible;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	transition: none;
}

@media (hover: hover) and (pointer: fine) {
	.magic-fse-catalog-archive .wc-block-product-template .wc-block-product:hover,
	.magic-fse-theme .woocommerce ul.products li.product:hover {
		border-color: transparent;
		box-shadow: none;
		transform: none;
	}
}

.magic-fse-catalog-archive .wc-block-components-product-image,
.magic-fse-catalog-archive .wc-block-product-image,
.magic-fse-theme .woocommerce ul.products li.product .woocommerce-LoopProduct-link {
	position: relative;
}

.magic-fse-catalog-archive .wc-block-components-product-image,
.magic-fse-catalog-archive .wc-block-product-image {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 0 0.72rem;
	overflow: hidden;
	border-radius: 12px;
	background: #f5f5f5;
}

.magic-fse-catalog-archive .wc-block-components-product-image > a,
.magic-fse-catalog-archive .wc-block-product-image > a {
	display: block;
	width: 100%;
	height: 100%;
}

.magic-fse-catalog-archive .wc-block-components-product-image img,
.magic-fse-catalog-archive .wc-block-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	object-fit: contain;
	object-position: center;
	background: transparent;
}

.magic-fse-catalog-archive .wc-block-components-product-title,
.magic-fse-catalog-archive .wp-block-post-title.wc-block-components-product-title {
	min-height: 2.5em;
	margin: 0 0 0.28rem;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.012em;
}

.magic-fse-catalog-archive .magic-catalog-card-rating {
	display: flex;
	min-height: 18px;
	align-items: center;
	justify-content: center;
	margin: 0 0 0.26rem;
}

.magic-fse-catalog-archive .magic-catalog-card-rating .wc-block-components-product-rating {
	margin: 0;
	color: #f59e0b !important;
	font-size: 13px;
	line-height: 1;
}

.magic-fse-catalog-archive .magic-catalog-card-rating .wc-block-components-product-rating__stars,
.magic-fse-catalog-archive .magic-catalog-card-rating .wc-block-components-product-rating__stars svg {
	color: #f59e0b !important;
}

.magic-fse-catalog-archive .magic-catalog-card-rating .wc-block-components-product-rating__stars svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.magic-fse-catalog-archive .wc-block-components-product-price,
.magic-fse-catalog-archive .wc-block-product-price {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.28;
}

.magic-fse-catalog-archive .wc-block-components-product-price del,
.magic-fse-catalog-archive .wc-block-product-price del {
	font-size: 12px;
	font-weight: 450;
}

.magic-fse-catalog-archive .wc-block-components-product-sale-badge,
.magic-fse-catalog-archive .wc-block-grid__product-onsale,
.magic-fse-theme .woocommerce ul.products li.product .onsale {
	top: 0.72rem;
	left: 0.72rem;
	padding: 0.42rem 0.68rem;
	border: 0;
	border-radius: 999px;
	background: #df4037;
	color: #fff;
	font-size: 12px;
	font-weight: 750;
	line-height: 1;
	text-transform: none;
	box-shadow: none;
}

.magic-fse-catalog-archive .wc-block-components-product-sale-badge span,
.magic-fse-catalog-archive .wc-block-grid__product-onsale span {
	color: #fff;
}

.magic-fse-catalog-archive .wc-block-product-template .wc-block-product > .magic-catalog-card-trend {
	position: absolute;
	top: 0.72rem;
	left: 0.72rem;
	z-index: 5;
	display: block;
	width: auto;
	max-width: calc(100% - 4.5rem);
	margin: 0;
}

.magic-fse-catalog-archive .wc-block-product-template .wc-block-product:has(.wc-block-components-product-sale-badge) > .magic-catalog-card-trend,
.magic-fse-catalog-archive .wc-block-product-template .wc-block-product:has(.wc-block-grid__product-onsale) > .magic-catalog-card-trend {
	top: 3.02rem;
}

.magic-fse-catalog-archive .magic-catalog-card-trend:not(:has(.magic-fse-slot:not(:empty))) {
	display: none;
}

.magic-fse-catalog-archive .magic-catalog-card-trend > .magic-fse-slot,
.magic-fse-catalog-archive .magic-catalog-card-trend > .magic-fse-slot > * {
	width: auto;
	margin: 0;
}

.magic-fse-catalog-archive .magic-catalog-card-trend .msv-fire-badge {
	display: inline-flex !important;
	min-height: 26px !important;
	margin: 0 !important;
	padding: 5px 9px !important;
	border-color: #079455 !important;
	background: #079455 !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 750 !important;
	box-shadow: none !important;
}

.magic-fse-catalog-archive .magic-catalog-card-trend .msv-fire-badge__icon {
	color: #ffd166 !important;
}

.magic-fse-catalog-archive .wc-block-product-template .wc-block-product > .magic-catalog-card-actions {
	top: 0.62rem;
	right: 0.62rem;
}

/* Compatibilità con eventuali loop WooCommerce classici. */
.magic-fse-theme .woocommerce ul.products li.product > .msv-fire-badge {
	position: absolute;
	top: 0.72rem;
	left: 0.72rem;
	z-index: 5;
	margin: 0 !important;
	border-color: #079455 !important;
	background: #079455 !important;
}

.magic-fse-theme .woocommerce ul.products li.product:has(.onsale) > .msv-fire-badge {
	top: 3.02rem;
}

@media (max-width: 781px) {
	.magic-fse-catalog-archive .wc-block-components-product-image,
	.magic-fse-catalog-archive .wc-block-product-image {
		margin-bottom: 0.6rem;
		border-radius: 10px;
	}

	.magic-fse-catalog-archive .wc-block-components-product-title,
	.magic-fse-catalog-archive .wp-block-post-title.wc-block-components-product-title {
		font-size: 14px;
	}

	.magic-fse-catalog-archive .wc-block-components-product-price,
	.magic-fse-catalog-archive .wc-block-product-price {
		font-size: 14px;
	}

	.magic-fse-catalog-archive .wc-block-components-product-sale-badge,
	.magic-fse-catalog-archive .wc-block-grid__product-onsale,
	.magic-fse-theme .woocommerce ul.products li.product .onsale {
		top: 0.55rem;
		left: 0.55rem;
		padding: 0.36rem 0.56rem;
		font-size: 11px;
	}

	.magic-fse-catalog-archive .wc-block-product-template .wc-block-product > .magic-catalog-card-trend,
	.magic-fse-theme .woocommerce ul.products li.product > .msv-fire-badge {
		top: 0.55rem;
		left: 0.55rem;
	}

	.magic-fse-catalog-archive .wc-block-product-template .wc-block-product:has(.wc-block-components-product-sale-badge) > .magic-catalog-card-trend,
	.magic-fse-catalog-archive .wc-block-product-template .wc-block-product:has(.wc-block-grid__product-onsale) > .magic-catalog-card-trend,
	.magic-fse-theme .woocommerce ul.products li.product:has(.onsale) > .msv-fire-badge {
		top: 2.65rem;
	}

	.magic-fse-catalog-archive .magic-catalog-card-trend .msv-fire-badge {
		min-height: 24px !important;
		padding: 4px 8px !important;
		font-size: 10px !important;
	}
}



/* 0.9.29 — badge/rating integrati nella media quadrata. */
.magic-fse-catalog-archive .magic-catalog-card-media {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 0 0.72rem;
	overflow: hidden;
	border-radius: 12px;
	background: #f5f5f5;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .wc-block-components-product-image,
.magic-fse-catalog-archive .magic-catalog-card-media > .wc-block-product-image {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	margin: 0;
	border-radius: inherit;
	background: transparent;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .wc-block-components-product-image img,
.magic-fse-catalog-archive .magic-catalog-card-media > .wc-block-product-image img {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: contain;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-trend {
	position: absolute;
	top: 0.72rem;
	left: 0.72rem;
	z-index: 7;
	display: block;
	width: auto;
	max-width: calc(100% - 4.5rem);
	margin: 0;
}

.magic-fse-catalog-archive .magic-catalog-card-media:has(.wc-block-components-product-sale-badge) > .magic-catalog-card-trend,
.magic-fse-catalog-archive .magic-catalog-card-media:has(.wc-block-grid__product-onsale) > .magic-catalog-card-trend {
	top: 3.02rem;
}

.magic-fse-catalog-archive .magic-catalog-card-media .magic-catalog-card-trend .msv-fire-badge {
	display: inline-flex !important;
	min-height: 26px !important;
	margin: 0 !important;
	padding: 5px 9px !important;
	border: 1px solid #151c36 !important;
	background: #151c36 !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	box-shadow: none !important;
}

.magic-fse-catalog-archive .magic-catalog-card-media .magic-catalog-card-trend .msv-fire-badge__icon {
	color: #f97316 !important;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-actions {
	position: absolute;
	top: 0.62rem;
	right: 0.62rem;
	z-index: 8;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-rating {
	position: absolute;
	bottom: 0.62rem;
	left: 50%;
	z-index: 7;
	display: flex;
	min-height: 0;
	align-items: center;
	justify-content: center;
	width: auto;
	margin: 0;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(17, 24, 39, 0.12);
	transform: translateX(-50%);
}

.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-rating:not(:has(.wc-block-components-product-rating, .wc-block-product-rating)) {
	display: none;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-rating > * {
	margin: 0 !important;
}

.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-rating .wc-block-components-product-rating,
.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-rating .wc-block-product-rating {
	margin: 0;
	line-height: 1;
}

.magic-fse-catalog-archive .magic-catalog-products .wc-block-components-product-title,
.magic-fse-catalog-archive .magic-catalog-products .wp-block-post-title.wc-block-components-product-title {
	margin-bottom: 0.22rem;
}

.magic-fse-catalog-archive .magic-catalog-products .wc-block-components-product-price,
.magic-fse-catalog-archive .magic-catalog-products .wc-block-product-price {
	margin-top: 0;
}

@media (max-width: 781px) {
	.magic-fse-catalog-archive .magic-catalog-card-media {
		margin-bottom: 0.6rem;
		border-radius: 10px;
	}

	.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-trend {
		top: 0.55rem;
		left: 0.55rem;
	}

	.magic-fse-catalog-archive .magic-catalog-card-media:has(.wc-block-components-product-sale-badge) > .magic-catalog-card-trend,
	.magic-fse-catalog-archive .magic-catalog-card-media:has(.wc-block-grid__product-onsale) > .magic-catalog-card-trend {
		top: 2.65rem;
	}

	.magic-fse-catalog-archive .magic-catalog-card-media .magic-catalog-card-trend .msv-fire-badge {
		min-height: 24px !important;
		padding: 4px 8px !important;
		font-size: 10px !important;
	}

	.magic-fse-catalog-archive .magic-catalog-card-media > .magic-catalog-card-rating {
		bottom: 0.5rem;
		padding: 3px 7px;
	}
}
