{% sw_extends '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
{% block component_product_box_price %}
<div class="product-price-wrapper">
{% set price = real %}
{% set isListPrice = price.listPrice.percentage > 0 %}
{% set isRegulationPrice = price.regulationPrice != null %}
<div class="product-cheapest-price{% if isListPrice and isRegulationPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}{% if isRegulationPrice and not displayFrom and displayFromVariants %} with-regulation-price{% endif %}{% if displayFrom and isRegulationPrice %} with-from-price{% endif %}">
{% if cheapest.unitPrice != real.unitPrice %}
<div>{{ "listing.cheapestPriceLabel"|trans|sw_sanitize }}<span class="product-cheapest-price-price"> {{ cheapest.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}</span></div>
{% endif %}
</div>
{% if displayFrom or (displayParent and displayFromVariants) %}
{{ "listing.listingTextFrom"|trans|sw_sanitize }}
{% endif %}
<span class="product-price{% if isListPrice and not displayFrom and not displayFromVariants %} with-list-price{% endif %}">
{{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if isListPrice and not displayFrom and not displayFromVariants %}
{% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
{% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
<span class="list-price">
{% if beforeListPriceSnippetExists %}{{ "listing.beforeListPrice"|trans|trim|sw_sanitize }}{% endif %}
<span class="list-price-price">{{ price.listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
{% if afterListPriceSnippetExists %}{{ "listing.afterListPrice"|trans|trim|sw_sanitize }}{% endif %}
</span>
{% endif %}
</span>
{% if isRegulationPrice %}
<span class="product-price with-regulation-price">
{% if isListPrice %}<br/>{% endif %}<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
</span>
{% endif %}
</div>
{% block component_product_box_price_unit_reference_content %}
{% set showReferencePrice = price.referencePrice is not null %}
{% if theme_config('atl-cms-product-box-use-placeholders') == 'true' %}
{% set showReferencePrice = true %}
{% endif %}
{% if theme_config('atl-cms-product-box-reference-price') == 'below-price' and showReferencePrice %}
<div class="product-price-unit-reference-content">
{% if price.referencePrice is not null %}
{{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
{% endif %}
</div>
{% endif %}
{% endblock %}
{% endblock %}