{% if on_sale and section.settings.show_sale_circle %}
<span class="badge badge--sale">
<span class="badge__text{% if sale_text.size > 7 %} badge__text--small{% endif %}">{{ 'products.product.sale' | t }}
{{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0'}}%
</span>
</span>
{% endif %}
{% if product.compare_at_price_max > product.price %}
<span style="position:absolute;top:0;right:0;background:#FF0000;display:block;padding:2px 5px;border-radius:4px;z-index:999;color:#FFFFFF;font-size:12px;"><em>
{{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0'}}% off
</em></span>
{% endif %}