{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig' %}
{% block buy_widget_price_unit %}
<div class="product-detail-price-unit">
{% block buy_widget_price_unit_label %}
<span class="price-unit-label">
{{ 'detail.priceUnitName'|trans|sw_sanitize }}
</span>
{% endblock %}
{% block buy_widget_price_unit_content %}
<span class="price-unit-content">
{{ product.purchaseUnit|number_format(2, ',', '') }} {{ product.unit.translated.name|replace({'Liter': 'l'}) }}
</span>
{% endblock %}
{% if price.referencePrice is not null %}
{% block buy_widget_price_unit_reference_content %}
<span> | </span>
<span class="price-unit-reference-content">
{% if price.referencePrice.referenceUnit == '1' and price.referencePrice.unitName =='Liter' %}
{{ price.referencePrice.price|currency }}/l
{% else %}
({{ price.referencePrice.price|currency }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
{% endif %}
</span>
{% endblock %}
{% endif %}
</div>
{% endblock %}