<?php 
	$estate_rental_listings_custom_css ='';

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

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

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

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

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

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

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

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

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

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

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

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

	$estate_rental_listings_primary_color = get_theme_mod('estate_rental_listings_primary_color', '#43cade'); // Add a fallback if the color isn't set

	if ($estate_rental_listings_primary_color) {
		$estate_rental_listings_custom_css .= ':root {';
		$estate_rental_listings_custom_css .= '--primry-color: ' . esc_attr($estate_rental_listings_primary_color) . ';';
		$estate_rental_listings_custom_css .= '}';
	}	

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

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

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

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

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

    if($estate_rental_listings_enable_breadcrumbs == 0){
        $estate_rental_listings_custom_css .='.estate-rental-listings-breadcrumbs, nav.woocommerce-breadcrumb{';
            $estate_rental_listings_custom_css .='display: none;';
        $estate_rental_listings_custom_css .='}';
    }