<?php 
	$pizza_parlor_custom_css ='';


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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

    if($pizza_parlor_enable_breadcrumbs == 0){
        $pizza_parlor_custom_css .='.pizza-parlor-breadcrumbs, nav.woocommerce-breadcrumb{';
            $pizza_parlor_custom_css .='display: none;';
        $pizza_parlor_custom_css .='}';
    }