<?php 
	$news_current_affair_custom_css ='';

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

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

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

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

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

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

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

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

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

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

    $news_current_affair_footer_attachment = get_theme_mod( 'news_current_affair_background_attachment','scroll');
    if($news_current_affair_footer_attachment == 'fixed'){
        $news_current_affair_custom_css .='.footer-top{';
            $news_current_affair_custom_css .='background-attachment: fixed;';
        $news_current_affair_custom_css .='}';
    }elseif ($news_current_affair_footer_attachment == 'scroll'){
        $news_current_affair_custom_css .='.footer-top{';
            $news_current_affair_custom_css .='background-attachment: scroll;';
        $news_current_affair_custom_css .='}';
    }


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

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

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

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

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

	$news_current_affair_primary_color = get_theme_mod('news_current_affair_primary_color', '#684AFC'); // Add a fallback if the color isn't set
	if ($news_current_affair_primary_color) {
		$news_current_affair_custom_css .= ':root {';
		$news_current_affair_custom_css .= '--primary-color: ' . esc_attr($news_current_affair_primary_color) . ';';
		$news_current_affair_custom_css .= '}';
	}

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

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

    if($news_current_affair_enable_breadcrumbs == 0){
        $news_current_affair_custom_css .='.news-current-affair-breadcrumbs, nav.woocommerce-breadcrumb{';
            $news_current_affair_custom_css .='display: none;';
        $news_current_affair_custom_css .='}';
    }