<div class="single-product modern-product-card w-100 d-flex flex-column">
<div class="product-image-container"
onmouseenter="showImageNav({{ product.id }})"
onmouseleave="hideImageNav({{ product.id }})">
<a href="{{ path('ui_product_show', { slug: product.slug }) }}" class="d-block image-link">
{% if product.images is defined and product.images|length > 0 %}
<img class="img-fluid main-product-img" id="main-img-{{ product.id }}" src="{{ asset(product.images[0]) }}" alt="{{ product.name }}">
{% else %}
<img class="img-fluid main-product-img" id="main-img-{{ product.id }}" src="{{ asset('ui/img/product/p1.jpg') }}" alt="{{ product.name }}">
{% endif %}
</a>
<!-- Boutons de navigation (visibles au survol) -->
{% if product.images is defined and product.images|length > 1 %}
<button class="img-nav-btn img-nav-left" id="img-left-{{ product.id }}" onclick="prevImage({{ product.id }})" style="display: none;">
<span class="lnr lnr-chevron-left"></span>
</button>
<button class="img-nav-btn img-nav-right" id="img-right-{{ product.id }}" onclick="nextImage({{ product.id }})" style="display: none;">
<span class="lnr lnr-chevron-right"></span>
</button>
<!-- Indicateurs de position -->
<div class="img-indicators" id="img-indicators-{{ product.id }}" style="display: none;">
{% for img in product.images %}
<span class="indicator" id="indicator-{{ product.id }}-{{ loop.index0 }}" onclick="showImage({{ product.id }}, {{ loop.index0 }})"></span>
{% endfor %}
</div>
{% endif %}
</div>
<div class="product-details d-flex flex-column flex-grow-1">
<a href="{{ path('ui_product_show', { slug: product.slug }) }}" class="product-title-link">
<h6 class="modern-product-title">{{ product.name }}</h6>
</a>
<!-- Affichage de la boutique -->
<div class="shop-info">
<small class="text-muted">
<i class="lnr lnr-store"></i>
{% if product.shop is defined and product.shop %}
<a href="{{ path('ui_shop_show', {'slug': product.shop.slug}) }}" class="shop-link">
{{ product.shop.name }}
</a>
{% else %}
<span class="text-muted">Boutique inconnue</span>
{% endif %}
</small>
</div>
<div class="price modern-price mt-auto">
<h6 class="current-price">{{ product.price|number_format(2, '.', ' ') }} HTG</h6>
{% if product.compareAtPrice %}
<h6 class="l-through old-price">{{ product.compareAtPrice|number_format(2, '.', ' ') }} HTG</h6>
{% endif %}
</div>
<div class="prd-bottom modern-prd-bottom mt-2">
<a href="javascript:void(0)" class="alibaba-btn add-to-cart-btn" data-product-id="{{ product.id }}" data-qty="1" title="Ajouter au panier">
<span class="ti-bag"></span> Ajouter
</a>
<a href="#" class="alibaba-btn icon-btn wishlist-btn" data-product-id="{{ product.id }}" {% if app.user %}onclick="toggleWishlist({{ product.id }}, this); return false;"{% else %}onclick="showCustomAlert('Vous devez ĂȘtre connectĂ© pour ajouter aux favoris', 'warning'); return false;"{% endif %} title="Favoris">
<span class="lnr lnr-heart"></span>
</a>
<a href="#" class="alibaba-btn icon-btn comparison-btn" data-product-id="{{ product.id }}" onclick="toggleComparison({{ product.id }}, this); return false;" title="Comparer">
<span class="lnr lnr-sync"></span>
</a>
</div>
</div>
</div>