<?php



use Elementor\Widget_Base;
use Elementor\Controls_Manager;

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


class Categorycarouselsixthkaveh extends Widget_Base{

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

  public function get_title(){
    return esc_html__( 'Category Carousel Style Six', 'kavehTheme' );
  }

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

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

  protected function register_controls(){
    
    $this->start_controls_section(
        'contentcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Element Content', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      );
      $this->add_control(
        'showbeforetiategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Show Image Before Title?', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
						'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
        ]
      );
      $this->add_control(
        'imgbeforeticategorycarouselkaveh',
        [
          'label' => esc_html__( 'Image Before Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,
          'condition' => [
            'showbeforetiategorycarouselsixthkaveh' => 'yes',
          ],
        ]
      );
      $this->add_control(
        'showticategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Show Title?', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
						'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
        ]
      );
      $this->add_control(
        'tagti1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Title Tag', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SELECT,
          'default' => 'H2',
          'condition' => [
            'showticategorycarouselsixthkaveh' => 'yes',
          ],
          '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' ),
          ],
        ]
      );
      $this->add_control(
        'widgticategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Bold Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'condition' => [
            'showticategorycarouselsixthkaveh' => 'yes',
          ],
          'default' => 'Categories',
  
        ]
      );
      $this->add_control(
        'wigti2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Title', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXT,
          'condition' => [
            'showticategorycarouselsixthkaveh' => 'yes',
          ],
          'default' => 'Best Sellers',
        ]
      );
      $this->add_control(
        'wigp2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Description', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::TEXTAREA,
          'condition' => [
            'showticategorycarouselsixthkaveh' => 'yes',
          ],
          'default' => 'Being in situations we experience for the first time always causes us stress and anxiety; therefore, if we try to prepare for the situations we want to be in beforehand,',
  
        ]
      );
      $this->add_control(
        'showbuttoncategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Show Button?', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
						'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
        ]
      );
        $this->add_control(
          'buttonticategorycarouselsixthkaveh',
          [
            'label' => esc_html__( 'Bold Button Title', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'condition' => [
              'showbuttoncategorycarouselsixthkaveh' => 'yes',
            ],
            'default' => esc_html__( 'View Products', 'kavehTheme' ),
          ]
        );
        $this->add_control(
          'buttonti2categorycarouselsixthkaveh',
          [
            'label' => esc_html__( 'Button Title', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'condition' => [
              'showbuttoncategorycarouselsixthkaveh' => 'yes',
            ],
            'default' => 'Discounted',
    
          ]
        );
        $this->add_control(
          'buttonicocategorycarouselsixthkaveh',
          [
            'label' => esc_html__( 'Icon', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::ICONS,
            'skin' => 'inline',
            'condition' => [
              'showbuttoncategorycarouselsixthkaveh' => 'yes',
            ],
            'exclude_inline_options' => [ 'svg' ],
            'default' => [
              'value' => 'icon-eye-2',
            ],
          ]
        ); 
        $this->add_control(
          'buttonlinkcategorycarouselsixthkaveh',
          [
            'label' => esc_html__( 'Button Link', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'condition' => [
              'showbuttoncategorycarouselsixthkaveh' => 'yes',
            ],
            'default' => '#',
    
          ]
        );
      $repeater = new \Elementor\Repeater();
      $repeater->add_control(
        'img1categorycarouselkaveh',
        [
          'label' => esc_html__( 'Category Image', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::MEDIA,
          'default' => [
            'url' => \Elementor\Utils::get_placeholder_image_src(),
          ],
        ]
      );
      $repeater->add_control(
      'title1categorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Title', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => 'iPhone Products',

      ]
    );
    $repeater->add_control(
      'tagheading1categorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Title Tag', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'H2',
        '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(
      'title2categorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Subtitle', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => 'Apple Iphone',

      ]
    );
    $repeater->add_control(
      'tagheading2categorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Subtitle Tag', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'H4',
        '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(
      'linkcategorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Link', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => '#',
      ]
    );
    $repeater->add_control(
      'imgbgcategorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Background Image', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::MEDIA,
      ]
    );
    $this->add_control(
      'listcategorycarouselsixthkaveh',
      [
        'label' => esc_html__( 'Categories', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $repeater->get_controls(),
        'default' => [
          [
            'title1categorycarouselsixthkaveh' => esc_html__( 'Title', 'kavehTheme' ),
						'title2categorycarouselsixthkaveh' => esc_html__( 'Subtitle', 'kavehTheme' ),
						'linkcategorycarouselsixthkaveh' => esc_html__( '#', 'kavehTheme' ),
          ],
      ]
      ]
    
    );

    
       $this->end_controls_section();
       $this->start_controls_section(
        'content3categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Carousel Settings', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      );
      $this->add_control(
        'showarrowcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Show Arrows?', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SWITCHER,
          'yes' => esc_html__( 'Yes', 'kavehTheme' ),
						'no' => esc_html__( 'No', 'kavehTheme' ),
          'return_value' => 'yes',
          'default' => 'yes',
        ]
      );
      $this->add_control(
        'productcolumncategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Number of Category Columns on Desktop', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 8,
          'step' => 1,
          'default' => 4,
      
        ]
      );
      $this->add_control(
        'productcolumn2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Number of Category Columns on Tablet', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 5,
          'step' => 1,
          'default' => 3,
      
        ]
      );
      $this->add_control(
        'productcolumn3categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Number of Category Columns on Mobile', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::NUMBER,
          'min' => 0,
          'max' => 5,
          'step' => 1,
          'default' => 1,
      
        ]
      );
       $this->end_controls_section();
       $this->start_controls_section(
        'stylet_categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Title Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
          'condition' => [
            'showticategorycarouselsixthkaveh' => 'yes',
          ],
        ]
      );
      $this->add_control(
        'textcolortbolcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Bold Title Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-title b' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'textcolortcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Title Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-title' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'titletyt_categorycarouselsixthkaveh',
          'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .section-heading-three-title',
        ]
      );
      $this->add_control(
        'textcolortpcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Description Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three p' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'titletytp_categorycarouselsixthkaveh',
          'label' => esc_html__( 'Description Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .section-heading-three p',
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'stylebut_categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
          'condition' => [
            'showbuttoncategorycarouselsixthkaveh' => 'yes',
          ],
        ]
      );
      $this->add_control(
        'iconsize2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => 'px',
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 200,
              'step' => 1,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link i' => 'font-size: {{SIZE}}{{UNIT}};',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'titletyp_categorycarouselsixthkaveh',
          'label' => esc_html__( 'Button Title Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .section-heading-three-link',
        ]
      );
      $this->add_control(
        'iconbgwidth2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Background Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px', '%' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 200,
              'step' => 1,
            ],
            '%' => [
              'min' => 0,
              'max' => 100,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link i' => 'width: {{SIZE}}{{UNIT}};',
          ],
        ]
      );
      $this->add_control(
        'iconbgheight2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Background Height', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px', '%' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 200,
              'step' => 1,
            ],
            '%' => [
              'min' => 0,
              'max' => 100,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link i' => 'height: {{SIZE}}{{UNIT}};',
          ],
        ]
      );
      $this->add_control(
        'buttoniconradius2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Background Rounded Corners', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link i' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
          ],
        ]
      );
      $this->add_control(
        'hrer3categorycarouselsixthkaveh',
        [
          'type' => \Elementor\Controls_Manager::DIVIDER,
        ]
      ); 
      $this->start_controls_tabs(
        'style_tabs2categorycarouselsixthkaveh'
      );
      
      $this->start_controls_tab(
        'style_normal_tab2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Normal', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'iconcolor2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link i' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'iconbg1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link i' => 'background-color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'textcolor2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Title Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'buttonbg1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link' => 'background-color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'buttonradius2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Rounded Corners', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Border::get_type(),
        [
          'name' => 'border2categorycarouselsixthkaveh',
          'label' => esc_html__( 'Border', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .section-heading-three-link',
        ]
      );
      $this->add_control(
        'buttonborders2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Border Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'condition' => [
            'border2categorycarouselsixthkaveh!' => '',
          ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      $this->end_controls_tab();
      $this->start_controls_tab(
        'style_hove_tab2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Hover', 'kavehTheme' ),
        ]
      );
      $this->add_control(
        'iconcolor1hover2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link:hover i' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'iconbg1hover2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Icon Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link:hover i' => 'background-color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'textcolor1hover2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Title Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link:hover' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'buttonbghover1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link:hover' => 'background-color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'buttonradius1hover2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Rounded Corners', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Border::get_type(),
        [
          'name' => 'border1hover2categorycarouselsixthkaveh',
          'label' => esc_html__( 'Border', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .section-heading-three-link:hover',
        ]
      );
      $this->add_control(
        'buttonborders1hover2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Border Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'condition' => [
            'border1hover2categorycarouselsixthkaveh!' => '',
          ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link:hover' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
          ],
        ]
      );
      
      $this->end_controls_tab();
      $this->end_controls_tabs();
      $this->add_control(
        'hrer2cart2kaveh',
        [
          'type' => \Elementor\Controls_Manager::DIVIDER,
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Box_Shadow::get_type(),
        [
          'name' => 'box_shadow2categorycarouselsixthkaveh',
          'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .section-heading-three-link',
        ]
      );
      $this->add_control(
        'buttonpadding1hover2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Button Padding', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .section-heading-three-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
          ],
        ]
      );
      $this->end_controls_section();

      $this->start_controls_section(
        'style2_categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Category Title Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'textcolor1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Main Category Title Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .content .title' => 'color: {{VALUE}}',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'titlety1_categorycarouselsixthkaveh',
          'label' => esc_html__( 'Main Category Title Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .top-category-five-item .content .title',
        ]
      );
      $this->add_control(
        'textcolor21categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Subtitle Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .content .sub-title' => 'background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, {{VALUE}} 100%);',
            '{{WRAPPER}} .top-category-five-item .content .sub-title' => 'background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0%, {{VALUE}} 100%);',
            '{{WRAPPER}} .top-category-five-item .content .sub-title' => 'background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0%, {{VALUE}} 100%);',
            '{{WRAPPER}} .top-category-five-item .content .sub-title' => 'background-image: linear-gradient(180deg , rgba(255, 255, 255, 0) 0%, {{VALUE}} 100%);',
          ],
        ]
      );
      $this->add_group_control(
        \Elementor\Group_Control_Typography::get_type(),
        [
          'name' => 'titlety2_categorycarouselsixthkaveh',
          'label' => esc_html__( 'Subtitle Typography', 'kavehTheme' ),
          'selector' => '{{WRAPPER}} .top-category-five-item .content .sub-title',
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'style3_categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Category Box Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'boxcolor1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Box Background Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .content' => 'background-color: {{VALUE}}',
          ],
        ]
      );
      $this->add_control(
        'borderradiustcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Rounded Corners', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
          ],
        ]
      );
      $this->add_control(
        'boxpadding1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Box Padding', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::DIMENSIONS,
          'size_units' => [ 'px' ],
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
          ],
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'style3arr_categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Arrows Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'arrowcolor1categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Arrows Color', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::COLOR,
          'condition' => [
            'showarrowcategorycarouselsixthkaveh' => 'yes',
          ],
          'selectors' => [
            '{{WRAPPER}} .swiper-button-next::after' => 'color: {{VALUE}} !important;',
            '{{WRAPPER}} .swiper-button-prev::after' => 'color: {{VALUE}} !important;',

          ],
        ]
      );
      $this->end_controls_section();
      $this->start_controls_section(
        'styleimag_categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Category Image Style', 'kavehTheme' ),
          'tab' => \Elementor\Controls_Manager::TAB_STYLE,
        ]
      );
      $this->add_control(
        'catimg1widthcategorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Category Image Width', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 300,
              'step' => 1,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .image' => 'width: {{SIZE}}{{UNIT}};',
          ],
        ]
      );
      $this->add_control(
        'catimg1height2categorycarouselsixthkaveh',
        [
          'label' => esc_html__( 'Category Image Height', 'kavehTheme' ),
          'type' => \Elementor\Controls_Manager::SLIDER,
          'size_units' => [ 'px' ],
          'range' => [
            'px' => [
              'min' => 0,
              'max' => 300,
              'step' => 1,
            ],
          ],
          'selectors' => [
            '{{WRAPPER}} .top-category-five-item .image' => 'height: {{SIZE}}{{UNIT}};',
          ],
        ]
      );
      $this->end_controls_section();

        }
 

  protected function render(){
    $settings = $this->get_settings_for_display();
    $clsid = $this->get_id();
    ?>
<section class="top-category-five my-100">
  <div class="container">
    <!-- Start Heading -->
    <div
      class="section-heading-three position-relative d-flex align-items-lg-center justify-content-lg-between flex-column flex-lg-row">
      <div>
          <?php if("yes"===$settings['showticategorycarouselsixthkaveh']){?>
            <<?php echo  esc_attr($settings['tagti1categorycarouselsixthkaveh']); ?> class="section-heading-three-title"> <b><?php echo esc_html($settings['widgticategorycarouselsixthkaveh']); ?></b> <?php echo esc_html($settings['wigti2categorycarouselsixthkaveh']); ?> </<?php echo  esc_attr($settings['tagti1categorycarouselsixthkaveh']); ?>>
            <p class="mb-0"><?php echo esc_html($settings['wigp2categorycarouselsixthkaveh']); ?></p>
            <?php } ?>   
          </div>
      <?php if("yes"===$settings['showbuttoncategorycarouselsixthkaveh']){?>
      <a href="<?php echo esc_url($settings['buttonlinkcategorycarouselsixthkaveh']); ?>"
        class="section-heading-three-link d-flex align-items-center position-relative text-nowrap mt-4 ms-md-0  mt-lg-0 ms-lg-4 me-lg-0">
        <i class="<?php echo  esc_html($settings['buttonicocategorycarouselsixthkaveh']['value']); ?> d-flex align-items-center justify-content-center"></i>
        <strong><?php echo esc_html($settings['buttonticategorycarouselsixthkaveh']); ?></strong> <?php echo esc_html($settings['buttonti2categorycarouselsixthkaveh']); ?>
      </a>
      <?php } ?>
    </div>
    <!-- End Heading -->
    <div class="position-relative">
    <!-- Start Carousel -->
    <div class="swiper swiper-top-category-five swiper-button-fill" data-swiper='{"watchSlidesProgress":true,"navigation":{"nextEl":".swiper-button-next","prevEl":".swiper-button-prev"},"breakpoints":{"320":{"slidesPerView":<?php echo  esc_html($settings['productcolumn3categorycarouselsixthkaveh']); ?>,"spaceBetween":8},"380":{"slidesPerView":<?php echo  esc_html($settings['productcolumn3categorycarouselsixthkaveh']); ?>,"spaceBetween":12},"576":{"slidesPerView":<?php echo  esc_html($settings['productcolumn2categorycarouselsixthkaveh']); ?>,"spaceBetween":12},"768":{"slidesPerView":<?php echo  esc_html($settings['productcolumn2categorycarouselsixthkaveh']); ?>,"spaceBetween":12},"992":{"slidesPerView":<?php echo  esc_html($settings['productcolumncategorycarouselsixthkaveh']); ?>,"spaceBetween":12},"1200":{"slidesPerView":<?php echo  esc_html($settings['productcolumncategorycarouselsixthkaveh']); ?>,"spaceBetween":20}}}'>
      <div class="swiper-wrapper">
        <?php
        $e=1;
        if ( $settings['listcategorycarouselsixthkaveh'] ) {
        foreach (  $settings['listcategorycarouselsixthkaveh'] as $item ) {
        ?>
        <!-- Start Slide -->
        <div class="swiper-slide">
          <div class="top-category-five-item position-relative">
            <a href="<?php echo esc_html($item['linkcategorycarouselsixthkaveh']); ?>" class="stretched-link" aria-label="link"></a>
            <div class="image position-absolute top-50 start-0 translate-middle-y">
              <img src="<?php echo esc_url($item['img1categorycarouselkaveh']['url']); ?>" alt="<?php echo esc_attr(\Elementor\Control_Media::get_image_alt( $item['img1categorycarouselkaveh'] )); ?>" width="153" height="93">
              <img src="<?php echo esc_url($item['img1categorycarouselkaveh']['url']); ?>" alt="<?php echo esc_attr(\Elementor\Control_Media::get_image_alt( $item['img1categorycarouselkaveh'] )); ?>" width="153" height="93"
                class="position-absolute top-0 end-0 w-100 h-100">
            </div>
            <div class="content gar<?php echo $e;?>">
              <<?php echo  esc_attr($item['tagheading1categorycarouselsixthkaveh']); ?> class="title"><?php echo  esc_html($item['title1categorycarouselsixthkaveh']); ?></<?php echo  esc_attr($item['tagheading1categorycarouselsixthkaveh']); ?>>
              <<?php echo  esc_attr($item['tagheading2categorycarouselsixthkaveh']); ?> class="sub-title"><?php echo  esc_html($item['title2categorycarouselsixthkaveh']); ?></<?php echo  esc_attr($item['tagheading2categorycarouselsixthkaveh']); ?>>
            </div>
          </div>
        </div>
        <!-- End Slide -->
        <style>
          .top-category-five-item <?php echo '.gar'. $e ?>.content {
          background: url("<?php echo esc_url($item['imgbgcategorycarouselsixthkaveh']['url']); ?>") 0 0 no-repeat;
          background-size: cover !important;
          }
        </style>
        <?php 
        $e++;
        }
          }
        ?>
      </div>
      <?php if("yes"===$settings['showarrowcategorycarouselsixthkaveh']){?>
      <div class="swiper-button-next"></div>
      <div class="swiper-button-prev"></div>
      <?php } ?>
    </div>
    <!-- End Carousel -->
  </div>
  </div>
  <style>
 <?php if("yes"===$settings['showbeforetiategorycarouselsixthkaveh']){?>
.section-heading-three::before {
    background: url("<?php echo esc_url($settings['imgbeforeticategorycarouselkaveh']['url']); ?>") 0 0 no-repeat;
    -webkit-background-size: contain !important;
    -moz-background-size: contain !important;
    -o-background-size: contain !important;
    background-size: contain !important;
}
<?php }else{?>
  .section-heading-three::before {
display: none !important;
}
.section-heading-three {
    padding-right: 25px;
}
<?php
} ?>
  </style>
</section>

    <?php
  }


}
