<!-- section/banner.liquid -->

{{ 'hdt-banner.css' | asset_url | stylesheet_tag }}

{%-liquid
  assign nav_class = '' 
  if section.settings.nav_rounded 
    assign nav_class = 'hdt-rounded-full'
  endif

-%}
{% style %}
  #shopify-section-{{section.id}}{
    --section-pt:{{section.settings.padding_top}}px;
    --section-pb:{{section.settings.padding_bottom}}px;
    --section-prate:{{section.settings.padding_rate}}
  }
  #{{section.id}} .hdt-banner_wrap{
    --spacing-x:{{section.settings.space_item_mb | default: 15 }}px;
    --spacing-y:{{section.settings.space_item_mb | default: 15 }}px;
    --aspect-ratioapt:{{section.settings.row_height_mb}}px;
  }
  @media(min-width:768px){
    #{{section.id}} .hdt-banner_wrap{
      --spacing-x:{{section.settings.space_item_tb}}px;
      --spacing-y:{{section.settings.space_item_tb}}px;
      --aspect-ratioapt-md:{{section.settings.row_height_tb}}px
    }
  }
  @media(min-width:1150px){
    #{{section.id}} .hdt-banner_wrap{
      --spacing-x:{{section.settings.space_item}}px;
      --spacing-y:{{section.settings.space_item}}px;
      --aspect-ratioapt-md:{{section.settings.row_height}}px
    }
  }
  @media (max-width:767px){
    .hdt-banner .hdt-banner_wrap.hdt-flex-cols-1 .hdt-col{
      flex:1 0 75%
    }
  }
{% endstyle %}
<div id="{{ section.id }}" class="hdt-section-inner hdt-section-spacing hdt-s-gradient"{% if section.index != 1 %} hdt-reveal="fade-in"{% endif %} color-scheme="{{ section.settings.color_scheme }}">
  <div class="hdt-container{% if section.settings.full_width %}-full{% endif %} {% if section.settings.full_width == true and section.settings.boxed_fullwidth == true %}hdt-px-15 md:hdt-px-30 lg:hdt-px-40{% endif %}">
    <hdt-slider id="Slider-{{ section.id }}" class="hdt-banner_wrap hdt-height--fixed md:hdt-height--fixed hdt-slider hdt-slider-parent hdt-slide-spacing-x hdt-relative {% if section.settings.navUI %} hdt-slider-has-nav hdt-nav-btns-{{ section.settings.nav_des }} hdt-nav-{{ section.settings.nav_pos }}{% endif %} {% if section.settings.dotUI %} hdt-slider-has-dots-dk{% endif %} hdt-dots-outline lg:hdt-slides-{{ section.settings.col_dk }} md:hdt-slides-{{ section.settings.col_tb }} hdt-slides-1" config='{ "id": "Slider-{{ section.id }}", "navUI": {{ section.settings.navUI }}, "dotUI": true }'>
      <div class="hdt-slider__viewport hdt-relative">
        <div class="hdt-slider__container">
          {% content_for 'blocks' %}
        </div>
      </div>
      {%- if section.settings.navUI -%}
        {%- render 'nav_slider', nav_des: section.settings.nav_des, nav_icon: section.settings.nav_icon, class: nav_class -%}
      {%- endif -%}
      <div hdt-slider-dots class="hdt-slider__dots hdt-flex hdt-align-center hdt-justify-center" aria-controls="Slider-{{ section.id }}"></div>
    </hdt-slider>
  </div>
</div>
{% schema %}
{
  "name": "Banner carousel",
  "tag": "section",
  "class": "hdt-banner hdt-section section-allow-transparent",
  "disabled_on": {
    "groups": [
      "*"
    ]
  },
  "settings": [
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "t:sections.all.colors.label",
      "default": "background-1"
    },
    {
      "type": "checkbox",
      "id": "full_width",
      "label": "t:sections.banner.settings.full_width",
      "default": false
    },
    {
      "type": "checkbox",
      "id": "boxed_fullwidth",
      "label": "t:sections.banner.settings.boxed.label",
      "info": "t:sections.banner.settings.boxed.info",
      "default": false
    },
    {
      "type": "header",
      "content": "t:sections.banner.settings.desktop"
    },
    {
      "type": "select",
      "id": "col_dk",
      "label": "t:sections.all.items_row.desktop",
      "default": "3",
      "options": [
        {
          "label": "2",
          "value": "2"
        },
        {
          "label": "3",
          "value": "3"
        }
      ]
    },
    {
      "type": "range",
      "id": "row_height",
      "min": 100,
      "max": 1000,
      "step": 10,
      "unit": "px",
      "label": "t:sections.banner.settings.row_height",
      "default": 500
    },
    {
      "type": "range",
      "id": "space_item",
      "min": 0,
      "max": 30,
      "step": 1,
      "unit": "px",
      "label": "t:sections.banner.settings.space_item",
      "default": 30
    },
    {
      "type": "header",
      "content": "t:sections.banner.settings.tablet"
    },
    {
      "type": "select",
      "id": "col_tb",
      "label": "t:sections.all.items_row.tablet",
      "default": "2",
      "options": [
        {
          "label": "1",
          "value": "1"
        },
        {
          "label": "2",
          "value": "2"
        },
        {
          "label": "3",
          "value": "3"
        }
      ]
    },
    {
      "type": "range",
      "id": "row_height_tb",
      "min": 100,
      "max": 750,
      "step": 10,
      "unit": "px",
      "label": "t:sections.banner.settings.row_height",
      "default": 500
    },
    {
      "type": "range",
      "id": "space_item_tb",
      "min": 0,
      "max": 30,
      "step": 1,
      "unit": "px",
      "label": "t:sections.banner.settings.space_item",
      "default": 15
    },
    {
      "type": "header",
      "content": "t:sections.banner.settings.mobile"
    },
    {
      "type": "range",
      "id": "row_height_mb",
      "min": 100,
      "max": 500,
      "step": 10,
      "unit": "px",
      "label": "t:sections.banner.settings.row_height",
      "default": 250
    },
    {
      "type": "header",
      "content": "t:sections.all.slider.label"
    },
    {
      "type": "checkbox",
      "id": "navUI",
      "label": "t:sections.all.slider.navUI",
      "default": false
    },
    {
      "type": "checkbox",
      "id": "nav_rounded",
      "label": "Navigation rounded",
      "default": false
    },
    {
      "type": "select",
      "id": "nav_des",
      "label": "t:sections.all.slider.nav_des.label",
      "options": [
        {
          "value": "default",
          "label": "t:sections.all.slider.nav_des.options.default"
        },
        {
          "value": "outline",
          "label": "t:sections.all.slider.nav_des.options.outline"
        },
        {
          "value": "simple",
          "label": "t:sections.all.slider.nav_des.options.simple"
        }
      ],
      "default": "default"
    },
    {
      "type": "select",
      "id": "nav_pos",
      "label": "t:sections.all.slider.nav_pos.label",
      "info": "t:sections.all.slider.nav_pos.info",
      "options": [
        {
          "value": "middle_in",
          "label": "t:sections.all.slider.nav_pos.options.middle_in"
        },
        {
          "value": "middle_out",
          "label": "t:sections.all.slider.nav_pos.options.middle_out"
        }
      ],
      "default": "middle_in"
    },
    {
      "type": "select",
      "id": "nav_icon",
      "label": "Navigation icon",
      "options": [
        {
          "value": "chrvon",
          "label": "Chevron"
        },
        {
          "value": "arrow_right",
          "label": "Arrow"
        }
      ],
      "default": "chrvon"
    },
    {
      "type": "checkbox",
      "id": "dotUI",
      "label": "t:sections.all.slider.dotUI",
      "default": false
    },
    {
      "type": "header",
      "content": "t:sections.all.padding.section_padding_heading"
    },
    {
      "type": "range",
      "id": "padding_top",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "label": "t:sections.all.padding.padding_top",
      "default": 40
    },
    {
      "type": "range",
      "id": "padding_bottom",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "label": "t:sections.all.padding.padding_bottom",
      "default": 40
    },
    {
      "type": "range",
      "id": "padding_rate",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "%",
      "label": "t:sections.all.padding.padding_rate",
      "default": 75
    }
  ],
  "blocks": [
    {
      "type": "_banner-item"
    }
  ],
  "presets": [
    {
      "name": "Banner carousel",
      "settings": {
        "dotUI": true
      },
      "blocks": [
        {
          "type": "_banner-item",
          "blocks": [
            {
              "type": "heading",
              "settings": {
                "heading": "<p>SALE OFF UP TO 70%</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "heading_size": "h5",
                "text_color": "",
                "font_size_heading_lg": 50,
                "font_size_heading_md": 30,
                "font_size_heading": 24,
                "font_weight_heading": 600,
                "letter_spacing_heading": 0
              }
            },
            {
              "type": "text",
              "settings": {
                "text": "<p>SS 2025 New Arrival</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "text_size": "4xl",
                "text_color": "",
                "font_size_text_lg": 16,
                "font_size_text_md": 14,
                "font_size_text": 14,
                "font_weight_text": 400,
                "letter_spacing_text": 0
              }
            },
            {
              "type": "spacer",
              "settings": {
                "direction": false,
                "space_lg": 50,
                "space_md": 50,
                "space": 50
              }
            },
            {
              "type": "button",
              "settings": {
                "label": "Shop now",
                "link": "",
                "open_in_new_tab": false,
                "full_width": false,
                "style_class": "solid",
                "font_size": "m",
                "font_weight": "normal",
                "font_size_btn": 14,
                "padding_btn": 30,
                "min_width_btn": 100,
                "min_width_dt_btn": 100,
                "min_height_btn": 40,
                "icon": "none",
                "icon_position": "after",
                "icon_height": 16,
                "icon_spacing": 5
              }
            }
          ]
        },
        {
          "type": "_banner-item",
          "blocks": [
            {
              "type": "heading",
              "settings": {
                "heading": "<p>SALE OFF UP TO 70%</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "heading_size": "h5",
                "text_color": "",
                "font_size_heading_lg": 50,
                "font_size_heading_md": 30,
                "font_size_heading": 24,
                "font_weight_heading": 600,
                "letter_spacing_heading": 0
              }
            },
            {
              "type": "text",
              "settings": {
                "text": "<p>SS 2025 New Arrival</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "text_size": "4xl",
                "text_color": "",
                "font_size_text_lg": 16,
                "font_size_text_md": 14,
                "font_size_text": 14,
                "font_weight_text": 400,
                "letter_spacing_text": 0
              }
            },
            {
              "type": "spacer",
              "settings": {
                "direction": false,
                "space_lg": 50,
                "space_md": 50,
                "space": 50
              }
            },
            {
              "type": "button",
              "settings": {
                "label": "Shop now",
                "link": "",
                "open_in_new_tab": false,
                "full_width": false,
                "style_class": "solid",
                "font_size": "m",
                "font_weight": "normal",
                "font_size_btn": 14,
                "padding_btn": 30,
                "min_width_btn": 100,
                "min_width_dt_btn": 100,
                "min_height_btn": 40,
                "icon": "none",
                "icon_position": "after",
                "icon_height": 16,
                "icon_spacing": 5
              }
            }
          ]
        },
        {
          "type": "_banner-item",
          "blocks": [
            {
              "type": "heading",
              "settings": {
                "heading": "<p>SALE OFF UP TO 70%</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "heading_size": "h5",
                "text_color": "",
                "font_size_heading_lg": 50,
                "font_size_heading_md": 30,
                "font_size_heading": 24,
                "font_weight_heading": 600,
                "letter_spacing_heading": 0
              }
            },
            {
              "type": "text",
              "settings": {
                "text": "<p>SS 2025 New Arrival</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "text_size": "4xl",
                "text_color": "",
                "font_size_text_lg": 16,
                "font_size_text_md": 14,
                "font_size_text": 14,
                "font_weight_text": 400,
                "letter_spacing_text": 0
              }
            },
            {
              "type": "spacer",
              "settings": {
                "direction": false,
                "space_lg": 50,
                "space_md": 50,
                "space": 50
              }
            },
            {
              "type": "button",
              "settings": {
                "label": "Shop now",
                "link": "",
                "open_in_new_tab": false,
                "full_width": false,
                "style_class": "solid",
                "font_size": "m",
                "font_weight": "normal",
                "font_size_btn": 14,
                "padding_btn": 30,
                "min_width_btn": 100,
                "min_width_dt_btn": 100,
                "min_height_btn": 40,
                "icon": "none",
                "icon_position": "after",
                "icon_height": 16,
                "icon_spacing": 5
              }
            }
          ]
        },
        {
          "type": "_banner-item",
          "blocks": [
            {
              "type": "heading",
              "settings": {
                "heading": "<p>SALE OFF UP TO 70%</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "heading_size": "h5",
                "text_color": "",
                "font_size_heading_lg": 50,
                "font_size_heading_md": 30,
                "font_size_heading": 24,
                "font_weight_heading": 600,
                "letter_spacing_heading": 0
              }
            },
            {
              "type": "text",
              "settings": {
                "text": "<p>SS 2025 New Arrival</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "text_size": "4xl",
                "text_color": "",
                "font_size_text_lg": 16,
                "font_size_text_md": 14,
                "font_size_text": 14,
                "font_weight_text": 400,
                "letter_spacing_text": 0
              }
            },
            {
              "type": "spacer",
              "settings": {
                "direction": false,
                "space_lg": 50,
                "space_md": 50,
                "space": 50
              }
            },
            {
              "type": "button",
              "settings": {
                "label": "Shop now",
                "link": "",
                "open_in_new_tab": false,
                "full_width": false,
                "style_class": "solid",
                "font_size": "m",
                "font_weight": "normal",
                "font_size_btn": 14,
                "padding_btn": 30,
                "min_width_btn": 100,
                "min_width_dt_btn": 100,
                "min_height_btn": 40,
                "icon": "none",
                "icon_position": "after",
                "icon_height": 16,
                "icon_spacing": 5
              }
            }
          ]
        },
        {
          "type": "_banner-item",
          "blocks": [
            {
              "type": "heading",
              "settings": {
                "heading": "<p>SALE OFF UP TO 70%</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "heading_size": "h5",
                "text_color": "",
                "font_size_heading_lg": 50,
                "font_size_heading_md": 30,
                "font_size_heading": 24,
                "font_weight_heading": 600,
                "letter_spacing_heading": 0
              }
            },
            {
              "type": "text",
              "settings": {
                "text": "<p>SS 2025 New Arrival</p>",
                "hidden_br_mobile": false,
                "hidden_on_mobile": false,
                "text_size": "4xl",
                "text_color": "",
                "font_size_text_lg": 16,
                "font_size_text_md": 14,
                "font_size_text": 14,
                "font_weight_text": 400,
                "letter_spacing_text": 0
              }
            },
            {
              "type": "spacer",
              "settings": {
                "direction": false,
                "space_lg": 50,
                "space_md": 50,
                "space": 50
              }
            },
            {
              "type": "button",
              "settings": {
                "label": "Shop now",
                "link": "",
                "open_in_new_tab": false,
                "full_width": false,
                "style_class": "solid",
                "font_size": "m",
                "font_weight": "normal",
                "font_size_btn": 14,
                "padding_btn": 30,
                "min_width_btn": 100,
                "min_width_dt_btn": 100,
                "min_height_btn": 40,
                "icon": "none",
                "icon_position": "after",
                "icon_height": 16,
                "icon_spacing": 5
              }
            }
          ]
        },
      ]
    }
  ]
}
{% endschema %}
