<?php

$classic_marketing_agency_first_color = get_theme_mod('classic_marketing_agency_first_color');
$classic_marketing_agency_second_color = get_theme_mod('classic_marketing_agency_second_color');
$classic_marketing_agency_color_scheme_css = '';

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

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

  $classic_marketing_agency_color_scheme_css .= '#slider-cat::before {';
  $classic_marketing_agency_color_scheme_css .= 'background: var(--first-theme-color);';
  $classic_marketing_agency_color_scheme_css .= 'opacity: 0.9';
  $classic_marketing_agency_color_scheme_css .= '} ';
}

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

if ($classic_marketing_agency_second_color) {
  $classic_marketing_agency_color_scheme_css .= ':root {';
  $classic_marketing_agency_color_scheme_css .= '--second-theme-color: ' . esc_attr($classic_marketing_agency_second_color) . ';';
  $classic_marketing_agency_color_scheme_css .= '} ';
  
  $classic_marketing_agency_color_scheme_css .= '.slide-cat .hover-overlay {';
  $classic_marketing_agency_color_scheme_css .= 'background: var(--second-theme-color);';
  $classic_marketing_agency_color_scheme_css .= 'opacity: 0.6';
  $classic_marketing_agency_color_scheme_css .= '} ';
}

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

//---------------------------------Logo-Max-height--------- 
  $classic_marketing_agency_logo_width = get_theme_mod('classic_marketing_agency_logo_width', 100);

  if($classic_marketing_agency_logo_width != false){

    $classic_marketing_agency_color_scheme_css .='.classic-marketing-agency-logo img{';

      $classic_marketing_agency_color_scheme_css .='width: '.esc_html($classic_marketing_agency_logo_width).'px;';

    $classic_marketing_agency_color_scheme_css .='}';
  }

  // by default header
  $classic_marketing_agency_slider = get_theme_mod('classic_marketing_agency_slider');

  if($classic_marketing_agency_slider != true){

  $classic_marketing_agency_color_scheme_css .='.page-template-template-home-page .headerbox{';

    $classic_marketing_agency_color_scheme_css .='position: static; background-color: var(--first-theme-color);';

  $classic_marketing_agency_color_scheme_css .='}';
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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