<div class="card custom-product-card mb-4 shadow-sm flex-fill" data-productid="{{ product.id }}">
{% set detailLink = app_product_detaillink(product) %}
<a href="{{ detailLink }}" class="text-decoration-none text-dark">
{% if(product.mainImage) %}
<div class="product-img">
{{ product.mainImage.thumbnail('grid').html({imgAttributes: {class: 'img-fluid w-100'}}) | raw }}
</div>
{% endif %}
<div class="card-body pricing">
<div class="card-body-top pb-3">
<h4 class="card-title pricing-card-title text-uppercase">{{ product.oSName }}</h4>
{% if( product is instanceof('App\\Model\\Product\\Car')) %}
<p class="card-text">{{ product.subText | raw }}</p>
{% elseif(product.saleInformation.saleInformation) %}
<p class="card-text">{{ 'general.condition' | trans }}: {{ ('attribute.' ~ product.saleInformation.saleInformation.condition) | trans }}</p>
{% endif %}
</div>
<div class="card-body-bottom">
{% set priceInfo = product.oSPriceInfo %}
{% if(priceInfo.hasDiscount) %}
<p class="card-price original mb-1">{{ priceInfo.originalPrice }}</p>
{% endif %}
<p class="card-price">{{ product.oSPrice }}</p>
<div class="row button-row">
<div class="col p-1">
<a href="{{ detailLink }}" class="btn btn-block btn-secondary">
{{ 'general.details' | trans }}
</a>
</div>
<div class="col p-1">
<a href="{{ path('shop-add-to-cart', { id: product.id }) }}" class="btn btn-block btn-primary">{{ 'general.buy' | trans }} <i class=" ml-2"><img src="/static/images/icons/cart.svg" height="20" width="auto"></i></a>
</div>
</div>
</div>
</div>
</a>
</div>