<?php 
	$renovation_roofing_custom_css ='';

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

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

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

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

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

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

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

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

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

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

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

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

	$renovation_roofing_primary_color = get_theme_mod('renovation_roofing_primary_color', '#3c3531'); // Add a fallback if the color isn't set

	if ($renovation_roofing_primary_color) {
		$renovation_roofing_custom_css .= ':root {';
		$renovation_roofing_custom_css .= '--primary-color: ' . esc_attr($renovation_roofing_primary_color) . ';';
		$renovation_roofing_custom_css .= '}';
	}

    /*-------------------- Secondary Color -------------------*/

	$renovation_roofing_secondary_color = get_theme_mod('renovation_roofing_secondary_color', '#a47c68'); // Add a fallback if the color isn't set

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

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

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

    if($renovation_roofing_enable_breadcrumbs == 0){
        $renovation_roofing_custom_css .='.renovation-roofing-breadcrumbs, nav.woocommerce-breadcrumb{';
            $renovation_roofing_custom_css .='display: none;';
        $renovation_roofing_custom_css .='}';
    }