<?php

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

/**
 * Expose selected options to js
 */
add_filter( 'shrk_redux_options_to_js', function( $redux_options ) {
	$redux_options[] = 'woo_related_as_slider';
	$redux_options[] = 'woo_related_slider_visible_slides';
	$redux_options[] = 'woo_shop_columns_grid';
	$redux_options[] = 'woo_notices_hide_timeout';
	return $redux_options;
});






function woo_shrk_redux_options( $sections ) {

	$shrk_page_sections  = shrk_redux_get_page_sections();
	$page_layout_options = shrk_redux_get_page_layout_options();
	$cart_icons          = array(
			'ion-bag'    => array(
					'alt' => esc_html__( 'Ion icons Bag icon', 'ux-shop' ),
					'img' => SHRK_ADMIN_IMG_URI . '/ion-bag.png'
				),
			'ion-ios-cart'    => array(
					'alt' => esc_html__( 'Ion icons ios cart icon', 'ux-shop' ),
					'img' => SHRK_ADMIN_IMG_URI . '/ion-ios-cart.png'
				),
			'ion-ios-cart-outline'    => array(
					'alt' => esc_html__( 'Ion icons ios cart icon outline', 'ux-shop' ),
					'img' => SHRK_ADMIN_IMG_URI . '/ion-ios-cart-outline.png'
				),
			'ion-android-cart'    => array(
					'alt' => esc_html__( 'Ion icons android cart icon', 'ux-shop' ),
					'img' => SHRK_ADMIN_IMG_URI . '/ion-android-cart.png'
				),
		);

	$sections[] = array(
		'title' => esc_html__( 'Shop', 'ux-shop' ),
		'icon'  => 'el el-shopping-cart',
		'fields' => array()
	);

	$sections[] = array(
		'title' => esc_html__( 'General', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id' => 'woo_header_cart_icon',
				'type' => 'image_select',
				'options' => $cart_icons,
				'title' => esc_html__( 'Header cart icon', 'ux-shop'),
				'default' => 'ion-bag',
			),
			array(
				'id'       => 'woo-cart-info-warning',
				'type'     => 'info',
				'style'    => 'warning',
				'title'    => esc_html__( 'Please note', 'ux-shop' ),
				'desc'     => esc_html__( 'You selected the \'Side panel\' option. The sidepanel is a widget area. In order for the shopping cart to appear in it, you have to add it through the Widget settings to the appropriate widget area, if you haven\'t already.', 'ux-shop' ),
				'required' => array('woo_cart_display', '=', 'side'),
			),
			array(
				'id'       => 'woo-cart-info-warning-b',
				'type'     => 'info',
				'style'    => 'warning',
				'title'    => esc_html__( 'Please note', 'ux-shop' ),
				'desc'     => esc_html__( 'You selected the \'Auto\' option. The sidepanel is a widget area. In order for the shopping cart to appear in it, you have to add it through the Widget settings to the appropriate widget area, if you haven\'t already.', 'ux-shop' ),
				'required' => array('woo_cart_display', '=', 'auto'),
			),
			array(
				'id'         => 'woo_cart_display',
				'type'       => 'button_set',
				'title'      => esc_html__('Show shopping cart as', 'ux-shop'),
				'desc'       => esc_html__('All options except \'none\' will show the cart icon in the header. The dropdown if selected appears when hovering the cart icon, the side panel if selected appears after clicking the cart icon. Selecting \'Auto\' will show the dropdown on desktop and the sidepanel in smaller screens.', 'ux-shop'),
				'options'    => array(
					'auto' 		=> esc_html__( 'Auto', 'ux-shop' ), 
					'none' 		=> esc_html__( 'None', 'ux-shop' ), 
					'dropdown' 	=> esc_html__( 'Dropdown', 'ux-shop' ), 
					'side' 		=> esc_html__( 'Side panel', 'ux-shop' )
				), 
				'default'    => 'auto'
			),
			array(
				'id'      => 'auto_show_cart',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Popup shopping cart', 'ux-shop' ),
				'desc'    => esc_html__( 'Automatically Scroll to and show shopping cart when customer adds a product to the basket (on archive pages).', 'ux-shop' ),
				'default' => 1,
			),
			array(
				'id'      => 'woo_notices_floating',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Shop notices always on screen bottom', 'ux-shop' ),
				'desc'    => esc_html__( 'Show all shop notices stickied at the bottom of the screen. If set to No only notices on non-WooCommerce pages will show at the bottom of the screen.', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id'      => 'woo_notices_hide_timeout',
				'type'    => 'spinner',
				'title'   => esc_html__( 'Popup notices timeout', 'ux-shop' ),
				'desc'    => esc_html__( 'Auto hide the popup shop notices after this number of seconds. When set to 0 auto-hiding is disabled.', 'ux-shop' ),
				'default' => '10',
				'min'     => '0',
				'step'    => '1',
				'max'     => '600',
			),
		) 
	);

	$sections[] = array(
		'title' => esc_html__( 'Page header', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id'      => 'product_page_cover_enabled',
				'type'    => 'switch',
				'title'   => esc_html__( 'Single Product cover', 'ux-shop'),
				'on'      => esc_html__( 'Show', 'ux-shop' ),
				'off'     => esc_html__( 'Hide', 'ux-shop' ),
				'desc'    => esc_html__( 'Enable or disable the page cover for the single product view.', 'ux-shop' ),
				'default' => 1,
				),
			array(
				'id'     => 'single_pagecover_section-start',
				'type'   => 'section',
				'title'  => esc_html__('Single product page cover options', 'ux-shop'),
				'indent' => true,
				'required' => array('product_page_cover_enabled', '=', 1),
				),
			array(
				'id'       => 'cover_thumbnail_fallback',
				'type'     => 'switch',
				'title'    => esc_html__( 'Product thumbnail fallback', 'ux-shop'),
				'on'       => esc_html__( 'Yes', 'ux-shop' ),
				'off'      => esc_html__( 'No', 'ux-shop' ),
				'desc'     => esc_html__( 'Use the product thumbnail as a fallback if the cover image is not set for a product.', 'ux-shop' ),
				'default'  => 0,
				'required' => array('product_page_cover_enabled', '=', 1),

				),
			array(
				'id'       => 'product_cover_hide_when_noimage',
				'type'     => 'switch',
				'title'    => esc_html__( 'Hide cover without image', 'ux-shop'),
				'on'       => esc_html__( 'Yes', 'ux-shop' ),
				'off'      => esc_html__( 'No', 'ux-shop' ),
				'desc'     => esc_html__( 'Completely hide the product\'s page cover when no cover image is available.', 'ux-shop' ),
				'default'  => 1,
				'required' => array('product_page_cover_enabled', '=', 1),
				),
			array(
				'id'      => 'hide_cover_page_header_product_singular',
				'type'    => 'switch',
				'title'   => esc_html__( 'Hide title', 'ux-shop'),
				'on'      => esc_html__( 'Hide', 'ux-shop' ),
				'off'     => esc_html__( 'Show', 'ux-shop' ),
				'desc'    => esc_html__( 'Hide the page header text (the title) from the page cover. Leave only the background image.', 'ux-shop' ),
				'default' => 0,
				),
			array(
				'id'         => 'cover_height_mode_product_singular',
				'type'       => 'button_set',
				'title'      => esc_html__('Set cover height', 'ux-shop'),
				'desc'       => esc_html__('Select how the page cover height is calculated.', 'ux-shop'),
				'options'    => array(
					'paddingheight' => esc_html__( 'Contents+padding', 'ux-shop' ), 
					'windowheight'  => esc_html__( 'Window Height', 'ux-shop' ), 
					'customheight'  => esc_html__( 'Custom', 'ux-shop' )
				), 
				'default'    => 'paddingheight',
				'required' => array('product_page_cover_enabled', '=', 1),
			),
			array(
				'id'             => 'cover_padding_product_singular',
				'type'           => 'spacing',
				'mode'           => 'padding',
				'units'          => array('em', 'px'),
				'units_extended' => 'true',
				'title'          => esc_html__( 'Page cover padding', 'ux-shop'),
				'desc'           => esc_html__( 'The padding you set here, plus the height of the content (titles, etc) will set the height of the page cover.', 'ux-shop' ),
				'left'           => false,
				'right'          => false,
				'default'        => array(
					'padding-top'    => '18em',
					'padding-bottom' => '14em', 
					'units'          => 'em',
					),
				'required' => array(
					array( 'cover_height_mode_product_singular', '=', 'paddingheight' ),
					array( 'product_page_cover_enabled', '=', 1 )
					),
				),
			array(
				'id'       => 'cover_custom_height_product_singular',
				'type'     => 'text',
				'title'    => esc_html__( 'Custom height value', 'ux-shop'),
				'desc'     => esc_html__('Enter a valid css value, eg 500px, 15em, or a percentage which will be calculated relative to the window size. For example entering 70% will make the page cover 70% of the window height.', 'ux-shop'),
				'default'  => '70%',
				'required' => array(
					array( 'cover_height_mode_product_singular', '=', 'customheight' ),
					array( 'product_page_cover_enabled', '=', 1 )
					),
				),
			array(
				'id'     => 'single_pagecover_section-end',
				'type'   => 'section',
				'indent' => false,
				),
			array(
				'id'         => 'woo_shoppage_afterheader',
				'type'       => 'button_set',
				'title'      => esc_html__('Shop page links below header', 'ux-shop'),
				'options'    => array(
					'categories' => esc_html__( 'Categories', 'ux-shop' ), 
					'menu'       => esc_html__( 'Custom menu', 'ux-shop' ), 
					'none'       => esc_html__( 'None', 'ux-shop' ), 
					), 
				'default'    => 'categories'
				),
			array(
				'id'       => 'woo_shoppage_afterheader_menu',
				'type'     => 'select',
				'data'     => 'menus',
				'title'    => esc_html__( 'Source menu for shop page', 'ux-shop' ),
				'required' => array('woo_shoppage_afterheader', '=', 'menu'),
				),
			array(
				'id'         => 'woo_products_afterheader',
				'type'       => 'button_set',
				'title'      => esc_html__('Product archives links below header', 'ux-shop'),
				'options'    => array(
					'categories' => esc_html__( 'Categories', 'ux-shop' ), 
					'menu'       => esc_html__( 'Custom menu', 'ux-shop' ), 
					'none'       => esc_html__( 'None', 'ux-shop' ), 
					), 
				'default'    => 'categories'
				),
			array(
				'id'       => 'woo_products_afterheader_menu',
				'type'     => 'select',
				'data'     => 'menus',
				'title'    => esc_html__( 'Source menu for products archive', 'ux-shop' ),
				'required' => array('woo_products_afterheader', '=', 'menu'),
				),
			array(
				'id'         => 'woo_afterheader_position',
				'type'       => 'button_set',
				'title'      => esc_html__('\'Links below header\' position', 'ux-shop'),
				'options'    => array(
					'normal' => esc_html__( 'After title', 'ux-shop' ), 
					'bottom' => esc_html__( 'Bottom edge', 'ux-shop' ), 
					), 
				'default'    => 'normal'
				),
			array(
				'id' => 'notice_cover_header_fade_incompat2',
				'type' => 'info',
				'notice' => true,
				'style' => 'critical',
				'icon'  => 'el el-chevron-up',
				'title' => esc_html__('Warning', 'ux-shop'),
				'desc' => esc_html__('This option is not compatible with the \'Fade out header\' option in Header\Page Cover options. Please change one of the two options', 'ux-shop'),
				'required' => array(
					array( 'cover_header_fade', '=', 1 ),
					array( 'woo_afterheader_position', '=', 'bottom' )
					),
			),
			array(
				'id'=>'woo_afterheader_background',
				'type' => 'color_rgba',
				'title' => esc_html__( '\'Links below header\' background color', 'ux-shop' ), 
				'default' => array( 'color' => '#000000', 'alpha' => '0.7' ),
				'mode' => 'background-color',
				'output' => array(
					'background-color'	=> '
					.page-cover.bottom-nav .page-header ul.categories, 
					.page-cover.bottom-nav .page-header ul.nav'
					),
				'validate' => 'colorrgba',
				'required' => array('woo_afterheader_position', '=', 'bottom'),
				),	
		)
	);

	$sections[] = array(
		'title' => esc_html__( 'Layout', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id'       => 'shop_width_max_grid',
				'type'     => 'dimensions',
				'units'    => array('px','%'),
				'height'   => false,
				'title'    => esc_html__('Shop content Grid width', 'ux-shop'),
				'desc'     => esc_html__('Override the global `Site grid width` setting. This affects the shop page and the product categories. Leave empty to use the global value from `General \ Layout`', 'ux-shop'),
				'default'  => array(
					'width'   => ''
				),
			),
			array(
				'id'      => 'page_layout_product',	//mso_var
				'type'    => 'image_select',
				'options' => $page_layout_options,
				'title'   => esc_html__( 'Products archive layout', 'ux-shop' ),
				'desc'    => esc_html__( 'Select the default layout for product (archive) pages.', 'ux-shop' ),
				'default' => 'no_sidebar',
				),
			array(
				'id'       => 'pagesections_product',	// TODO mso_var
				'type'     => 'select',
				'title'    => esc_html__( 'Section header for shop pages (archive)', 'ux-shop' ),
				'desc'     => esc_html__( 'Select the section to show as header of the Shop products pages.', 'ux-shop' ),
				'class'    => 'require-pagesections-posttype',
				'options'  => $shrk_page_sections
			),
			array(
				'id'      => 'page_layout_product_singular',	//mso_var
				'type'    => 'image_select',
				'options' => $page_layout_options,
				'title'   => esc_html__( 'Single product layout', 'ux-shop' ),
				'desc'    => esc_html__( 'Select the default layout for single product pages.', 'ux-shop' ),
				'default' => 'no_sidebar',
				),
			array(
				'id'    =>'woo_shop_columns_grid',
				'type'  => 'multi_bp_select',
				'title' => esc_html__('Shop Columns grid', 'ux-shop'),
				'desc'  => esc_html__('Customize the number of columns shown for each screen width. The order is important and the first line should always have the largest number and the \'At least\' setting, refer to the documentation for more. Leave the defaults if you are not sure.', 'ux-shop'),
				'default' => array(
						array(
							'opr'   => 'min',
							'width' => '1201',
							'cols'  => '3',
						),
						array(
							'opr'   => 'max',
							'width' => '1200',
							'cols'  => '3',
						),
						array(
							'opr'   => 'max',
							'width' => '992',
							'cols'  => '2',
						),
						array(
							'opr'   => 'max',
							'width' => '768',
							'cols'  => '2',
						),
						array(
							'opr'   => 'max',
							'width' => '480',
							'cols'  => '1',
						),
					),
			    ),
		) 
	);

	$sections[] = array(
		'title' => esc_html__( 'Shop style', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id'         => 'woo_products_style_view',
				'type'       => 'button_set',
				'title'      => esc_html__('Products grid or list', 'ux-shop'),
				'options'    => array(
					'grid'   => esc_html__( 'Grid', 'ux-shop' ), 
					'list'   => esc_html__( 'List', 'ux-shop' ), 
					'manual' => esc_html__( 'User\'s choice', 'ux-shop' ), 
					), 
				'desc'    => esc_html__( 'You can select a default view as a list, as a grid, or show a set of buttons and let the user decide. The user\'s decision is stored in a cookie in the visitors browser so he/she won\'t have to select their preference every time.', 'ux-shop' ),
				'default'    => 'grid'
				),
			array(
				'id'=>'woo_meta_bg_products_list_color',
				'type' => 'color_rgba',
				'title' => esc_html__( 'List view meta background color', 'ux-shop' ), 
				'default' => array( 'color' => '#FFFFFF', 'alpha' => '0' ),
				'required' => array('woo_products_style_view', '!=', 'grid'),
				),	
			array(
				'id'      => 'woo_slides_image_grid',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Images Slider in products', 'ux-shop' ),
				'desc'    => esc_html__( 'Enable to show a slider with product\'s images instead of a single image (replaced by the second image on mouse hover) in the category view of products.', 'ux-shop' ),
				'default' => 1,
			),
			array(
				'id'      => 'woo_transparent_products',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Transparent products meta & title.', 'ux-shop' ),
				'desc'    => esc_html__( 'Places the title, price, icons etc in a transparent container over the product image (Affects all product loop locations, but not the list view.).', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id'      => 'woo_isolate_product_on_hover',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Hovered Stands out', 'ux-shop' ),
				'desc'    => esc_html__( 'If turned on, the product under the mouse is shown and the rest are faded. Affects all grid-like product locations.', 'ux-shop' ),
				'default' => 1,
			),
			array(
				'id'      => 'woo_meta_bg_products',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Product meta with background', 'ux-shop' ),
				'desc'    => esc_html__( 'Show a background (set the color below) behind the product meta. Doesn\'t affect the list view.', 'ux-shop' ),
				'default' => 0,
				'required' => array('woo_transparent_products', '=', 1),
			),
			array(
				'id'=>'woo_meta_bg_products_color',
				'type' => 'color_rgba',
				'title' => esc_html__( 'Product meta background color', 'ux-shop' ), 
				'default' => array( 'color' => '#FFFFFF', 'alpha' => '0.7' ),
				'mode' => 'background-color',
				'output' => array(
					'background-color'	=> '
					.products-transparent .woocommerce.products-meta-bg ul.products li.product .product-meta-wrapper .product-meta, 
					.products-transparent .woocommerce.products-meta-bg ul.products li.product .product-meta-wrapper .yith-wcqv-button, 
					.woocommerce.products-transparent.products-meta-bg ul.products li.product .product-meta-wrapper .product-meta,
					.woocommerce.products-transparent.products-meta-bg ul.products li.product .product-meta-wrapper .yith-wcqv-button'
					),
				'validate' => 'colorrgba',
				'required' => array('woo_meta_bg_products', '=', 1),
				),	
			array(
				'id'      => 'woo_hovershadow_products',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Show a shadow behind a product when hovering over it.', 'ux-shop' ),
				'desc'    => esc_html__( 'This effect is visible only on the product in the shop page and the product category pages.', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id'      => 'woo_hovermeta_products',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Show product meta only on hover.', 'ux-shop' ),
				'desc'    => esc_html__( 'On touch devices this is ignored since there is no actual hover action.', 'ux-shop' ),
				'default' => 0,
				'required' => array('woo_products_style_view', '=', 'grid'),
			),
			array(
				'id'      => 'woo_transparent_product_images',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Optimize for transparent product images.', 'ux-shop' ),
				'desc'    => esc_html__( 'If your product images have a transparent background (usually PNG\'s), enable this.', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id' => 'woo_products_loop_style',
				'type' => 'image_select',
				'options' => array(
					'products-style-a'    => array(
							'alt' => esc_html__( 'Style A', 'ux-shop' ),
							'img' => SHRK_ADMIN_IMG_URI . '/product-style-a.png'
						),
					'products-style-b'    => array(
							'alt' => esc_html__( 'Style B', 'ux-shop' ),
							'img' => SHRK_ADMIN_IMG_URI . '/product-style-b.png'
						),
					),
				'title' => esc_html__( 'Products style', 'ux-shop'),
				'default' => 'products-style-a',
				),
			array(
				'id'      => 'woo_product_badges_style',
				'type'    => 'image_select',
				'options' => array(
					'badges-style-a'    => array(
							'alt' => esc_html__( 'Style A', 'ux-shop' ),
							'img' => SHRK_ADMIN_IMG_URI . '/badge-style-a.png'
						),
					'badges-style-b'    => array(
							'alt' => esc_html__( 'Style B', 'ux-shop' ),
							'img' => SHRK_ADMIN_IMG_URI . '/badge-style-b.png'
						),
					),
				'title'   => esc_html__( 'Product Badges style', 'ux-shop'),
				'default' => 'badges-style-a',
				),
			array(
				'id' => 'woo_loop_cart_icon',
				'type' => 'image_select',
				'options' => $cart_icons,
				'title' => esc_html__( 'Product add to cart icon', 'ux-shop'),
				'default' => 'ion-bag',
			),
			array(
				'id'     => 'woo_loop_categories_title_fg',
				'type'   => 'color',
				'title'  => esc_html__( 'Categories title foreground', 'ux-shop' ),
				'desc'   => esc_html__( 'This affects the text color of the category, in the shop loop.', 'ux-shop' ),
				'output' => array(
					'color' => '.woocommerce ul.products li.product.product-category h3, .woocommerce ul.products li.product.product-category .woocommerce-loop-category__title'
					),
				'mode' => 'color',
				'transparent' => false,
				'default' => '#CBC7C4',
			),	
			array(
				'id'     => 'woo_loop_categories_title_bg',
				'type'   => 'color_rgba',
				'title'  => esc_html__( 'Categories title background', 'ux-shop' ),
				'desc'   => esc_html__( 'This affects the colored band behind the title of the category, in the shop loop.', 'ux-shop' ),
				'mode' => 'background-color',
				'validate' => 'colorrgba',
				'default' => array( 'color' => '#FFFFFF', 'alpha' => '0.9' ),
			),	
			array(
				'id'      => 'woo_custom_smallthumb_size',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Use custom small thumbnail size', 'ux-shop' ),
				'desc'    => wp_kses( __( 'Assign a separate image size to the image thumbnails in single product view. After changing this setting or the settings below you may need to <a href=\'https://wordpress.org/plugins/regenerate-thumbnails/\' target=\'_blank\'>regenerate</a> your thumbnails.', 'ux-shop'), shrk_kses_allowed( 'link' ) ),
				'default' => 0,
			),
			array(
				'id'     => 'woo_custom_smallthumb_size-start',
				'type'   => 'section',
				'indent' => true 
			),
			array(
				'id'      => 'woo_custom_smallthumb_width',
				'min'     => '1',
				'step'    => '1',
				'max'     => '500',
				'type'    => 'slider',
				'title'   => esc_html__( 'Thumbnail width', 'ux-shop'),
				'default' => '150',
				'required' => array('woo_custom_smallthumb_size', '=', 1),
			),
			array(
				'id'      => 'woo_custom_smallthumb_height',
				'min'     => '1',
				'step'    => '1',
				'max'     => '500',
				'type'    => 'slider',
				'title'   => esc_html__( 'Thumbnail height', 'ux-shop'),
				'default' => '150',
				'required' => array('woo_custom_smallthumb_size', '=', 1),
			),
			array(
				'id'      => 'woo_custom_smallthumb_crop',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Thumbnail crop', 'ux-shop' ),
				'default' => 1,
				'required' => array('woo_custom_smallthumb_size', '=', 1),
			),
			array(
				'id'     => 'woo_custom_smallthumb_size-end',
				'type'   => 'section',
				'indent' => false 
			),
		)
	);


	$sections[] = array(
		'title' => esc_html__( 'Colors', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id'     => 'woo_cta_colors_section-start',
				'type'   => 'section',
				'title'  => esc_html__('Color overrides for CTA buttons', 'ux-shop'),
				'indent' => true,
				),
			array(
				'id'      => 'woo_single_add2cart_button_colors',
				'type'    => 'button_color',
				'output'  => array( '.woocommerce div.product .form-cart-wrapper .button, .woocommerce div.product.product-type-variable .single_variation_wrap .button, .woocommerce div.product.product-type-variable .single_variation_wrap .button.disabled, .woocommerce div.product .form-cart-wrapper .button.disabled' ),
				'bg'      => true,
				'fg'      => true,
				'bghover' => true,
				'fghover' => true,
				'title'   => __('Add to cart button (Single product)', 'ux-shop'),
			),
			array(
				'id'      => 'woo_cart_checkout_button_colors',
				'type'    => 'button_color',
				'output'  => array( '.woocommerce-cart .wc-proceed-to-checkout a.checkout-button' ),
				'bg'      => true,
				'fg'      => true,
				'bghover' => true,
				'fghover' => true,
				'title'   => __('Proceed to checkout button (Cart)', 'ux-shop'),
			),
			array(
				'id'      => 'woo_checkout_placeorder_button_colors',
				'type'    => 'button_color',
				'output'  => array( '.woocommerce #payment #place_order, .woocommerce-page #payment #place_order' ),
				'bg'      => true,
				'fg'      => true,
				'bghover' => true,
				'fghover' => true,
				'title'   => __('Place order button (Checkout)', 'ux-shop'),
			array(
				'id'     => 'woo_cta_colors_section-start',
				'type'   => 'section',
				'indent' => false
				),
			),
		) 
	);

	$sections[] = array(
		'title' => esc_html__( 'Single product', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id'       => 'pagesections_product_singular', 
				'type'     => 'select',
				'title'    => esc_html__( 'Section header for single products', 'ux-shop' ),
				'desc'     => esc_html__( 'Select the section to show as header of single product pages.', 'ux-shop' ),
				'class'    => 'require-pagesections-posttype',
				'options'  => $shrk_page_sections
			),
			array(
				'id'      => 'woo_single_slider_arrows',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Hide Image slider arrows', 'ux-shop' ),
				'desc'    => esc_html__( 'In small screens with touch enabled don\'t show arrows on the image slider.', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id'      => 'woo_single_side_thumbs',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Thumbnails on the side', 'ux-shop' ),
				'desc'    => esc_html__( 'In single product, show thumbnails on the left of the main image, as opposed to below it. This is not compatible with the thumbnails slider from YITH Magnifier plugin.', 'ux-shop' ),
				'default' => 1,
			),
			array(
				'id'      => 'woo_single_show_qty_buttons',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Show quantity ( + / - ) buttons on single product &amp; cart page.', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id'      => 'woo_single_add2cart_stretch',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Stretch Add-to-cart button.', 'ux-shop' ),
				'desc'    => esc_html__( 'Make the Add-to-cart automatically stretch to fill the available space.', 'ux-shop' ),
				'default' => 0,
			),
			array(
				'id'      => 'woo_single_show_share_icons',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Show share icons on single product', 'ux-shop' ),
				'default' => 1,
			),
			array(
				'id'     => 'woo_single_product_meta_bg',
				'type'   => 'color',
				'title'  => esc_html__( 'Product meta background', 'ux-shop' ),
				'desc'   => esc_html__( 'This affects the small section containing the product meta data below product images and short description.', 'ux-shop' ),
				'output' => array(
					'background-color' => '.woocommerce div.product .single-meta-wrapper'
					),
				'mode' => 'background-color',
				'default' => '#FFFFFF',
			),	

			array(
				'id'      => 'woo_related_products_count',
				'type'    => 'spinner',
				'title'   => esc_html__( 'Related products', 'ux-shop' ),
				'desc'    => esc_html__( 'Set the number of related products you wish to show in the single product page.', 'ux-shop' ),
				'default' => '4',
				'min'     => '1',
				'step'    => '1',
				'max'     => '50',
			),
			array(
				'id'      => 'woo_related_as_slider',
				'on'      => esc_html__( 'Yes', 'ux-shop' ),
				'off'     => esc_html__( 'No', 'ux-shop' ),
				'type'    => 'switch',
				'title'   => esc_html__( 'Related products as slider', 'ux-shop' ),
				'default' => 1,
			),
			array(
				'id'      => 'woo_related_slider_visible_slides',
				'type'    => 'spinner',
				'title'   => esc_html__( 'Visible related products', 'ux-shop' ),
				'desc'    => esc_html__( 'Set how many products will be visible insinde the related products slider.', 'ux-shop' ),
				'default' => '3',
				'min'     => '1',
				'step'    => '1',
				'max'     => '10',
				'required' => array('woo_related_as_slider', '=', 1),
			),
		) 
	);

	$sections[] = array(
		'title' => esc_html__( 'Checkout', 'ux-shop'),
		'subsection' => true,
		'fields' => array(
			array(
				'id'      => 'woo_checkout_style',
				'type'    => 'select',
				'title'   => esc_html__( 'Checkout page style', 'ux-shop' ),
				'default' => 'checkout-style-a',
				'options' => array(
					'checkout-style-a' => 'Stacked, Order review below Customer details',
					'checkout-style-b' => 'Side by side, Order review on the right of customer details',
					),
			),
		) 
	);

	return $sections;

}
add_filter( 'redux/options/shrk_theme_options/sections', 'woo_shrk_redux_options', 1 );

?>