{% import '_types/product/_cart.html' as _cart %}
  {# ---- Price block ---- #}
  {% import '_types/product/prices.html' as prices %}
  {% set prices_ns = namespace() %}
  {{ prices.set_prices(d, prices_ns)}}

  <div class="flex flex-row items-center justify-between md:gap-2 md:px-2">
      {{ _cart.add(d.slug, cart)}}
      
    {% if prices_ns.sp_val %}
      <div class="text-md font-bold text-emerald-700">
        Special price
      </div>
      <div class="text-xl font-semibold text-emerald-700">
        {{ prices.price_str(prices_ns.sp_val, prices_ns.sp_raw, prices_ns.sp_cur) }}
      </div>
      {% if prices_ns.sp_val and prices_ns.rp_val %}
        <div class="text-base text-md line-through text-stone-500">
          {{ prices.price_str(prices_ns.rp_val, prices_ns.rp_raw, prices_ns.rp_cur) }}
        </div>
      {% endif %}
    {% elif prices_ns.rp_val %}
      <div class="hidden md:block text-xl font-bold">
          Our price
        </div>
      <div class="text-xl font-semibold">
        {{ prices.price_str(prices_ns.rp_val, prices_ns.rp_raw, prices_ns.rp_cur) }}
      </div>
  {% endif %}
    {{ prices.rrp(prices_ns) }}
    
  </div>

