<?php

$classic_digital_marketing_first_color = get_theme_mod('classic_digital_marketing_first_color');
$classic_digital_marketing_second_color = get_theme_mod('classic_digital_marketing_second_color');
$classic_digital_marketing_color_scheme_css = '';

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

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

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

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

$classic_digital_marketing_color_scheme_css .='#slider .overlayer {';
$classic_digital_marketing_color_scheme_css .='background: '.esc_attr($classic_digital_marketing_second_color).'!important;';
$classic_digital_marketing_color_scheme_css .='}';

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

if($classic_digital_marketing_logo_width != false){

  $classic_digital_marketing_color_scheme_css .='.logo img{';

    $classic_digital_marketing_color_scheme_css .='width: '.esc_html($classic_digital_marketing_logo_width).'px;';

  $classic_digital_marketing_color_scheme_css .='}';
}

// slider hide css
$classic_digital_marketing_hidcatslide = get_theme_mod('classic_digital_marketing_hide_categorysec', false);
  $classic_digital_marketing_slidersection = get_theme_mod('classic_digital_marketing_slidersection');
if($classic_digital_marketing_hidcatslide != true || $classic_digital_marketing_slidersection != true){
  $classic_digital_marketing_color_scheme_css .='.page-template-template-home-page .mainhead{';
    $classic_digital_marketing_color_scheme_css .='position:static;background-color: #35E1B2;';
  $classic_digital_marketing_color_scheme_css .='}';
  $classic_digital_marketing_color_scheme_css .='#blog{';
    $classic_digital_marketing_color_scheme_css .='margin-top:5em !important;';
  $classic_digital_marketing_color_scheme_css .='}';
}

//social media
$classic_digital_marketing_fb_link = get_theme_mod('classic_digital_marketing_fb_link');
$classic_digital_marketing_insta_link = get_theme_mod('classic_digital_marketing_insta_link');
$classic_digital_marketing_whatsapp_link = get_theme_mod('classic_digital_marketing_whatsapp_link');
$classic_digital_marketing_linkedin_link = get_theme_mod('classic_digital_marketing_linkedin_link');
$classic_digital_marketing_youtube_link = get_theme_mod('classic_digital_marketing_youtube_link');
if($classic_digital_marketing_fb_link != true && $classic_digital_marketing_insta_link != true && $classic_digital_marketing_whatsapp_link != true && $classic_digital_marketing_linkedin_link != true && $classic_digital_marketing_youtube_link != true){
$classic_digital_marketing_color_scheme_css .='.social-icon{';
  $classic_digital_marketing_color_scheme_css .='padding:0 !important; background:none;';
$classic_digital_marketing_color_scheme_css .='}';
$classic_digital_marketing_color_scheme_css .='.menu-wrapper{';
  $classic_digital_marketing_color_scheme_css .='display:block;';
$classic_digital_marketing_color_scheme_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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