<?php 
	$supermarket_store_custom_css ='';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	if ($supermarket_store_secondary_color) {
		$supermarket_store_custom_css .= ':root {';
		$supermarket_store_custom_css .= '--tertiary-color: ' . esc_attr($supermarket_store_secondary_color) . ';';
		$supermarket_store_custom_css .= '}';
	}

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

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

    if($supermarket_store_enable_breadcrumbs == 0){
        $supermarket_store_custom_css .='.supermarket-store-breadcrumbs, nav.woocommerce-breadcrumb{';
            $supermarket_store_custom_css .='display: none;';
        $supermarket_store_custom_css .='}';
    }