<?php 
	$rev_orphanage_custom_css ='';

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

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

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

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

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

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

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

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

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

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

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

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

	$rev_orphanage_primary_color = get_theme_mod('rev_orphanage_primary_color', '#15C8A0'); // Add a fallback if the color isn't set

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

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

	$rev_orphanage_secondary_color = get_theme_mod('rev_orphanage_secondary_color', '#1F2230'); // Add a fallback if the color isn't set

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

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

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

    if($rev_orphanage_enable_breadcrumbs == 0){
        $rev_orphanage_custom_css .='.rev-orphanage-breadcrumbs, nav.woocommerce-breadcrumb{';
            $rev_orphanage_custom_css .='display: none;';
        $rev_orphanage_custom_css .='}';
    }