<section class="grower-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="grower-voices__grid">
      {%- for block in section.blocks -%}
        <div class="grower-voices__card" {{ block.shopify_attributes }} data-reveal style="--index: {{ forloop.index }}">
          <div class="grower-voices__leaf" aria-hidden="true">
            <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M12 3C8 3 4 7 4 13c0 3 1.5 5.5 3 7" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><path d="M12 3c4 0 8 4 8 10 0 3-1.5 5.5-3 7" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><path d="M12 3v17" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>
          </div>
          {%- if block.settings.quote != blank -%}
            <blockquote class="grower-voices__quote">{{ block.settings.quote }}</blockquote>
          {%- endif -%}
          <div class="grower-voices__footer">
            {%- if block.settings.author != blank -%}
              <span class="grower-voices__author">{{ block.settings.author }}</span>
            {%- endif -%}
            {%- if block.settings.detail != blank -%}
              <span class="grower-voices__detail">{{ block.settings.detail }}</span>
            {%- endif -%}
          </div>
        </div>
      {%- endfor -%}
    </div>
  </div>
</section>

{% schema %}
{
  "name": "Grower Voices",
  "class": "section-grower-voices",
  "settings": [
    { "type": "text", "id": "eyebrow", "label": "Eyebrow", "default": "REVIEWS" },
    { "type": "text", "id": "heading", "label": "Heading", "default": "What Growers Say" }
  ],
  "blocks": [
    {
      "type": "voice",
      "name": "Voice",
      "settings": [
        { "type": "textarea", "id": "quote", "label": "Quote" },
        { "type": "text", "id": "author", "label": "Author" },
        { "type": "text", "id": "detail", "label": "Detail" }
      ]
    }
  ],
  "presets": [{ "name": "Grower Voices", "blocks": [{ "type": "voice" }, { "type": "voice" }, { "type": "voice" }] }]
}
{% endschema %}