<?php
/**
 * Astronomy Store Theme Customizer
 *
 * @package Astronomy Store
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function astronomy_store_customize_register( $wp_customize ) {

	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';

	wp_enqueue_style('astronomy-store-customize-controls', trailingslashit(esc_url(get_template_directory_uri())).'/css/customize-controls.css');

	if ( class_exists( 'WP_Customize_Control' ) ) {
		require_once get_template_directory() . '/inc/customizer-custom-controls.php';
	}

	// Enable / Disable Logo
	$wp_customize->add_setting('astronomy_store_logo_enable',array(
		'default' => true,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control( 'astronomy_store_logo_enable', array(
		'settings' => 'astronomy_store_logo_enable',
		'section'   => 'title_tagline',
		'label'     => __('Enable Logo','astronomy-store'),
		'type'      => 'checkbox'
	));

	//Logo
    $wp_customize->add_setting('astronomy_store_logo_width',array(
		'default'=> '',
		'transport' => 'refresh',
		'sanitize_callback' => 'astronomy_store_sanitize_integer'
	));
	$wp_customize->add_control(new Astronomy_Store_Slider_Custom_Control( $wp_customize, 'astronomy_store_logo_width',array(
		'label'	=> esc_html__('Logo Width','astronomy-store'),
		'section'=> 'title_tagline',
		'settings'=>'astronomy_store_logo_width',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 300,
        ),
	)));

	// color site title
	$wp_customize->add_setting('astronomy_store_sitetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sitetitle_color', array(
	   'settings' => 'astronomy_store_sitetitle_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Title Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_title_enable',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control( 'astronomy_store_title_enable', array(
	   'settings' => 'astronomy_store_title_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Title','astronomy-store'),
	   'type'      => 'checkbox'
	));

	// color site tagline
	$wp_customize->add_setting('astronomy_store_sitetagline_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sitetagline_color', array(
	   'settings' => 'astronomy_store_sitetagline_color',
	   'section'   => 'title_tagline',
	   'label' => __('Site Tagline Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_tagline_enable',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control( 'astronomy_store_tagline_enable', array(
	   'settings' => 'astronomy_store_tagline_enable',
	   'section'   => 'title_tagline',
	   'label'     => __('Enable Site Tagline','astronomy-store'),
	   'type'      => 'checkbox'
	));

	// woocommerce section
	$wp_customize->add_section('astronomy_store_woocommerce_page_settings', array(
		'title'    => __('WooCommerce Page Settings', 'astronomy-store'),
		'priority' => null,
		'panel'    => 'woocommerce',
	));

	$wp_customize->add_setting('astronomy_store_shop_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
	 ));
	 $wp_customize->add_control('astronomy_store_shop_page_sidebar',array(
		'type' => 'checkbox',
		'label' => __(' Check To Enable Shop page sidebar','astronomy-store'),
		'section' => 'astronomy_store_woocommerce_page_settings',
	 ));

	$wp_customize->add_setting('astronomy_store_wooproducts_nav',array(
		'default' => 'Yes',
		'sanitize_callback'	=> 'astronomy_store_sanitize_choices'
	));
	$wp_customize->add_control('astronomy_store_wooproducts_nav',array(
		'type' => 'select',
		'label' => __('Shop Page Products Navigation','astronomy-store'),
		'choices' => array(
			 'Yes' => __('Yes','astronomy-store'),
			 'No' => __('No','astronomy-store'),
		 ),
		'section' => 'astronomy_store_woocommerce_page_settings',
	));

    // shop page sidebar alignment
    $wp_customize->add_setting('astronomy_store_shop_page_sidebar_position', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'astronomy_store_sanitize_choices',
	));
	$wp_customize->add_control('astronomy_store_shop_page_sidebar_position',array(
		'type'           => 'radio',
		'label'          => __('Shop Page Sidebar', 'astronomy-store'),
		'section'        => 'astronomy_store_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'astronomy-store'),
			'Right Sidebar' => __('Right Sidebar', 'astronomy-store'),
		),
	));	 

	$wp_customize->add_setting( 'astronomy_store_single_page_sidebar',array(
		'default' => false,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
    ) );
    $wp_customize->add_control('astronomy_store_single_page_sidebar',array(
    	'type' => 'checkbox',
       	'label' => __('Check To Enable Single Product Page Sidebar','astronomy-store'),
		'section' => 'astronomy_store_woocommerce_page_settings'
    ));

	// single product page sidebar alignment
    $wp_customize->add_setting('astronomy_store_single_product_page_layout', array(
		'default'           => 'Right Sidebar',
		'sanitize_callback' => 'astronomy_store_sanitize_choices',
	));
	$wp_customize->add_control('astronomy_store_single_product_page_layout',array(
		'type'           => 'radio',
		'label'          => __('Single product Page Sidebar', 'astronomy-store'),
		'section'        => 'astronomy_store_woocommerce_page_settings',
		'choices'        => array(
			'Left Sidebar'  => __('Left Sidebar', 'astronomy-store'),
			'Right Sidebar' => __('Right Sidebar', 'astronomy-store'),
		),
	));	

	$wp_customize->add_setting('astronomy_store_related_product_enable',array(
		'default' => true,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
	));
	$wp_customize->add_control('astronomy_store_related_product_enable',array(
		'type' => 'checkbox',
		'label' => __('Check To Enable Related product','astronomy-store'),
		'section' => 'astronomy_store_woocommerce_page_settings',
	));

	$wp_customize->add_setting( 'astronomy_store_woo_product_img_border_radius', array(
        'default'              => '0',
        'transport'            => 'refresh',
        'sanitize_callback'    => 'astronomy_store_sanitize_integer'
    ) );
    $wp_customize->add_control(new Astronomy_Store_Slider_Custom_Control( $wp_customize, 'astronomy_store_woo_product_img_border_radius',array(
		'label'	=> esc_html__('Product Img Border Radius','astronomy-store'),
		'section'=> 'astronomy_store_woocommerce_page_settings',
		'settings'=>'astronomy_store_woo_product_img_border_radius',
		'input_attrs' => array(
            'step'             => 1,
			'min'              => 0,
			'max'              => 100,
        ),
	)));

    // Add a setting for number of products per row
    $wp_customize->add_setting('astronomy_store_products_per_row', array(
	   'default'   => '4',
	   'transport' => 'refresh',
	   'sanitize_callback' => 'astronomy_store_sanitize_integer'
    ));
    $wp_customize->add_control('astronomy_store_products_per_row', array(
	   'label'    => __('Products Per Row', 'astronomy-store'),
	   'section'  => 'astronomy_store_woocommerce_page_settings',
	   'settings' => 'astronomy_store_products_per_row',
	   'type'     => 'select',
	   'choices'  => array(
		  '2' => '2',
		  '3' => '3',
		  '4' => '4',
	   ),
   ));

	// Add a setting for the number of products per page
	$wp_customize->add_setting('astronomy_store_products_per_page', array(
		'default'   => '9',
		'transport' => 'refresh',
		'sanitize_callback' => 'astronomy_store_sanitize_integer'
	));
	$wp_customize->add_control('astronomy_store_products_per_page', array(
		'label'    => __('Products Per Page', 'astronomy-store'),
		'section'  => 'astronomy_store_woocommerce_page_settings',
		'settings' => 'astronomy_store_products_per_page',
		'type'     => 'number',
		'input_attrs' => array(
			'min'  => 1,
			'step' => 1,
		),
	));
   
	//Theme Options
	$wp_customize->add_panel( 'astronomy_store_panel_area', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'title' => __( 'Theme Options Panel', 'astronomy-store' ),
	) );

	//Site Layout Section
	$wp_customize->add_section('astronomy_store_site_layoutsec',array(
		'title'	=> __('Manage Site Layout Section ','astronomy-store'),
		'description' => __('<p class="sec-title">Manage Site Layout Section</p>','astronomy-store'),
		'priority'	=> 1,
		'panel' => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_preloader',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control( 'astronomy_store_preloader', array(
	   'section'   => 'astronomy_store_site_layoutsec',
	   'label'	=> __('Check to Show preloader','astronomy-store'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting('astronomy_store_box_layout',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control( 'astronomy_store_box_layout', array(
	   'section'   => 'astronomy_store_site_layoutsec',
	   'label'	=> __('Check to Show Box Layout','astronomy-store'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting( 'astronomy_store_layout_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_layout_settings_upgraded_features', array(
		  'type'=> 'hidden',
		  'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			  <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
		  'section' => 'astronomy_store_site_layoutsec'
	));

	//Global Color
	$wp_customize->add_section('astronomy_store_global_color', array(
		'title'    => __('Manage Global Color Section', 'astronomy-store'),
		'panel'    => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_first_color', array(
		'default'           => '#e2d027',
		'sanitize_callback' => 'sanitize_hex_color',
	));
	$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'astronomy_store_first_color', array(
		'label'    => __('Theme Color', 'astronomy-store'),
		'section'  => 'astronomy_store_global_color',
		'settings' => 'astronomy_store_first_color',
	)));	

	$wp_customize->add_setting( 'astronomy_store_global_color_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_global_color_settings_upgraded_features', array(
			'type'=> 'hidden',
			'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
				<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
			'section' => 'astronomy_store_global_color'
	));

	// Header Section
	$wp_customize->add_section('astronomy_store_header_section', array(
        'title' => __('Manage Header Section', 'astronomy-store'),
		'description' => __('<p class="sec-title">Manage Header Section</p>','astronomy-store'),
        'priority' => null,
		'panel' => 'astronomy_store_panel_area',
 	));

 	$wp_customize->add_setting('astronomy_store_stickyheader',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control( 'astronomy_store_stickyheader', array(
	   'section'   => 'astronomy_store_header_section',
	   'label'	=> __('Check To Show Sticky Header','astronomy-store'),
	   'type'      => 'checkbox'
 	));

	$wp_customize->add_setting('astronomy_store_fb_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_fb_link', array(
	   'settings' => 'astronomy_store_fb_link',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Facebook Link', 'astronomy-store'),
	   'type'      => 'url'
	));

	// color facebook
	$wp_customize->add_setting('astronomy_store_fb_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_fb_color', array(
	   'settings' => 'astronomy_store_fb_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Facebook Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_twitt_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_twitt_link', array(
	   'settings' => 'astronomy_store_twitt_link',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Twitter Link', 'astronomy-store'),
	   'type'      => 'url'
	));

	// color twitt
	$wp_customize->add_setting('astronomy_store_twitt_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_twitt_color', array(
	   'settings' => 'astronomy_store_twitt_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Twitter Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_pinterst_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_pinterst_link', array(
	   'settings' => 'astronomy_store_pinterst_link',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Pinterest Link', 'astronomy-store'),
	   'type'      => 'url'
	));

	// color pinterest
	$wp_customize->add_setting('astronomy_store_pinterst_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_pinterst_color', array(
	   'settings' => 'astronomy_store_pinterst_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Pinterst Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_insta_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_insta_link', array(
	   'settings' => 'astronomy_store_insta_link',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Instagram Link', 'astronomy-store'),
	   'type'      => 'url'
	));

	// color insta
	$wp_customize->add_setting('astronomy_store_insta_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_insta_color', array(
	   'settings' => 'astronomy_store_insta_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Instagram Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// header menu
	$wp_customize->add_setting('astronomy_store_menu_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_menu_color', array(
	   'settings' => 'astronomy_store_menu_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Menu Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// header menu hover color
	$wp_customize->add_setting('astronomy_store_menuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_menuhrv_color', array(
	   'settings' => 'astronomy_store_menuhrv_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('Menu Hover Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// header sub menu color
	$wp_customize->add_setting('astronomy_store_submenu_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_submenu_color', array(
	   'settings' => 'astronomy_store_submenu_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('SubMenu Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// header sub menu bg color
	$wp_customize->add_setting('astronomy_store_submenubg_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_submenubg_color', array(
	   'settings' => 'astronomy_store_submenubg_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('SubMenu BG Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// header sub menu hover color
	$wp_customize->add_setting('astronomy_store_submenuhrv_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_submenuhrv_color', array(
	   'settings' => 'astronomy_store_submenuhrv_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('SubMenu Hover Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// header sub menu border color
	$wp_customize->add_setting('astronomy_store_submenuborder_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_submenuborder_color', array(
	   'settings' => 'astronomy_store_submenuborder_color',
	   'section'   => 'astronomy_store_header_section',
	   'label' => __('SubMenu Border Color', 'astronomy-store'),
	   'type'      => 'color'
	));

    // Menu Text Transform
    $wp_customize->add_setting( 'astronomy_store_menu_text_transform', array(
        'default'           => 'Capitalize',
		'transport' => 'refresh',
		'sanitize_callback' => 'astronomy_store_sanitize_choices'
    ));

    $wp_customize->add_control( 'astronomy_store_menu_text_transform', array(
        'label'    => __( 'Menu Text Transform', 'astronomy-store' ),
        'section'  => 'astronomy_store_header_section',
        'type'     => 'select',
        'choices'  => array(
			'None'       => __( 'None', 'astronomy-store' ),
            'Capitalize' => __( 'Capitalize', 'astronomy-store' ),
            'Uppercase'  => __( 'Uppercase', 'astronomy-store' ),
            'Lowercase'  => __( 'Lowercase', 'astronomy-store' ),
        ),
    ));

	$wp_customize->add_setting( 'astronomy_store_header_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_header_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
		'section' => 'astronomy_store_header_section'
	));

	// Home Category Dropdown Section
	$wp_customize->add_section('astronomy_store_one_cols_section',array(
		'title'	=> __('Manage Slider Section','astronomy-store'),
		'description'	=> __('<p class="sec-title">Manage Slider Section</p> Select Category from the Dropdowns for slider, Also use the given image dimension (1600 x 850).','astronomy-store'),
		'priority'	=> null,
		'panel' => 'astronomy_store_panel_area'
	));

	//Hide Section
	$wp_customize->add_setting('astronomy_store_hide_categorysec',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_hide_categorysec', array(
	   'settings' => 'astronomy_store_hide_categorysec',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label'     => __('Check To Enable This Section','astronomy-store'),
	   'type'      => 'checkbox'
	));

	// Add a category dropdown Slider Coloumn
	$wp_customize->add_setting( 'astronomy_store_slidersection', array(
		'default'	=> '0',
		'sanitize_callback'	=> 'absint'
	) );
	$wp_customize->add_control( new Astronomy_Store_Category_Dropdown_Custom_Control( $wp_customize, 'astronomy_store_slidersection', array(
		'section' => 'astronomy_store_one_cols_section',
	   'label'     => __('Select Category to Display Slider','astronomy-store'),
		'settings'   => 'astronomy_store_slidersection',
	) ) );

	$wp_customize->add_setting('astronomy_store_button_text',array(
		'default' => 'Read More',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_button_text', array(
	   'settings' => 'astronomy_store_button_text',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Add Button Text 1', 'astronomy-store'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('astronomy_store_button_link_slider',array(
        'default'=> '',
        'sanitize_callback' => 'esc_url_raw'
    ));
    $wp_customize->add_control('astronomy_store_button_link_slider',array(
        'label' => esc_html__('Add Button 1 URL','astronomy-store'),
        'section'=> 'astronomy_store_one_cols_section',
        'type'=> 'url'
    ));

	$wp_customize->add_setting('astronomy_store_button2_text',array(
		'default' => 'Contact Us',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_button2_text', array(
	   'settings' => 'astronomy_store_button2_text',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Add Button 2 Text', 'astronomy-store'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting('astronomy_store_button2_url',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_button2_url', array(
	   'settings' => 'astronomy_store_button2_url',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Add Button 2 URL', 'astronomy-store'),
	   'type'      => 'url'
	));

	//Slider height
    $wp_customize->add_setting('astronomy_store_slider_img_height',array(
        'default'=> '',
        'sanitize_callback' => 'sanitize_text_field'
    ));
    $wp_customize->add_control('astronomy_store_slider_img_height',array(
        'label' => __('Slider Image Height','astronomy-store'),
        'description'   => __('Add the slider image height here (eg. 600px)','astronomy-store'),
        'input_attrs' => array(
            'placeholder' => __( '500px', 'astronomy-store' ),
        ),
        'section'=> 'astronomy_store_one_cols_section',
        'type'=> 'text'
    ));

	// color slider title
	$wp_customize->add_setting('astronomy_store_slidertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_slidertitle_color', array(
	   'settings' => 'astronomy_store_slidertitle_color',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Title Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// color slider description
	$wp_customize->add_setting('astronomy_store_sliderdescription_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sliderdescription_color', array(
	   'settings' => 'astronomy_store_sliderdescription_color',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Description Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// color slider button1 text
	$wp_customize->add_setting('astronomy_store_sliderbutton1text_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sliderbutton1text_color', array(
	   'settings' => 'astronomy_store_sliderbutton1text_color',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Button 1 Text Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// color slider button1
	$wp_customize->add_setting('astronomy_store_sliderbutton1_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sliderbutton1_color', array(
	   'settings' => 'astronomy_store_sliderbutton1_color',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Button 1 Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// color slider button2 text
	$wp_customize->add_setting('astronomy_store_sliderbutton2text_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sliderbutton2text_color', array(
	   'settings' => 'astronomy_store_sliderbutton2text_color',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Button 2 Text Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	// color slider button2
	$wp_customize->add_setting('astronomy_store_sliderbutton2_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_sliderbutton2_color', array(
	   'settings' => 'astronomy_store_sliderbutton2_color',
	   'section'   => 'astronomy_store_one_cols_section',
	   'label' => __('Button 2 Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting( 'astronomy_store_slider_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_slider_settings_upgraded_features', array(
	    'type'=> 'hidden',
	    'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
	        <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
	    'section' => 'astronomy_store_one_cols_section'
	));

	// Services Section
	$wp_customize->add_section('astronomy_store_below_slider_section', array(
		'title'	=> __('Manage Services Section','astronomy-store'),
		'description'	=> __('<p class="sec-title">Manage Services Section</p> Select Pages from the dropdown for Services.','astronomy-store'),
		'priority'	=> null,
		'panel' => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_disabled_pgboxes',array(
		'default' => false,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_disabled_pgboxes', array(
	   'settings' => 'astronomy_store_disabled_pgboxes',
	   'section'   => 'astronomy_store_below_slider_section',
	   'label'     => __('Check To Enable This Section','astronomy-store'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting('astronomy_store_service_heading',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_service_heading', array(
	   'settings' => 'astronomy_store_service_heading',
	   'section'   => 'astronomy_store_below_slider_section',
	   'label' => __('Heading', 'astronomy-store'),
	   'type'      => 'text'
	));
	
	// Add a category dropdown Slider Coloumn
	$wp_customize->add_setting( 'astronomy_store_services_cat', array(
		'default'	=> '0',
		'sanitize_callback'	=> 'absint'
	) );
	$wp_customize->add_control( new Astronomy_Store_Category_Dropdown_Custom_Control( $wp_customize, 'astronomy_store_services_cat', array(
		'section' => 'astronomy_store_below_slider_section',
	   'label'     => __('Select Category to Display Services','astronomy-store'),
		'settings'   => 'astronomy_store_services_cat',
	)));

	//  service heading color
	$wp_customize->add_setting('astronomy_store_serviceheading_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_serviceheading_color', array(
	   'settings' => 'astronomy_store_serviceheading_color',
	   'section'   => 'astronomy_store_below_slider_section',
	   'label' => __('Heading Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_service_subheading',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_service_subheading', array(
	   'settings' => 'astronomy_store_service_subheading',
	   'section'   => 'astronomy_store_below_slider_section',
	   'label' => __('Sub Heading', 'astronomy-store'),
	   'type'      => 'text'
	));

	//  service subheading color
	$wp_customize->add_setting('astronomy_store_servicesubheading_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_servicesubheading_color', array(
	   'settings' => 'astronomy_store_servicesubheading_color',
	   'section'   => 'astronomy_store_below_slider_section',
	   'label' => __('SubHeading Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	//  service title color
	$wp_customize->add_setting('astronomy_store_servicetitle_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_servicetitle_color', array(
	   'settings' => 'astronomy_store_servicetitle_color',
	   'section'   => 'astronomy_store_below_slider_section',
	   'label' => __('Title Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting( 'astronomy_store_secondsec_settings_upgraded_features',array(
	   'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_secondsec_settings_upgraded_features', array(
	    'type'=> 'hidden',
	    'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
	        <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
	    'section' => 'astronomy_store_below_slider_section'
	));

	//Blog post
	$wp_customize->add_section('astronomy_store_blog_post_settings',array(
        'title' => __('Manage Post Section', 'astronomy-store'),
        'priority' => null,
        'panel' => 'astronomy_store_panel_area'
    ) );

	// Layouts Post
	$wp_customize->add_setting(
		'astronomy_store_blog_layout_option_setting',
		array(
			'default'           => 'Left',
			'sanitize_callback' => 'astronomy_store_sanitize_choices',
		)
	);

	$wp_customize->add_control(
		new Astronomy_Store_Image_Radio_Control(
			$wp_customize,
			'astronomy_store_blog_layout_option_setting',
			array(
				'label'   => __( 'Post Layouts', 'astronomy-store' ),
				'section' => 'astronomy_store_blog_post_settings',
				'choices' => array(
					'Left' => get_template_directory_uri() . '/images/layout-1.png',
					'Center'    => get_template_directory_uri() . '/images/layout-2.png',
					'Right'   => get_template_directory_uri() . '/images/layout-3.png',
				),
			)
		)
	);

	$wp_customize->add_setting('astronomy_store_metafields_date', array(
	    'default' => true,
	    'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control('astronomy_store_metafields_date', array(
	    'settings' => 'astronomy_store_metafields_date', 
	    'section'   => 'astronomy_store_blog_post_settings',
	    'label'     => __('Check to Enable Date', 'astronomy-store'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('astronomy_store_metafields_comments', array(
		'default' => true,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));	
	$wp_customize->add_control('astronomy_store_metafields_comments', array(
		'settings' => 'astronomy_store_metafields_comments',
		'section'  => 'astronomy_store_blog_post_settings',
		'label'    => __('Check to Enable Comments', 'astronomy-store'),
		'type'     => 'checkbox',
	));

	$wp_customize->add_setting('astronomy_store_metafields_author', array(
		'default' => true,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control('astronomy_store_metafields_author', array(
		'settings' => 'astronomy_store_metafields_author',
		'section'  => 'astronomy_store_blog_post_settings',
		'label'    => __('Check to Enable Author', 'astronomy-store'),
		'type'     => 'checkbox',
	));		

	$wp_customize->add_setting('astronomy_store_metafields_time', array(
		'default' => true,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control('astronomy_store_metafields_time', array(
		'settings' => 'astronomy_store_metafields_time',
		'section'  => 'astronomy_store_blog_post_settings',
		'label'    => __('Check to Enable Time', 'astronomy-store'),
		'type'     => 'checkbox',
	));	

	$wp_customize->add_setting('astronomy_store_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','astronomy-store'),
		'description' => __('Ex: "/", "|", "-", ...','astronomy-store'),
		'section' => 'astronomy_store_blog_post_settings'
	)); 

   // Add Settings and Controls for Post Layout
	$wp_customize->add_setting('astronomy_store_sidebar_post_layout',array(
		'default' => 'right',
		'sanitize_callback' => 'astronomy_store_sanitize_choices'
	));
	$wp_customize->add_control('astronomy_store_sidebar_post_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Post Sidebar Position', 'astronomy-store'),
		'description'   => __('This option work for blog page, archive page and search page.', 'astronomy-store'),
		'section' => 'astronomy_store_blog_post_settings',
		'choices' => array(
			'left' => __('Left','astronomy-store'),
			'right' => __('Right','astronomy-store'),
			'three-column' => __('Three Columns','astronomy-store'),
			'four-column' => __('Four Columns','astronomy-store'),
			'grid' => __('Grid Layout','astronomy-store'),
			'full' => __('No Sidebar','astronomy-store')
     ),
	));

	$wp_customize->add_setting('astronomy_store_blog_post_description_option',array(
    	'default'   => 'Full Content', 
        'sanitize_callback' => 'astronomy_store_sanitize_choices'
	));
	$wp_customize->add_control('astronomy_store_blog_post_description_option',array(
        'type' => 'radio',
        'label' => __('Post Description Length','astronomy-store'),
        'section' => 'astronomy_store_blog_post_settings',
        'choices' => array(
            'No Content' => __('No Content','astronomy-store'),
            'Excerpt Content' => __('Excerpt Content','astronomy-store'),
            'Full Content' => __('Full Content','astronomy-store'),
        ),
	) );

	$wp_customize->add_setting('astronomy_store_blog_post_thumb',array(
        'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
        'default'           => 1,
    ));
    $wp_customize->add_control('astronomy_store_blog_post_thumb',array(
        'type'        => 'checkbox',
        'label'       => esc_html__('Show / Hide Blog Post Thumbnail', 'astronomy-store'),
        'section'     => 'astronomy_store_blog_post_settings',
    ));

	$wp_customize->add_setting( 'astronomy_store_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_post_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
		'section' => 'astronomy_store_blog_post_settings'
	));

	//Single Post Settings
	$wp_customize->add_section('astronomy_store_single_post_settings',array(
		'title' => __('Manage Single Post Section', 'astronomy-store'),
		'priority' => null,
		'panel' => 'astronomy_store_panel_area'
	));

	$wp_customize->add_setting('astronomy_store_single_post_date',array(
		'default' => true,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
	));
	$wp_customize->add_control('astronomy_store_single_post_date',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Date ','astronomy-store'),
		'section' => 'astronomy_store_single_post_settings'
	));	

	$wp_customize->add_setting('astronomy_store_single_post_author',array(
		'default' => true,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
	));
	$wp_customize->add_control('astronomy_store_single_post_author',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Author','astronomy-store'),
		'section' => 'astronomy_store_single_post_settings'
	));

	$wp_customize->add_setting('astronomy_store_single_post_comment',array(
		'default' => true,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
	));
	$wp_customize->add_control('astronomy_store_single_post_comment',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Comments','astronomy-store'),
		'section' => 'astronomy_store_single_post_settings'
	));	

	$wp_customize->add_setting('astronomy_store_single_post_time',array(
		'default' => true,
		'sanitize_callback'	=> 'astronomy_store_sanitize_checkbox'
	));
	$wp_customize->add_control('astronomy_store_single_post_time',array(
		'type' => 'checkbox',
		'label' => __('Enable / Disable Time','astronomy-store'),
		'section' => 'astronomy_store_single_post_settings'
	));	

	$wp_customize->add_setting('astronomy_store_single_post_metabox_seperator',array(
		'default' => '|',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_single_post_metabox_seperator',array(
		'type' => 'text',
		'label' => __('Metabox Seperator','astronomy-store'),
		'description' => __('Ex: "/", "|", "-", ...','astronomy-store'),
		'section' => 'astronomy_store_single_post_settings'
	)); 

	$wp_customize->add_setting('astronomy_store_sidebar_single_post_layout',array(
    	'default' => 'right',
    	 'sanitize_callback' => 'astronomy_store_sanitize_choices'
	));
	$wp_customize->add_control('astronomy_store_sidebar_single_post_layout',array(
   		'type' => 'radio',
    	'label'     => __('Single post sidebar layout', 'astronomy-store'),
     	'section' => 'astronomy_store_single_post_settings',
     	'choices' => array(
			'left' => __('Left','astronomy-store'),
			'right' => __('Right','astronomy-store'),
			'full' => __('No Sidebar','astronomy-store')
     ),
	));

	$wp_customize->add_setting( 'astronomy_store_single_post_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_single_post_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
		'section' => 'astronomy_store_single_post_settings'
	));

	//Page Settings
	$wp_customize->add_section('astronomy_store_page_settings',array(
		'title' => __('Manage Page Section', 'astronomy-store'),
		'priority' => null,
		'panel' => 'astronomy_store_panel_area'
	));

	// Add Settings and Controls for Page Layout
	$wp_customize->add_setting('astronomy_store_sidebar_page_layout',array(
		'default' => 'full',
			'sanitize_callback' => 'astronomy_store_sanitize_choices'
	));
	$wp_customize->add_control('astronomy_store_sidebar_page_layout',array(
		'type' => 'radio',
		'label'     => __('Theme Page Sidebar Position', 'astronomy-store'),
		'section' => 'astronomy_store_page_settings',
		'choices' => array(
			'left' => __('Left','astronomy-store'),
			'right' => __('Right','astronomy-store'),
			'full' => __('No Sidebar','astronomy-store')
	),
	));	

	// 404 Page Settings
	$wp_customize->add_section('astronomy_store_page_not_found', array(
		'title'	=> __('Manage 404 Page Section','astronomy-store'),
		'priority'	=> null,
		'panel' => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_page_not_found_heading',array(
		'default'=> __('404 Not Found','astronomy-store'),
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_page_not_found_heading',array(
		'label'	=> __('404 Heading','astronomy-store'),
		'section'=> 'astronomy_store_page_not_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('astronomy_store_page_not_found_content',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));

	$wp_customize->add_control('astronomy_store_page_not_found_content',array(
		'label'	=> __('404 Text','astronomy-store'),
		'input_attrs' => array(
			'placeholder' => __( 'Looks like you have taken a wrong turn.....Don\'t worry... it happens to the best of us.', 'astronomy-store' ),
		),
		'section'=> 'astronomy_store_page_not_found',
		'type'=> 'text'
	));

	$wp_customize->add_setting('astronomy_store_page_not_found_btn',array(
		'default' => 'Homepage',
		'sanitize_callback' => 'sanitize_text_field',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_page_not_found_btn', array(
	   'settings' => 'astronomy_store_page_not_found_btn',
	   'section'   => 'astronomy_store_page_not_found',
	   'label' => __('404 Button', 'astronomy-store'),
	   'type'      => 'text'
	));

	$wp_customize->add_setting( 'astronomy_store_page_not_found_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_page_not_found_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
			<a target='_blank' href='". esc_url(ASTRONOMY_STORE_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'astronomy_store_page_not_found'
	));

	// Animation Section
	$wp_customize->add_section('astronomy_store_animation', array(
		'title'	=> __('Manage Animation Section','astronomy-store'),
		'description'	=> __('<p class="sec-title">Manage Animation Section</p>','astronomy-store'),
		'priority'	=> null,
		'panel' => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_animation_enabled',array(
		'default' => true,
		'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_animation_enabled', array(
	   'settings' => 'astronomy_store_animation_enabled',
	   'section'   => 'astronomy_store_animation',
	   'label'     => __('Check To Enable Animation','astronomy-store'),
	   'type'      => 'checkbox'
	));

	$wp_customize->add_setting( 'astronomy_store_animation_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_animation_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		<a target='_blank' href='". esc_url(ASTRONOMY_STORE_PREMIUM_PAGE) ." '>Upgrade to Pro</a></span>",
		'section' => 'astronomy_store_animation'
	));

	// Footer Section
	$wp_customize->add_section('astronomy_store_footer', array(
		'title'	=> __('Manage Footer Section','astronomy-store'),
		'description'	=> __('<p class="sec-title">Manage Footer Section</p>','astronomy-store'),
		'priority'	=> null,
		'panel' => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_footer_widget', array(
	    'default' => true,
	    'sanitize_callback' => 'astronomy_store_sanitize_checkbox',
	));
	$wp_customize->add_control('astronomy_store_footer_widget', array(
	    'settings' => 'astronomy_store_footer_widget', // Corrected setting name
	    'section'   => 'astronomy_store_footer',
	    'label'     => __('Check to Enable Footer Widget', 'astronomy-store'),
	    'type'      => 'checkbox',
	));

	$wp_customize->add_setting('astronomy_store_footer_bg_image',array(
        'default'   => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'astronomy_store_footer_bg_image',array(
        'label' => __('Footer Background Image','astronomy-store'),
        'section' => 'astronomy_store_footer',
    )));

	$wp_customize->add_setting('astronomy_store_footer_img_position',array(
		'default' => 'center center',
		'transport' => 'refresh',
		'sanitize_callback' => 'astronomy_store_sanitize_choices'
	));
	$wp_customize->add_control('astronomy_store_footer_img_position',array(
		'type' => 'select',
		'label' => __('Footer Image Position','astronomy-store'),
		'section' => 'astronomy_store_footer',
		'choices' 	=> array(
			'center center'   => esc_html__( 'Center', 'astronomy-store' ),
			'center top'   => esc_html__( 'Top', 'astronomy-store' ),
			'left center'   => esc_html__( 'Left', 'astronomy-store' ),
			'right center'   => esc_html__( 'Right', 'astronomy-store' ),
			'center bottom'   => esc_html__( 'Bottom', 'astronomy-store' ),
		),
	));	

	$wp_customize->add_setting('astronomy_store_copyright_line',array(
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'astronomy_store_copyright_line', array(
	   'section' 	=> 'astronomy_store_footer',
	   'label'	 	=> __('Copyright Line','astronomy-store'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

    $wp_customize->add_setting('astronomy_store_copyright_link',array(
		'default' => '',
		'sanitize_callback' => 'sanitize_text_field',
	));	
	$wp_customize->add_control( 'astronomy_store_copyright_link', array(
	   'section' 	=> 'astronomy_store_footer',
	   'label'	 	=> __('Copyright Link','astronomy-store'),
	   'type'    	=> 'text',
	   'priority' 	=> null,
    ));

	//  footer bg color
	$wp_customize->add_setting('astronomy_store_footerbg_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footerbg_color', array(
	   'settings' => 'astronomy_store_footerbg_color',
	   'section'   => 'astronomy_store_footer',
	   'label' => __('BG Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	//  footer coypright color
	$wp_customize->add_setting('astronomy_store_footercoypright_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footercoypright_color', array(
	   'settings' => 'astronomy_store_footercoypright_color',
	   'section'   => 'astronomy_store_footer',
	   'label' => __('Coypright Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	//  footer title color
	$wp_customize->add_setting('astronomy_store_footertitle_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footertitle_color', array(
	   'settings' => 'astronomy_store_footertitle_color',
	   'section'   => 'astronomy_store_footer',
	   'label' => __('Title Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	//  footer description color
	$wp_customize->add_setting('astronomy_store_footerdescription_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footerdescription_color', array(
	   'settings' => 'astronomy_store_footerdescription_color',
	   'section'   => 'astronomy_store_footer',
	   'label' => __('Description Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	//  footer list color
	$wp_customize->add_setting('astronomy_store_footerlist_color',array(
		'default' => '',
		'sanitize_callback' => 'astronomy_store_sanitize_hex_color',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footerlist_color', array(
	   'settings' => 'astronomy_store_footerlist_color',
	   'section'   => 'astronomy_store_footer',
	   'label' => __('List Color', 'astronomy-store'),
	   'type'      => 'color'
	));

	$wp_customize->add_setting('astronomy_store_scroll_hide', array(
        'default' => true,
        'sanitize_callback' => 'astronomy_store_sanitize_checkbox'
    ));
    $wp_customize->add_control( new WP_Customize_Control($wp_customize,'astronomy_store_scroll_hide',array(
        'label'          => __( 'Check To Show Scroll To Top', 'astronomy-store' ),
        'section'        => 'astronomy_store_footer',
        'settings'       => 'astronomy_store_scroll_hide',
        'type'           => 'checkbox',
    )));

    $wp_customize->add_setting('astronomy_store_scroll_position',array(
        'default' => 'Right',
        'sanitize_callback' => 'astronomy_store_sanitize_choices'
    ));
    $wp_customize->add_control('astronomy_store_scroll_position',array(
        'type' => 'radio',
        'section' => 'astronomy_store_footer',
        'label'	 	=> __('Scroll To Top Positions','astronomy-store'),
        'choices' => array(
            'Right' => __('Right','astronomy-store'),
            'Left' => __('Left','astronomy-store'),
            'Center' => __('Center','astronomy-store')
        ),
    ));

	$wp_customize->add_setting('astronomy_store_scroll_text',array(
		'default'	=> __('TOP','astronomy-store'),
		'sanitize_callback'	=> 'sanitize_text_field',
	));	
	$wp_customize->add_control('astronomy_store_scroll_text',array(
		'label'	=> __('Scroll To Top Button Text','astronomy-store'),
		'section'	=> 'astronomy_store_footer',
		'type'		=> 'text'
	));

	$wp_customize->add_setting( 'astronomy_store_scroll_top_shape', array(
		'default'           => 'circle',
		'sanitize_callback' => 'sanitize_text_field',
	));
	$wp_customize->add_control( 'astronomy_store_scroll_top_shape', array(
		'label'    => __( 'Scroll to Top Button Shape', 'astronomy-store' ),
		'section'  => 'astronomy_store_footer',
		'settings' => 'astronomy_store_scroll_top_shape',
		'type'     => 'radio',
		'choices'  => array(
			'box'        => __( 'Box', 'astronomy-store' ),
			'curved' => __( 'Curved', 'astronomy-store'),
			'circle'     => __( 'Circle', 'astronomy-store' ),
		),
	));

	$wp_customize->add_setting('astronomy_store_footer_widget_areas',array(
		'default'           => 4,
		'sanitize_callback' => 'astronomy_store_sanitize_choices',
	));
	$wp_customize->add_control('astronomy_store_footer_widget_areas',array(
		'type'        => 'radio',
		'section' => 'astronomy_store_footer',
		'label'       => __('Footer widget area', 'astronomy-store'),
		'choices' => array(
		   '1'     => __('One', 'astronomy-store'),
		   '2'     => __('Two', 'astronomy-store'),
		   '3'     => __('Three', 'astronomy-store'),
		   '4'     => __('Four', 'astronomy-store')
		),
	));

    $wp_customize->add_setting( 'astronomy_store_footer_settings_upgraded_features',array(
	  'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_footer_settings_upgraded_features', array(
	    'type'=> 'hidden',
	    'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
	        <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
	    'section' => 'astronomy_store_footer'
	));

	// Footer Social Section
	$wp_customize->add_section('astronomy_store_footer_social_icons', array(
		'title'	=> __('Manage Footer Social Section','astronomy-store'),
		'description'	=> __('<p class="sec-title">Manage Footer Social Section</p>','astronomy-store'),
		'priority'	=> null,
		'panel' => 'astronomy_store_panel_area',
	));

	$wp_customize->add_setting('astronomy_store_footer_facebook_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footer_facebook_link', array(
		'settings' => 'astronomy_store_footer_facebook_link',
		'section'   => 'astronomy_store_footer_social_icons',
		'label' => __('Facebook Link', 'astronomy-store'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('astronomy_store_footer_twitter_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footer_twitter_link', array(
		'settings' => 'astronomy_store_footer_twitter_link',
		'section'   => 'astronomy_store_footer_social_icons',
		'label' => __('Twitter Link', 'astronomy-store'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('astronomy_store_footer_pinterest_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footer_pinterest_link', array(
		'settings' => 'astronomy_store_footer_pinterest_link',
		'section'   => 'astronomy_store_footer_social_icons',
		'label' => __('Pinterest Link', 'astronomy-store'),
		'type'      => 'url'
	));

	$wp_customize->add_setting('astronomy_store_footer_instagram_link',array(
		'default' => '',
		'sanitize_callback' => 'esc_url_raw',
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_control( 'astronomy_store_footer_instagram_link', array(
		'settings' => 'astronomy_store_footer_instagram_link',
		'section'   => 'astronomy_store_footer_social_icons',
		'label' => __('Instagram Link', 'astronomy-store'),
		'type'      => 'url'
	));
	
	$wp_customize->add_setting( 'astronomy_store_footer_social_settings_upgraded_features',array(
		'sanitize_callback' => 'sanitize_text_field'
	));
	$wp_customize->add_control('astronomy_store_footer_social_settings_upgraded_features', array(
		'type'=> 'hidden',
		'description' => "<span class='customizer-upgraded-features'>Unlock Premium Customization Features:
		   <a target='_blank' href='". esc_url('https://www.theclassictemplates.com/products/astronomy-wordpress-template') ." '>Upgrade to Pro</a></span>",
		'section' => 'astronomy_store_footer_social_icons'
	));

 	// Google Fonts
	 $wp_customize->add_section( 'astronomy_store_google_fonts_section', array(
		'title'       => __( 'Google Fonts', 'astronomy-store' ),
		'priority'       => 24,
	) );

	$font_choices = array(
		'' => 'No Fonts',
		'Kaushan Script:' => 'Kaushan Script',
		'Emilys Candy:' => 'Emilys Candy',
		'Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900' => 'Poppins',
		'Source Sans Pro:400,700,400italic,700italic' => 'Source Sans Pro',
		'Open Sans:400italic,700italic,400,700' => 'Open Sans',
		'Oswald:400,700' => 'Oswald',
		'Playfair Display:400,700,400italic' => 'Playfair Display',
		'Montserrat:400,700' => 'Montserrat',
		'Raleway:400,700' => 'Raleway',
		'Droid Sans:400,700' => 'Droid Sans',
		'Lato:400,700,400italic,700italic' => 'Lato',
		'Arvo:400,700,400italic,700italic' => 'Arvo',
		'Lora:400,700,400italic,700italic' => 'Lora',
		'Merriweather:400,300italic,300,400italic,700,700italic' => 'Merriweather',
		'Oxygen:400,300,700' => 'Oxygen',
		'PT Serif:400,700' => 'PT Serif',
		'PT Sans:400,700,400italic,700italic' => 'PT Sans',
		'PT Sans Narrow:400,700' => 'PT Sans Narrow',
		'Cabin:400,700,400italic' => 'Cabin',
		'Fjalla One:400' => 'Fjalla One',
		'Francois One:400' => 'Francois One',
		'Josefin Sans:400,300,600,700' => 'Josefin Sans',
		'Libre Baskerville:400,400italic,700' => 'Libre Baskerville',
		'Arimo:400,700,400italic,700italic' => 'Arimo',
		'Ubuntu:400,700,400italic,700italic' => 'Ubuntu',
		'Bitter:400,700,400italic' => 'Bitter',
		'Droid Serif:400,700,400italic,700italic' => 'Droid Serif',
		'Roboto:400,400italic,700,700italic' => 'Roboto',
		'Open Sans Condensed:700,300italic,300' => 'Open Sans Condensed',
		'Roboto Condensed:400italic,700italic,400,700' => 'Roboto Condensed',
		'Roboto Slab:400,700' => 'Roboto Slab',
		'Yanone Kaffeesatz:400,700' => 'Yanone Kaffeesatz',
		'Rokkitt:400' => 'Rokkitt',
	);

	$wp_customize->add_setting( 'astronomy_store_headings_fonts', array(
		'sanitize_callback' => 'astronomy_store_sanitize_fonts',
	));
	$wp_customize->add_control( 'astronomy_store_headings_fonts', array(
		'type' => 'select',
		'description' => __('Select your desired font for the headings.', 'astronomy-store'),
		'section' => 'astronomy_store_google_fonts_section',
		'choices' => $font_choices
	));

	$wp_customize->add_setting( 'astronomy_store_body_fonts', array(
		'sanitize_callback' => 'astronomy_store_sanitize_fonts'
	));
	$wp_customize->add_control( 'astronomy_store_body_fonts', array(
		'type' => 'select',
		'description' => __( 'Select your desired font for the body.', 'astronomy-store' ),
		'section' => 'astronomy_store_google_fonts_section',
		'choices' => $font_choices
	));	

}
add_action( 'customize_register', 'astronomy_store_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function astronomy_store_customize_preview_js() {
	wp_enqueue_script( 'astronomy_store_customizer', esc_url(get_template_directory_uri()) . '/js/customize-preview.js', array( 'customize-preview' ), '20161510', true );
}
add_action( 'customize_preview_init', 'astronomy_store_customize_preview_js' );
