<?php

use Elementor\Widget_Base;
use Elementor\Controls_Manager;

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


class Amazingoffertenthstkaveh extends Widget_Base{

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

  public function get_title(){
    return esc_html__( 'Amazing Offer Style Ten', 'kavehTheme' );
  }

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

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

  protected function register_controls(){
    



    $this->start_controls_section(
        'contentamazingoffertenthstkaveh',
        [
          'label' => esc_html__( 'General', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        ]
      );

      $this->add_control(
        'styleamazingoffertenthstkaveh',
        [
          'label' => esc_html__('Element Layout', 'kavehTheme'),
          'type' => \Elementor\Controls_Manager::SELECT,
          'default' => 'one',
          'options' => [
            'one' => esc_html__('Layout One', 'kavehTheme'),
            'two' => esc_html__('Layout Two', 'kavehTheme'),
          ],
        ]
      );
 

   $this->end_controls_section();
   $this->start_controls_section(
    'content2amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Product Settings', 'kavehTheme'),
        'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
    ]
);

// 2. Exclude Out of Stock Products (for WooCommerce only)
$this->add_control(
    'kaveh_exclude_out_of_stock',
    [
        'label' => esc_html__('Hide Out of Stock Products', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SWITCHER,
        'yes' => esc_html__('Yes', 'kavehTheme'),
        'no' => esc_html__('No', 'kavehTheme'),
        'return_value' => 'yes',
        'default' => 'yes',
    ]
);

// 3. Show Only Onsale Products
$this->add_control(
    'show_onsale_products_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Show Only Sale Products', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SWITCHER,
        'yes' => esc_html__('Yes', 'kavehTheme'),
        'no' => esc_html__('No', 'kavehTheme'),
        'return_value' => 'yes',
        'default' => 'no',
    ]
);

// 4. Taxonomy Filters
$taxonomies = get_taxonomies(['public' => true], 'objects');
$taxonomy_options = [];
foreach ($taxonomies as $taxonomy) {
    $taxonomy_options[$taxonomy->name] = $taxonomy->label;
}
$this->add_control(
    'taxonomy_filter_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Filter by Taxonomy', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SELECT2,
        'multiple' => true,
        'options' => $taxonomy_options,
    ]
);
// Add a control for selecting taxonomy terms
$this->add_control(
'taxonomy_terms_amazingoffertenthstkaveh',
[
    'label' => esc_html__('Select Taxonomy Terms', 'kavehTheme'),
    'type' => \Elementor\Controls_Manager::SELECT2,
    'multiple' => true,
    'options' => [], // Initially empty, populated dynamically
]
);

// 5. Product Attributes Control
$attribute_taxonomies = wc_get_attribute_taxonomies();
$attribute_options = [];
foreach ($attribute_taxonomies as $attribute) {
    $attribute_options[$attribute->attribute_name] = $attribute->attribute_label;
}
$this->add_control(
    'product_attributes_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Filter by Product Attribute', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SELECT2,
        'multiple' => true,
        'options' => $attribute_options,
    ]
);
// Add a control for selecting product attribute terms
$this->add_control(
'product_attribute_terms_amazingoffertenthstkaveh',
[
    'label' => esc_html__('Select Attribute Values', 'kavehTheme'),
    'type' => \Elementor\Controls_Manager::SELECT2,
    'multiple' => true,
    'options' => [], // Initially empty, populated dynamically
]
);

// 6. Advanced Sorting
$this->add_control(
    'psortamazingoffertenthstkaveh',
    [
        'label' => esc_html__('Sort By', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'date',
        'options' => [
            'date' => esc_html__('Date', 'kavehTheme'),
            'title' => esc_html__('Title', 'kavehTheme'),
            'rand' => esc_html__('Random', 'kavehTheme'),
            'comment_count' => esc_html__('Comment Count', 'kavehTheme'),
            'menu_order' => esc_html__('Menu Order', 'kavehTheme'),
            '_price' => esc_html__('Price', 'kavehTheme'),
            '_wc_average_rating' => esc_html__('Most Popular', 'kavehTheme'),
            'total_sales' => esc_html__('Sales Amount', 'kavehTheme'),
        ],
    ]
);

// 7. Sort Order
$this->add_control(
    'psortiamazingoffertenthstkaveh',
    [
        'label' => esc_html__('Sort Order', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'desc',
        'options' => [
            'asc' => esc_html__('Ascending', 'kavehTheme'),
            'desc' => esc_html__('Descending', 'kavehTheme'),
        ],
    ]
);

// 8. Pagination and Limits
$this->add_control(
    'posts_per_page_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Number of Products', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::NUMBER,
        'default' => 10,
        'min' => 1,
        'max' => 100,
    ]
);

// 9. Meta Query (Custom Fields)
$this->add_control(
    'meta_key_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Meta Key', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'description' => esc_html__('Meta key for filtering (optional)', 'kavehTheme'),
    ]
);

$this->add_control(
    'meta_value_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Meta Value', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'description' => esc_html__('Meta value for filtering (optional)', 'kavehTheme'),
    ]
);

// 10. Date Query
$this->add_control(
    'date_query_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Filter by Date', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'none',
        'options' => [
            'none' => esc_html__('None', 'kavehTheme'),
            'today' => esc_html__('Today', 'kavehTheme'),
            'last_7_days' => esc_html__('Last 7 Days', 'kavehTheme'),
            'last_30_days' => esc_html__('Last 30 Days', 'kavehTheme'),
            'custom' => esc_html__('Custom', 'kavehTheme'),
        ],
    ]
);

// 11. Exclusions
$this->add_control(
    'exclude_posts_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Exclude Posts', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'description' => esc_html__('Separate post IDs with commas (optional)', 'kavehTheme'),
    ]
);

// 12. Custom Query Parameters
$this->add_control(
    'custom_query_amazingoffertenthstkaveh',
    [
        'label' => esc_html__('Custom WP_Query Parameters', 'kavehTheme'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'description' => esc_html__('Enter custom parameters as JSON (optional)', 'kavehTheme'),
    ]
);

$this->end_controls_section();
      $this->start_controls_section(
        'content4amazingoffertenthstkaveh',
        [
          'label' => esc_html__( 'Cart Button', 'kavehTheme' ),
                  'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                  'condition' => [
                    'styleamazingoffertenthstkaveh' => 'one',
                  ],
        ]
      );
      $this->add_control(
        'carttitleamazingoffertenthstkaveh',
        [
            'label' => esc_html__( 'Button Text', 'kavehTheme' ),
            'type' => \Elementor\Controls_Manager::TEXT,
            'default' => esc_html__( 'Buy', 'kavehTheme' ),
    
        ]
    );
    $this->add_control(
      'iconiamazingoffertenthstkaveh',
      [
        'label' => esc_html__( 'Button Icon', 'kavehTheme' ),
        'type' => \Elementor\Controls_Manager::ICONS,
        'skin' => 'inline',
        'exclude_inline_options' => [ 'svg' ],
        'default' => [
          'value' => 'icon-box-alt',
        ],
      ]
    ); 

    $this->end_controls_section();



///////////////////////////// style one ///////////////////////////////

$this->start_controls_section(
  'style_title_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Product Title Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->start_controls_tabs('tabs_title_amazingoffertenthstkaveh');

$this->start_controls_tab(
  'tab_title_normal_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Normal', 'kavehTheme' ),
  ]
);
$this->add_control(
  'title_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Title Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .title a' => 'color: {{VALUE}}',
    ],
  ]
);
$this->end_controls_tab();

$this->start_controls_tab(
  'tab_title_hover_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Hover', 'kavehTheme' ),
  ]
);
$this->add_control(
  'title_hover_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Title Color on Hover', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .title a:hover' => 'color: {{VALUE}}',
    ],
  ]
);
$this->end_controls_tab();
$this->end_controls_tabs();

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'title_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .title a',
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Text_Shadow::get_type(),
  [
    'name' => 'title_shadow_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Title Text Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .title a',
  ]
);

$this->end_controls_section();

$this->start_controls_section(
  'style_features_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Product Features Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'feature_label_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Feature Title Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item ul li' => 'color: {{VALUE}}',
    ],
  ]
);
$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'feature_label_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Feature Title Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item ul li',
  ]
);

$this->add_control(
  'feature_value_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Feature Value Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item ul li span' => 'color: {{VALUE}}',
    ],
  ]
);
$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'feature_value_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Feature Value Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item ul li span',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_price_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Price Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'price_current_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Current Price Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .price span' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'price_current_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Current Price Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .price span',
  ]
);

$this->add_control(
  'price_old_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Previous Price Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .price del' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'price_old_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Previous Price Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .price del',
  ]
);

$this->add_control(
  'price_unit_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Currency Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .price .toman span' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'price_unit_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Currency Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .price .toman span',
  ]
);

$this->add_control(
  'price_old_line_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Previous Price Line Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .price del' => 'text-decoration-color: {{VALUE}}',
    ],
  ]
);

$this->add_control(
  'price_old_line_thickness_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Previous Price Line Thickness', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'size_units' => [ 'px' ],
    'range' => [
      'px' => [
        'min' => 1,
        'max' => 10,
      ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .price del' => 'text-decoration-thickness: {{SIZE}}{{UNIT}}',
    ],
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_rate_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Rating Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'rate_circle_bg_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Background Circle Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'default' => '#E5EEFF',
  ]
);

$this->add_control(
  'rate_circle_fill_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Progress Circle Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'default' => '#0057FF',
  ]
);

$this->add_control(
  'rate_number_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Rating Number Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .rate span' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'rate_number_typography_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Rating Number Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .rate span',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_btn_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Buy Button Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->start_controls_tabs('tabs_btn_amazingoffertenthstkaveh');
$this->start_controls_tab('tab_btn_normal_amazingoffertenthstkaveh', [
  'label' => esc_html__( 'Normal', 'kavehTheme' ),
]);

$this->add_control(
  'btn_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_control(
  'btn_bg_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Button Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view' => 'background-color: {{VALUE}}',
    ],
  ]
);

$this->add_control(
  'btn_icon_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view i' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Border::get_type(),
  [
    'name' => 'btn_border_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Button Border', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .btn-view',
  ]
);

$this->end_controls_tab();
$this->start_controls_tab('tab_btn_hover_amazingoffertenthstkaveh', [
  'label' => esc_html__( 'Hover', 'kavehTheme' ),
]);

$this->add_control(
  'btn_hover_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Text Color on Hover', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view:hover' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_control(
  'btn_hover_bg_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Background Color on Hover', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view:hover' => 'background-color: {{VALUE}}',
    ],
  ]
);

$this->add_control(
  'btn_icon_hover_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Icon Color on Hover', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view:hover i' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Border::get_type(),
  [
    'name' => 'btn_border_hover_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Button Border', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .btn-view:hover',
  ]
);

$this->end_controls_tab();
$this->end_controls_tabs();

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'btn_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Button Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .btn-view',
  ]
);

$this->add_control(
  'btn_padding_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Button Inner Spacing', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'size_units' => [ 'px' ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'btn_radius_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Button Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'btn_shadow_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .btn-view',
  ]
);

$this->add_control(
  'btn_icon_bg_section_title_amazingoffertenthstkaveh',
  [
    'type' => \Elementor\Controls_Manager::DIVIDER,
    'style' => 'solid',
  ]
);

$this->add_control(
  'btn_icon_bg_section_heading_amazingoffertenthstkaveh',
  [
    'type' => \Elementor\Controls_Manager::HEADING,
    'label' => esc_html__( 'Icon Background Style', 'kavehTheme' ),
    'separator' => 'none',
  ]
);

$this->add_control(
  'btn_icon_bg_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Icon Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
  ]
);

$this->add_control(
  'btn_icon_width_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Icon Background Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'size_units' => [ 'px'],
    'range' => [
      'px' => [
        'min' => 0,
        'max' => 100,
        'step' => 1,
      ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view i' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'btn_icon_height_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Icon Background Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'size_units' => [ 'px'],
    'range' => [
      'px' => [
        'min' => 0,
        'max' => 100,
        'step' => 1,
      ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view i' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'btn_icon_radius_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Icon Background Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .btn-view i' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'btn_icon_shadow_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Icon Background Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .btn-view i',
  ]
);
$this->end_controls_section();
$this->start_controls_section(
  'style_discount_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Discount Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'discount_bg_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Discount Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .discount::before, .discounted-products-tech-item .discount .bg::before' => 'background-color: {{VALUE}} !important',
    ],
  ]
);

$this->add_control(
  'discount_overlay_blur_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Decorative Background Blur Amount', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'size_units' => [ 'px' ],
    'range' => [
      'px' => [
        'min' => 0,
        'max' => 30,
        'step' => 1,
      ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .discount .bg' => 'filter: blur({{SIZE}}{{UNIT}});',
    ],
  ]
);

$this->add_control(
  'discount_text_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Discount Text Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .discount span' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'discount_text_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Discount Text Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .discount span',
  ]
);

$this->add_control(
  'discount_off_color_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Discount Title Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .discount' => 'color: {{VALUE}}',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'discount_off_typo_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Discount Title Typography OFF', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .discount',
  ]
);


$this->add_control(
  'discount_width_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Discount Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'size_units' => [ 'px'],
    'range' => [
      'px' => [ 'min' => 0, 'max' => 100 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .discount' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'discount_height_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Discount Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'size_units' => [ 'px'],
    'range' => [
      'px' => [ 'min' => 0, 'max' => 100 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .discount' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_image_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Product Image Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_responsive_control(
  'image_wrapper_width_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Image Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 500 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .image img' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);
$this->add_responsive_control(
  'image_wrapper_height_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Image Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 500 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .image img' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'image_radius_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Image Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'image_shadow_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Image Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .image img',
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Css_Filter::get_type(),
  [
    'name' => 'image_css_filters_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Background CSS Filters', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech-item .image img',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_image_bg_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Image Background Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'image_bg_color_amazingoffertenthstkaveh',
  [
    'name' => 'image_bg_color_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .image .bg::before, .discounted-products-tech-item .image .bg::after' => 'background-color: {{VALUE}} !important;',
      '{{WRAPPER}} .discounted-products-tech-item .image::before' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_responsive_control(
  'image_bg_width_amazingoffertenthstkaveh',
  [
    'name' => 'image_bg_width_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Background Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 10, 'max' => 500 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .image' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_responsive_control(
  'image_bg_height_amazingoffertenthstkaveh',
  [
    'name' => 'image_bg_height_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Background Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 10, 'max' => 500 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech-item .image' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_wrapper_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Overall Product Box Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'wrapper_bg_color_amazingoffertenthstkaveh',
  [
    'name' => 'wrapper_bg_color_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech' => 'background-color: {{VALUE}} !important;',
    ],
  ]
);

$this->add_control(
  'wrapper_padding_amazingoffertenthstkaveh',
  [
    'name' => 'wrapper_padding_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Padding', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'wrapper_radius_amazingoffertenthstkaveh',
  [
    'name' => 'wrapper_radius_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .discounted-products-tech' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'wrapper_shadow_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .discounted-products-tech',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_pagination_amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Pagination Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'one',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_color_amazingoffertenthstkaveh',
  [
    'name' => 'pagination_bullet_color_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Bullet Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .swiper-pagination .swiper-pagination-bullet' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_active_color_amazingoffertenthstkaveh',
  [
    'name' => 'pagination_bullet_active_color_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Active Bullet Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .swiper-pagination .swiper-pagination-bullet-active' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_width_amazingoffertenthstkaveh',
  [
    'name' => 'pagination_bullet_width_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Bullet Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 2, 'max' => 40 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .swiper-pagination .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_height_amazingoffertenthstkaveh',
  [
    'name' => 'pagination_bullet_height_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Bullet Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 2, 'max' => 40 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .swiper-pagination .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_radius_amazingoffertenthstkaveh',
  [
    'name' => 'pagination_bullet_radius_amazingoffertenthstkaveh',
    'label' => esc_html__( 'Bullet Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .swiper-pagination .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->end_controls_section();



//////////////////////////// style two ////////////////////////////

$this->start_controls_section(
  'content5amazingoffertenthstkaveh',
  [
    'label' => esc_html__( 'Cart Button', 'kavehTheme' ),
            'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            'condition' => [
              'styleamazingoffertenthstkaveh' => 'two',
            ],
  ]
);

$this->add_control(
  'show_satisfaction_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Show Satisfaction and Sales', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SWITCHER,
    'label_on' => esc_html__( 'Yes', 'kavehTheme' ),
        'label_off' => esc_html__( 'No', 'kavehTheme' ),
    'return_value' => 'yes',
    'default' => 'yes',
  ]
);

$this->add_control(
  'cart2titleamazingoffertenthstkaveh',
  [
      'label' => esc_html__( 'Button Text', 'kavehTheme' ),
      'type' => \Elementor\Controls_Manager::TEXT,
      'default' => esc_html__( 'Buy', 'kavehTheme' ),

  ]
);

$this->add_control(
'icon2iamazingoffertenthstkaveh',
[
  'label' => esc_html__( 'Button Icon', 'kavehTheme' ),
  'type' => \Elementor\Controls_Manager::ICONS,
  'skin' => 'inline',
  'exclude_inline_options' => [ 'svg' ],
  'default' => [
    'value' => 'icon-arrow-left-7',
  ],
]
); 

$this->end_controls_section();


$this->start_controls_section(
  'style_title_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Product Title Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->start_controls_tabs( 'title_tabs_amazingoffersecondstkaveh' );

$this->start_controls_tab(
  'title_tab_normal_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Normal', 'kavehTheme' ),
  ]
);

$this->add_control(
  'title_color_normal_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Title Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .title-product a' => 'color: {{VALUE}};',
    ],
  ]
);

$this->end_controls_tab();

$this->start_controls_tab(
  'title_tab_hover_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Hover', 'kavehTheme' ),
  ]
);

$this->add_control(
  'title_color_hover_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Title Color (Hover)', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .title-product a:hover' => 'color: {{VALUE}};',
    ],
  ]
);

$this->end_controls_tab();
$this->end_controls_tabs();

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'title_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .title-product a',
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Text_Shadow::get_type(),
  [
    'name' => 'title_text_shadow_normal_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Text Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .title-product a',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_category_features_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Category and Features Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->add_control(
  'attr_label_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Feature Title Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product .listone' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'attr_label_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Feature Title Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .options-product .listone',
  ]
);

$this->add_control(
  'attr_value_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Feature Value Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product .listthree' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'attr_value_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Feature Value Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .options-product .listthree',
  ]
);

$this->add_control(
  'attr_icon_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product .listtwo' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'attr_icon_size_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [
        'min' => 8,
        'max' => 50,
      ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product .listtwo' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'attr_icon_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product .listtwo' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'attr_icon_bottom_spacing_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Distance from Feature Title', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 50 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product .listtwo' => 'margin-left: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_attr_box_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Features Box Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->add_control(
  'attr_box_bg_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Feature Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product li' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'attr_box_padding_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Inner Spacing', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'attr_box_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product li' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'attr_box_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Box Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .options-product li',
  ]
);

$this->add_control(
  'attr_box_gap_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Distance Between Boxes', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 50 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .options-product li' => 'margin: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_price_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Product Price Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->add_control(
  'price_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Final Price Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .price span' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'price_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Final Price Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .price span',
  ]
);

$this->add_control(
  'regular_price_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Previous Price Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} del .woocommerce-Price-amount bdi:first-child' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'regular_price_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Previous Price Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} del .woocommerce-Price-amount bdi:first-child',
  ]
);

$this->add_control(
  'regular_price2_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Currency Unit Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} * * span.woocommerce-Price-currencySymbol' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'regular_price2_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Currency Unit Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} * * span.woocommerce-Price-currencySymbol',
  ]
);

$this->add_control(
  'regular_price_line_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Previous Price Line Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .price del' => 'text-decoration-color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'regular_price_line_width_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Previous Price Line Thickness', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 1, 'max' => 5 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .price del' => 'text-decoration-thickness: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_button_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Buy Button Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->start_controls_tabs( 'tabs_button_amazingoffersecondstkaveh' );

$this->start_controls_tab(
  'tab_button_normal_amazingoffersecondstkaveh',
  [ 'label' => esc_html__( 'Normal', 'kavehTheme' ) ]
);

$this->add_control(
  'button_text_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Button Text Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'button_icon_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7 i' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'button_bg_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->end_controls_tab();

$this->start_controls_tab(
  'tab_button_hover_amazingoffersecondstkaveh',
  [ 'label' => esc_html__( 'Hover', 'kavehTheme' ) ]
);

$this->add_control(
  'button_text_hover_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Hover Text Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7:hover' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'button_icon_hover_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Hover Icon Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7:hover i' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'button_bg_hover_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Hover Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7:hover' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->end_controls_tab();
$this->end_controls_tabs();

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'button_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Button Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .btn-success-7',
  ]
);

$this->add_control(
  'button_icon_size_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Size', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 8, 'max' => 40 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7 i' => 'font-size: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'button_padding_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Button Inner Spacing', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'button_border_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .btn-success-7' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'button_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Button Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .btn-success-7',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_satisfaction_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Satisfaction and Sales Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
      'show_satisfaction_amazingoffersecondstkaveh' => 'yes',
    ],
  ]
);

$this->add_control(
  'satisfaction_title_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Title Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .satisfaction-sales .title' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'satisfaction_title_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Title Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .satisfaction-sales .title',
  ]
);

$this->add_control(
  'satisfaction_value_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Value Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .satisfaction-sales .val' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'satisfaction_value_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Value Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .satisfaction-sales .val',
  ]
);

$this->add_control(
  'satisfaction_icon_bg_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .satisfaction-sales .icon' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_responsive_control(
  'satisfaction_icon_width_wrapper_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Box Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 100 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .satisfaction-sales .icon' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_responsive_control(
  'satisfaction_icon_height_wrapper_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Box Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 100 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .satisfaction-sales .icon' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'satisfaction_icon_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Icon Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .satisfaction-sales .icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'satisfaction_icon_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Icon Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .satisfaction-sales .icon',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_discount_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Discount Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->add_control(
  'discount_box_bg_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Discount Box Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .discount' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Border::get_type(),
  [
    'name' => 'discount_border_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Discount Box Border', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .discount',
  ]
);

$this->add_control(
  'discount_percent_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Discount Percentage Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .discount span' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'discount_percent_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Discount Percentage Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .discount span',
  ]
);

$this->add_control(
  'discount_text_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Discount Text Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .discount' => 'color: {{VALUE}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Typography::get_type(),
  [
    'name' => 'discount_text_typography_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Discount Text Typography', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .discount',
  ]
);

$this->add_responsive_control(
  'discount_box_width_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Box Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 100 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .discount' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_responsive_control(
  'discount_box_height_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Box Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [
      'px' => [ 'min' => 0, 'max' => 100 ],
    ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .discount' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'discount_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Discount Box Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .discount' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'discount_box_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Discount Box Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .discount',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_image_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Product Image Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->add_responsive_control(
  'product_img_width_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [ 'px' => [ 'min' => 50, 'max' => 500 ] ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image img' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_responsive_control(
  'product_img_height_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [ 'px' => [ 'min' => 50, 'max' => 500 ] ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image img' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'product_img_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'product_img_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Image Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .image img',
  ]
);

$this->add_control(
  'product_img_box_bg_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Box Background Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_responsive_control(
  'product_box_img_width_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Box Width', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [ 'px' => [ 'min' => 0, 'max' => 500 ] ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image' => 'width: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_responsive_control(
  'product_box_img_height_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Box Height', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [ 'px' => [ 'min' => 0, 'max' => 500 ] ],
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image' => 'height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'product_box_img_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Image Box Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .product-bed-one .image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'product_box_img_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Image Box Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .product-bed-one .image',
  ]
);

$this->end_controls_section();
$this->start_controls_section(
  'style_pagination_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Pagination Style', 'kavehTheme' ),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'condition' => [
      'styleamazingoffertenthstkaveh' => 'two',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Bullet Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .swiper-products-bed-one .swiper-pagination-bullet' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_active_color_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Active Bullet Color', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::COLOR,
    'selectors' => [
      '{{WRAPPER}} .swiper-products-bed-one .swiper-pagination-bullet-active' => 'background-color: {{VALUE}};',
    ],
  ]
);

$this->add_responsive_control(
  'pagination_bullet_size_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Bullet Size', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [ 'px' => [ 'min' => 4, 'max' => 30 ] ],
    'selectors' => [
      '{{WRAPPER}} .swiper-products-bed-one .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_gap_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Distance Between Bullets', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::SLIDER,
    'range' => [ 'px' => [ 'min' => 0, 'max' => 50 ] ],
    'selectors' => [
      '{{WRAPPER}} .swiper-products-bed-one .swiper-pagination-bullet' => 'margin-inline: calc({{SIZE}}{{UNIT}} / 2);',
    ],
  ]
);

$this->add_control(
  'pagination_bullet_radius_amazingoffersecondstkaveh',
  [
    'label' => esc_html__( 'Bullet Corners', 'kavehTheme' ),
    'type' => \Elementor\Controls_Manager::DIMENSIONS,
    'selectors' => [
      '{{WRAPPER}} .swiper-products-bed-one .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
    ],
  ]
);

$this->add_group_control(
  \Elementor\Group_Control_Box_Shadow::get_type(),
  [
    'name' => 'pagination_bullet_shadow_amazingoffersecondstkaveh',
    'label' => esc_html__( 'Bullet Shadow', 'kavehTheme' ),
    'selector' => '{{WRAPPER}} .swiper-products-bed-one .swiper-pagination-bullet',
  ]
);

$this->end_controls_section();






















        }
 

  protected function render(){
    $settings = $this->get_settings_for_display();
    $clsid = $this->get_id();
    ?>
          <?php if ('one' === $settings['styleamazingoffertenthstkaveh']) { ?>

         <div class="discounted-products-tech position-relative bg-white">
            <!-- Start Carousel -->
            <div class="swiper swiper-discounted-products-tech">
              <div class="swiper-wrapper">

                <?php
                  $args = [
                      'post_type' => 'product',
                      'posts_per_page' => $settings['posts_per_page_amazingoffertenthstkaveh'],
                      'orderby' => $settings['psortamazingoffertenthstkaveh'],
                      'order' => $settings['psortiamazingoffertenthstkaveh']
                  ];

                  // Handle WooCommerce specific options
                      // Exclude out of stock products
                      if ($settings['kaveh_exclude_out_of_stock'] === 'yes') {
                          $args['meta_query'][] = [
                              'key' => '_stock_status',
                              'value' => 'outofstock',
                              'compare' => '!='
                          ];
                      }

                      // Show only on-sale products
                      if ($settings['show_onsale_products_amazingoffertenthstkaveh'] === 'yes') {
                          $args['meta_query'][] = [
                              'relation' => 'OR',
                              [
                                  'key' => '_sale_price',
                                  'value' => '',
                                  'compare' => '!='
                              ],
                              [
                                  'key' => '_min_variation_sale_price',
                                  'value' => '',
                                  'compare' => '!='
                              ]
                          ];
                      }

                      // Handle product attributes
                      if (!empty($settings['product_attributes_amazingoffertenthstkaveh']) && !empty($settings['product_attribute_terms_amazingoffertenthstkaveh'])) {
                          $tax_query = [];
                          foreach ($settings['product_attributes_amazingoffertenthstkaveh'] as $attribute) {
                              $tax_query[] = [
                                  'taxonomy' => 'pa_' . $attribute,
                                  'field' => 'term_id',
                                  'terms' => $settings['product_attribute_terms_amazingoffertenthstkaveh']
                              ];
                          }
                          if (!empty($tax_query)) {
                              $args['tax_query'][] = [
                                  'relation' => 'AND',
                                  $tax_query
                              ];
                          }
                      }
                  

                  // Handle taxonomy filters
                  if (!empty($settings['taxonomy_filter_amazingoffertenthstkaveh']) && !empty($settings['taxonomy_terms_amazingoffertenthstkaveh'])) {
                      $tax_query = [];
                      foreach ($settings['taxonomy_filter_amazingoffertenthstkaveh'] as $taxonomy) {
                          $tax_query[] = [
                              'taxonomy' => $taxonomy,
                              'field' => 'term_id',
                              'terms' => $settings['taxonomy_terms_amazingoffertenthstkaveh']
                          ];
                      }
                      if (!empty($tax_query)) {
                          $args['tax_query'][] = [
                              'relation' => 'AND',
                              $tax_query
                          ];
                      }
                  }

                  // Handle meta query
                  if (!empty($settings['meta_key_amazingoffertenthstkaveh']) && !empty($settings['meta_value_amazingoffertenthstkaveh'])) {
                      $args['meta_query'][] = [
                          'key' => $settings['meta_key_amazingoffertenthstkaveh'],
                          'value' => $settings['meta_value_amazingoffertenthstkaveh']
                      ];
                  }

                  // Handle date query
                  if ($settings['date_query_amazingoffertenthstkaveh'] !== 'none') {
                      $date_query = [];
                      switch ($settings['date_query_amazingoffertenthstkaveh']) {
                          case 'today':
                              $date_query = [
                                  'after' => '1 day ago'
                              ];
                              break;
                          case 'last_7_days':
                              $date_query = [
                                  'after' => '1 week ago'
                              ];
                              break;
                          case 'last_30_days':
                              $date_query = [
                                  'after' => '1 month ago'
                              ];
                              break;
                      }
                      if (!empty($date_query)) {
                          $args['date_query'] = $date_query;
                      }
                  }

                  // Handle exclusions
                  if (!empty($settings['exclude_posts_amazingoffertenthstkaveh'])) {
                      $excluded_ids = array_map('trim', explode(',', $settings['exclude_posts_amazingoffertenthstkaveh']));
                      $args['post__not_in'] = array_map('intval', $excluded_ids);
                  }

                  // Handle custom query parameters
                  if (!empty($settings['custom_query_amazingoffertenthstkaveh'])) {
                      $custom_args = json_decode($settings['custom_query_amazingoffertenthstkaveh'], true);
                      if (is_array($custom_args)) {
                          $args = array_merge($args, $custom_args);
                      }
                  }

                  // Execute the query
                  $query = KavehCustomQuery::get_cached_query($args);
                  ?>

                <?php if ($query->have_posts()) : ?>
                <?php while ($query->have_posts()) : $query->the_post();
                    $product = wc_get_product(get_the_ID());
                    if (!$product) continue;

                    $regular_price = (float) $product->get_regular_price();
                    $sale_price = (float) $product->get_sale_price();
                    $price = $product->get_price();
                    $currency = get_woocommerce_currency_symbol();

                    $discount_percentage = ($sale_price && $regular_price) ? round((($regular_price - $sale_price) / $regular_price) * 100) : 0;

                    $categories = wc_get_product_category_list($product->get_id());
                    $rating = $product->get_average_rating();
                    $product_link = get_permalink($product->get_id());
                    $product_title = get_the_title();
                    $pr_id = get_the_ID();

                    $image_url = get_the_post_thumbnail_url($product->get_id(), 'medium') ?: wc_placeholder_img_src();
                ?>
                  <div class="swiper-slide h-auto">
                    <div class="discounted-products-tech-item d-flex align-items-center position-relative flex-wrap gap-3 gap-lg-0">
                        
                        <?php if ($discount_percentage) : ?>
                        <div class="discount d-flex align-items-center justify-content-center flex-column position-absolute top-0 end-0">
                        <span class="bg position-absolute top-0 end-0 w-100 h-100"></span>
                        <span>%<?php echo  $discount_percentage ?></span>
                        OFF
                        </div>
                        <?php endif; ?>

                        <div class="image position-relative flex-fill flex-grow-0 flex-shrink-0">
                        <div class="bg"></div>
                        <img src="<?php echo  esc_url($image_url) ?>" alt="<?php echo  esc_attr($product_title) ?>" width="223" height="293" class="position-absolute">
                        <?php if ($rating) : ?>
                        <div class="rate position-absolute d-flex align-items-center justify-content-center">
                            <span><?php echo  number_format($rating, 1) ?></span>
                            <svg class="position-absolute top-0 end-0" viewbox="0 0 100 100" width="72" height="72" data-rate-progress="<?php echo  number_format($rating, 1) ?>">
                            <circle cx="50" cy="50" r="45.14" stroke="<?php echo  esc_attr($settings['rate_circle_bg_color_amazingoffertenthstkaveh']); ?>" stroke-width="7" fill="none" />
                            <circle cx="50" cy="50" r="45.14" stroke="<?php echo  esc_attr($settings['rate_circle_fill_color_amazingoffertenthstkaveh']); ?>" stroke-width="7" fill="none"
                                stroke-dasharray="<?php echo  2.83 * number_format($rating, 1) ?> 100" />
                            </svg>
                        </div>
                        <?php endif; ?>
                        </div>

                        <div class="detail flex-grow-1">
                        <h2 class="title">
                            <a href="<?php echo  esc_url($product_link) ?>"><?php echo  esc_html($product_title) ?></a>
                        </h2>
                        <?php if (!empty($categories)) : ?>
                        <a href="<?php echo  esc_url($product_link) ?>" class="category d-inline-block mt-auto category-title-kaveh">
                            <?php echo  wp_kses_post($categories) ?>
                        </a>
                        <?php endif; ?>

                        <ul class="d-flex flex-column">
                            <?php
                            $attributes = $product->get_attributes();
                            $count = 0;
                            foreach ($attributes as $attribute) {
                                if ($attribute->is_taxonomy()) {
                                $taxonomy = $attribute->get_name();
                                $terms = wc_get_product_terms($product->get_id(), $taxonomy, ['fields' => 'names']);
                                if (!empty($terms)) {
                                    $label = wc_attribute_label($taxonomy);
                                    $value = implode(', ', $terms);
                            ?>
                            <li class="d-flex align-items-center gap-2">
                                <svg><!-- icon --></svg>
                                <?php echo  esc_html($label) ?>:
                                <span><?php echo  esc_html($value) ?></span>
                            </li>
                            <?php
                                    $count++;
                                    if ($count >= 3) break;
                                }
                                }
                            }
                            ?>
                        </ul>
 
                        <div class="btn-price d-flex align-items-center justify-content-between justify-content-md-start flex-wrap">
                        <?php if ( $product && $product->is_type('variable') ) { ?>
                          <a href="<?php echo  esc_url($product_link) ?>" class="btn-view d-flex align-items-center gap-3">
                            <i class="icon-box-alt lh-1 d-flex align-items-center justify-content-center"></i>
                            View
                          </a>
                        <?php }else{ ?>
                          <a type="submit" name="add-to-cart" class="btn-view d-flex align-items-center gap-3 single_add_to_cart_button" value="<?php echo $pr_id ?>">
                            <i class="<?php echo  esc_attr($settings['iconiamazingoffertenthstkaveh']['value']); ?> lh-1 d-flex align-items-center justify-content-center"></i>
                            <?php echo  esc_html($settings['carttitleamazingoffertenthstkaveh']); ?>
                          </a>
                        <?php } ?>
                          <div class="price d-flex align-items-center">
                            <div class="d-flex flex-column">
                              <span><?php echo  number_format($price) ?></span>
                              <?php if ($regular_price && $sale_price && $regular_price > $sale_price) : ?>
                                <del><?php echo  number_format($regular_price) ?></del>
                              <?php endif; ?>
                            </div>
                            <div class="toman d-flex flex-column">
                              <span><?php echo  $currency ?></span>
                            </div>
                          </div>
                        </div>

                        </div>
                    </div>
                    </div>              
                      <?php 
                        endwhile;
                        wp_reset_postdata();
                    endif;
                    ?>

              </div>
              <div class="swiper-pagination top-50 start-0 w-auto h-auto d-none d-lg-flex flex-column"></div>
            </div>
            <!-- End Carousel -->
          </div>
          <style>
          .discounted-products-tech-item .detail .btn-view i {
          background-image: linear-gradient(131.09deg, <?php echo  esc_attr($settings['btn_icon_bg_color_amazingoffertenthstkaveh']); ?> 26.71%, <?php echo  esc_attr($settings['btn_icon_bg_color_amazingoffertenthstkaveh']); ?> 142.62%);
          }
          </style>





          <?php } elseif ('two' === $settings['styleamazingoffertenthstkaveh']) { ?>
            <div class="box-products-bed-one position-relative">
              <!-- Start Carousel -->
              <div class="swiper swiper-products-bed-one">
                <div class="swiper-wrapper">

                  <?php
                  $args = [
                      'post_type' => 'product',
                      'posts_per_page' => $settings['posts_per_page_amazingoffertenthstkaveh'],
                      'orderby' => $settings['psortamazingoffertenthstkaveh'],
                      'order' => $settings['psortiamazingoffertenthstkaveh']
                  ];

                  // Handle WooCommerce specific options
                      // Exclude out of stock products
                      if ($settings['kaveh_exclude_out_of_stock'] === 'yes') {
                          $args['meta_query'][] = [
                              'key' => '_stock_status',
                              'value' => 'outofstock',
                              'compare' => '!='
                          ];
                      }

                      // Show only on-sale products
                      if ($settings['show_onsale_products_amazingoffertenthstkaveh'] === 'yes') {
                          $args['meta_query'][] = [
                              'relation' => 'OR',
                              [
                                  'key' => '_sale_price',
                                  'value' => '',
                                  'compare' => '!='
                              ],
                              [
                                  'key' => '_min_variation_sale_price',
                                  'value' => '',
                                  'compare' => '!='
                              ]
                          ];
                      }

                      // Handle product attributes
                      if (!empty($settings['product_attributes_amazingoffertenthstkaveh']) && !empty($settings['product_attribute_terms_amazingoffertenthstkaveh'])) {
                          $tax_query = [];
                          foreach ($settings['product_attributes_amazingoffertenthstkaveh'] as $attribute) {
                              $tax_query[] = [
                                  'taxonomy' => 'pa_' . $attribute,
                                  'field' => 'term_id',
                                  'terms' => $settings['product_attribute_terms_amazingoffertenthstkaveh']
                              ];
                          }
                          if (!empty($tax_query)) {
                              $args['tax_query'][] = [
                                  'relation' => 'AND',
                                  $tax_query
                              ];
                          }
                      }
                  

                  // Handle taxonomy filters
                  if (!empty($settings['taxonomy_filter_amazingoffertenthstkaveh']) && !empty($settings['taxonomy_terms_amazingoffertenthstkaveh'])) {
                      $tax_query = [];
                      foreach ($settings['taxonomy_filter_amazingoffertenthstkaveh'] as $taxonomy) {
                          $tax_query[] = [
                              'taxonomy' => $taxonomy,
                              'field' => 'term_id',
                              'terms' => $settings['taxonomy_terms_amazingoffertenthstkaveh']
                          ];
                      }
                      if (!empty($tax_query)) {
                          $args['tax_query'][] = [
                              'relation' => 'AND',
                              $tax_query
                          ];
                      }
                  }

                  // Handle meta query
                  if (!empty($settings['meta_key_amazingoffertenthstkaveh']) && !empty($settings['meta_value_amazingoffertenthstkaveh'])) {
                      $args['meta_query'][] = [
                          'key' => $settings['meta_key_amazingoffertenthstkaveh'],
                          'value' => $settings['meta_value_amazingoffertenthstkaveh']
                      ];
                  }

                  // Handle date query
                  if ($settings['date_query_amazingoffertenthstkaveh'] !== 'none') {
                      $date_query = [];
                      switch ($settings['date_query_amazingoffertenthstkaveh']) {
                          case 'today':
                              $date_query = [
                                  'after' => '1 day ago'
                              ];
                              break;
                          case 'last_7_days':
                              $date_query = [
                                  'after' => '1 week ago'
                              ];
                              break;
                          case 'last_30_days':
                              $date_query = [
                                  'after' => '1 month ago'
                              ];
                              break;
                      }
                      if (!empty($date_query)) {
                          $args['date_query'] = $date_query;
                      }
                  }

                  // Handle exclusions
                  if (!empty($settings['exclude_posts_amazingoffertenthstkaveh'])) {
                      $excluded_ids = array_map('trim', explode(',', $settings['exclude_posts_amazingoffertenthstkaveh']));
                      $args['post__not_in'] = array_map('intval', $excluded_ids);
                  }

                  // Handle custom query parameters
                  if (!empty($settings['custom_query_amazingoffertenthstkaveh'])) {
                      $custom_args = json_decode($settings['custom_query_amazingoffertenthstkaveh'], true);
                      if (is_array($custom_args)) {
                          $args = array_merge($args, $custom_args);
                      }
                  }

                  // Execute the query
                  $query = KavehCustomQuery::get_cached_query($args);
                  ?>

                <?php if ($query->have_posts()) : ?>
                <?php while ($query->have_posts()) : $query->the_post();
                global $product;
                if (!$product instanceof \WC_Product) continue;

                $product_link = get_permalink();
                $title = get_the_title();
                $category = wc_get_product_category_list($product->get_id(), ', ');
                $image_url = get_the_post_thumbnail_url(null, 'woocommerce_thumbnail');
                $price = $product->get_price();
                $regular_price = $product->get_regular_price();
                $sale_price = $product->get_sale_price();
                $currency = get_woocommerce_currency_symbol();

                // Features
                $attributes = $product->get_attributes();
                $attribute_display = '';
                $attr_count = 0;
                $pr_id = get_the_ID();

                foreach ($attributes as $attribute) {
                    if ($attribute->is_taxonomy()) {
                        $values = wc_get_product_terms($product->get_id(), $attribute->get_name(), ['fields' => 'names']);
                        if (!empty($values)) {
                            $attribute_label = wc_attribute_label($attribute->get_name());
                            $attribute_display .= '<li class="d-flex align-items-center listone"><span class="dot listtwo"></span>' . esc_html($attribute_label) . ': <span class="value listthree">' . esc_html(implode(', ', $values)) . '</span></li>';
                            $attr_count++;
                        }
                    }
                    if ($attr_count >= 4) break;
                }
                ?>

                <!-- Start Product -->
                <div class="swiper-slide">
                  <div class="product-bed-one d-flex align-items-center h-100 flex-column flex-md-row">
                    <div class="image flex-fill flex-grow-1 flex-shrink-1 w-100 mb-4 mb-md-0">
                      <img src="<?php echo  esc_url($image_url) ?>" alt="<?php echo  esc_attr($title) ?>" width="257" height="257" class="d-block mx-auto">
                    </div>
                    <div class="detail flex-grow-1 w-100 position-relative d-flex flex-column">
                      <?php if ($regular_price && $sale_price && $regular_price > $sale_price) : 
                        $discount_percent = round((($regular_price - $sale_price) / $regular_price) * 100);
                      ?>
                        <div class="discount position-absolute top-0 end-0 d-flex align-items-center justify-content-center flex-column">
                          <span> %<?php echo  $discount_percent ?> </span>
                          <?php esc_html_e('OFF', 'kavehTheme'); ?>
                        </div>
                      <?php endif; ?>
                      <h2 class="title-product">
                        <a href="<?php echo  esc_url($product_link) ?>"> <?php echo  esc_html($title) ?> </a>
                      </h2>
                      <a href="<?php echo  esc_url($product_link) ?>" class="category"> <?php echo  $category ?> </a>
                      <div class="divider"></div>
                      <ul class="options-product d-flex flex-wrap">
                        <?php echo  $attribute_display ?>
                      </ul>

                      <?php if ( 'yes' === $settings['show_satisfaction_amazingoffersecondstkaveh'] ) : ?>
                      <div class="satisfaction-sales d-flex align-items-center justify-content-between gap-2 position-relative overflow-hidden">
                        <div class="satisfaction-sales-item d-flex align-items-center">
                          <div class="icon d-flex align-items-center justify-content-center">
                            <!-- Satisfaction Icon -->
                            <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" fill="none" viewBox="0 0 17 17">
                              <path fill="#FFDF39" stroke="#000" stroke-linejoin="round" stroke-opacity=".91" stroke-width="1.3" d="M1.166 4.531c.02-.196.264-.244.376-.082l1.874 2.71c.518.75 1.646.683 2.072-.123l2.758-5.213a.288.288 0 0 1 .508 0l2.758 5.213a1.214 1.214 0 0 0 2.072.123l1.875-2.71c.111-.162.355-.114.376.082.138 1.291.254 2.617.254 3.969 0 1.352-.116 2.678-.254 3.969a3.803 3.803 0 0 1-3.343 3.351c-1.299.145-2.632.27-3.992.27-1.36 0-2.693-.125-3.992-.27a3.803 3.803 0 0 1-3.342-3.351C1.027 11.178.91 9.852.91 8.5c0-1.352.116-2.678.255-3.969Z"></path>
                            </svg>
                          </div>
                          <?php
                          $rating = floatval( $product->get_average_rating() );
                          ?>
                          <div>
                            <div class="title"> Satisfaction: </div>
                            <div class="val">
                              <?php echo  $rating > 0 ? number_format($rating, 1) : 'No Rating' ?>
                            </div>
                          </div>

                        </div>
                        <div class="satisfaction-sales-item d-flex align-items-center">
                          <div class="icon d-flex align-items-center justify-content-center">
                            <!-- Sales Icon -->
                            <svg xmlns="http://www.w3.org/2000/svg" width="19" height="20" fill="none" viewBox="0 0 19 20">
                                <path fill="#FFDF39" stroke="#020202" stroke-width="1.3" d="M1 14.667c0-2.54 1.014-5.107 1.928-6.96C3.456 6.637 4.573 6 5.767 6h7.466c1.194 0 2.311.636 2.84 1.707.913 1.853 1.927 4.42 1.927 6.96 0 2.166-1.378 3.64-3.542 3.987C13.2 18.855 11.625 19 9.5 19s-3.699-.145-4.958-.346C2.378 18.307 1 16.834 1 14.667Z"></path>
                                <path stroke="#020202" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3" d="M8 12h3"></path>
                                <path stroke="#020202" stroke-width="1.3" d="M6 6V4.5a3.5 3.5 0 1 1 7 0V6"></path>
                            </svg>
                          </div>
                          <?php
                          $sales_count = (int) get_post_meta( get_the_ID(), 'total_sales', true );
                          ?>
                          <div>
                            <div class="title"> Sales: </div>
                            <div class="val"> <?php echo  $sales_count > 0 ? number_format($sales_count) : '0' ?> </div>
                          </div>
                        </div>
                      </div>
                      <?php endif; ?>

                      <div class="btn-price d-flex align-items-center justify-content-between gap-2">
                      <?php if ( $product && $product->is_type('variable') ) { ?>
                        <a href="<?php echo  esc_url($product_link) ?>" class="btn btn-success-7 d-flex align-items-center justify-content-between w-100">
                          <?php esc_html_e( 'View Product', 'kavehTheme'); ?>
                          <i class="icon-arrow-left-7 lh-1"></i>
                        </a>
                      <?php }else{ ?>
                        <a type="submit" name="add-to-cart" class="btn btn-success-7 d-flex align-items-center justify-content-between w-100 single_add_to_cart_button" value="<?php echo $pr_id ?>">
                          <?php echo  esc_html($settings['cart2titleamazingoffertenthstkaveh']); ?>
                          <i class="<?php echo  esc_attr($settings['icon2iamazingoffertenthstkaveh']['value']); ?> lh-1"></i>
                        </a>
                    <?php } ?>
                        <div class="price d-flex align-items-center justify-content-end">
                          <div class="d-flex flex-column">
                            <span><?php echo  wc_price($price) ?></span>
                            <?php if ($regular_price && $sale_price && $regular_price > $sale_price) : ?>
                              <del><?php echo  wc_price($regular_price) ?></del>
                            <?php endif; ?>
                          </div>
                        </div>

                      </div>
                    </div>
                  </div>
                </div>
                <!-- End Product -->

                <?php 
                endwhile;
                wp_reset_postdata();
                endif;
                ?>

                </div>
                <div class="swiper-pagination bottom-0 d-flex align-items-center"></div>
              </div>
              <!-- End Carousel -->
            </div>

          <?php } ?>
    <?php
  }


}
