<?php 
	$lights_store_custom_css ='';

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

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

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

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

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

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

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

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

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

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

    $lights_store_footer_attachment = get_theme_mod( 'lights_store_background_attachment','scroll');
    if($lights_store_footer_attachment == 'fixed'){
        $lights_store_custom_css .='.footer-top{';
            $lights_store_custom_css .='background-attachment: fixed;';
        $lights_store_custom_css .='}';
    }elseif ($lights_store_footer_attachment == 'scroll'){
        $lights_store_custom_css .='.footer-top{';
            $lights_store_custom_css .='background-attachment: scroll;';
        $lights_store_custom_css .='}';
    }

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

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

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

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

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

	$lights_store_primary_color = get_theme_mod('lights_store_primary_color', '#98c397'); // Add a fallback if the color isn't set

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

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

	$lights_store_secondary_color = get_theme_mod('lights_store_secondary_color', '#1F2230'); // Add a fallback if the color isn't set

	if ($lights_store_secondary_color) {
		$lights_store_custom_css .= ':root {';
		$lights_store_custom_css .= '--secondary-color: ' . esc_attr($lights_store_secondary_color) . ';';
		$lights_store_custom_css .= '}';
	}
    
    /*----------------Enable/Disable Breadcrumbs -------------------*/

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

    if($lights_store_enable_breadcrumbs == 0){
        $lights_store_custom_css .='.light-store-breadcrumbs, nav.woocommerce-breadcrumb{';
            $lights_store_custom_css .='display: none;';
        $lights_store_custom_css .='}';
    }