<?php

  $optical_store_theme_custom_setting_css = '';

    // Global Color
    $optical_store_first_theme_color = get_theme_mod('optical_store_first_theme_color', '#FF5557');
    $optical_store_second_theme_color = get_theme_mod('optical_store_second_theme_color', '#221943');

    $optical_store_theme_custom_setting_css .=':root {';
        $optical_store_theme_custom_setting_css .='--primary-theme-color: '.esc_attr($optical_store_first_theme_color ).'!important;';
        $optical_store_theme_custom_setting_css .='--secondary-theme-color: '.esc_attr($optical_store_second_theme_color ).'!important;';
    $optical_store_theme_custom_setting_css .='}';

	// Scroll to top alignment
	$optical_store_scroll_alignment = get_theme_mod('optical_store_scroll_alignment', 'right');

    if($optical_store_scroll_alignment == 'right'){
        $optical_store_theme_custom_setting_css .='.scroll-up{';
            $optical_store_theme_custom_setting_css .='right: 30px;!important;';
			$optical_store_theme_custom_setting_css .='left: auto;!important;';
        $optical_store_theme_custom_setting_css .='}';
    }else if($optical_store_scroll_alignment == 'center'){
        $optical_store_theme_custom_setting_css .='.scroll-up{';
            $optical_store_theme_custom_setting_css .='left: calc(50% - 10px) !important;';
        $optical_store_theme_custom_setting_css .='}';
    }else if($optical_store_scroll_alignment == 'left'){
        $optical_store_theme_custom_setting_css .='.scroll-up{';
            $optical_store_theme_custom_setting_css .='left: 30px;!important;';
			$optical_store_theme_custom_setting_css .='right: auto;!important;';
        $optical_store_theme_custom_setting_css .='}';
    }

    // Woocommerce Sale Position
    $optical_store_sale_badge_position = get_theme_mod( 'optical_store_sale_badge_position','right');
    if($optical_store_sale_badge_position == 'left'){
        $optical_store_theme_custom_setting_css .='.woocommerce ul.products li.product .onsale{';
            $optical_store_theme_custom_setting_css .='left: 10px; right: auto;';
        $optical_store_theme_custom_setting_css .='}';
    }else if($optical_store_sale_badge_position == 'right'){
        $optical_store_theme_custom_setting_css .='.woocommerce ul.products li.product .onsale{';
            $optical_store_theme_custom_setting_css .='left: auto; right: 10px;';
        $optical_store_theme_custom_setting_css .='}';
    }