<?php

$foodie_review_blog_first_color = get_theme_mod('foodie_review_blog_first_color');
$foodie_review_blog_color_scheme_css = '';

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

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

// Sticky Header
$foodie_review_blog_resp_stickyheader = get_theme_mod( 'foodie_review_blog_sticky_header',false);
if($foodie_review_blog_resp_stickyheader != true){
    $foodie_review_blog_color_scheme_css .='.header-fixed{';
        $foodie_review_blog_color_scheme_css .='position:static;';
    $foodie_review_blog_color_scheme_css .='} ';
}
if($foodie_review_blog_resp_stickyheader == true){
    $foodie_review_blog_color_scheme_css .='@media screen and (max-width:575px) {';
    $foodie_review_blog_color_scheme_css .='.header-fixed{';
        $foodie_review_blog_color_scheme_css .='position:fixed;';
    $foodie_review_blog_color_scheme_css .='} }';
}else if($foodie_review_blog_resp_stickyheader == false){
    $foodie_review_blog_color_scheme_css .='@media screen and (max-width:575px){';
    $foodie_review_blog_color_scheme_css .='.header-fixed{';
        $foodie_review_blog_color_scheme_css .='position:static;';
    $foodie_review_blog_color_scheme_css .='} }';
}

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

  if($foodie_review_blog_logo_width != false){

    $foodie_review_blog_color_scheme_css .='.foodie-review-blog-logo img{';

      $foodie_review_blog_color_scheme_css .='width: '.esc_html($foodie_review_blog_logo_width).'px;';

    $foodie_review_blog_color_scheme_css .='}';
  }

  // by default header
  $foodie_review_blog_slider = get_theme_mod('foodie_review_blog_slider', 'true');

  if($foodie_review_blog_slider != true){

  $foodie_review_blog_color_scheme_css .='.page-template-template-home-page .main-header{';

    $foodie_review_blog_color_scheme_css .='position: static;';

  $foodie_review_blog_color_scheme_css .='}';

  }

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

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

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

$foodie_review_blog_footer_bg_image = get_theme_mod('foodie_review_blog_footer_bg_image');
if($foodie_review_blog_footer_bg_image != false){
    $foodie_review_blog_color_scheme_css .='#footer{';
        $foodie_review_blog_color_scheme_css .='background: url('.esc_attr($foodie_review_blog_footer_bg_image).');';
        $foodie_review_blog_color_scheme_css .= 'background-size: cover;';  
    $foodie_review_blog_color_scheme_css .='}';
}

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

$foodie_review_blog_footer_img_position = get_theme_mod('foodie_review_blog_footer_img_position','center center');
if($foodie_review_blog_footer_img_position != false){
    $foodie_review_blog_color_scheme_css .='#footer{';
        $foodie_review_blog_color_scheme_css .='background-position: '.esc_attr($foodie_review_blog_footer_img_position).';';
    $foodie_review_blog_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

$foodie_review_blog_theme_lay = get_theme_mod( 'foodie_review_blog_menu_text_transform','Capitalize');
if($foodie_review_blog_theme_lay == 'Uppercase'){
    $foodie_review_blog_color_scheme_css .='.main-nav a, .page-template-template-home-page .main-nav a{';
        $foodie_review_blog_color_scheme_css .='text-transform: uppercase;';
    $foodie_review_blog_color_scheme_css .='}';
}else if($foodie_review_blog_theme_lay == 'Lowercase'){
    $foodie_review_blog_color_scheme_css .='.main-nav a, .page-template-template-home-page .main-nav a{';
        $foodie_review_blog_color_scheme_css .='text-transform: lowercase;';
    $foodie_review_blog_color_scheme_css .='}';
}
else if($foodie_review_blog_theme_lay == 'Capitalize'){
    $foodie_review_blog_color_scheme_css .='.main-nav a, .page-template-template-home-page .main-nav a{';
        $foodie_review_blog_color_scheme_css .='text-transform: capitalize;';
    $foodie_review_blog_color_scheme_css .='}';
}

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

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