<?php 
	$writer_portfolio_custom_css ='';

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

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

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

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

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

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

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

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

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

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

    $writer_portfolio_footer_attachment = get_theme_mod( 'writer_portfolio_background_attachment','scroll');
    if($writer_portfolio_footer_attachment == 'fixed'){
        $writer_portfolio_custom_css .='.footer-top{';
            $writer_portfolio_custom_css .='background-attachment: fixed;';
        $writer_portfolio_custom_css .='}';
    }elseif ($writer_portfolio_footer_attachment == 'scroll'){
        $writer_portfolio_custom_css .='.footer-top{';
            $writer_portfolio_custom_css .='background-attachment: scroll;';
        $writer_portfolio_custom_css .='}';
    }

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

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

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

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

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

	$writer_portfolio_primary_color = get_theme_mod('writer_portfolio_primary_color', '#1B4ED3'); // Add a fallback if the color isn't set
	if ($writer_portfolio_primary_color) {
		$writer_portfolio_custom_css .= ':root {';
		$writer_portfolio_custom_css .= '--primary-color: ' . esc_attr($writer_portfolio_primary_color) . ';';
		$writer_portfolio_custom_css .= '}';
	}

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

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

     /*--------------------------- Slider -------------------*/
    $writer_portfolio_enable_slider = get_theme_mod('writer_portfolio_enable_slider', 0);
    if ($writer_portfolio_enable_slider == false) {
        $writer_portfolio_custom_css .= '.page-template-revolution-home .site-branding{';
        $writer_portfolio_custom_css .= 'margin:0;';
        $writer_portfolio_custom_css .= '}';
        $writer_portfolio_custom_css .= '.page-template-revolution-home .header-menu-box{';
        $writer_portfolio_custom_css .= 'position:static;';
        $writer_portfolio_custom_css .= '}';
    }

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

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

    if($writer_portfolio_enable_breadcrumbs == 0){
        $writer_portfolio_custom_css .='.writer-portfolio-breadcrumbs, nav.woocommerce-breadcrumb{';
            $writer_portfolio_custom_css .='display: none;';
        $writer_portfolio_custom_css .='}';
    }