<?php

$cooking_classes_first_color = get_theme_mod('cooking_classes_first_color');
$cooking_classes_second_color = get_theme_mod('cooking_classes_second_color');
$cooking_classes_third_color = get_theme_mod('cooking_classes_third_color');
$cooking_classes_color_scheme_css = '';

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

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

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

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

/*------------------ Global Third Color -----------*/
if ($cooking_classes_second_color) {
  $cooking_classes_color_scheme_css .= ':root {';
  $cooking_classes_color_scheme_css .= '--third-theme-color: ' . esc_attr($cooking_classes_second_color) . ' !important;';
  $cooking_classes_color_scheme_css .= '} ';
}

// slider hide css
$cooking_classes_hide_categorysec = get_theme_mod( 'cooking_classes_hide_categorysec', false);
  $cooking_classes_slidersection = get_theme_mod('cooking_classes_slidersection');
if($cooking_classes_hide_categorysec != true || $cooking_classes_slidersection != true){
  $cooking_classes_color_scheme_css .='.page-template-template-home-page #header{';
    $cooking_classes_color_scheme_css .='position:static !important;';
  $cooking_classes_color_scheme_css .='}';
}

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

if($cooking_classes_logo_width != false){

  $cooking_classes_color_scheme_css .='.logo-bg2 img{';

    $cooking_classes_color_scheme_css .='width: '.esc_html($cooking_classes_logo_width).'px;';

  $cooking_classes_color_scheme_css .='}';
}

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

  $cooking_classes_slider_img_height = get_theme_mod('cooking_classes_slider_img_height');
  if($cooking_classes_slider_img_height != false){
      $cooking_classes_color_scheme_css .='#slider .content{';
          $cooking_classes_color_scheme_css .='height: '.esc_attr($cooking_classes_slider_img_height).' !important;';
      $cooking_classes_color_scheme_css .='}';
  }

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

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

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

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

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

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

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

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

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

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

/*--------------------------- Footer image position -------------------*/

$cooking_classes_footer_img_position = get_theme_mod('cooking_classes_footer_img_position','center center');
if($cooking_classes_footer_img_position != false){
    $cooking_classes_color_scheme_css .='.footer-widget{';
        $cooking_classes_color_scheme_css .='background-position: '.esc_attr($cooking_classes_footer_img_position).';';
    $cooking_classes_color_scheme_css .='}';
}	

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

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

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

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

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

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

/*--------------------------- Post Layout -------------------*/

$cooking_classes_blog_layouts = get_theme_mod('cooking_classes_blog_layout_option_setting', 'Left');
if ($cooking_classes_blog_layouts == 'Left') {
    $cooking_classes_color_scheme_css .= '.postsec-list .listarticle{';
    $cooking_classes_color_scheme_css .= 'text-align:left;';
    $cooking_classes_color_scheme_css .= '}';
} elseif ($cooking_classes_blog_layouts == 'Center') {
    $cooking_classes_color_scheme_css .= '.postsec-list .listarticle{';
    $cooking_classes_color_scheme_css .= 'text-align:center;';
    $cooking_classes_color_scheme_css .= '}';
} elseif ($cooking_classes_blog_layouts == 'Right') {
    $cooking_classes_color_scheme_css .= '.postsec-list .listarticle{';
    $cooking_classes_color_scheme_css .= 'text-align:right;';
    $cooking_classes_color_scheme_css .= '}';
}