<?php

    $store_eshop_theme_css= "";

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

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

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

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

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

    $store_eshop_nav_menu_font_weight = get_theme_mod( 'store_eshop_nav_menu_font_weight',400);
    if($store_eshop_menu_font_size != ''){
        $store_eshop_theme_css .='.site-navigation .primary-menu > li a{';
            $store_eshop_theme_css .='font-weight: '.esc_attr($store_eshop_nav_menu_font_weight).';';
        $store_eshop_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

    $store_eshop_first_color = get_theme_mod('store_eshop_first_color');
    $store_eshop_second_color = get_theme_mod('store_eshop_second_color');

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

    if ($store_eshop_second_color) {
        $store_eshop_theme_css .= ':root {';
        $store_eshop_theme_css .= '--second-color: ' . esc_attr($store_eshop_second_color) . ' !important;';
        $store_eshop_theme_css .= '} ';
    }

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

    $store_eshop_heading_color = get_theme_mod('store_eshop_heading_color');
    $store_eshop_heading_font_family = get_theme_mod('store_eshop_heading_font_family');
    $store_eshop_heading_font_size = get_theme_mod('store_eshop_heading_font_size');
    if($store_eshop_heading_color != false || $store_eshop_heading_font_family != false || $store_eshop_heading_font_size != false){
        $store_eshop_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{';
            $store_eshop_theme_css .='color: '.esc_attr($store_eshop_heading_color).'!important; 
            font-family: '.esc_attr($store_eshop_heading_font_family).'!important;
            font-size: '.esc_attr($store_eshop_heading_font_size).'px !important;';
        $store_eshop_theme_css .='}';
    }

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

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

    /*------------------ Slider CSS -------------------*/
    $store_eshop_slider_opacity_setting = get_theme_mod( 'store_eshop_slider_opacity_setting',false);
    $store_eshop_image_opacity_color = get_theme_mod( 'store_eshop_image_opacity_color');
    $store_eshop_slider_opacity = get_theme_mod( 'store_eshop_slider_opacity');
    if( $store_eshop_slider_opacity_setting != false) {
        $store_eshop_theme_css .='#top-slider .slider-image img{';
            $store_eshop_theme_css .='opacity: '. $store_eshop_slider_opacity. ';';
        $store_eshop_theme_css .='}';
        if( $store_eshop_image_opacity_color != '') {
            $store_eshop_theme_css .='#top-slider .slider-image {';
                $store_eshop_theme_css .='background-color: '. $store_eshop_image_opacity_color. ';';
            $store_eshop_theme_css .='}';
        }
    } else {
        $store_eshop_theme_css .='#top-slider .slider-image img{';
            $store_eshop_theme_css .='opacity: 1;';
        $store_eshop_theme_css .='}';
    }

    /*--------------------------- Featured Image Border Radius -------------------*/

    $store_eshop_post_page_image_border_radius = get_theme_mod('store_eshop_post_page_image_border_radius', 0);
    if($store_eshop_post_page_image_border_radius != false){
        $store_eshop_theme_css .='.article-box img{';
            $store_eshop_theme_css .='border-radius: '.esc_attr($store_eshop_post_page_image_border_radius).'px;';
        $store_eshop_theme_css .='}';
    }

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

    $store_eshop_post_page_image_box_shadow = get_theme_mod('store_eshop_post_page_image_box_shadow',0);
    if($store_eshop_post_page_image_box_shadow != false){
        $store_eshop_theme_css .='.article-box img{';
            $store_eshop_theme_css .='box-shadow: '.esc_attr($store_eshop_post_page_image_box_shadow).'px '.esc_attr($store_eshop_post_page_image_box_shadow).'px '.esc_attr($store_eshop_post_page_image_box_shadow).'px #cccccc;';
        $store_eshop_theme_css .='}';
    }

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

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

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

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

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

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