{% set attributeGroups = coreshop_variant_attribute_list_object(product)|coreshop_variant_selected(product) %}
{% if attributeGroups %}
    {% set index = coreshop_variant_index(product) %}
    {% set config = { attributes: attributeGroups|coreshop_variant_serialize_groups, index: index|coreshop_variant_serialize_index } %}
    <div class="product-info__attributes" data-config="{{ config|json_encode() }}">
        {% for key, attributeGroup in attributeGroups %}
            <fieldset class="mt-1 mt-lg-3" id="attribute-group-{{ attributeGroup.group.id }}" {{ coreshop_test_html_attribute('attribute-group', attributeGroup.group.id) }}>
                <label class="h2 fs-3">{{ 'coreshop.ui.attribute_group.label'|trans({ '%name%': attributeGroup.group.name }) }}</label>
                {% if attributeGroup.type == "Pimcore\\Model\\DataObject\\CoreShopAttributeColor" %}
                    {% include '@CoreShopFrontend/Product/attributes/detail/_color.html.twig' with { group: attributeGroup } %}
                {% else %}
                    {% include '@CoreShopFrontend/Product/attributes/detail/_text.html.twig' with { group: attributeGroup } %}
                {% endif %}
                {# {% include '@CoreShopFrontend/Product/attributes/detail/_select.html.twig' with { group: attributeGroup } %} #}
            </fieldset>
        {% endfor %}
    </div>
{% endif %}