<?php
namespace Sifency\Traits;
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;
use Elementor\Utils;
use Elementor\Group_Control_Typography;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;

trait Sifency_Related_Product_Controls {
	protected function add_sifency_related_product_controls( $args = [] ) {
		$this->start_controls_section( 'section_query', [ 'label' => esc_html__( 'Query', 'sifency-addons' ) ] );
        $this->add_control(
            'related_by',
            [
                'label' => esc_html__('Source', 'sifency-addons'),
                'type' => Controls_Manager::SELECT,
                'options' => [
                    'related_ids' => 'Related Products',
                    'upsell_ids' => 'Up-Sells',
                    'cross_sell_ids' => 'Cross-Sells',
                    'category' => 'By Category',
                    'product_tag' => 'By Tag',
                ],
                'default' => 'related_ids',
                'description' => esc_html__('Determines which products to display. "Related", "Up-Sells", and "Cross-Sells" are set in the Product Data panel.', 'sifency-addons'),
            ]
        );
        $this->add_control( 'posts_per_page', [ 'label' => esc_html__('Products to Show', 'sifency-addons'), 'type' => Controls_Manager::NUMBER, 'default' => 4 ] );
		$this->add_control( 'orderby', [ 'label' => esc_html__('Order By', 'sifency-addons'), 'type' => Controls_Manager::SELECT, 'options' => [ 'date' => 'Date', 'title' => 'Title', 'rand' => 'Random', 'popularity' => 'Popularity' ], 'default' => 'rand' ] );
		$this->add_control( 'order', [ 'label' => esc_html__('Order', 'sifency-addons'), 'type' => Controls_Manager::SELECT, 'options' => [ 'DESC' => 'Descending', 'ASC'  => 'Ascending' ], 'default' => 'DESC' ] );
		$this->end_controls_section();

		// --- Layout Section ---
        $this->start_controls_section( 'section_layout', [ 'label' => esc_html__( 'Layout', 'sifency-addons' ) ] );
        $this->add_control( 'layout_style', [ 'label' => esc_html__('Layout', 'sifency-addons'), 'type' => Controls_Manager::SELECT, 'options' => [ 'grid' => 'Grid', 'carousel' => 'Carousel' ], 'default' => 'carousel', 'prefix_class' => 'sifency-products-layout-' ] );

        $this->add_responsive_control( 'columns', [
            'label' => esc_html__('Columns', 'sifency-addons'),
            'type' => Controls_Manager::SELECT,
            'options' => [ '1'=>'1', '2'=>'2', '3'=>'3', '4'=>'4', '5'=>'5', '6'=>'6' ],
            'default' => '4',
            'tablet_default' => '3',
            'mobile_default' => '2',
            'condition' => [ 'layout_style' => 'grid' ],
            'prefix_class' => 'sifency-grid-columns%s-',
             'selectors' => [
                 '{{WRAPPER}}.sifency-grid-columns-1 ul.products' => 'grid-template-columns: repeat(1, 1fr);',
                 '{{WRAPPER}}.sifency-grid-columns-2 ul.products' => 'grid-template-columns: repeat(2, 1fr);',
                 '{{WRAPPER}}.sifency-grid-columns-3 ul.products' => 'grid-template-columns: repeat(3, 1fr);',
                 '{{WRAPPER}}.sifency-grid-columns-4 ul.products' => 'grid-template-columns: repeat(4, 1fr);',
                 '{{WRAPPER}}.sifency-grid-columns-5 ul.products' => 'grid-template-columns: repeat(5, 1fr);',
                 '{{WRAPPER}}.sifency-grid-columns-6 ul.products' => 'grid-template-columns: repeat(6, 1fr);',
            ],
        ] );

        $this->add_control(
			'show_heading',
			[
				'label' => esc_html__( 'Show Heading', 'sifency-addons' ),
				'type' => Controls_Manager::SWITCHER,
				'label_on' => esc_html__( 'Show', 'sifency-addons' ),
				'label_off' => esc_html__( 'Hide', 'sifency-addons' ),
				'return_value' => 'yes',
				'default' => 'yes',
                'separator' => 'before',
			]
		);
        $this->add_control(
			'heading_text',
			[
				'label' => esc_html__( 'Heading Text', 'sifency-addons' ),
				'type' => Controls_Manager::TEXT,
				'default' => esc_html__( 'Related products', 'sifency-addons' ),
				'placeholder' => esc_html__( 'Enter your title', 'sifency-addons' ),
                'condition' => [ 'show_heading' => 'yes' ],
			]
		);
        $this->end_controls_section();

		$carousel_condition = [
            'condition' => [
                'layout_style' => 'carousel'
            ]
        ];
        $this->add_sifency_carousel_controls($carousel_condition);

        //================================================================================
        // Style Tab
        //================================================================================
        $this->start_controls_section( 'section_style_layout', [ 'label' => esc_html__( 'Layout', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] );
        $this->add_responsive_control( 'column_gap', [ 'label' => esc_html__('Column Gap', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'default' => [ 'unit' => 'px', 'size' => 30 ], 'selectors' => [ '{{WRAPPER}} .products' => 'grid-column-gap: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'layout_style' => 'grid' ] ] );
        $this->add_responsive_control( 'row_gap', [ 'label' => esc_html__('Row Gap', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'default' => [ 'unit' => 'px', 'size' => 30 ], 'selectors' => [ '{{WRAPPER}} .products' => 'grid-row-gap: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'layout_style' => 'grid' ] ] );
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_heading', [ 'label' => esc_html__( 'Heading', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'show_heading' => 'yes' ] ] );
        $this->add_control( 'heading_tag', [ 'label' => esc_html__('HTML Tag', 'sifency-addons'), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6', 'div' => 'div', 'span' => 'span', 'p' => 'p' ], 'default' => 'h2' ] );
        $this->add_control( 'heading_color', [ 'label' => esc_html__('Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .related.products > h2' => 'color: {{VALUE}};' ] ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'heading_typography', 'selector' => '{{WRAPPER}} .related.products > h2' ] );
        $this->add_responsive_control( 'heading_align', [ 'label' => esc_html__('Alignment', 'sifency-addons'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => 'Left', 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => 'Center', 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => 'Right', 'icon' => 'eicon-text-align-right' ] ], 'selectors' => [ '{{WRAPPER}} .related.products > h2' => 'text-align: {{VALUE}};' ] ] );
        $this->add_responsive_control( 'heading_spacing', [ 'label' => esc_html__('Bottom Spacing', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .related.products > h2' => 'margin-bottom: {{SIZE}}{{UNIT}};' ] ] );
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_box', [ 'label' => esc_html__( 'Product Box', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] );
        $this->add_control( 'box_padding', [ 'label' => esc_html__('Padding', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .products .product' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->add_responsive_control( 'content_align', [ 'label' => esc_html__('Content Alignment', 'sifency-addons'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => 'Left', 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => 'Center', 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => 'Right', 'icon' => 'eicon-text-align-right' ] ], 'selectors' => [ '{{WRAPPER}} .products .product' => 'text-align: {{VALUE}};' ], 'separator' => 'after' ] );
        $this->start_controls_tabs('tabs_box_style');
        $this->start_controls_tab('tab_box_normal', [ 'label' => esc_html__( 'Normal', 'sifency-addons' ) ] );
        $this->add_control( 'box_bg_color', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product' => 'background-color: {{VALUE}};' ] ] );
        $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'box_border', 'selector' => '{{WRAPPER}} .products .product' ] );
        $this->add_control( 'box_border_radius', [ 'label' => esc_html__('Border Radius', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .products .product' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'box_shadow', 'selector' => '{{WRAPPER}} .products .product' ] );
        $this->end_controls_tab();
        $this->start_controls_tab('tab_box_hover', [ 'label' => esc_html__( 'Hover', 'sifency-addons' ) ] );
        $this->add_control( 'box_bg_color_hover', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product:hover' => 'background-color: {{VALUE}};' ] ] );
        $this->add_control( 'box_border_color_hover', [ 'label' => esc_html__('Border Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product:hover' => 'border-color: {{VALUE}};' ] ] );
        $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'box_shadow_hover', 'selector' => '{{WRAPPER}} .products .product:hover' ] );
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_image', [ 'label' => esc_html__( 'Product Image', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] );
        $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'image_border', 'selector' => '{{WRAPPER}} .products .product img' ] );
        $this->add_control( 'image_border_radius', [ 'label' => esc_html__('Border Radius', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .products .product img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->add_responsive_control( 'image_spacing', [ 'label' => esc_html__('Bottom Spacing', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .products .product .woocommerce-loop-product__link' => 'margin-bottom: {{SIZE}}{{UNIT}};' ] ] );
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_content', [ 'label' => esc_html__( 'Product Content', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] );
        $this->add_control( 'heading_title', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Title', 'sifency-addons') ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .products .product .woocommerce-loop-product__title' ] );
        $this->add_control( 'title_color', [ 'label' => esc_html__('Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .woocommerce-loop-product__title' => 'color: {{VALUE}};' ] ] );
        $this->add_responsive_control( 'title_spacing', [ 'label' => esc_html__('Bottom Spacing', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .products .product .woocommerce-loop-product__title' => 'margin-bottom: {{SIZE}}{{UNIT}};' ] ] );
        $this->add_control( 'heading_price', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Price', 'sifency-addons'), 'separator' => 'before' ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'price_typography', 'selector' => '{{WRAPPER}} .products .product .price, {{WRAPPER}} .products .product .price .amount' ] );
        $this->add_control( 'price_color', [ 'label' => esc_html__('Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .price, {{WRAPPER}} .products .product .price .amount' => 'color: {{VALUE}};' ] ] );
        $this->add_control( 'sale_price_color', [ 'label' => esc_html__('Sale Price Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .price ins .amount' => 'color: {{VALUE}};' ] ] );
        $this->add_responsive_control( 'price_spacing', [ 'label' => esc_html__('Bottom Spacing', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .products .product .price' => 'margin-bottom: {{SIZE}}{{UNIT}};' ] ] );
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_button', [ 'label' => esc_html__( 'Add to Cart Button', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'button_typography', 'selector' => '{{WRAPPER}} .products .product .button' ] );
        $this->add_control( 'button_padding', [ 'label' => esc_html__('Padding', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em'], 'selectors' => [ '{{WRAPPER}} .products .product .button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->add_control( 'button_border_radius', [ 'label' => esc_html__('Border Radius', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .products .product .button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->start_controls_tabs('tabs_button_style');
        $this->start_controls_tab('tab_button_normal', [ 'label' => esc_html__( 'Normal', 'sifency-addons' ) ] );
        $this->add_control( 'button_text_color', [ 'label' => esc_html__('Text Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .button' => 'color: {{VALUE}};' ] ] );
        $this->add_control( 'button_bg_color', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .button' => 'background-color: {{VALUE}};' ] ] );
        $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'button_border', 'selector' => '{{WRAPPER}} .products .product .button' ] );
        $this->end_controls_tab();
        $this->start_controls_tab('tab_button_hover', [ 'label' => esc_html__( 'Hover', 'sifency-addons' ) ] );
        $this->add_control( 'button_text_color_hover', [ 'label' => esc_html__('Text Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .button:hover' => 'color: {{VALUE}};' ] ] );
        $this->add_control( 'button_bg_color_hover', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .button:hover' => 'background-color: {{VALUE}};' ] ] );
        $this->add_control( 'button_border_color_hover', [ 'label' => esc_html__('Border Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .button:hover' => 'border-color: {{VALUE}};' ] ] );
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_badge', [ 'label' => esc_html__( 'Sale Badge', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE ] );
        $this->add_control( 'badge_text_color', [ 'label' => esc_html__('Text Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .onsale' => 'color: {{VALUE}};' ] ] );
        $this->add_control( 'badge_bg_color', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .products .product .onsale' => 'background-color: {{VALUE}};' ] ] );
        $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'badge_typography', 'selector' => '{{WRAPPER}} .products .product .onsale' ] );
        $this->add_control( 'badge_border_radius', [ 'label' => esc_html__('Border Radius', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .products .product .onsale' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->add_responsive_control( 'badge_padding', [ 'label' => esc_html__('Padding', 'sifency-addons'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em'], 'selectors' => [ '{{WRAPPER}} .products .product .onsale' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] );
        $this->add_responsive_control( 'badge_top_position', [ 'label' => esc_html__('Top Position', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => -100, 'max' => 100 ], '%' => [ 'min' => -50, 'max' => 50 ] ], 'selectors' => [ '{{WRAPPER}} .products .product .onsale' => 'top: {{SIZE}}{{UNIT}};' ] ] );
        $this->add_responsive_control( 'badge_left_position', [ 'label' => esc_html__('Left Position', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => -100, 'max' => 100 ], '%' => [ 'min' => -50, 'max' => 50 ] ], 'selectors' => [ '{{WRAPPER}} .products .product .onsale' => 'left: {{SIZE}}{{UNIT}};' ] ] );
        $this->end_controls_section();

        $this->start_controls_section( 'section_style_navigation', [ 'label' => esc_html__( 'Carousel Navigation', 'sifency-addons' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'layout_style' => 'carousel' ] ] );
        $this->add_control( 'heading_arrows', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Arrows', 'sifency-addons'), 'condition' => [ 'show_arrows' => 'yes' ] ] );
        $this->add_responsive_control( 'arrows_size', [ 'label' => esc_html__('Size', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 10, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .swiper-button-prev, {{WRAPPER}} .swiper-button-next' => 'font-size: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'show_arrows' => 'yes' ] ] );
        $this->add_responsive_control( 'arrows_bg_size', [ 'label' => esc_html__('Background Size', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 20, 'max' => 120 ] ], 'selectors' => [ '{{WRAPPER}} .swiper-button-prev, {{WRAPPER}} .swiper-button-next' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'show_arrows' => 'yes' ] ] );
        $this->start_controls_tabs('tabs_arrows_style', [ 'condition' => [ 'show_arrows' => 'yes' ] ]);
        $this->start_controls_tab('tab_arrows_normal', [ 'label' => esc_html__( 'Normal', 'sifency-addons' ) ] );
        $this->add_control( 'arrows_color', [ 'label' => esc_html__('Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-prev, {{WRAPPER}} .swiper-button-next' => 'color: {{VALUE}};' ] ] );
        $this->add_control( 'arrows_bg_color', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-prev, {{WRAPPER}} .swiper-button-next' => 'background-color: {{VALUE}};' ] ] );
        $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'arrows_border', 'selector' => '{{WRAPPER}} .swiper-button-prev, {{WRAPPER}} .swiper-button-next' ] );
        $this->end_controls_tab();
        $this->start_controls_tab('tab_arrows_hover', [ 'label' => esc_html__( 'Hover', 'sifency-addons' ) ] );
        $this->add_control( 'arrows_color_hover', [ 'label' => esc_html__('Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-prev:hover, {{WRAPPER}} .swiper-button-next:hover' => 'color: {{VALUE}};' ] ] );
        $this->add_control( 'arrows_bg_color_hover', [ 'label' => esc_html__('Background Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-prev:hover, {{WRAPPER}} .swiper-button-next:hover' => 'background-color: {{VALUE}};' ] ] );
        $this->add_control( 'arrows_border_color_hover', [ 'label' => esc_html__('Border Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-button-prev:hover, {{WRAPPER}} .swiper-button-next:hover' => 'border-color: {{VALUE}};' ] ] );
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->add_control( 'heading_pagination', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Pagination', 'sifency-addons'), 'separator' => 'before', 'condition' => [ 'show_pagination!' => '' ] ] );
        $this->add_responsive_control( 'dots_size', [ 'label' => esc_html__('Size', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => [ 'min' => 2, 'max' => 20 ] ], 'selectors' => [ '{{WRAPPER}} .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'show_pagination!' => '' ] ] );
        $this->add_control( 'dots_color', [ 'label' => esc_html__('Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-pagination-bullet' => 'background-color: {{VALUE}};' ], 'condition' => [ 'show_pagination!' => '' ] ] );
        $this->add_control( 'dots_color_active', [ 'label' => esc_html__('Active Color', 'sifency-addons'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .swiper-pagination-bullet-active' => 'background-color: {{VALUE}};' ], 'condition' => [ 'show_pagination!' => '' ] ] );
        $this->add_responsive_control( 'dots_y_position', [ 'label' => esc_html__('Vertical Position', 'sifency-addons'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => [ 'min' => -100, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .swiper-pagination' => 'bottom: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'show_pagination!' => '' ] ] );
        $this->end_controls_section();
	}
}