<?php

    $gym_nutrition_shop_theme_css= "";

    /*--------------------------- Scroll to top positions -------------------*/

    $gym_nutrition_shop_scroll_position = get_theme_mod( 'gym_nutrition_shop_scroll_top_position','Right');
    if($gym_nutrition_shop_scroll_position == 'Right'){
        $gym_nutrition_shop_theme_css .='#button{';
            $gym_nutrition_shop_theme_css .='right: 20px;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_scroll_position == 'Left'){
        $gym_nutrition_shop_theme_css .='#button{';
            $gym_nutrition_shop_theme_css .='left: 20px;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_scroll_position == 'Center'){
        $gym_nutrition_shop_theme_css .='#button{';
            $gym_nutrition_shop_theme_css .='right: 50%;left: 50%;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Footer Widget Heading Alignment -------------------*/

    $gym_nutrition_shop_footer_widget_heading_alignment = get_theme_mod( 'gym_nutrition_shop_footer_widget_heading_alignment','Left');
    if($gym_nutrition_shop_footer_widget_heading_alignment == 'Left'){
        $gym_nutrition_shop_theme_css .='#colophon h5, h5.footer-column-widget-title{';
        $gym_nutrition_shop_theme_css .='text-align: left;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_footer_widget_heading_alignment == 'Center'){
        $gym_nutrition_shop_theme_css .='#colophon h5, h5.footer-column-widget-title{';
            $gym_nutrition_shop_theme_css .='text-align: center;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_footer_widget_heading_alignment == 'Right'){
        $gym_nutrition_shop_theme_css .='#colophon h5, h5.footer-column-widget-title{';
            $gym_nutrition_shop_theme_css .='text-align: right;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Footer Widget Content Alignment -------------------*/

    $gym_nutrition_shop_footer_widget_content_alignment = get_theme_mod( 'gym_nutrition_shop_footer_widget_content_alignment','Left');
    if($gym_nutrition_shop_footer_widget_content_alignment == 'Left'){
        $gym_nutrition_shop_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
        $gym_nutrition_shop_theme_css .='text-align: left;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_footer_widget_content_alignment == 'Center'){
        $gym_nutrition_shop_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
            $gym_nutrition_shop_theme_css .='text-align: center;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_footer_widget_content_alignment == 'Right'){
        $gym_nutrition_shop_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
            $gym_nutrition_shop_theme_css .='text-align: right;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Copyright Content Alignment -------------------*/

    $gym_nutrition_shop_copyright_content_alignment = get_theme_mod( 'gym_nutrition_shop_copyright_content_alignment','Center');
    if($gym_nutrition_shop_copyright_content_alignment == 'Left'){
        $gym_nutrition_shop_theme_css .='.footer-menu-left{';
        $gym_nutrition_shop_theme_css .='text-align: left !important;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_copyright_content_alignment == 'Center'){
        $gym_nutrition_shop_theme_css .='.footer-menu-left{';
            $gym_nutrition_shop_theme_css .='text-align: center !important;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_copyright_content_alignment == 'Right'){
        $gym_nutrition_shop_theme_css .='.footer-menu-left{';
            $gym_nutrition_shop_theme_css .='text-align: right !important;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*---------------------------Width Layout -------------------*/

    $gym_nutrition_shop_width_option = get_theme_mod( 'gym_nutrition_shop_width_option','Full Width');
    if($gym_nutrition_shop_width_option == 'Boxed Width'){
        $gym_nutrition_shop_theme_css .='body{';
            $gym_nutrition_shop_theme_css .='max-width: 1140px; width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;';
        $gym_nutrition_shop_theme_css .='}';
        $gym_nutrition_shop_theme_css .='.scrollup i{';
            $gym_nutrition_shop_theme_css .='right: 100px;';
        $gym_nutrition_shop_theme_css .='}';
        $gym_nutrition_shop_theme_css .='.page-template-custom-home-page .home-page-header{';
            $gym_nutrition_shop_theme_css .='padding: 0px 40px 0 10px;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_width_option == 'Wide Width'){
        $gym_nutrition_shop_theme_css .='body{';
            $gym_nutrition_shop_theme_css .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';
        $gym_nutrition_shop_theme_css .='}';
        $gym_nutrition_shop_theme_css .='.scrollup i{';
            $gym_nutrition_shop_theme_css .='right: 30px;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_width_option == 'Full Width'){
        $gym_nutrition_shop_theme_css .='body{';
            $gym_nutrition_shop_theme_css .='max-width: 100%;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*------------------ Nav Menus -------------------*/

    $gym_nutrition_shop_nav_menu = get_theme_mod( 'gym_nutrition_shop_nav_menu_text_transform','Capitalize');
    if($gym_nutrition_shop_nav_menu == 'Capitalize'){
        $gym_nutrition_shop_theme_css .='.site-navigation .primary-menu > li a{';
            $gym_nutrition_shop_theme_css .='text-transform:Capitalize;';
        $gym_nutrition_shop_theme_css .='}';
    }
    if($gym_nutrition_shop_nav_menu == 'Lowercase'){
        $gym_nutrition_shop_theme_css .='.site-navigation .primary-menu > li a{';
            $gym_nutrition_shop_theme_css .='text-transform:Lowercase;';
        $gym_nutrition_shop_theme_css .='}';
    }
    if($gym_nutrition_shop_nav_menu == 'Uppercase'){
        $gym_nutrition_shop_theme_css .='.site-navigation .primary-menu > li a{';
            $gym_nutrition_shop_theme_css .='text-transform:Uppercase;';
        $gym_nutrition_shop_theme_css .='}';
    }

    $gym_nutrition_shop_menu_font_size = get_theme_mod( 'gym_nutrition_shop_menu_font_size');
    if($gym_nutrition_shop_menu_font_size != ''){
        $gym_nutrition_shop_theme_css .='.site-navigation .primary-menu > li a{';
            $gym_nutrition_shop_theme_css .='font-size: '.esc_attr($gym_nutrition_shop_menu_font_size).'px;';
        $gym_nutrition_shop_theme_css .='}';
    }

    $gym_nutrition_shop_nav_menu_font_weight = get_theme_mod( 'gym_nutrition_shop_nav_menu_font_weight',600);
    if($gym_nutrition_shop_menu_font_size != ''){
        $gym_nutrition_shop_theme_css .='.site-navigation .primary-menu > li a{';
            $gym_nutrition_shop_theme_css .='font-weight: '.esc_attr($gym_nutrition_shop_nav_menu_font_weight).';';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*-------------------- Global First Color -------------------*/

    $gym_nutrition_shop_global_color = get_theme_mod('gym_nutrition_shop_global_color');

    if ($gym_nutrition_shop_global_color) {
        $gym_nutrition_shop_theme_css .= ':root {';
        $gym_nutrition_shop_theme_css .= '--first-color: ' . esc_attr($gym_nutrition_shop_global_color) . ' !important;';
        $gym_nutrition_shop_theme_css .= '} ';
    }

    /*-------------------- Heading typography -------------------*/

    $gym_nutrition_shop_heading_color = get_theme_mod('gym_nutrition_shop_heading_color');
    $gym_nutrition_shop_heading_font_family = get_theme_mod('gym_nutrition_shop_heading_font_family');
    $gym_nutrition_shop_heading_font_size = get_theme_mod('gym_nutrition_shop_heading_font_size');
    if($gym_nutrition_shop_heading_color != false || $gym_nutrition_shop_heading_font_family != false || $gym_nutrition_shop_heading_font_size != false){
        $gym_nutrition_shop_theme_css .='h1, h2, h3, h4, h5, h6, .navbar-brand h1.site-title, h2.entry-title, h1.entry-title, h2.page-title, #latest_post h2, h2.woocommerce-loop-product__title, #top-slider .slider-inner-box h3, .featured h3.main-heading, .article-box h3.entry-title, .featured h4.main-heading, #colophon h5, .sidebar h5{';
            $gym_nutrition_shop_theme_css .='color: '.esc_attr($gym_nutrition_shop_heading_color).'!important; 
            font-family: '.esc_attr($gym_nutrition_shop_heading_font_family).'!important;
            font-size: '.esc_attr($gym_nutrition_shop_heading_font_size).'px !important;';
        $gym_nutrition_shop_theme_css .='}';
    }

    $gym_nutrition_shop_paragraph_color = get_theme_mod('gym_nutrition_shop_paragraph_color');
    $gym_nutrition_shop_paragraph_font_family = get_theme_mod('gym_nutrition_shop_paragraph_font_family');
    $gym_nutrition_shop_paragraph_font_size = get_theme_mod('gym_nutrition_shop_paragraph_font_size');
    if($gym_nutrition_shop_paragraph_color != false || $gym_nutrition_shop_paragraph_font_family != false || $gym_nutrition_shop_paragraph_font_size != false){
        $gym_nutrition_shop_theme_css .='p, p.site-title, span, .article-box p, ul, li{';
            $gym_nutrition_shop_theme_css .='color: '.esc_attr($gym_nutrition_shop_paragraph_color).'!important; 
            font-family: '.esc_attr($gym_nutrition_shop_paragraph_font_family).'!important;
            font-size: '.esc_attr($gym_nutrition_shop_paragraph_font_size).'px !important;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*---------------- Logo CSS ----------------------*/
    $gym_nutrition_shop_logo_title_font_size = get_theme_mod( 'gym_nutrition_shop_logo_title_font_size');
    $gym_nutrition_shop_logo_tagline_font_size = get_theme_mod( 'gym_nutrition_shop_logo_tagline_font_size');
    if( $gym_nutrition_shop_logo_title_font_size != '') {
        $gym_nutrition_shop_theme_css .='#masthead .navbar-brand a{';
            $gym_nutrition_shop_theme_css .='font-size: '. $gym_nutrition_shop_logo_title_font_size. 'px;';
        $gym_nutrition_shop_theme_css .='}';
    }
    if( $gym_nutrition_shop_logo_tagline_font_size != '') {
        $gym_nutrition_shop_theme_css .='#masthead .navbar-brand p{';
            $gym_nutrition_shop_theme_css .='font-size: '. $gym_nutrition_shop_logo_tagline_font_size. 'px;';
        $gym_nutrition_shop_theme_css .='}';
    }

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

    $gym_nutrition_shop_product_sale = get_theme_mod( 'gym_nutrition_shop_woocommerce_product_sale','Right');
    if($gym_nutrition_shop_product_sale == 'Right'){
        $gym_nutrition_shop_theme_css .='.woocommerce ul.products li.product .onsale{';
            $gym_nutrition_shop_theme_css .='left: auto; right: 15px;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_product_sale == 'Left'){
        $gym_nutrition_shop_theme_css .='.woocommerce ul.products li.product .onsale{';
            $gym_nutrition_shop_theme_css .='left: 15px; right: auto;';
        $gym_nutrition_shop_theme_css .='}';
    }else if($gym_nutrition_shop_product_sale == 'Center'){
        $gym_nutrition_shop_theme_css .='.woocommerce ul.products li.product .onsale{';
            $gym_nutrition_shop_theme_css .='right: 50%;left: 50%;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Woocommerce Product Sale Border Radius -------------------*/

    $gym_nutrition_shop_woo_product_sale_border_radius = get_theme_mod('gym_nutrition_shop_woo_product_sale_border_radius');
    if($gym_nutrition_shop_woo_product_sale_border_radius != false){
        $gym_nutrition_shop_theme_css .='.woocommerce ul.products li.product .onsale{';
            $gym_nutrition_shop_theme_css .='border-radius: '.esc_attr($gym_nutrition_shop_woo_product_sale_border_radius).'px;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Woocommerce Related Products -------------------*/

    $gym_nutrition_shop_woocommerce_related_product_show_hide = get_theme_mod('gym_nutrition_shop_woocommerce_related_product_show_hide',true);
    if($gym_nutrition_shop_woocommerce_related_product_show_hide != true){
        $gym_nutrition_shop_theme_css .='.related.products{';
            $gym_nutrition_shop_theme_css .='display: none;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------- Woocommerce Product Border Radius -------------------*/

    $gym_nutrition_shop_woo_product_border_radius = get_theme_mod('gym_nutrition_shop_woo_product_border_radius', 0);
    if($gym_nutrition_shop_woo_product_border_radius != false){
        $gym_nutrition_shop_theme_css .='.woocommerce ul.products li.product a img{';
            $gym_nutrition_shop_theme_css .='border-radius: '.esc_attr($gym_nutrition_shop_woo_product_border_radius).'px;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Product Image Box Shadow -------------------*/

    $gym_nutrition_shop_woo_product_image_box_shadow = get_theme_mod('gym_nutrition_shop_woo_product_image_box_shadow',0);
    if($gym_nutrition_shop_woo_product_image_box_shadow != false){
        $gym_nutrition_shop_theme_css .='.woocommerce ul.products li.product a img{';
            $gym_nutrition_shop_theme_css .='box-shadow: '.esc_attr($gym_nutrition_shop_woo_product_image_box_shadow).'px '.esc_attr($gym_nutrition_shop_woo_product_image_box_shadow).'px '.esc_attr($gym_nutrition_shop_woo_product_image_box_shadow).'px #cccccc;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*--------------------------- Single Post Page Image Box Shadow -------------------*/

    $gym_nutrition_shop_single_post_page_image_box_shadow = get_theme_mod('gym_nutrition_shop_single_post_page_image_box_shadow',0);
    if($gym_nutrition_shop_single_post_page_image_box_shadow != false){
        $gym_nutrition_shop_theme_css .='.single-post .entry-header img{';
            $gym_nutrition_shop_theme_css .='box-shadow: '.esc_attr($gym_nutrition_shop_single_post_page_image_box_shadow).'px '.esc_attr($gym_nutrition_shop_single_post_page_image_box_shadow).'px '.esc_attr($gym_nutrition_shop_single_post_page_image_box_shadow).'px #cccccc;';
        $gym_nutrition_shop_theme_css .='}';
    }

    /*---------------- Single post Settings ------------------*/

    $gym_nutrition_shop_single_post_navigation_show_hide = get_theme_mod('gym_nutrition_shop_single_post_navigation_show_hide',true);
    if($gym_nutrition_shop_single_post_navigation_show_hide != true){
        $gym_nutrition_shop_theme_css .='.nav-links{';
            $gym_nutrition_shop_theme_css .='display: none;';
        $gym_nutrition_shop_theme_css .='}';
    }

     /*--------------------------- Single Post Page Image Border Radius -------------------*/

    $gym_nutrition_shop_single_post_page_image_border_radius = get_theme_mod('gym_nutrition_shop_single_post_page_image_border_radius', 0);
    if($gym_nutrition_shop_single_post_page_image_border_radius != false){
        $gym_nutrition_shop_theme_css .='.single-post .entry-header img{';
            $gym_nutrition_shop_theme_css .='border-radius: '.esc_attr($gym_nutrition_shop_single_post_page_image_border_radius).'px;';
        $gym_nutrition_shop_theme_css .='}';
    }