<?php
/**
 * Product Comparison Widget — Style Controls (TAB_STYLE)
 *
 * Included via require inside register_controls(), so $this is in scope.
 *
 * @package GGM_Commerce
 */

// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// === STYLE TAB ===

// Title Style
$this->start_controls_section(
	'section_style_title',
	array(
		'label' => 'Title',
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'title_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-title',
	)
);

$this->add_control(
	'title_color',
	array(
		'label'     => 'Title Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-title' => 'color: {{VALUE}};',
		),
	)
);

$this->add_responsive_control(
	'title_margin',
	array(
		'label'      => 'Title Margin',
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->end_controls_section();

// Table Container Style
$this->start_controls_section(
	'section_style_table_container',
	array(
		'label' => __( 'Table Container', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_control(
	'table_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-table-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Box_Shadow::get_type(),
	array(
		'name'     => 'table_box_shadow',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table-container',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'table_container_border',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table-container',
	)
);

$this->end_controls_section();

// Table Style
$this->start_controls_section(
	'section_style_table',
	array(
		'label' => __( 'Table', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_control(
	'table_border_heading',
	array(
		'label' => __( 'Table Border', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'table_border',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table',
	)
);

$this->add_control(
	'header_heading',
	array(
		'label' => __( 'Header Row', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	)
);

$this->add_control(
	'header_background',
	array(
		'label'     => __( 'Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table thead th' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'header_text_color',
	array(
		'label'     => __( 'Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table thead th' => 'color: {{VALUE}};',
		),
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'header_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table thead th',
	)
);

$this->add_control(
	'rows_heading',
	array(
		'label'     => __( 'Body Rows', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_control(
	'row_background',
	array(
		'label'     => __( 'Row Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table tbody tr' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'row_alt_background',
	array(
		'label'     => __( 'Alternating Row Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table tbody tr:nth-child(even)' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'row_hover_background',
	array(
		'label'     => __( 'Row Hover Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table tbody tr:hover' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'cell_heading',
	array(
		'label'     => __( 'Cells', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'cell_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table tbody td',
	)
);

$this->add_control(
	'cell_text_color',
	array(
		'label'     => __( 'Cell Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table tbody td' => 'color: {{VALUE}};',
		),
	)
);

$this->add_responsive_control(
	'cell_padding',
	array(
		'label'      => __( 'Cell Padding', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-table th, {{WRAPPER}} .ggmc-comparison-table td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'border_heading',
	array(
		'label'     => __( 'Borders', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'cell_border',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table th, {{WRAPPER}} .ggmc-comparison-table td',
	)
);

$this->end_controls_section();

// Field Label Style
$this->start_controls_section(
	'section_style_labels',
	array(
		'label' => 'Field Labels',
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_control(
	'label_background',
	array(
		'label'     => 'Label Column Background',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table .field-label' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'label_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-table .field-label',
	)
);

$this->add_control(
	'label_color',
	array(
		'label'     => 'Label Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-table .field-label' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Product Name Style
$this->start_controls_section(
	'section_style_product_name',
	array(
		'label' => 'Product Name',
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'product_name_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-product-name a',
	)
);

$this->add_control(
	'product_name_color',
	array(
		'label'     => 'Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-product-name a' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'product_name_hover_color',
	array(
		'label'     => 'Hover Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-product-name a:hover' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Price Style
$this->start_controls_section(
	'section_style_price',
	array(
		'label' => 'Price',
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'price_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-price .current-price, {{WRAPPER}} .ggmc-comparison-price .sale-price',
	)
);

$this->add_control(
	'price_color',
	array(
		'label'     => 'Price Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-price .current-price, {{WRAPPER}} .ggmc-comparison-price .sale-price' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'original_price_color',
	array(
		'label'     => 'Original Price Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-price .original-price' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Stock Status Style
$this->start_controls_section(
	'section_style_stock',
	array(
		'label' => 'Stock Status',
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_control(
	'in_stock_color',
	array(
		'label'     => 'In Stock Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'default'   => '#22c55e',
		'selectors' => array(
			'{{WRAPPER}} .ggmc-stock-status.in-stock' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'low_stock_color',
	array(
		'label'     => 'Low Stock Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'default'   => '#f59e0b',
		'selectors' => array(
			'{{WRAPPER}} .ggmc-stock-status.low-stock' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'out_of_stock_color',
	array(
		'label'     => 'Out of Stock Color',
		'type'      => \Elementor\Controls_Manager::COLOR,
		'default'   => '#ef4444',
		'selectors' => array(
			'{{WRAPPER}} .ggmc-stock-status.out-of-stock' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Add to Cart Button Style (using shared controls)
GGM_Add_To_Cart_Controls::register(
	$this,
	array(
		'selector'      => '.ggmc-comparison-add-to-cart',
		'prefix'        => 'add_to_cart',
		'section_id'    => 'section_style_add_to_cart',
		'section_label' => __( 'Add to Cart Button', 'ggm-commerce' ),
		'include_icon'  => true,
		'condition'     => array( 'show_add_to_cart' => 'yes' ),
	)
);

// Other Buttons Style
$this->start_controls_section(
	'section_style_other_buttons',
	array(
		'label' => __( 'Other Buttons', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_control(
	'remove_button_heading',
	array(
		'label' => __( 'Remove Button', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	)
);

$this->add_control(
	'remove_button_color',
	array(
		'label'     => __( 'Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-remove-btn' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'remove_button_hover_color',
	array(
		'label'     => __( 'Hover Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-remove-btn:hover' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'clear_all_heading',
	array(
		'label'     => __( 'Clear All Button', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'clear_all_typography',
		'selector' => '{{WRAPPER}} .ggmc-compare-clear-btn',
	)
);

$this->add_control(
	'clear_all_color',
	array(
		'label'     => __( 'Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-compare-clear-btn' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'clear_all_hover_color',
	array(
		'label'     => __( 'Hover Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-compare-clear-btn:hover' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Rating Stars Style (using shared controls)
GGM_Rating_Stars_Controls::register(
	$this,
	array(
		'selector'        => '.ggmc-comparison-rating .rating-stars',
		'star_selector'   => '.star',
		'filled_selector' => '.star.filled',
		'empty_selector'  => '.star.empty',
		'prefix'          => 'rating',
		'section_id'      => 'section_style_rating',
		'section_label'   => __( 'Rating Stars', 'ggm-commerce' ),
		'include_text'    => true,
		'text_selector'   => '.ggmc-comparison-rating .rating-value',
	)
);

// Image Style
$this->start_controls_section(
	'section_style_image',
	array(
		'label' => __( 'Product Image', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_responsive_control(
	'image_size',
	array(
		'label'      => __( 'Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array(
				'min' => 60,
				'max' => 300,
			),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-image' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'image_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-image, {{WRAPPER}} .ggmc-comparison-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'image_background',
	array(
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-image' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'no_image_icon_heading',
	array(
		'label'     => __( 'No Image Placeholder', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_control(
	'no_image_icon_size',
	array(
		'label'      => __( 'Icon Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array(
				'min' => 16,
				'max' => 80,
			),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-image .ggmc-no-image' => 'font-size: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'no_image_icon_color',
	array(
		'label'     => __( 'Icon Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-image .ggmc-no-image' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Empty State Style
$this->start_controls_section(
	'section_style_empty_state',
	array(
		'label' => __( 'Empty State', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_control(
	'empty_state_background',
	array(
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-empty' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_responsive_control(
	'empty_state_padding',
	array(
		'label'      => __( 'Padding', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-empty' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'empty_state_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-empty' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'empty_icon_heading',
	array(
		'label'     => __( 'Icon', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_control(
	'empty_state_icon',
	array(
		'label'   => __( 'Icon', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::ICONS,
		'default' => array(
			'value'   => 'eicon-exchange',
			'library' => 'eicons',
		),
	)
);

$this->add_control(
	'empty_icon_size',
	array(
		'label'      => __( 'Icon Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array(
				'min' => 24,
				'max' => 120,
			),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-empty-icon' => 'font-size: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'empty_icon_color',
	array(
		'label'     => __( 'Icon Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-empty-icon' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'empty_message_heading',
	array(
		'label'     => __( 'Message', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'empty_message_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-empty-message',
	)
);

$this->add_control(
	'empty_message_color',
	array(
		'label'     => __( 'Message Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-empty-message' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'empty_cta_heading',
	array(
		'label'     => __( 'CTA Button', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'empty_cta_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-cta-btn',
	)
);

$this->add_control(
	'empty_cta_background',
	array(
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-cta-btn' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'empty_cta_text_color',
	array(
		'label'     => __( 'Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-cta-btn' => 'color: {{VALUE}};',
		),
	)
);

$this->add_responsive_control(
	'empty_cta_padding',
	array(
		'label'      => __( 'Padding', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-cta-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'empty_cta_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', 'em', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-cta-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'empty_cta_hover_background',
	array(
		'label'     => __( 'Hover Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-cta-btn:hover' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'empty_cta_hover_text_color',
	array(
		'label'     => __( 'Hover Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-cta-btn:hover' => 'color: {{VALUE}};',
		),
	)
);

$this->end_controls_section();

// Custom Attributes Style (using shared controls)
GGM_Attribute_Display_Controls::register(
	$this,
	array(
		'icon_selector'  => '.ggmc-attr-icon',
		'label_selector' => '.ggmc-attr-name',
		'value_selector' => '.ggmc-comparison-table td.ggmc-attr-value',
		'unit_selector'  => '.ggmc-attr-unit',
		'prefix'         => 'attr',
		'section_id'     => 'section_style_custom_attributes',
		'section_label'  => __( 'Custom Attributes', 'ggm-commerce' ),
		'include_icon'   => true,
		'condition'      => array( 'show_custom_attributes' => 'yes' ),
	)
);

// Add More Products Style
$this->start_controls_section(
	'section_style_add_more',
	array(
		'label' => __( 'Add More Products Button', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'add_more_typography',
		'selector' => '{{WRAPPER}} .ggmc-comparison-add-more-btn',
	)
);

$this->add_control(
	'add_more_color',
	array(
		'label'     => __( 'Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-add-more-btn' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'add_more_hover_color',
	array(
		'label'     => __( 'Hover Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-comparison-add-more-btn:hover' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'add_more_icon_heading',
	array(
		'label'     => __( 'Icon', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	)
);

$this->add_control(
	'add_more_icon',
	array(
		'label'   => __( 'Icon', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::ICONS,
		'default' => array(
			'value'   => 'eicon-plus-circle',
			'library' => 'eicons',
		),
	)
);

$this->add_control(
	'add_more_icon_size',
	array(
		'label'      => __( 'Icon Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px', 'em' ),
		'range'      => array(
			'px' => array(
				'min' => 8,
				'max' => 32,
			),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-add-more-btn i'   => 'font-size: {{SIZE}}{{UNIT}};',
			'{{WRAPPER}} .ggmc-comparison-add-more-btn svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->add_control(
	'add_more_icon_spacing',
	array(
		'label'      => __( 'Icon Spacing', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array(
				'min' => 0,
				'max' => 20,
			),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-comparison-add-more-btn i, {{WRAPPER}} .ggmc-comparison-add-more-btn svg' => 'margin-right: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->end_controls_section();
