<div class="grid grid-table">
    <div class="container">

        {% if grid.title.value %}
            <div class="title">
                {{ grid.title }}
            </div>
        {% endif %}

        {% set columns = grid.columns %}
        {% set rows = columns.first().rows.count()-1 %}

        <div class="table" style="grid-template-columns: repeat({{ columns.count() }}, 1fr);">
            {% for i in 0..rows %}
                {% for column in columns %}
                    <div class="cell row-{{ i }}">
                        {{ column.rows.value[i]|raw }}
                    </div>
                {% endfor %}
            {% endfor %}
        </div>

    </div>
</div>
