{% import "@CoreShopFrontend/Common/Macro/currency.html.twig" as currency %}
{% set href = pimcore_object_path(product) %}

<div class="product-col">
    <div class="image">
        {% if product.image is pimcore_asset_image %}
            <a href="{{ href }}">
                {{ product.image|pimcore_image_thumbnail_html('coreshop_productList', {'imgAttributes': {'class': 'img-fluid'}, 'alt': product.name, 'id': 'image' ~ product.id}) }}
            </a>
        {% endif %}
    </div>
    <div class="caption">
        <h4><a href="{{ href }}" {{ coreshop_test_html_attribute('product-name', product.name) }}>{{ product.name }}</a></h4>
        <div class="description">
            {{ product.shortDescription }}
        </div>

        <div class="price">
            <span class="price-new">{{ currency.getPrice(product) }}</span>
        </div>

        {% if coreshop_inventory_is_available(product) %}
        <div class="cart-button">
            {{ render(url('coreshop_partial_cart_add', {'product': product.id|coreshop_string})) }}
        </div>
        {% endif %}
    </div>
</div>
