<?php 
	$digital_marketer_custom_css ='';

/*----------------Related Product show/hide -------------------*/

$digital_marketer_enable_related_product = get_theme_mod('digital_marketer_enable_related_product',1);

	if($digital_marketer_enable_related_product == 0){
		$digital_marketer_custom_css .='.related.products{';
			$digital_marketer_custom_css .='display: none;';
		$digital_marketer_custom_css .='}';
	}

/*----------------blog post content alignment -------------------*/

$digital_marketer_blog_Post_content_layout = get_theme_mod( 'digital_marketer_blog_Post_content_layout','Left');
    if($digital_marketer_blog_Post_content_layout == 'Left'){
		$digital_marketer_custom_css .='.ct-post-wrapper .card-item {';
			$digital_marketer_custom_css .='text-align:start;';
		$digital_marketer_custom_css .='}';
	}else if($digital_marketer_blog_Post_content_layout == 'Center'){
		$digital_marketer_custom_css .='.ct-post-wrapper .card-item {';
			$digital_marketer_custom_css .='text-align:center;';
		$digital_marketer_custom_css .='}';
	}else if($digital_marketer_blog_Post_content_layout == 'Right'){
		$digital_marketer_custom_css .='.ct-post-wrapper .card-item {';
			$digital_marketer_custom_css .='text-align:end;';
		$digital_marketer_custom_css .='}';
	}

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

    $digital_marketer_footer_bg_image = get_theme_mod('digital_marketer_footer_bg_image');
    if($digital_marketer_footer_bg_image != false){
        $digital_marketer_custom_css .='.footer-top{';
            $digital_marketer_custom_css .='background: url('.esc_attr($digital_marketer_footer_bg_image).');';
        $digital_marketer_custom_css .='}';
    }

	/*--------------------------- Go to top positions -------------------*/

    $digital_marketer_go_to_top_position = get_theme_mod( 'digital_marketer_go_to_top_position','Right');
    if($digital_marketer_go_to_top_position == 'Right'){
        $digital_marketer_custom_css .='.footer-go-to-top{';
            $digital_marketer_custom_css .='right: 20px;';
        $digital_marketer_custom_css .='}';
    }else if($digital_marketer_go_to_top_position == 'Left'){
        $digital_marketer_custom_css .='.footer-go-to-top{';
            $digital_marketer_custom_css .='left: 20px;';
        $digital_marketer_custom_css .='}';
    }else if($digital_marketer_go_to_top_position == 'Center'){
        $digital_marketer_custom_css .='.footer-go-to-top{';
            $digital_marketer_custom_css .='right: 50%;left: 50%;';
        $digital_marketer_custom_css .='}';
    }

    /*--------------------------- Woocommerce Product Sale Positions -------------------*/

    $digital_marketer_product_sale = get_theme_mod( 'digital_marketer_woocommerce_product_sale','Right');
    if($digital_marketer_product_sale == 'Right'){
        $digital_marketer_custom_css .='.woocommerce ul.products li.product .onsale{';
            $digital_marketer_custom_css .='left: auto; ';
        $digital_marketer_custom_css .='}';
    }else if($digital_marketer_product_sale == 'Left'){
        $digital_marketer_custom_css .='.woocommerce ul.products li.product .onsale{';
            $digital_marketer_custom_css .='right: auto;left:0;';
        $digital_marketer_custom_css .='}';
    }else if($digital_marketer_product_sale == 'Center'){
        $digital_marketer_custom_css .='.woocommerce ul.products li.product .onsale{';
            $digital_marketer_custom_css .='right: 50%; left: 50%; ';
        $digital_marketer_custom_css .='}';
    }

    /*-------------------- Primary Color -------------------*/

	$digital_marketer_primary_color = get_theme_mod('digital_marketer_primary_color', '#6754e9'); // Add a fallback if the color isn't set

	if ($digital_marketer_primary_color) {
		$digital_marketer_custom_css .= ':root {';
		$digital_marketer_custom_css .= '--secondary-color: ' . esc_attr($digital_marketer_primary_color) . ';';
		$digital_marketer_custom_css .= '}';
	}

    /*----------------Enable/Disable Breadcrumbs -------------------*/

    $digital_marketer_enable_breadcrumbs = get_theme_mod('digital_marketer_enable_breadcrumbs',1);

    if($digital_marketer_enable_breadcrumbs == 0){
        $digital_marketer_custom_css .='.digital-marketer-breadcrumbs, nav.woocommerce-breadcrumb{';
            $digital_marketer_custom_css .='display: none;';
        $digital_marketer_custom_css .='}';
    }