<?php 
	$machine_repair_custom_css ='';

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

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

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

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

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

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

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

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

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

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

    $machine_repair_footer_attachment = get_theme_mod( 'machine_repair_background_attachment','scroll');
    if($machine_repair_footer_attachment == 'fixed'){
        $machine_repair_custom_css .='.footer-top{';
            $machine_repair_custom_css .='background-attachment: fixed;';
        $machine_repair_custom_css .='}';
    }elseif ($machine_repair_footer_attachment == 'scroll'){
        $machine_repair_custom_css .='.footer-top{';
            $machine_repair_custom_css .='background-attachment: scroll;';
        $machine_repair_custom_css .='}';
    }

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

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

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

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

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

	$machine_repair_primary_color = get_theme_mod('machine_repair_primary_color', '#2D72BB'); // Add a fallback if the color isn't set

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

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

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

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

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

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

    if($machine_repair_enable_breadcrumbs == 0){
        $machine_repair_custom_css .='.machine-repair-breadcrumbs, nav.woocommerce-breadcrumb{';
            $machine_repair_custom_css .='display: none;';
        $machine_repair_custom_css .='}';
    }