<?php 
	$solar_generator_custom_css ='';

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

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

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

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

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

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

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

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

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

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

    $solar_generator_footer_attachment = get_theme_mod( 'solar_generator_background_attachment','scroll');
    if($solar_generator_footer_attachment == 'fixed'){
        $solar_generator_custom_css .='.footer-top{';
            $solar_generator_custom_css .='background-attachment: fixed;';
        $solar_generator_custom_css .='}';
    }elseif ($solar_generator_footer_attachment == 'scroll'){
        $solar_generator_custom_css .='.footer-top{';
            $solar_generator_custom_css .='background-attachment: scroll;';
        $solar_generator_custom_css .='}';
    }

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

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

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

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


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

	$solar_generator_primary_color = get_theme_mod('solar_generator_primary_color', '#539D56'); // Add a fallback if the color isn't set

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


	/*--------------------------- slider-------------------*/

    $solar_generator_enable_slider = get_theme_mod('solar_generator_enable_slider', 0);
    if($solar_generator_enable_slider != 1){
        $solar_generator_custom_css .='.page-template-revolution-home .header-menu-box{';
            $solar_generator_custom_css .='position:static;';
        $solar_generator_custom_css .='}';
         $solar_generator_custom_css .='.page-template-revolution-home .site-branding .site-title a, .page-template-revolution-home .main-navigation ul#primary-menu>li>a, .page-template-revolution-home .main-navigation div#primary-menu>ul>li>a, .page-template-revolution-home .site-description{';
            $solar_generator_custom_css .='color:#000;';
        $solar_generator_custom_css .='}';
        $solar_generator_custom_css .='.page-template-revolution-home .header-button a:hover{';
            $solar_generator_custom_css .='outline-color:#000;background-color:#000; color:#fff;';
        $solar_generator_custom_css .='}';
        $solar_generator_custom_css .='.page-template-revolution-home .header-menu-box{';
            $solar_generator_custom_css .='border-bottom:1px solid #ccc;';
        $solar_generator_custom_css .='}';
    }

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

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

    if($solar_generator_enable_breadcrumbs == 0){
        $solar_generator_custom_css .='.solar-generator-breadcrumbs, nav.woocommerce-breadcrumb{';
            $solar_generator_custom_css .='display: none;';
        $solar_generator_custom_css .='}';
    }