<?php
/**
 * Wishlist Widget - Style Controls
 *
 * @package GGM_Commerce
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// $this is the GGM_Commerce_Widget_Wishlist instance.

// ── Title ─────────────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_title',
	array(
		'label'     => __( 'Title', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array(
			'show_title' => 'yes',
		),
	)
);

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

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

$this->add_control(
	'title_count_color',
	array(
		'label'     => __( 'Count Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-title .ggmc-wishlist-count' => 'color: {{VALUE}};',
		),
	)
);

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

$this->end_controls_section();

// ── Wishlist Tabs ─────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_tabs',
	array(
		'label'     => __( 'Wishlist Tabs', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array(
			'wishlist_mode' => 'all',
		),
	)
);

$this->add_control(
	'tabs_background_color',
	array(
		'label'     => __( 'Tabs Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tabs-nav' => 'background-color: {{VALUE}};',
		),
	)
);

$this->start_controls_tabs( 'tabs_style_tabs' );

$this->start_controls_tab(
	'tab_normal',
	array( 'label' => __( 'Normal', 'ggm-commerce' ) )
);

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

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

$this->add_control(
	'tab_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->start_controls_tab(
	'tab_hover',
	array( 'label' => __( 'Hover', 'ggm-commerce' ) )
);

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

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

$this->add_control(
	'tab_hover_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab:hover' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->start_controls_tab(
	'tab_active',
	array( 'label' => __( 'Active', 'ggm-commerce' ) )
);

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

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

$this->add_control(
	'tab_active_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab.active' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->end_controls_tabs();

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'      => 'tab_typography',
		'label'     => __( 'Typography', 'ggm-commerce' ),
		'selector'  => '{{WRAPPER}} .ggmc-wishlist-tab',
		'separator' => 'before',
	)
);

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

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

$this->add_responsive_control(
	'tabs_gap',
	array(
		'label'      => __( 'Tabs Gap', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array( 'min' => 0, 'max' => 30 ),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-tabs-nav' => 'gap: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->end_controls_section();

// ── Table ─────────────────────────────────────────────────────────────────────

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

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

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'table_border',
		'label'    => __( 'Border', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-table',
	)
);

$this->add_responsive_control(
	'table_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-table' => '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',
		'label'    => __( 'Box Shadow', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-table',
	)
);

$this->end_controls_section();

// ── Header ────────────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_header',
	array(
		'label'     => __( 'Header', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'layout' => 'table' ),
	)
);

$this->add_control(
	'header_background_color',
	array(
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-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-wishlist-table thead th' => 'color: {{VALUE}};',
		),
	)
);

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

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

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'header_border',
		'label'    => __( 'Border', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-table thead th',
	)
);

$this->end_controls_section();

// ── Row ───────────────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_row',
	array(
		'label'     => __( 'Row', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'layout' => 'table' ),
	)
);

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

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

$this->add_control(
	'enable_striped_rows',
	array(
		'label'        => __( 'Enable Striped Rows', 'ggm-commerce' ),
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'label_on'     => __( 'Yes', 'ggm-commerce' ),
		'label_off'    => __( 'No', 'ggm-commerce' ),
		'return_value' => 'yes',
		'default'      => 'no',
		'description'  => __( 'Alternate row background colors for better readability', 'ggm-commerce' ),
	)
);

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

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

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'     => 'row_typography',
		'label'    => __( 'Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-table tbody td',
	)
);

$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-wishlist-table td' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'cell_border',
		'label'    => __( 'Cell Border', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-table td',
	)
);

$this->add_control(
	'row_hover_lift',
	array(
		'label'        => __( 'Hover Lift Effect', 'ggm-commerce' ),
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'label_on'     => __( 'Yes', 'ggm-commerce' ),
		'label_off'    => __( 'No', 'ggm-commerce' ),
		'return_value' => 'yes',
		'default'      => 'no',
		'separator'    => 'before',
	)
);

$this->add_responsive_control(
	'row_hover_lift_offset',
	array(
		'label'      => __( 'Lift Offset', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array( 'min' => 0, 'max' => 20 ),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-table tbody tr:hover' => 'transform: translateY(-{{SIZE}}{{UNIT}});',
		),
		'condition'  => array(
			'row_hover_lift' => 'yes',
		),
	)
);

$this->end_controls_section();

// ── Items (grid / list) ───────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_items',
	array(
		'label'     => __( 'Items', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'layout!' => 'table' ),
	)
);

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

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

$this->add_group_control(
	\Elementor\Group_Control_Border::get_type(),
	array(
		'name'     => 'item_border',
		'label'    => __( 'Border', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-item',
	)
);

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

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

$this->add_group_control(
	\Elementor\Group_Control_Box_Shadow::get_type(),
	array(
		'name'     => 'item_box_shadow',
		'label'    => __( 'Box Shadow', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-item',
	)
);

$this->add_group_control(
	\Elementor\Group_Control_Box_Shadow::get_type(),
	array(
		'name'     => 'item_hover_box_shadow',
		'label'    => __( 'Hover Box Shadow', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-wishlist-item:hover',
	)
);

$this->add_responsive_control(
	'grid_gap',
	array(
		'label'      => __( 'Gap', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array( 'min' => 0, 'max' => 50 ),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-grid' => 'gap: {{SIZE}}{{UNIT}};',
			'{{WRAPPER}} .ggmc-wishlist-list' => 'gap: {{SIZE}}{{UNIT}};',
		),
	)
);

$this->end_controls_section();

// ── Add to Cart Button ────────────────────────────────────────────────────────

if ( class_exists( 'GGM_Add_To_Cart_Controls' ) ) {
	GGM_Add_To_Cart_Controls::register(
		$this,
		array(
			'selector'      => '.ggmc-wishlist-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' ),
		)
	);
}

// ── Remove Button ─────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_remove_button',
	array(
		'label'     => __( 'Remove Button', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'show_remove_button' => 'yes' ),
	)
);

$this->start_controls_tabs( 'remove_button_tabs' );

$this->start_controls_tab(
	'remove_button_normal_tab',
	array( 'label' => __( 'Normal', 'ggm-commerce' ) )
);

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

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

$this->end_controls_tab();

$this->start_controls_tab(
	'remove_button_hover_tab',
	array( 'label' => __( 'Hover', 'ggm-commerce' ) )
);

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

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

$this->end_controls_tab();

$this->end_controls_tabs();

$this->add_responsive_control(
	'remove_button_size',
	array(
		'label'      => __( 'Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => array( 'px' ),
		'range'      => array(
			'px' => array( 'min' => 20, 'max' => 60 ),
		),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-remove' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		),
		'separator'  => 'before',
	)
);

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

$this->end_controls_section();

// ── Clear All Button ──────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_clear_all',
	array(
		'label'     => __( 'Clear All Button', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'show_clear_all' => 'yes' ),
	)
);

$this->start_controls_tabs( 'clear_all_button_tabs' );

$this->start_controls_tab(
	'clear_all_normal_tab',
	array( 'label' => __( 'Normal', 'ggm-commerce' ) )
);

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

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

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

$this->end_controls_tab();

$this->start_controls_tab(
	'clear_all_hover_tab',
	array( 'label' => __( 'Hover', 'ggm-commerce' ) )
);

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

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

$this->add_control(
	'clear_all_hover_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-clear-all:hover' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->end_controls_tabs();

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'      => 'clear_all_typography',
		'label'     => __( 'Typography', 'ggm-commerce' ),
		'selector'  => '{{WRAPPER}} .ggmc-wishlist-clear-all',
		'separator' => 'before',
	)
);

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

$this->add_responsive_control(
	'clear_all_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-clear-all' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->end_controls_section();

// ── Share Button ──────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_share',
	array(
		'label'     => __( 'Share Button', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'show_sharing' => 'yes' ),
	)
);

$this->start_controls_tabs( 'share_button_tabs' );

$this->start_controls_tab(
	'share_normal_tab',
	array( 'label' => __( 'Normal', 'ggm-commerce' ) )
);

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

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

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

$this->end_controls_tab();

$this->start_controls_tab(
	'share_hover_tab',
	array( 'label' => __( 'Hover', 'ggm-commerce' ) )
);

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

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

$this->add_control(
	'share_hover_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-share-btn:hover' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->end_controls_tabs();

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'      => 'share_typography',
		'label'     => __( 'Typography', 'ggm-commerce' ),
		'selector'  => '{{WRAPPER}} .ggmc-wishlist-share-btn',
		'separator' => 'before',
	)
);

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

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

$this->end_controls_section();

// ── Action Buttons ────────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_action_buttons',
	array(
		'label'     => __( 'Action Buttons', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array( 'wishlist_mode!' => 'default' ),
	)
);

$this->start_controls_tabs( 'action_button_tabs' );

$this->start_controls_tab(
	'action_normal_tab',
	array( 'label' => __( 'Normal', 'ggm-commerce' ) )
);

$this->add_control(
	'action_button_color',
	array(
		'label'     => __( 'Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'action_button_background',
	array(
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'action_button_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->start_controls_tab(
	'action_hover_tab',
	array( 'label' => __( 'Hover', 'ggm-commerce' ) )
);

$this->add_control(
	'action_button_hover_color',
	array(
		'label'     => __( 'Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button:hover, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button:hover' => 'color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'action_button_hover_background',
	array(
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button:hover, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button:hover' => 'background-color: {{VALUE}};',
		),
	)
);

$this->add_control(
	'action_button_hover_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button:hover, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button:hover' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->end_controls_tabs();

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'      => 'action_button_typography',
		'label'     => __( 'Typography', 'ggm-commerce' ),
		'selector'  => '{{WRAPPER}} .ggmc-wishlist-tab-actions button, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button',
		'separator' => 'before',
	)
);

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

$this->add_responsive_control(
	'action_button_border_radius',
	array(
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => array( 'px', '%' ),
		'selectors'  => array(
			'{{WRAPPER}} .ggmc-wishlist-tab-actions button, {{WRAPPER}} .ggmc-wishlist-dropdown-actions button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		),
	)
);

$this->end_controls_section();

// ── Management Buttons ────────────────────────────────────────────────────────

$this->start_controls_section(
	'section_style_management',
	array(
		'label'     => __( 'Management Buttons', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => array(
			'wishlist_mode!'  => 'default',
			'show_management' => 'yes',
		),
	)
);

$this->start_controls_tabs( 'management_button_tabs' );

$this->start_controls_tab(
	'management_normal_tab',
	array( 'label' => __( 'Normal', 'ggm-commerce' ) )
);

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

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

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

$this->end_controls_tab();

$this->start_controls_tab(
	'management_hover_tab',
	array( 'label' => __( 'Hover', 'ggm-commerce' ) )
);

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

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

$this->add_control(
	'management_button_hover_border_color',
	array(
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => array(
			'{{WRAPPER}} .ggmc-wishlist-management-btn:hover' => 'border-color: {{VALUE}};',
		),
	)
);

$this->end_controls_tab();

$this->end_controls_tabs();

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	array(
		'name'      => 'management_button_typography',
		'label'     => __( 'Typography', 'ggm-commerce' ),
		'selector'  => '{{WRAPPER}} .ggmc-wishlist-management-btn',
		'separator' => 'before',
	)
);

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

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

$this->end_controls_section();
