<?php



use Elementor\Widget_Base;
use Elementor\Controls_Manager;

if (!defined('ABSPATH')) exit; // Exit if accessed directly


class Sliderseventhkaveh extends Widget_Base{

  public function get_name(){
    return 'sliderseventhkaveh';
  }

  public function get_title(){
    return esc_html__( 'Slider Style Seven', 'kavehTheme' );
  }

  public function get_icon(){
    return 'eicon-archive-posts';
  } 

  public function get_categories(){
    return ['kavehelements'];
  }

  protected function register_controls(){
    
    $this->start_controls_section(
        'contentsliderseventhkaveh',
        [
          'label' => esc_html__( 'Element Content', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      ); 
      $repeater = new \Elementor\Repeater();
      $repeater->add_control(
        'titlesliderseventhkaveh',
        [
            'label' => esc_html__( 'Subtitle', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'default' => esc_html__( 'Sale of Various', 'kavehTheme' ),
    
        ]
    );
    $repeater->add_control(
      'tagheading1sliderseventhkaveh',
      [
        'label' => esc_html__( 'Subtitle Tag', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'H6',
        'options' => [
          'H1'  => esc_html__( 'H1', 'kavehTheme' ),
                 'H2' => esc_html__( 'H2', 'kavehTheme' ),
                 'H3' => esc_html__( 'H3', 'kavehTheme' ),
                 'H4' => esc_html__( 'H4', 'kavehTheme' ),
                 'H5' => esc_html__( 'H5', 'kavehTheme' ),
                 'H6' => esc_html__( 'H6', 'kavehTheme' ),
                 'p' => esc_html__( 'p', 'kavehTheme' ),
                 'div' => esc_html__( 'div', 'kavehTheme' ),
                 'span' => esc_html__( 'span', 'kavehTheme' ),
        ],
      ]
    );
    $repeater->add_control(
      'title2sliderseventhkaveh',
      [
          'label' => esc_html__( 'Main Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( 'Metal Handicrafts', 'kavehTheme' ),
  
      ]
  );
  $repeater->add_control(
    'tagheading2sliderseventhkaveh',
    [
      'label' => esc_html__( 'Main Title Tag', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::SELECT,
      'default' => 'H3',
      'options' => [
        'H1'  => esc_html__( 'H1', 'kavehTheme' ),
				'H2' => esc_html__( 'H2', 'kavehTheme' ),
				'H3' => esc_html__( 'H3', 'kavehTheme' ),
				'H4' => esc_html__( 'H4', 'kavehTheme' ),
				'H5' => esc_html__( 'H5', 'kavehTheme' ),
				'H6' => esc_html__( 'H6', 'kavehTheme' ),
				'p' => esc_html__( 'p', 'kavehTheme' ),
				'div' => esc_html__( 'div', 'kavehTheme' ),
				'span' => esc_html__( 'span', 'kavehTheme' ),
      ],
    ]
  );
      $repeater->add_control(
        'buttonsliderseventhkaveh',
        [
            'label' => esc_html__( 'Button Title', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'default' => esc_html__( 'Products', 'kavehTheme' ),
    
        ]
    );
    $repeater->add_control(
      'iconbuttsliderseventhkaveh',
      [
        'label' => esc_html__( 'Icon', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::ICONS,
        'skin' => 'inline',
        'exclude_inline_options' => [ 'svg' ],
        'default' => [
          'value' => 'isax isax-arrow-left4',
        ],
      ]
    );
    $repeater->add_control(
      'linkbuttonsliderseventhkaveh',
      [
          'label' => esc_html__( 'Button Link', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'default' => esc_html__( '#', 'kavehTheme' ),
  
      ]
  );
  $repeater->add_control(
    'backsliderseventhkaveh',
    [
      'label' => esc_html__( 'Select Your Image', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::MEDIA,
    ]
  );
      $this->add_control(
        'slidessliderseventhkaveh',
        [
          'label' => esc_html__( 'Slides', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::REPEATER,
          'default' => [
            [
              'titlesliderseventhkaveh' => esc_html__( 'Sale of Various', 'kavehTheme' ),
				'title2sliderseventhkaveh' => esc_html__( 'Metal Handicrafts', 'kavehTheme' ),
				'buttonsliderseventhkaveh' => esc_html__( 'Products', 'kavehTheme' ),
				'linkbuttonsliderseventhkaveh' => esc_html__( '#', 'kavehTheme' ),
            ],
          ],
          'fields' => $repeater->get_controls()
          ],
      );
      $this->add_control(
        'backjsliderseventhkaveh',
        [
          'label' => esc_html__( 'Background Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,     
          'selectors' => [
            '{{WRAPPER}} .landing-fiveteen::before' => 'background: url({{URL}})',
        ],       
        ]
      );
      
      $this->add_control(
        'backj2sliderseventhkaveh',
        [
          'label' => esc_html__( 'Inner Background Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,    
          'selectors' => [
            '{{WRAPPER}} .landing-fiveteen-wrapper::before' => 'background: url({{URL}})',
        ],        
        ]
      );
       $this->end_controls_section();
       $this->start_controls_section(
        'content2sliderseventhkaveh',
        [
          'label' => esc_html__( 'Brands', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      ); 
      $this->add_control(
        'showbrandssliderseventhkaveh',
        [
          'label' => esc_html__( 'Show Brands?', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
          'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
        ]
      );
      $repeater = new \Elementor\Repeater();

      $repeater->add_control(
        'brandlogosliderseventhkaveh',
        [
          'label' => esc_html__( 'Brand Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,
        ]
        );
        $repeater->add_control(
          'linkbrandsliderseventhkaveh',
          [
              'label' => esc_html__( 'Brand Link', 'kavehTheme' ),
              'type' => \Elementor\Controls_Manager::TEXT,
              'default' => esc_html__( '#', 'kavehTheme' ),
      
          ]
      );
    $this->add_control(
      'brandssliderseventhkaveh',
      [
        'label' => esc_html__( 'Categories', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $repeater->get_controls(),
        'condition' => [
          'showbrandssliderseventhkaveh' => 'yes',
        ],
        'default' => [
          [
            'linksliderseventhkaveh' => esc_html__( '#', 'kavehTheme' ),
          ],
      ]
      ]
    
    );
      $this->end_controls_section();
      $this->start_controls_section(
        'content3sliderseventhkaveh',
        [
          'label' => esc_html__( 'Brand Carousel Settings', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                  'condition' => [
                    'showbrandssliderseventhkaveh' => 'yes',
                  ],
        ]
      );
      $this->add_control(
        'productcolumnsliderseventhkaveh',
        [
          'label' => esc_html__( 'Number of Brand Columns on Desktop', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 7,
          'step' => 1,
          'default' => 6,
      
        ]
      );
      $this->add_control(
        'productcolumn2sliderseventhkaveh',
        [
          'label' => esc_html__( 'Number of Brand Columns on Tablet', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 5,
          'step' => 1,
          'default' => 3,
      
        ]
      );
      $this->add_control(
        'productcolumn3sliderseventhkaveh',
        [
          'label' => esc_html__( 'Number of Brand Columns on Mobile', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 5,
          'step' => 1,
          'default' => 1,
      
        ]
      );
      // Brand carousel autoplay settings
$this->add_control(
  'autoplaybrandsliderseventhkaveh',
  [
    'label' => esc_html__( 'Enable Brand Autoplay', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'no',
  ]
);

$this->add_control(
  'autoplaydelaybrandsliderseventhkaveh',
  [
    'label' => esc_html__( 'Brand Autoplay Delay (Milliseconds)', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::NUMBER,
    'min' => 1000,
    'max' => 10000,
    'step' => 500,
    'default' => 3000,
    'condition' => [
      'autoplaybrandsliderseventhkaveh' => 'yes',
    ],
  ]
);

$this->add_control(
  'pauseonhoverbrandsliderseventhkaveh',
  [
    'label' => esc_html__( 'Pause on Hover Brands', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
    'condition' => [
      'autoplaybrandsliderseventhkaveh' => 'yes',
    ],
  ]
);

// Loop settings for brands
$this->add_control(
  'loopbrandsliderseventhkaveh',
  [
    'label' => esc_html__( 'Infinite Loop Brands', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
  ]
);

// Speed settings for brands
$this->add_control(
  'speedbrandsliderseventhkaveh',
  [
    'label' => esc_html__( 'Brand Transition Speed (Milliseconds)', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::NUMBER,
    'min' => 300,
    'max' => 3000,
    'step' => 100,
    'default' => 300,
  ]
);

// Show arrows for brands
$this->add_control(
  'showarrowbrandsliderseventhkaveh',
  [
    'label' => esc_html__( 'Show Brand Arrows?', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'no',
  ]
);

// Main slider controls - add these BEFORE the end_controls_section() of content3sliderseventhkaveh
$this->add_control(
  'hr_divider_main_slider',
  [
    'type' => \Elementor\Controls_Manager::DIVIDER,
  ]
);

$this->add_control(
  'main_slider_heading',
  [
    'label' => esc_html__( 'Main Slider Settings', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::HEADING,
    'separator' => 'before',
  ]
);

// Main slider autoplay settings
$this->add_control(
  'autoplaysliderseventhkaveh',
  [
    'label' => esc_html__( 'Enable Main Slider Autoplay', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
  ]
);

$this->add_control(
  'autoplaydelaysliderseventhkaveh',
  [
    'label' => esc_html__( 'Main Slider Autoplay Delay (Milliseconds)', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::NUMBER,
    'min' => 1000,
    'max' => 10000,
    'step' => 500,
    'default' => 5000,
    'condition' => [
      'autoplaysliderseventhkaveh' => 'yes',
    ],
  ]
);

$this->add_control(
  'pauseonhoversliderseventhkaveh',
  [
    'label' => esc_html__( 'Pause on Hover Main Slider', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
    'condition' => [
      'autoplaysliderseventhkaveh' => 'yes',
    ],
  ]
);

// Loop settings
$this->add_control(
  'loopsliderseventhkaveh',
  [
    'label' => esc_html__( 'Infinite Loop Main Slider', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
  ]
);

// Speed settings
$this->add_control(
  'speedsliderseventhkaveh',
  [
    'label' => esc_html__( 'Main Slider Transition Speed (Milliseconds)', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::NUMBER,
    'min' => 300,
    'max' => 3000,
    'step' => 100,
    'default' => 300,
  ]
);

// Effect
$this->add_control(
  'effectsliderseventhkaveh',
  [
    'label' => esc_html__( 'Main Slider Transition Effect', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SELECT,
    'default' => 'fade',
    'options' => [
      'slide' => esc_html__( 'Slide', 'kavehTheme' ),
				'fade' => esc_html__( 'Fade', 'kavehTheme' ),
				'cube' => esc_html__( 'Cube', 'kavehTheme' ),
				'coverflow' => esc_html__( 'Coverflow', 'kavehTheme' ),
				'flip' => esc_html__( 'Flip', 'kavehTheme' ),
    ],
  ]
);

// Show arrows
$this->add_control(
  'showarrowsliderseventhkaveh',
  [
    'label' => esc_html__( 'Show Main Slider Arrows?', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'no',
  ]
);

// Pagination dots
$this->add_control(
  'showdotssliderseventhkaveh',
  [
    'label' => esc_html__( 'Show Main Slider Pagination Dots', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'yes' => esc_html__( 'Yes', 'kavehTheme' ),
    'no' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
  ]
);
             $this->end_controls_section();
             $this->start_controls_section(
              'style1_sliderseventhkaveh',
              [
                'label' => esc_html__( 'Title Style', 'kavehTheme' ),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
              ]
             );
             $this->add_control(
              'titlestsliderseventhkaveh',
              [
                'label' => esc_html__( 'Subtitle Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .landing-fiveteen-wrapper .detail .sup-title .subsli7t' => 'color: {{VALUE}}',
                ],
              ]
             );
             $this->add_group_control(
              \Elementor\Group_Control_Typography::get_type(),
              [
                'name' => 'title_sliderseventhkaveh',
                'label' => esc_html__( 'Subtitle Typography', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .sup-title .subsli7t',
              ]
             );
             $this->add_control(
              'titlepstsliderseventhkaveh',
              [
                'label' => esc_html__( 'Main Title Color', 'kavehTheme' ),
                'type' => \Elementor\Controls_Manager::COLOR,
                'selectors' => [
                  '{{WRAPPER}} .landing-fiveteen-wrapper .detail .title .sli7t' => 'color: {{VALUE}}',
                ],
              ]
             );
             $this->add_group_control(
              \Elementor\Group_Control_Typography::get_type(),
              [
                'name' => 'p_sliderseventhkaveh',
                'label' => esc_html__( 'Main Title Typography', 'kavehTheme' ),
                'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .title .sli7t',
              ]
             );
             $this->end_controls_section();
             
             
             
             
             
             $this->start_controls_section(
               'style2_sliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Style', 'kavehTheme' ),
                 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 
               ]
              );
              $this->add_group_control(
               \Elementor\Group_Control_Typography::get_type(),
               [
                 'name' => 'button_sliderseventhkaveh',
                 'label' => esc_html__( 'Button Text Typography', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn',
               ]
             );
             $this->add_control(
               'iconsizesliderseventhkaveh',
               [
                 'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px', '%' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 200,
                     'step' => 5,
                   ],
                   '%' => [
                     'min' => 0,
                     'max' => 100,
                   ],
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn i' => 'font-size: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Text_Shadow::get_type(),
               [
                 'name' => 'text_shadowsliderseventhkaveh',
                 'label' => esc_html__( 'Text Shadow', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn',
               ]
             );
             $this->start_controls_tabs(
               'style_tabssliderseventhkaveh'
             );
             
             $this->start_controls_tab(
               'style_normal_tabsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Normal', 'kavehTheme' ),
               ]
             );
             $this->add_control(
               'textbuttoncolorsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'iconcolorsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn i' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttoncolorsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn' => 'background-color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttonradiussliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Border::get_type(),
               [
                 'name' => 'bordersliderseventhkaveh',
                 'label' => esc_html__( 'Border', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn',
               ]
             );
             $this->add_control(
               'buttonborderssliderseventhkaveh',
               [
                 'label' => esc_html__( 'Border Width', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'condition' => [
                   'bordersliderseventhkaveh!' => '',
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
                 ],
               ]
             );
             $this->end_controls_tab();
             $this->start_controls_tab(
               'style_hove_tabsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Hover', 'kavehTheme' ),
               ]
             );
             $this->add_control(
               'textbuttoncolorhoversliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn:hover' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'iconcolorhoversliderseventhkaveh',
               [
                 'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn:hover i' => 'color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttoncolorhoversliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn:hover' => 'background-color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'buttonradiushoversliderseventhkaveh',
               [
                 'label' => esc_html__( 'Button Border Radius', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Border::get_type(),
               [
                 'name' => 'borderhoversliderseventhkaveh',
                 'label' => esc_html__( 'Border', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn:hover',
               ]
             );
             $this->add_control(
               'buttonbordershoversliderseventhkaveh',
               [
                 'label' => esc_html__( 'Border Width', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'condition' => [
                   'borderhoversliderseventhkaveh!' => '',
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
                 ],
               ]
             );
             $this->end_controls_tab();
             $this->end_controls_tabs();
             $this->add_control(
               'hr1sliderseventhkaveh',
               [
                 'type' => \Elementor\Controls_Manager::DIVIDER,
               ]
             );
             $this->add_group_control(
               \Elementor\Group_Control_Box_Shadow::get_type(),
               [
                 'name' => 'box_shadowsliderseventhkavehh',
                 'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
                 'selector' => '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn',
               ]
             );
             $this->add_control(
               'buttonpaddingsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Padding', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::DIMENSIONS,
                 'size_units' => [ 'px' ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .detail .btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                 ],
               ]
             );
              $this->end_controls_section();
             
             
             
              $this->start_controls_section(
               'style3_sliderseventhkaveh',
               [
                 'label' => esc_html__( 'Image Style', 'kavehTheme' ),
                 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 
               ]
              );
             $this->add_control(
               'widthmainsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Image Size', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px', '%' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 5,
                   ],
                   '%' => [
                     'min' => 0,
                     'max' => 100,
                   ],
                 ],
                 'default' => [
                   'unit' => 'px',
                   'size' => 336,
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper .image img' => 'width: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_control(
               'width2bgsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Background Image Size', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px', '%' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 5,
                   ],
                   '%' => [
                     'min' => 0,
                     'max' => 100,
                   ],
                 ],
                 'default' => [
                   'unit' => 'px',
                   'size' => 350,
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen::before' => 'width: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
             $this->add_control(
               'widthmabrandinsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Brand Size', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px', '%' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 5,
                   ],
                   '%' => [
                     'min' => 0,
                     'max' => 100,
                   ],
                 ],
                 'default' => [
                   'unit' => 'px',
                   'size' => 90,
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .slider7brandimg' => 'width: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
              $this->end_controls_section();
              $this->start_controls_section(
               'style4_sliderseventhkaveh',
               [
                 'label' => esc_html__( 'General Style', 'kavehTheme' ),
                 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
               ]
              );
              $this->add_control(
               'bgmaincolorsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Background Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper::before' => 'background-color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'dotsbordercolor2sliderseventhkaveh',
               [
                 'label' => esc_html__( 'Dots Border Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                  '{{WRAPPER}} .landing-fiveteen .swiper-pagination' => 'border: 2px solid {{VALUE}}',
                ],
               ]
             ); 
             $this->add_control(
               'dotscolor2sliderseventhkaveh',
               [
                 'label' => esc_html__( 'Dots Color', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::COLOR,
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen .swiper-pagination-bullet' => 'background-color: {{VALUE}}',
                 ],
               ]
             ); 
             $this->add_control(
               'heightmainsliderseventhkaveh',
               [
                 'label' => esc_html__( 'Slider Height', 'kavehTheme' ),
                 'type' => \Elementor\Controls_Manager::SLIDER,
                 'size_units' => [ 'px', '%' ],
                 'range' => [
                   'px' => [
                     'min' => 0,
                     'max' => 2000,
                     'step' => 5,
                   ],
                   '%' => [
                     'min' => 0,
                     'max' => 100,
                   ],
                 ],
                 'selectors' => [
                   '{{WRAPPER}} .landing-fiveteen-wrapper' => 'height: {{SIZE}}{{UNIT}};',
                 ],
               ]
             );
              $this->end_controls_section();
        }


protected function render(){
  $settings = $this->get_settings_for_display();
  $clsid = $this->get_id();
  
  // Build main slider settings array
  $main_swiper_settings = array(
    'slidesPerView' => 1,
    'spaceBetween' => 0
  );

  // Add navigation if arrows are enabled
  if (isset($settings['showarrowsliderseventhkaveh']) && $settings['showarrowsliderseventhkaveh'] === 'yes') {
    $main_swiper_settings['navigation'] = array(
      'nextEl' => '.swiper-button-next',
      'prevEl' => '.swiper-button-prev'
    );
  }

  // Add pagination if enabled
  if (isset($settings['showdotssliderseventhkaveh']) && $settings['showdotssliderseventhkaveh'] === 'yes') {
    $main_swiper_settings['pagination'] = array(
      'el' => '.swiper-pagination',
      'type' => 'bullets',
      'clickable' => true
    );
  }

  // Add loop if enabled
  if (isset($settings['loopsliderseventhkaveh']) && $settings['loopsliderseventhkaveh'] === 'yes') {
    $main_swiper_settings['loop'] = true;
  }

  // Add speed if set
  if (isset($settings['speedsliderseventhkaveh']) && !empty($settings['speedsliderseventhkaveh'])) {
    $main_swiper_settings['speed'] = (int)$settings['speedsliderseventhkaveh'];
  }

  // Add effect
  if (isset($settings['effectsliderseventhkaveh']) && !empty($settings['effectsliderseventhkaveh'])) {
    $main_swiper_settings['effect'] = $settings['effectsliderseventhkaveh'];
    
    if ($settings['effectsliderseventhkaveh'] === 'fade') {
      $main_swiper_settings['fadeEffect'] = array('crossFade' => true);
    }
  }

  // Add autoplay if enabled
  if (isset($settings['autoplaysliderseventhkaveh']) && $settings['autoplaysliderseventhkaveh'] === 'yes') {
    $autoplay_settings = array(
      'delay' => isset($settings['autoplaydelaysliderseventhkaveh']) ? (int)$settings['autoplaydelaysliderseventhkaveh'] : 5000,
      'disableOnInteraction' => false
    );
    
    if (isset($settings['pauseonhoversliderseventhkaveh']) && $settings['pauseonhoversliderseventhkaveh'] === 'yes') {
      $autoplay_settings['pauseOnMouseEnter'] = true;
    }
    
    $main_swiper_settings['autoplay'] = $autoplay_settings;
  }

  // Build brand carousel settings array
  $brand_swiper_settings = array(
    'breakpoints' => array(
      320 => array(
        'slidesPerView' => (int)$settings['productcolumn3sliderseventhkaveh'],
        'spaceBetween' => 4
      ),
      576 => array(
        'slidesPerView' => (int)$settings['productcolumn2sliderseventhkaveh'],
        'spaceBetween' => 8
      ),
      768 => array(
        'slidesPerView' => (int)$settings['productcolumn2sliderseventhkaveh'],
        'spaceBetween' => 12
      ),
      992 => array(
        'slidesPerView' => (int)$settings['productcolumnsliderseventhkaveh'],
        'spaceBetween' => 12
      )
    )
  );

  // Add brand navigation if arrows are enabled
  if (isset($settings['showarrowbrandsliderseventhkaveh']) && $settings['showarrowbrandsliderseventhkaveh'] === 'yes') {
    $brand_swiper_settings['navigation'] = array(
      'nextEl' => '.swiper-button-next',
      'prevEl' => '.swiper-button-prev'
    );
  }

  // Add brand loop if enabled
  if (isset($settings['loopbrandsliderseventhkaveh']) && $settings['loopbrandsliderseventhkaveh'] === 'yes') {
    $brand_swiper_settings['loop'] = true;
  }

  // Add brand speed if set
  if (isset($settings['speedbrandsliderseventhkaveh']) && !empty($settings['speedbrandsliderseventhkaveh'])) {
    $brand_swiper_settings['speed'] = (int)$settings['speedbrandsliderseventhkaveh'];
  }

  // Add brand autoplay if enabled
  if (isset($settings['autoplaybrandsliderseventhkaveh']) && $settings['autoplaybrandsliderseventhkaveh'] === 'yes') {
    $brand_autoplay_settings = array(
      'delay' => isset($settings['autoplaydelaybrandsliderseventhkaveh']) ? (int)$settings['autoplaydelaybrandsliderseventhkaveh'] : 3000,
      'disableOnInteraction' => false
    );
    
    if (isset($settings['pauseonhoverbrandsliderseventhkaveh']) && $settings['pauseonhoverbrandsliderseventhkaveh'] === 'yes') {
      $brand_autoplay_settings['pauseOnMouseEnter'] = true;
    }
    
    $brand_swiper_settings['autoplay'] = $brand_autoplay_settings;
  }

  // Properly encode and escape JSON
  $main_swiper_json = wp_json_encode($main_swiper_settings, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
  $brand_swiper_json = wp_json_encode($brand_swiper_settings, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
  ?>
  <!-- Start Landing -->
  <section class="landing-fiveteen position-relative">
    <div class="container">
      <div class="landing-fiveteen-wrapper position-relative">
        <div class="swiper swiper-landing" data-swiper='<?php echo esc_attr($main_swiper_json); ?>'>
          <div class="swiper-wrapper">
            <?php
            if ( $settings['slidessliderseventhkaveh'] ) {
            foreach (  $settings['slidessliderseventhkaveh'] as $item ) {
            ?>
            <!-- Start Slide -->
            <div class="swiper-slide">
              <div class="landing-fiveteen-item">
                <div class="row align-items-center">
                  <div class="col-lg-6">
                    <div class="image overflow-hidden">
                      <img src="<?php echo esc_url($item['backsliderseventhkaveh']['url']); ?>" alt="<?php echo esc_attr(\Elementor\Control_Media::get_image_alt( $item['backsliderseventhkaveh'] )); ?>"
                        class="d-block me-auto me-lg-0 ms-auto mb-4 mb-lg-0" />
                    </div>
                  </div>
                  <div class="col-lg-6">
                    <div class="detail">
                      <div class="sup-title overflow-hidden">
                        <<?php echo esc_html($item['tagheading1sliderseventhkaveh']); ?> class="d-block subsli7t"><?php echo esc_html($item['titlesliderseventhkaveh']); ?></<?php echo esc_html($item['tagheading1sliderseventhkaveh']); ?>>
                      </div>
                      <div class="title overflow-hidden">
                        <<?php echo esc_html($item['tagheading2sliderseventhkaveh']); ?> class="mb-0 sli7t"><?php echo esc_html($item['title2sliderseventhkaveh']); ?></<?php echo esc_html($item['tagheading2sliderseventhkaveh']); ?>>
                      </div>
                      <a href="<?php echo esc_url($item['linkbuttonsliderseventhkaveh']); ?>" class="btn btn-primary mt-4">
                      <?php echo esc_html($item['buttonsliderseventhkaveh']); ?>
                        <i class="<?php echo esc_attr($item['iconbuttsliderseventhkaveh']['value']); ?>"></i>
                      </a>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <!-- End Slide -->
           <?php
              }
            }
            ?>
          </div>
          
          <?php 
          $arrow_class = (isset($settings['showarrowsliderseventhkaveh']) && $settings['showarrowsliderseventhkaveh'] === 'yes') ? '' : 'd-none';
          ?>
          <div class="swiper-button-next <?php echo esc_attr($arrow_class); ?>"></div>
          <div class="swiper-button-prev <?php echo esc_attr($arrow_class); ?>"></div>
          
          <?php if(isset($settings['showdotssliderseventhkaveh']) && $settings['showdotssliderseventhkaveh'] === 'yes'){ ?>
          <div class="swiper-pagination"></div>
          <?php } ?>
        </div>
      </div>
    </div>
  </section>
  <!-- End Landing -->
  
  <?php if("yes"===$settings['showbrandssliderseventhkaveh']){?>
  <!-- Start Brands -->
  <div class="brands brands-fiveteen">
    <div class="container">
      <div class="brands-wrapper position-relative">
        <div class="swiper swiper-brands overflow-hidden" data-swiper='<?php echo esc_attr($brand_swiper_json); ?>'>
          <div class="swiper-wrapper">
          <?php
            if ( $settings['brandssliderseventhkaveh'] ) {
            foreach (  $settings['brandssliderseventhkaveh'] as $item ) {
            ?>
            <div class="swiper-slide">
              <a href="<?php echo esc_url($item['linkbrandsliderseventhkaveh']); ?>" class="brands-item d-block">
                <img class="slider7brandimg" src="<?php echo esc_url($item['brandlogosliderseventhkaveh']['url']); ?>" alt="<?php echo esc_attr(\Elementor\Control_Media::get_image_alt( $item['brandlogosliderseventhkaveh'] )); ?>" />
              </a>
            </div>
            <?php
              }
            }
            ?>
          </div>
          
          <?php 
          $brand_arrow_class = (isset($settings['showarrowbrandsliderseventhkaveh']) && $settings['showarrowbrandsliderseventhkaveh'] === 'yes') ? '' : 'd-none';
          ?>
          <div class="swiper-button-next <?php echo esc_attr($brand_arrow_class); ?>"></div>
          <div class="swiper-button-prev <?php echo esc_attr($brand_arrow_class); ?>"></div>
        </div>
      </div>
    </div>
  </div>
  <?php } ?>

  <style>
  <?php echo '.elementor-element-' . $clsid . ''; ?> .landing-fiveteen::before {
      -webkit-background-size: cover !important;
      -moz-background-size: cover !important;
      -o-background-size: cover !important;
      background-size: cover !important;
  }
  <?php echo '.elementor-element-' . $clsid . ''; ?> .landing-fiveteen-wrapper::before {
      -webkit-background-size: cover !important;
      -moz-background-size: cover !important;
      -o-background-size: cover !important;
      background-size: cover !important;
  }
   </style>
  
  <?php  
}


}
