<?php

$classic_toy_store_first_color = get_theme_mod('classic_toy_store_first_color');
$classic_toy_store_second_color = get_theme_mod('classic_toy_store_second_color');
$classic_toy_store_third_color = get_theme_mod('classic_toy_store_third_color');
$classic_toy_store_fourth_color = get_theme_mod('classic_toy_store_fourth_color');
$classic_toy_store_fifth_color = get_theme_mod('classic_toy_store_fifth_color');
$classic_toy_store_color_scheme_css = '';

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

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

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

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

/*------------------ Global Third Color -----------*/

if ($classic_toy_store_third_color) {
  $classic_toy_store_color_scheme_css .= ':root {';
  $classic_toy_store_color_scheme_css .= '--third-theme-color: ' . esc_attr($classic_toy_store_third_color) . ' !important;';
  $classic_toy_store_color_scheme_css .= '} ';
}

/*------------------ Global Fourth Color -----------*/

if ($classic_toy_store_fourth_color) {
  $classic_toy_store_color_scheme_css .= ':root {';
  $classic_toy_store_color_scheme_css .= '--fourth-theme-color: ' . esc_attr($classic_toy_store_fourth_color) . ' !important;';
  $classic_toy_store_color_scheme_css .= '} ';
}

/*------------------ Global Fifth Color -----------*/

if ($classic_toy_store_fifth_color) {
  $classic_toy_store_color_scheme_css .= ':root {';
  $classic_toy_store_color_scheme_css .= '--fifth-theme-color: ' . esc_attr($classic_toy_store_fifth_color) . ' !important;';
  $classic_toy_store_color_scheme_css .= '} ';
}

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

$classic_toy_store_wave_color1 = get_theme_mod('classic_toy_store_wave_color1');
if($classic_toy_store_wave_color1 != false){
    $classic_toy_store_color_scheme_css .='.wave-img1 svg path, .banner-img .img-bg svg circle:nth-child(5), .banner-img .img-bg svg circle:nth-child(6){';
      $classic_toy_store_color_scheme_css .='fill: '.esc_html($classic_toy_store_wave_color1).';';
    $classic_toy_store_color_scheme_css .='}';
}

$classic_toy_store_wave_color2 = get_theme_mod('classic_toy_store_wave_color2');
if($classic_toy_store_wave_color2 != false){
    $classic_toy_store_color_scheme_css .='.wave-img2 svg path, .banner-img .img-bg svg circle:nth-child(3), .banner-img .img-bg svg circle:nth-child(4){';
      $classic_toy_store_color_scheme_css .='fill: '.esc_html($classic_toy_store_wave_color2).';';
    $classic_toy_store_color_scheme_css .='}';
}

$classic_toy_store_wave_color3 = get_theme_mod('classic_toy_store_wave_color3');
if($classic_toy_store_wave_color3 != false){
    $classic_toy_store_color_scheme_css .='.wave-img3 svg path, .banner-img .img-bg svg path:nth-child(1){';
      $classic_toy_store_color_scheme_css .='fill: '.esc_html($classic_toy_store_wave_color3).';';
    $classic_toy_store_color_scheme_css .='}';
}

$classic_toy_store_wave_color4 = get_theme_mod('classic_toy_store_wave_color4');
if($classic_toy_store_wave_color4 != false){
    $classic_toy_store_color_scheme_css .='.wave-img4 svg path, .banner-img .img-bg svg path:nth-child(2){';
      $classic_toy_store_color_scheme_css .='fill: '.esc_html($classic_toy_store_wave_color4).';';
    $classic_toy_store_color_scheme_css .='}';
}

//---------------------------------Logo-Max-height--------- 
$classic_toy_store_logo_width = get_theme_mod('classic_toy_store_logo_width');
if($classic_toy_store_logo_width != false){
    $classic_toy_store_color_scheme_css .='.classic-toy-store-logo img{';
      $classic_toy_store_color_scheme_css .='width: '.esc_html($classic_toy_store_logo_width).'px;';
    $classic_toy_store_color_scheme_css .='}';
}

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

$classic_toy_store_woo_product_img_border_radius = get_theme_mod('classic_toy_store_woo_product_img_border_radius');
if($classic_toy_store_woo_product_img_border_radius != false){
    $classic_toy_store_color_scheme_css .='.woocommerce-shop.woocommerce .product-content .product-image img{';
    $classic_toy_store_color_scheme_css .='border-radius: '.esc_attr($classic_toy_store_woo_product_img_border_radius).'px;';
    $classic_toy_store_color_scheme_css .='}';
}  

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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