<?php 

$real_fitness_color_scheme_one = get_theme_mod('real_fitness_color_scheme_one');
$real_fitness_color_scheme_two = get_theme_mod('real_fitness_color_scheme_two');
$real_fitness_color_scheme_css = "";

/*------------------ Global First Color -----------*/

if ($real_fitness_color_scheme_one) {
  $real_fitness_color_scheme_css .= ':root {';
  $real_fitness_color_scheme_css .= '--first-theme-color: ' . esc_attr($real_fitness_color_scheme_one) . ' !important;';
  $real_fitness_color_scheme_css .= '} ';
}

/*------------------ Global Second Color -----------*/

if ($real_fitness_color_scheme_two) {
  $real_fitness_color_scheme_css .= ':root {';
  $real_fitness_color_scheme_css .= '--second-theme-color: ' . esc_attr($real_fitness_color_scheme_two) . ' !important;';
  $real_fitness_color_scheme_css .= '} ';
}

//---------------------------------Logo-Max-height--------- 
  $real_fitness_logo_width = get_theme_mod('real_fitness_logo_width');

  if($real_fitness_logo_width != false){

    $real_fitness_color_scheme_css .='.logo img{';

      $real_fitness_color_scheme_css .='width: '.esc_html($real_fitness_logo_width).'px;';

    $real_fitness_color_scheme_css .='}';
  }

  /*---------------------------Slider Height ------------*/

    $real_fitness_slider_img_height = get_theme_mod('real_fitness_slider_img_height');
    if($real_fitness_slider_img_height != false){
        $real_fitness_color_scheme_css .='.slidesection img{';
            $real_fitness_color_scheme_css .='height: '.esc_attr($real_fitness_slider_img_height).' !important;';
        $real_fitness_color_scheme_css .='}';
    }

  /*--------------------------- Footer background image -------------------*/

    $real_fitness_footer_bg_image = get_theme_mod('real_fitness_footer_bg_image');
    if($real_fitness_footer_bg_image != false){
        $real_fitness_color_scheme_css .='.footer-widget{';
            $real_fitness_color_scheme_css .='background: url('.esc_attr($real_fitness_footer_bg_image).')!important;';
        $real_fitness_color_scheme_css .='}';
    }

    /*--------------------------- Scroll to top positions -------------------*/

    $real_fitness_scroll_position = get_theme_mod( 'real_fitness_scroll_position','Right');
    if($real_fitness_scroll_position == 'Right'){
        $real_fitness_color_scheme_css .='#button{';
            $real_fitness_color_scheme_css .='right: 20px;';
        $real_fitness_color_scheme_css .='}';
    }else if($real_fitness_scroll_position == 'Left'){
        $real_fitness_color_scheme_css .='#button{';
            $real_fitness_color_scheme_css .='left: 20px;';
        $real_fitness_color_scheme_css .='}';
    }else if($real_fitness_scroll_position == 'Center'){
        $real_fitness_color_scheme_css .='#button{';
            $real_fitness_color_scheme_css .='right: 50%;left: 50%;';
        $real_fitness_color_scheme_css .='}';
    }  

    /*--------------------------- Woocommerce Product Image Border Radius -------------------*/

    $real_fitness_woo_product_img_border_radius = get_theme_mod('real_fitness_woo_product_img_border_radius');
    if($real_fitness_woo_product_img_border_radius != false){
        $real_fitness_color_scheme_css .='.woocommerce ul.products li.product a img{';
            $real_fitness_color_scheme_css .='border-radius: '.esc_attr($real_fitness_woo_product_img_border_radius).'px;';
        $real_fitness_color_scheme_css .='}';
    }

/*--------------------------- Woocommerce Product Sale Position -------------------*/    

$real_fitness_product_sale_position = get_theme_mod( 'real_fitness_product_sale_position','Left');
if($real_fitness_product_sale_position == 'Right'){
    $real_fitness_color_scheme_css .='.woocommerce ul.products li.product .onsale{';
        $real_fitness_color_scheme_css .='left:auto !important; right:.5em !important;';
    $real_fitness_color_scheme_css .='}';
}else if($real_fitness_product_sale_position == 'Left'){
    $real_fitness_color_scheme_css .='.woocommerce ul.products li.product .onsale {';
        $real_fitness_color_scheme_css .='right:auto !important; left:.5em !important;';
    $real_fitness_color_scheme_css .='}';
}        

/*--------------------------- Shop page pagination -------------------*/

$real_fitness_wooproducts_nav = get_theme_mod('real_fitness_wooproducts_nav', 'Yes');
if($real_fitness_wooproducts_nav == 'No'){
  $real_fitness_color_scheme_css .='.woocommerce nav.woocommerce-pagination{';
    $real_fitness_color_scheme_css .='display: none;';
  $real_fitness_color_scheme_css .='}';
}

/*--------------------------- Related Product -------------------*/

$real_fitness_related_product_enable = get_theme_mod('real_fitness_related_product_enable',true);
if($real_fitness_related_product_enable == false){
  $real_fitness_color_scheme_css .='.related.products{';
    $real_fitness_color_scheme_css .='display: none;';
  $real_fitness_color_scheme_css .='}';
}

/*--------------------------- Scroll to Top Button Shape -------------------*/

$real_fitness_scroll_top_shape = get_theme_mod('real_fitness_scroll_top_shape', 'circle');
if($real_fitness_scroll_top_shape == 'box' ){
  $real_fitness_color_scheme_css .='#button{';
    $real_fitness_color_scheme_css .=' border-radius: 0%';
  $real_fitness_color_scheme_css .='}';
}elseif($real_fitness_scroll_top_shape == 'curved' ){
  $real_fitness_color_scheme_css .='#button{';
    $real_fitness_color_scheme_css .=' border-radius: 20%';
  $real_fitness_color_scheme_css .='}';
}elseif($real_fitness_scroll_top_shape == 'circle' ){
  $real_fitness_color_scheme_css .='#button{';
    $real_fitness_color_scheme_css .=' border-radius: 50%;';
  $real_fitness_color_scheme_css .='}';
}

/*--------------------------- Menu Typography -------------------*/

$real_fitness_theme_lay = get_theme_mod( 'real_fitness_menu_text_transform','Uppercase');
if($real_fitness_theme_lay == 'Uppercase'){
    $real_fitness_color_scheme_css .='.main-nav a{';
        $real_fitness_color_scheme_css .='text-transform: uppercase;';
    $real_fitness_color_scheme_css .='}';
}else if($real_fitness_theme_lay == 'Lowercase'){
    $real_fitness_color_scheme_css .='.main-nav a{';
        $real_fitness_color_scheme_css .='text-transform: lowercase;';
    $real_fitness_color_scheme_css .='}';
}
else if($real_fitness_theme_lay == 'Capitalize'){
    $real_fitness_color_scheme_css .='.main-nav a{';
        $real_fitness_color_scheme_css .='text-transform: capitalize;';
    $real_fitness_color_scheme_css .='}';
}