<?php

$classic_fashion_blog_first_color = get_theme_mod('classic_fashion_blog_first_color');
$classic_fashion_blog_second_color = get_theme_mod('classic_fashion_blog_second_color');
$classic_fashion_blog_color_scheme_css = '';

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

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

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

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

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

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

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

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

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

/*------------------ Media Queries -----------------*/

// Media query for max-width: 767px
$classic_fashion_blog_color_scheme_css .= '@media screen and (max-width: 767px) {
  .page-template-template-home-page .mainhead, #banner-cat, .page-template-template-home-page .product-cart .cart-count {
    background-color: ' . esc_attr($classic_fashion_blog_second_color) . ' !important;
  }
}';

// Media query for 768px to 991px
$classic_fashion_blog_color_scheme_css .= '@media screen and (min-width: 768px) and (max-width: 991px) {
  .page-template-template-home-page .mainhead, #banner-cat{
     background-color: ' . esc_attr($classic_fashion_blog_second_color) . ' !important;
  }
  .page-template-template-home-page .header .toggle-nav button{
     background: ' . esc_attr($classic_fashion_blog_second_color) . ' !important;
  }
}';

// Media query for 992px to 1199px
$classic_fashion_blog_color_scheme_css .= '@media screen and (min-width: 992px) and (max-width: 1199px) {
  .page-template-template-home-page .mainhead, #banner-cat{
      background-image: linear-gradient(to right, ' . esc_attr($classic_fashion_blog_second_color) . ' 90%, #F5F5F5 10%) !important;
  }
}';

// Media query for 1200px to 1399px
$classic_fashion_blog_color_scheme_css .= '@media screen and (min-width: 1200px) and (max-width: 1399px) {
  .page-template-template-home-page .mainhead, #banner-cat{
      background-image: linear-gradient(to right, ' . esc_attr($classic_fashion_blog_second_color) . ' 90%, #F5F5F5 10%) !important;
  }
}';

// Media query for 1400px to 1599px
$classic_fashion_blog_color_scheme_css .= '@media screen and (min-width: 1400px) and (max-width: 1599px) {
  .page-template-template-home-page .mainhead, #banner-cat{
      background-image: linear-gradient(to right, ' . esc_attr($classic_fashion_blog_second_color) . ' 90%, #F5F5F5 10%) !important;
  }
}';

// Media query for 1600px to 1800px
$classic_fashion_blog_color_scheme_css .= '@media screen and (min-width: 1600px) and (max-width: 1800px) {
  .page-template-template-home-page .mainhead, #banner-cat{
      background-image: linear-gradient(to right, ' . esc_attr($classic_fashion_blog_second_color) . ' 90%, #F5F5F5 10%) !important;
  }
}';

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

  if($classic_fashion_blog_logo_width != false){

    $classic_fashion_blog_color_scheme_css .='.logo img{';

      $classic_fashion_blog_color_scheme_css .='width: '.esc_html($classic_fashion_blog_logo_width).'px;';

    $classic_fashion_blog_color_scheme_css .='}';
  }

$classic_fashion_blog_banner_color = get_theme_mod('classic_fashion_blog_banner_color');
  if($classic_fashion_blog_banner_color != false){
    $classic_fashion_blog_color_scheme_css .='.page-template-template-home-page .mainhead, #banner-cat{';
      $classic_fashion_blog_color_scheme_css .='background-image: linear-gradient(to right, '.esc_attr($classic_fashion_blog_banner_color).' 86%, #F5F5F5 14%);';
    $classic_fashion_blog_color_scheme_css .='}';
    $classic_fashion_blog_color_scheme_css .='#banner-cat .banner-side{';
      $classic_fashion_blog_color_scheme_css .='background: '.esc_attr($classic_fashion_blog_banner_color).'';
    $classic_fashion_blog_color_scheme_css .='}';
  }

$classic_fashion_blog_img_bg_color = get_theme_mod('classic_fashion_blog_img_bg_color');
  if($classic_fashion_blog_img_bg_color != false){
    $classic_fashion_blog_color_scheme_css .='#banner-cat .image-bg1, #banner-cat .image-bg2, #banner-cat .banner-right-img .imagebox:before, #banner-cat .banner-right-img .imagebox:after{';
      $classic_fashion_blog_color_scheme_css .='background: '.esc_attr($classic_fashion_blog_img_bg_color).';';
    $classic_fashion_blog_color_scheme_css .='}';
  }

/*--------------------------- Preloader Background Image ------------*/

$classic_fashion_blog_preloader_bg_image = get_theme_mod('classic_fashion_blog_preloader_bg_image');
if($classic_fashion_blog_preloader_bg_image != false){
  $classic_fashion_blog_color_scheme_css .='#preloader{';
    $classic_fashion_blog_color_scheme_css .='background: url('.esc_attr($classic_fashion_blog_preloader_bg_image).'); background-size: cover;';
  $classic_fashion_blog_color_scheme_css .='}';
}

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

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

/*--------------------------- Woocommerce Product Image Border Radius -------------------*/
$classic_fashion_blog_woo_product_img_border_radius = get_theme_mod('classic_fashion_blog_woo_product_img_border_radius');
  if($classic_fashion_blog_woo_product_img_border_radius != false){
    $classic_fashion_blog_color_scheme_css .='.woocommerce ul.products li.product a img{';
    $classic_fashion_blog_color_scheme_css .='border-radius: '.esc_attr($classic_fashion_blog_woo_product_img_border_radius).'px;';
    $classic_fashion_blog_color_scheme_css .='}';
}  

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

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

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

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

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

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

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

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

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

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