@inherits ViewModelTemplate<ProductViewModel>
@using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites
@using Dynamicweb.Rendering
@using Dynamicweb.Ecommerce.ProductCatalog
@using Dynamicweb.Ecommerce.Products

@{ 	
	string? priceMin = Model?.VariantInfo?.PriceMin?.PriceFormatted;
	string? priceMax = Model?.VariantInfo?.PriceMax?.PriceFormatted;
	string? price = !string.IsNullOrEmpty(priceMin) ? (priceMin != priceMax ? priceMin + " - " + priceMax : priceMin) : Model?.Price.PriceFormatted;
}

<div class="d-flex flex-wrap justify-content-end gap-2">
	<span itemprop="priceCurrency" content="@Model?.Price.CurrencyCode" class="d-none"></span>
	<span itemprop="price" content="@Model?.Price.Price" class="d-none"></span>
	@if (Model?.HasDiscount())
	{
		<span class="text-decoration-line-through opacity-75 text-price">@Model?.PriceBeforeDiscount?.PriceFormatted</span>
	}
	<span class="text-price">@price</span>
	@if (Model?.Price.TryGetVatLabel(out string vatLabel)) {
		<small class="opacity-85 fst-normal order-3">@Translate(vatLabel)</small>
	}
</div>