<?php 
	$rental_estate_realtor_custom_css ='';

    /*--------------------------- Menu Text Transform -------------------*/

    $rental_estate_realtor_footer_attachment = get_theme_mod( 'rental_estate_realtor_menu_text_transform','capitalize');
    if($rental_estate_realtor_footer_attachment == 'uppercase'){
        $rental_estate_realtor_custom_css .='.main-navigation ul#primary-menu>li>a, .main-navigation div#primary-menu>ul>li>a{';
            $rental_estate_realtor_custom_css .='text-transform: uppercase;';
        $rental_estate_realtor_custom_css .='}';
    }elseif ($rental_estate_realtor_footer_attachment == 'capitalize'){
        $rental_estate_realtor_custom_css .='.main-navigation ul#primary-menu>li>a, .main-navigation div#primary-menu>ul>li>a{';
            $rental_estate_realtor_custom_css .='text-transform: capitalize;';
        $rental_estate_realtor_custom_css .='}';
    }elseif ($rental_estate_realtor_footer_attachment == 'lowercase'){
        $rental_estate_realtor_custom_css .='.main-navigation ul#primary-menu>li>a, .main-navigation div#primary-menu>ul>li>a{';
            $rental_estate_realtor_custom_css .='text-transform: lowercase;';
        $rental_estate_realtor_custom_css .='}';
    }

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

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

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

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

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

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

    $rental_estate_realtor_footer_bg_image = get_theme_mod('rental_estate_realtor_footer_bg_image');
    if($rental_estate_realtor_footer_bg_image != false){
        $rental_estate_realtor_custom_css .= '.footer-top{';
        $rental_estate_realtor_custom_css .= 'background-image:url(' . esc_url($rental_estate_realtor_footer_bg_image) . ');';
        $rental_estate_realtor_custom_css .= 'background-size: cover;';
        $rental_estate_realtor_custom_css .= 'background-repeat:no-repeat;';
        $rental_estate_realtor_custom_css .= '}';
    }

    /*--------------------------- Footer Background Image Attachment -------------------*/

    $rental_estate_realtor_footer_attachment = get_theme_mod( 'rental_estate_realtor_background_attachment','scroll');
    if($rental_estate_realtor_footer_attachment == 'fixed'){
        $rental_estate_realtor_custom_css .='.footer-top{';
            $rental_estate_realtor_custom_css .='background-attachment: fixed;';
        $rental_estate_realtor_custom_css .='}';
    }elseif ($rental_estate_realtor_footer_attachment == 'scroll'){
        $rental_estate_realtor_custom_css .='.footer-top{';
            $rental_estate_realtor_custom_css .='background-attachment: scroll;';
        $rental_estate_realtor_custom_css .='}';
    }

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

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

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

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


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

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

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

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

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

    if($rental_estate_realtor_enable_breadcrumbs == 0){
        $rental_estate_realtor_custom_css .='.rental-estate-realtor-breadcrumbs, nav.woocommerce-breadcrumb{';
            $rental_estate_realtor_custom_css .='display: none;';
        $rental_estate_realtor_custom_css .='}';
    }

    /*----------------Enable/Disable slider -------------------*/

    $rental_estate_realtor_enable_slider = get_theme_mod('rental_estate_realtor_enable_slider', 0);

    if ( $rental_estate_realtor_enable_slider == 0 ) {
        $rental_estate_realtor_custom_css .= '.page-template-revolution-home .header-menu-box {';
            $rental_estate_realtor_custom_css .= 'position: static;';
        $rental_estate_realtor_custom_css .= '}';
        $rental_estate_realtor_custom_css .= '.page-template-revolution-home .site-header{';
            $rental_estate_realtor_custom_css .= 'background: #1b6f58;';
        $rental_estate_realtor_custom_css .= '}';
    }