{{ 'section-banner-v8.css' | asset_url | stylesheet_tag }}

{%- assign reversed = section.settings.reversed -%}

<div class='banner-v156'>
  <div
    {% render 'section-attr' %}
  >
    {% render 'section-bg-image' %}
    <xo-container
      {% render 'section-layout' %}
    >
      <xo-animate xo-cascade>
        <div
          class='banner-v156__grid'
        >
          <div
            class='banner-v156__item1'
          >
            <div class='{%- render 'hover-style' -%}'>
              <a href='{{ section.settings.collection1.url }}' class='banner-v156__img'>
                {%- render 'image', image: section.settings['image-1'] -%}
              </a>
              <div class='banner-v156__content'>
                <h4 class='banner-v156__title'>
                  <a href='{{ section.settings.collection1.url }}'>
                    {%- if section.settings['title-1'] -%}
                      {{ section.settings['title-1'] }}
                    {%- else -%}
                      {{ section.settings.collection1.title }}
                    {%- endif -%}
                  </a>
                </h4>
                <div class='banner-v156__item-counts'>
                  <div class='collection-v156__desc'>
                    {%- if section.settings.collection1.products_count > 1 -%}
                      {{ 'products.facets.product_count_simple.other' | t: count: section.settings.collection1.products_count }}
                    {%- else -%}
                      {{ 'products.facets.product_count_simple.one' | t: count: section.settings.collection1.products_count }}
                    {%- endif -%}
                  </div>
                </div>
              </div>
            </div>
          </div>

          <div class='banner-v156__item2'>
            <div class='{%- render 'hover-style' -%}'>
              <a href='{{ section.settings.collection2.url }}' class='banner-v156__img'>
                {%- render 'image', image: section.settings['image-2'] -%}
              </a>
              <div class='banner-v156__content'>
                <h4 class='banner-v156__title'>
                  <a href='{{ section.settings.collection2.url }}'>
                    {{ section.settings['title-2'] }}
                  </a>
                </h4>
                <div class='banner-v156__item-counts'>
                  <div class='collection-v156__desc'>
                    {%- if section.settings.collection_2.products_count > 1 -%}
                      {{ 'products.facets.product_count_simple.other' | t: count: section.settings.collection2.products_count }}
                    {%- else -%}
                      {{ 'products.facets.product_count_simple.one' | t: count: section.settings.collection2.products_count }}
                    {%- endif -%}
                  </div>
                </div>
              </div>
            </div>
          </div>

          <div class='banner-v156__item3'>
            <div class='{%- render 'hover-style' -%}'>
              <a href='{{ section.settings.collection3.url }}' class='banner-v156__img'>
                {%- render 'image', image: section.settings['image-3'] -%}
              </a>
              <div class='banner-v156__content'>
                <h4 class='banner-v156__title'>
                  <a href='{{ section.settings.collection3.url }}'>
                    {{ section.settings['title-3'] }}
                  </a>
                </h4>
                <div class='banner-v156__item-counts'>
                  <div class='collection-v156__desc'>
                    {%- if section.settings.collection3.products_count > 1 -%}
                      {{ 'products.facets.product_count_simple.other' | t: count: section.settings.collection3.products_count }}
                    {%- else -%}
                      {{ 'products.facets.product_count_simple.one' | t: count: section.settings.collection3.products_count }}
                    {%- endif -%}
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </xo-animate>
    </xo-container>
  </div>
</div>

{% schema %}
{
  "name": "t:sections.banner_v8.name",
  "settings": [
    {
      "type": "header",
      "content": "Setting layout"
    },
    {
      "type": "select",
      "id": "width",
      "label": "t:sections.all.width.label",
      "default": "box",
      "options": [
        {
          "value": "box",
          "label": "t:sections.all.width.options__1.label"
        },
        {
          "value": "wide",
          "label": "t:sections.all.width.options__2.label"
        },
        {
          "value": "fullwidth",
          "label": "t:sections.all.width.options__3.label"
        }
      ]
    },
    {
      "type": "header",
      "content": "t:sections.banner_v8.settings.header.content-1"
    },
    {
      "type": "text",
      "id": "title-1",
      "default": "t:sections.banner_v8.settings.title.content-1",
      "label": "t:sections.banner_v8.settings.title.label"
    },
    {
      "type": "collection",
      "id": "collection1",
      "label": "t:sections.banner_v8.settings.collection.label"
    },
    {
      "type": "image_picker",
      "id": "image-1",
      "label": "t:sections.banner_v8.settings.image.label"
    },
    {
      "type": "header",
      "content": "t:sections.banner_v8.settings.header.content-2"
    },
    {
      "type": "text",
      "id": "title-2",
      "default": "t:sections.banner_v8.settings.title.content-2",
      "label": "t:sections.banner_v8.settings.title.label"
    },
    {
      "type": "collection",
      "id": "collection2",
      "label": "t:sections.banner_v8.settings.collection.label"
    },
    {
      "type": "image_picker",
      "id": "image-2",
      "label": "t:sections.banner_v8.settings.image.label"
    },
    {
      "type": "header",
      "content": "t:sections.banner_v8.settings.header.content-3"
    },
    {
      "type": "text",
      "id": "title-3",
      "default": "t:sections.banner_v8.settings.title.content-3",
      "label": "t:sections.banner_v8.settings.title.label"
    },
    {
      "type": "collection",
      "id": "collection3",
      "label": "t:sections.banner_v8.settings.collection.label"
    },
    {
      "type": "image_picker",
      "id": "image-3",
      "label": "t:sections.banner_v8.settings.image.label"
    },
    {
      "type": "header",
      "content": "t:sections.banner_v8.settings.header.content-4"
    },
    {
      "type": "select",
      "id": "hover",
      "label": "t:sections.all.hover.label",
      "default": "hover1",
      "options": [
        {
          "value": "hover1",
          "label": "t:sections.all.hover.option__1.label"
        },
        {
          "value": "hover2",
          "label": "Style 02"
        },
        {
          "value": "hover3",
          "label": "Style 03"
        },
        {
          "value": "hover4",
          "label": "Style 04"
        },
        {
          "value": "hover5",
          "label": "Style 05"
        },
        {
          "value": "hover6",
          "label": "Style 06"
        }
      ]
    },
    {
      "type": "header",
      "content": "t:sections.all.heading.content"
    },
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "t:sections.all.color_scheme.label"
    },
    {
      "type": "color",
      "id": "background_color",
      "label": "t:sections.all.bg_color.label"
    },
    {
      "type": "color_background",
      "id": "background_gradient",
      "label": "t:sections.all.bg_gradient.label"
    },
    {
      "type": "image_picker",
      "id": "background_image_desktop",
      "label": "t:sections.all.background_image_desktop.label"
    },
    {
      "type": "image_picker",
      "id": "background_image_mobile",
      "label": "t:sections.all.background_image_mobile.label"
    },
    {
      "type": "checkbox",
      "id": "use_parallax",
      "label": "t:sections.all.use_parallax.label",
      "default": true
    },
    {
      "type": "number",
      "id": "padding_top",
      "label": "t:sections.all.padding_top.label",
      "default": 50
    },
    {
      "type": "number",
      "id": "padding_bottom",
      "label": "t:sections.all.padding_bottom.label",
      "default": 50
    }
  ],
  "presets": [
    {
      "name": "t:sections.banner_v8.presets.name"
    }
  ]
}
{% endschema %}
