<section class="summit-voices" data-reveal>
  <div class="container">
    {%- if section.settings.eyebrow != blank -%}
      <span class="section-eyebrow">{{ section.settings.eyebrow }}</span>
    {%- endif -%}
    {%- if section.settings.heading != blank -%}
      <h2 class="section-heading section-heading--center">{{ section.settings.heading }}</h2>
    {%- endif -%}

    <div class="summit-voices__grid">
      {%- for block in section.blocks -%}
        <div class="summit-voices__card" {{ block.shopify_attributes }} data-reveal style="--index: {{ forloop.index }}">
          {%- if block.settings.product != blank -%}
            <span class="summit-voices__product">{{ block.settings.product }}</span>
          {%- endif -%}
          <blockquote class="summit-voices__quote">&ldquo;{{ block.settings.quote }}&rdquo;</blockquote>
          <div class="summit-voices__footer">
            <span class="summit-voices__author">{{ block.settings.author }}</span>
            {%- if block.settings.detail != blank -%}
              <span class="summit-voices__detail">{{ block.settings.detail }}</span>
            {%- endif -%}
          </div>
        </div>
      {%- endfor -%}
    </div>
  </div>
</section>

{% schema %}
{
  "name": "Summit Voices",
  "class": "section-summit-voices",
  "settings": [
    { "type": "text", "id": "eyebrow", "label": "Eyebrow", "default": "FROM THE TRAIL" },
    { "type": "text", "id": "heading", "label": "Heading", "default": "Summit Voices" }
  ],
  "blocks": [
    {
      "type": "voice",
      "name": "Voice",
      "settings": [
        { "type": "textarea", "id": "quote", "label": "Quote" },
        { "type": "text", "id": "author", "label": "Author" },
        { "type": "text", "id": "detail", "label": "Detail" },
        { "type": "text", "id": "product", "label": "Product" }
      ]
    }
  ],
  "presets": [{ "name": "Summit Voices", "blocks": [{ "type": "voice" }, { "type": "voice" }, { "type": "voice" }] }]
}
{% endschema %}