{% if page.product.extensions.productGroup %}
<section class="py-3">
<div class="color-title font-accent uppercase text-sm flex mb-2">
{% for property in page.product.properties.elements %}
{% if property.group.name === 'color' %}
<div class="font-medium text-grey-600">{{ property.group.translated.name }}</div>
<div class="font-bold text-grey-900 ml-2">
{{ property.name }}
</div>
{% endif %}
{% endfor %}
</div>
<div class="flex grid-gap-2">
{% for product in page.product.extensions.productGroup.get('0').elements %}
{# Custom switch, as we want product cards to link to the Parent product (so no variation is selected), instead of the product variation itself. #}
{% if product.parentId is not null %}
{% set id = product.parentId %}
{% else %}
{% set id = product.id %}
{% endif %}
{% set cover = product.cover.media %}
{% set active = page.product.id === id %}
{% block variation_product_box_image_link %}
<a href="{{ seoUrl('frontend.detail.page', { 'productId': id }) }}"
title="{{ name }}"
class="product-variation-image-link block ratio w-12 ratio_product_image border rounded-sm transition {% if active %} border-grey-900{% else %} border-grey-100 hover:border-grey-600{% endif %}">
{% block variation_product_box_image_link_inner %}
{% if cover.url %}
{% set attributes = {
'class': 'product-image is-'~displayMode,
'alt': (cover.translated.alt ?: name),
'title': (cover.translated.title ?: name)
} %}
{% if displayMode == 'cover' or displayMode == 'contain' %}
{% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
{% endif %}
{% block variation_product_box_image_thumbnail %}
{% sw_thumbnails 'product-image-thumbnails' with {
media: cover,
sizes: sizes
} %}
{% endblock %}
{% else %}
{% block variation_product_box_image_placeholder %}
<div class="product-image-placeholder">
{% sw_icon 'placeholder' style {
'size': 'fluid'
} %}
</div>
{% endblock %}
{% endif %}
{% endblock %}
</a>
{% endblock %}
{% endfor %}
</div>
</section>
{% endif %}