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

{%- assign reversed = section.settings.reversed -%}
{% comment %} Assign align. Align will get 3 values : start , center or end {% endcomment %}
{%- assign align = section.settings.align | default: 'start' -%}

<div class='banner-v231'>
  <div
    {% render 'section-attr' %}
  >
    {% render 'section-bg-image' %}
    <xo-container
      {% render 'section-layout' %}
    >
      <xo-animate xo-cascade>
        <xo-grid
          style='--xs:1;--lg:2;--xo-grid-col-gap:{{ section.settings.gap }}px ;--xo-grid-row-gap:{{ section.settings.gap }}px ;'
        >
          <div
            class='banner-v231__item'
            {%- if reversed -%}
              style='--order-xs: 1;--order-sm:1'
            {%- endif -%}
          >
            <a href='{{ section.settings.link_banner }}' class='banner-v231__img'>
              <div class='{%- render 'hover-style' -%}'>
                {%- render 'image', image: section.settings.image -%}
              </div>
            </a>
          </div>
          <div class='banner-v231__item'>
            <div
              class='banner-v231__content'
              style='text-align: {{ align }};'
            >
              <div class='banner-v231__subtitle'>{{ section.settings.subtitle }}</div>
              <h2 class='banner-v231__title'>{{ section.settings.title }}</h2>
              <p class='banner-v231__description'>{{ section.settings.description }}</p>
              <div class='banner-v231__info'>
                <div class='banner-v231__info-wrap'>
                  <h2 class='banner-v231__info-title'>
                    {{ section.settings.mini_title1 }}
                  </h2>
                  <p class='banner-v231__info-desc'>{{ section.settings.mini_subtitle1 }}</p>
                </div>
                <div class='banner-v231__info-wrap'>
                  <h2 class='banner-v231__info-title'>
                    {{ section.settings.mini_title2 }}
                  </h2>
                  <p class='banner-v231__info-desc'>{{ section.settings.mini_subtitle2 }}</p>
                </div>
                <div class='banner-v231__info-wrap'>
                  <h2 class='banner-v231__info-title'>
                    {{ section.settings.mini_title3 }}
                  </h2>
                  <p class='banner-v231__info-desc'>{{ section.settings.mini_subtitle3 }}</p>
                </div>
              </div>
            </div>
          </div>
        </xo-grid>
      </xo-animate>
    </xo-container>
  </div>
</div>

{% schema %}
{
  "name": "t:sections.banner_v7.name",
  "settings": [
    {
      "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": "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": "range",
      "id": "gap",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 30,
      "label": "t:sections.banner_v7.settings.gap.label"
    },
    {
      "type": "checkbox",
      "id": "reversed",
      "default": false,
      "label": "t:sections.banner_v7.settings.reversed.label"
    },
    {
      "type": "select",
      "id": "align",
      "default": "start",
      "label": "t:sections.banner_v7.settings.align.label",
      "options": [
        {
          "value": "start",
          "label": "t:sections.banner_v7.settings.align.option.label-1"
        },
        {
          "value": "center",
          "label": "t:sections.banner_v7.settings.align.option.label-2"
        },
        {
          "value": "end",
          "label": "t:sections.banner_v7.settings.align.option.label-3"
        }
      ]
    },
    {
      "type": "image_picker",
      "id": "image",
      "label": "t:sections.banner_v7.settings.image.label",
      "info": "t:sections.banner_v7.settings.image.info"
    },
    {
      "type": "url",
      "id": "link_banner",
      "default": "/collections/all",
      "label": "t:sections.banner_v7.settings.url.label"
    },
    {
      "type": "text",
      "id": "subtitle",
      "default": "Famous wine",
      "label": "t:sections.banner_v7.settings.subtitle.label"
    },
    {
      "type": "text",
      "id": "title",
      "default": "A New Generationof Winemakers",
      "label": "t:sections.banner_v7.settings.title.label"
    },
    {
      "type": "text",
      "id": "description",
      "default": "The best wines are born in the noblest lands. The diversity and great richness of our terroirs located in the most recognized valleys of the country give us an incalculable potential to elaborate wines of the highest quality, eu pri accusamus conclusionemque. Ocurreret scripserit ei vis. Eros iusto.",
      "label": "t:sections.banner_v7.settings.description.label"
    },
    {
      "type": "text",
      "id": "mini_title1",
      "default": "10k",
      "label": "t:sections.banner_v7.settings.mini_title1.label"
    },
    {
      "type": "text",
      "id": "mini_subtitle1",
      "default": "Happy clients",
      "label": "t:sections.banner_v7.settings.mini_subtitle1.label"
    },
    {
      "type": "text",
      "id": "mini_title2",
      "default": "9.8k",
      "label": "t:sections.banner_v7.settings.mini_title2.label"
    },
    {
      "type": "text",
      "id": "mini_subtitle2",
      "default": "5 stars Reviews",
      "label": "t:sections.banner_v7.settings.mini_subtitle2.label"
    },
    {
      "type": "text",
      "id": "mini_title3",
      "default": "10k",
      "label": "t:sections.banner_v7.settings.mini_title3.label"
    },
    {
      "type": "text",
      "id": "mini_subtitle3",
      "default": "Happy clients",
      "label": "t:sections.banner_v7.settings.mini_subtitle3.label"
    },
    {
      "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_v7.presets.name"
    }
  ]
}
{% endschema %}
