<?php 
	$automotive_parts_custom_css ='';

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

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

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

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

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

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

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

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

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

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

    $automotive_parts_footer_attachment = get_theme_mod( 'automotive_parts_background_attachment','scroll');
    if($automotive_parts_footer_attachment == 'fixed'){
        $automotive_parts_custom_css .='.footer-top{';
            $automotive_parts_custom_css .='background-attachment: fixed;';
        $automotive_parts_custom_css .='}';
    }elseif ($automotive_parts_footer_attachment == 'scroll'){
        $automotive_parts_custom_css .='.footer-top{';
            $automotive_parts_custom_css .='background-attachment: scroll;';
        $automotive_parts_custom_css .='}';
    }

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

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

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

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

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

	$automotive_parts_primary_color = get_theme_mod('automotive_parts_primary_color', '#E52727'); // Add a fallback if the color isn't set
	if ($automotive_parts_primary_color) {
		$automotive_parts_custom_css .= ':root {';
		$automotive_parts_custom_css .= '--primary-color: ' . esc_attr($automotive_parts_primary_color) . ';';
		$automotive_parts_custom_css .= '}';
	}

    $automotive_parts_secondary_color = get_theme_mod('automotive_parts_secondary_color', '#FDB919'); // Add a fallback if the color isn't set
    if ($automotive_parts_secondary_color) {
        $automotive_parts_custom_css .= ':root {';
        $automotive_parts_custom_css .= '--secondary-color: ' . esc_attr($automotive_parts_secondary_color) . ';';
        $automotive_parts_custom_css .= '}';
    }


    /*--------------------------- slider-------------------*/

    $automotive_parts_enable_slider = get_theme_mod('automotive_parts_enable_slider', 0);
    if($automotive_parts_enable_slider != 1){
        $automotive_parts_custom_css .='.page-template-revolution-home .header-menu-box .container{';
            $automotive_parts_custom_css .='position:static;';
        $automotive_parts_custom_css .='}';
    }

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

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

    if($automotive_parts_enable_breadcrumbs == 0){
        $automotive_parts_custom_css .='.automotive-parts-breadcrumbs, nav.woocommerce-breadcrumb{';
            $automotive_parts_custom_css .='display: none;';
        $automotive_parts_custom_css .='}';
    }