<?php 
	$legal_services_firm_custom_css ='';

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

    if($legal_services_firm_enable_breadcrumbs == 0){
        $legal_services_firm_custom_css .='.legal-services-firm-breadcrumbs, nav.woocommerce-breadcrumb{';
            $legal_services_firm_custom_css .='display: none;';
        $legal_services_firm_custom_css .='}';
    }