<?php

    $kids_online_store_theme_css= "";

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

    $kids_online_store_theme_color_one = get_theme_mod('kids_online_store_theme_color_one');
    $kids_online_store_theme_color_two = get_theme_mod('kids_online_store_theme_color_two');

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

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

    /*--------------------------- Scroll To Top Positions -------------------*/

    $kids_online_store_scroll_position = get_theme_mod( 'kids_online_store_scroll_top_position','Right');
    if($kids_online_store_scroll_position == 'Right'){
        $kids_online_store_theme_css .='#button{';
            $kids_online_store_theme_css .='right: 20px;';
        $kids_online_store_theme_css .='}';
    }else if($kids_online_store_scroll_position == 'Left'){
        $kids_online_store_theme_css .='#button{';
            $kids_online_store_theme_css .='left: 20px;right: auto;';
        $kids_online_store_theme_css .='}';
    }else if($kids_online_store_scroll_position == 'Center'){
        $kids_online_store_theme_css .='#button{';
            $kids_online_store_theme_css .='right: auto;left: 50%; transform:translateX(-50%);';
        $kids_online_store_theme_css .='}';
    }

    /*--------------------------- Scroll To Top Border Radius -------------------*/

    $kids_online_store_scroll_to_top_border_radius = get_theme_mod('kids_online_store_scroll_to_top_border_radius');
    $kids_online_store_scroll_bg_color = get_theme_mod('kids_online_store_scroll_bg_color');
    $kids_online_store_scroll_color = get_theme_mod('kids_online_store_scroll_color');
    $kids_online_store_scroll_font_size = get_theme_mod('kids_online_store_scroll_font_size');
    if($kids_online_store_scroll_to_top_border_radius != false || $kids_online_store_scroll_bg_color != false || $kids_online_store_scroll_color != false || $kids_online_store_scroll_font_size != false){
        $kids_online_store_theme_css .='#colophon a#button{';
            $kids_online_store_theme_css .='border-radius: '.esc_attr($kids_online_store_scroll_to_top_border_radius).'px; background-color: '.esc_attr($kids_online_store_scroll_bg_color).'; color: '.esc_attr($kids_online_store_scroll_color).' !important; font-size: '.esc_attr($kids_online_store_scroll_font_size).'px;';
        $kids_online_store_theme_css .='}';
    }

    /*--------------------------- Slider Image Opacity -------------------*/
    $kids_online_store_slider_opacity_setting = get_theme_mod( 'kids_online_store_slider_opacity_setting',true);
    $kids_online_store_image_opacity_color = get_theme_mod( 'kids_online_store_image_opacity_color');
    $kids_online_store_slider_opacity = get_theme_mod( 'kids_online_store_slider_opacity');
    if( $kids_online_store_slider_opacity_setting != false) {
        $kids_online_store_theme_css .='#top-slider .slider-box img{';
            $kids_online_store_theme_css .='opacity: '. $kids_online_store_slider_opacity. ';';
        $kids_online_store_theme_css .='}';
    } else {
        $kids_online_store_theme_css .='#top-slider .slider-box img{';
            $kids_online_store_theme_css .='opacity: 1;';
        $kids_online_store_theme_css .='}';
    }

    /*---------------------------Slider Height ------------*/

    $kids_online_store_slider_img_height = get_theme_mod('kids_online_store_slider_img_height');
    if($kids_online_store_slider_img_height != false){
        $kids_online_store_theme_css .='#top-slider .owl-carousel .owl-item img{';
            $kids_online_store_theme_css .='height: '.esc_attr($kids_online_store_slider_img_height).';';
        $kids_online_store_theme_css .='}';
    }

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

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

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

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

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

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

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

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

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

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

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

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

    /*--------------------------- Footer Background Image Position -------------------*/

    $kids_online_store_footer_bg_image_position = get_theme_mod( 'kids_online_store_footer_bg_image_position','scroll');
    if($kids_online_store_footer_bg_image_position == 'fixed'){
        $kids_online_store_theme_css .='#colophon, .footer-widgets{';
            $kids_online_store_theme_css .='background-attachment: fixed !important; background-position: center !important;';
        $kids_online_store_theme_css .='}';
    }elseif ($kids_online_store_footer_bg_image_position == 'scroll'){
        $kids_online_store_theme_css .='#colophon, .footer-widgets{';
            $kids_online_store_theme_css .='background-attachment: scroll !important; background-position: center !important;';
        $kids_online_store_theme_css .='}';
    }

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

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

    /*--------------------------- Footer Background Color -------------------*/

    $kids_online_store_footer_background_color = get_theme_mod('kids_online_store_footer_background_color');
    if($kids_online_store_footer_background_color != false){
        $kids_online_store_theme_css .='.footer-widgets{';
            $kids_online_store_theme_css .='background-color: '.esc_attr($kids_online_store_footer_background_color).' !important;';
        $kids_online_store_theme_css .='}';
    }

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

    $kids_online_store_footer_bg_image = get_theme_mod('kids_online_store_footer_bg_image');
    if($kids_online_store_footer_bg_image != false){
        $kids_online_store_theme_css .='#colophon, .footer-widgets{';
            $kids_online_store_theme_css .='background: url('.esc_attr($kids_online_store_footer_bg_image).');';
        $kids_online_store_theme_css .='}';
    }

    /*--------------------------- Copyright Background Color -------------------*/

    $kids_online_store_copyright_background_color = get_theme_mod('kids_online_store_copyright_background_color');
    if($kids_online_store_copyright_background_color != false){
        $kids_online_store_theme_css .='.footer_info{';
            $kids_online_store_theme_css .='background-color: '.esc_attr($kids_online_store_copyright_background_color).';';
        $kids_online_store_theme_css .='}';
    } 

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

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

    /*--------------------------- Site Title And Tagline Color -------------------*/

    $kids_online_store_logo_title_color = get_theme_mod('kids_online_store_logo_title_color');
    if($kids_online_store_logo_title_color != false){
        $kids_online_store_theme_css .='p.site-title a, .navbar-brand a{';
            $kids_online_store_theme_css .='color: '.esc_attr($kids_online_store_logo_title_color).' !important;';
        $kids_online_store_theme_css .='}';
    }

    $kids_online_store_logo_tagline_color = get_theme_mod('kids_online_store_logo_tagline_color');
    if($kids_online_store_logo_tagline_color != false){
        $kids_online_store_theme_css .='.logo p.site-description, .navbar-brand p{';
            $kids_online_store_theme_css .='color: '.esc_attr($kids_online_store_logo_tagline_color).'  !important;';
        $kids_online_store_theme_css .='}';
    }

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

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

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

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

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

    $kids_online_store_nav_menu = get_theme_mod( 'kids_online_store_nav_menu_text_transform','Uppercase');
    if($kids_online_store_nav_menu == 'Capitalize'){
        $kids_online_store_theme_css .='.main-navigation .menu > li > a{';
            $kids_online_store_theme_css .='text-transform:Capitalize;';
        $kids_online_store_theme_css .='}';
    }
    if($kids_online_store_nav_menu == 'Lowercase'){
        $kids_online_store_theme_css .='.main-navigation .menu > li > a{';
            $kids_online_store_theme_css .='text-transform:Lowercase;';
        $kids_online_store_theme_css .='}';
    }
    if($kids_online_store_nav_menu == 'Uppercase'){
        $kids_online_store_theme_css .='.main-navigation .menu > li > a{';
            $kids_online_store_theme_css .='text-transform:Uppercase;';
        $kids_online_store_theme_css .='}';
    }

    $kids_online_store_menu_font_size = get_theme_mod( 'kids_online_store_menu_font_size');
    if($kids_online_store_menu_font_size != ''){
        $kids_online_store_theme_css .='.main-navigation .menu > li > a{';
            $kids_online_store_theme_css .='font-size: '.esc_attr($kids_online_store_menu_font_size).'px;';
        $kids_online_store_theme_css .='}';
    }

    $kids_online_store_nav_menu_font_weight = get_theme_mod( 'kids_online_store_nav_menu_font_weight',400);
    if($kids_online_store_menu_font_size != ''){
        $kids_online_store_theme_css .='.main-navigation .menu > li > a{';
            $kids_online_store_theme_css .='font-weight: '.esc_attr($kids_online_store_nav_menu_font_weight).';';
        $kids_online_store_theme_css .='}';
    }

    /*------------------ Slider CSS -------------------*/

    $kids_online_store_slider_content_layout = get_theme_mod( 'kids_online_store_slider_content_layout','Center');
    if($kids_online_store_slider_content_layout == 'Left'){
        $kids_online_store_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $kids_online_store_theme_css .='text-align : left;';
        $kids_online_store_theme_css .='}';
    }
    if($kids_online_store_slider_content_layout == 'Center'){
        $kids_online_store_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $kids_online_store_theme_css .='text-align : center;';
        $kids_online_store_theme_css .='}';
    }
    if($kids_online_store_slider_content_layout == 'Right'){
        $kids_online_store_theme_css .='.slider-inner-box, #top-slider .slider-inner-box p{';
            $kids_online_store_theme_css .='text-align : right;';
        $kids_online_store_theme_css .='}';
    }