<?php
/**
 * @package LZ Fitness Premium
 */

function total_dymanic_styles(){
    global $post;
    $primColor = get_theme_mod( 'lz_fitness_template_color', '#6a9529' );


    $color_rgba = totalColourBrightness($primColor, 0.3);

    $darker_color = totalColourBrightness($primColor, -0.5);

    $header_image = get_header_image();
    // DYNAMIC FONTS
    // echo '<br> heading font '.
    $headeingFontRow = get_theme_mod('lz_fitness_general_headeing_font', '27');
    // echo '<br> text font '.
    $textFontRow = get_theme_mod('lz_fitness_general_text_font', '1');
    $header = get_theme_mod('header_textcolor', '#666666'); //header color
    $headingFont = getFonts(false, (int)$headeingFontRow);
    $textFont = getFonts(false, (int)$textFontRow);
    $custom_css = '';
    $custom_css = " body, * {font-family: $textFont;}
    h2.lz-about-heading, h2.lz-facility-heading, .ht-section-title, .lz-fitness-h2, .ht-title-wrap, .ht-slide-cap-title, #ht-princing-post-section .ht-princing-icon,h1, h2, h3, h4, h5, h6,#pricing-page .ht-princing-icon .ht-slide-cap-descmore a{font-family: $headingFont; }
        #ht-masthead, .header-main-box, .lower-header { background: #FFF url('$header_image'); background-repeat: no-repeat; background-size: cover;}
        #ht-masthead, .ht-site-description a, .page-template-home-template .ht-main-navigation .menu-item > a, .ht-main-navigation a, .ht-main-navigation ul ul a {color: #{$header};}
    .page-template-home-template .ht-main-navigation .current_page_item > a {$primColor}
    li.current_page_item > a {color: #ffffff;}
    ";

    $custom_css .= "
    button,
    input[type='button'],
    input[type='reset'],
    input[type='submit'],
    .widget-area .widget-title:after,
    h3#reply-title:after,
    h3.comments-title:after,
    .nav-previous a,
    .nav-next a,
    .pagination .page-numbers,    
    .ht-progress-bar-length,


    .ht-service-post-wrap:after,
    .ht-service-icon,
    .ht-counter:after,
    .ht-counter:before,
    .ht-testimonial-wrap .bx-wrapper .bx-controls-direction a,
    .ht-cta-buttons a.ht-cta-button1,
    .ht-cta-buttons a.ht-cta-button2:hover,
	#ht-back-top:hover,
    .entry-readmore a,
    .woocommerce #respond input#submit, 
    .woocommerce a.button, 
    .woocommerce button.button, 
    .woocommerce input.button,
    .woocommerce #respond input#submit.alt, 
    .woocommerce a.button.alt, 
    .woocommerce button.button.alt, 
    .woocommerce input.button.alt,
    .woocommerce nav.woocommerce-pagination ul li a, 
    .woocommerce nav.woocommerce-pagination ul li span,
    .woocommerce span.onsale,
    .woocommerce div.product .woocommerce-tabs ul.tabs li.active,
    .woocommerce #respond input#submit.disabled, 
    .woocommerce #respond input#submit:disabled, 
    .woocommerce #respond input#submit:disabled[disabled], 
    .woocommerce a.button.disabled, .woocommerce a.button:disabled, 
    .woocommerce a.button:disabled[disabled], 
    .woocommerce button.button.disabled, 
    .woocommerce button.button:disabled, 
    .woocommerce button.button:disabled[disabled], 
    .woocommerce input.button.disabled, 
    .woocommerce input.button:disabled, 
    .woocommerce input.button:disabled[disabled],
    .woocommerce #respond input#submit.alt.disabled, 
    .woocommerce #respond input#submit.alt.disabled:hover, 
    .woocommerce #respond input#submit.alt:disabled, 
    .woocommerce #respond input#submit.alt:disabled:hover, 
    .woocommerce #respond input#submit.alt:disabled[disabled], 
    .woocommerce #respond input#submit.alt:disabled[disabled]:hover, 
    .woocommerce a.button.alt.disabled, 
    .woocommerce a.button.alt.disabled:hover, 
    .woocommerce a.button.alt:disabled, 
    .woocommerce a.button.alt:disabled:hover, 
    .woocommerce a.button.alt:disabled[disabled], 
    .woocommerce a.button.alt:disabled[disabled]:hover, 
    .woocommerce button.button.alt.disabled, 
    .woocommerce button.button.alt.disabled:hover, 
    .woocommerce button.button.alt:disabled, 
    .woocommerce button.button.alt:disabled:hover, 
    .woocommerce button.button.alt:disabled[disabled], 
    .woocommerce button.button.alt:disabled[disabled]:hover, 
    .woocommerce input.button.alt.disabled, 
    .woocommerce input.button.alt.disabled:hover, 
    .woocommerce input.button.alt:disabled, 
    .woocommerce input.button.alt:disabled:hover, 
    .woocommerce input.button.alt:disabled[disabled], 
    .woocommerce input.button.alt:disabled[disabled]:hover,
    .woocommerce .widget_price_filter .ui-slider .ui-slider-range,
    #ht-princing-post-section .ht-princing-icon,
    #ht-princing-post-section .plan-amount,
    .ht-princing-icon,
    .plan-amount,
    .ht-princing-link a:hover,       
    .readmore a,
    .page-main-header,
    #ht-contactus-wrap .contact-page-form,
    .contact-mapbox iframe,
    #content-box ol li:before,
    .ht-slide-cap-descmore a,
    .ht-princing-link a,
    .days-time-day,
    .lz-facility-text ul li i,
    .facility-icon,
    .ht-blog-date,
    .post-right .blog-read-more a,
    #blog-box .blog-read-more a,
    .pagingation .current,
    .pagingation a:hover,
    .sect-height-appointment-box,
    .ht-appintment-member-wrap:after,
    .ht-main-navigation ul ul,
    .Category-nevigation h2,
    .widget-area .widget-title,
    .widget-area .widget-title:after,
    .total-count .count,
    .ctrl-btn,
    #featured-post-section,
    section#recent-post-section .recent-product-main-heading,
    h2.ht-section-title.lz-featured-heading p,
    section#featured-post-section ul li,
    section#recent-post-section ul li,
    h2.ht-section-title.lz-recentproduct-heading p,
    .appointment-icon span.fa,
    section#top-product-section ul li,
    h2.ht-section-title.lz-topsellar-heading p,
    .product-page h3,
    .product-page h3:after,
    button.product-btn,
    .widget-area h3:after,
    div#sb-search input[type='submit'],
    .widget-area h3,
    .woocommerce ul.products li.product .button:hover,
    section#product-category-section .main-banner h5:hover .special-banner,
    .sb-icon-search, .sb-search-submit

    {
    	background:{$primColor};
    }

    
    .ht-post-info .entry-date span.ht-day,
    .entry-categories .fa,
    .widget-area a:hover,
    .comment-list a:hover,
    .no-comments,
    .ht-site-title a,
    .woocommerce .woocommerce-breadcrumb a:hover,
	#total-breadcrumbs a:hover,
    .ht-featured-link a,
    .ht-portfolio-cat-name-list .fa,
    .ht-portfolio-cat-name:hover, 
    .ht-portfolio-cat-name.active,
    .ht-portfolio-caption a,
    .ht-team-detail,
    .ht-counter-icon,
    .woocommerce ul.products li.product .price,
    .woocommerce div.product p.price, 
    .woocommerce div.product span.price,
    .woocommerce .product_meta a:hover,
    .woocommerce-error:before, 
    .woocommerce-info:before, 
    .woocommerce-message:before,
    .featured-post:after,
    .featured-post:before,
    .featured-link a,
    .breadcrumbbox a,
    #ht-colophon .social-profile-icons a:hover,
    footer#ht-colophon ul li a:hover,
    .ht-footer .textwidget .fa,
    h6.secondry-text,
    #ht-about-us-section ul li:before,
    #ht-team-section .team-member-designation,
    #innerpage-box .team-member-designation,
    .pluses.text-right i.fa.fa-plus,
    .ht-section-tagline.lz-newslatter-text b,
    .woocommerce-MyAccount-navigation-link a,
    .ht-footer .social-profile-icons ul li a:hover,
    .support-icon span.fa:hover,
    nav#ht-site-navigation ul li a:hover,
    .ht-main-navigation li.current_page_item a,
    #content-box ul li:before,
    h2.ht-section-title.lz-newslatter-heading span,
    section#ht-newsletter-section ul li a:hover,
    section#ht-newsletter-section i.fa.fa-envelope,
    #ht-top-footer span,
    .socialMedia a:hover,
    .product-cat li a:hover,
    .product-cat li:hover a:before,
    main#innerpage-box span.fa:hover,
    .Category-nevigation ul li a:hover,
    .social-profile-icons ul li i:hover,
   main#innerpage-box div#ht-contactus-wrap a:hover,
   #innerpage-box h6.faq-title:before,

    .lz-fitness-time div:nth-child(8) div.days-time-day


    {
    	color:{$primColor};
    }

    .ht-main-navigation ul ul,
    .ht-featured-link a,
    .ht-counter,
    .ht-testimonial-wrap .bx-wrapper img,
    .ht-blog-post,
	#ht-colophon,
    .woocommerce ul.products li.product:hover, 
    .woocommerce-page ul.products li.product:hover,
    .woocommerce #respond input#submit, 
    .woocommerce a.button, 
    .woocommerce button.button, 
    .woocommerce input.button,
    .woocommerce ul.products li.product:hover .button,
    .woocommerce #respond input#submit.alt, 
    .woocommerce a.button.alt, 
    .woocommerce button.button.alt, 
    .woocommerce input.button.alt,
    .woocommerce div.product .woocommerce-tabs ul.tabs,
    .woocommerce #respond input#submit.alt.disabled, 
    .woocommerce #respond input#submit.alt.disabled:hover, 
    .woocommerce #respond input#submit.alt:disabled, 
    .woocommerce #respond input#submit.alt:disabled:hover, 
    .woocommerce #respond input#submit.alt:disabled[disabled], 
    .woocommerce #respond input#submit.alt:disabled[disabled]:hover, 
    .woocommerce a.button.alt.disabled, 
    .woocommerce a.button.alt.disabled:hover, 
    .woocommerce a.button.alt:disabled, 
    .woocommerce a.button.alt:disabled:hover, 
    .woocommerce a.button.alt:disabled[disabled], 
    .woocommerce a.button.alt:disabled[disabled]:hover, 
    .woocommerce button.button.alt.disabled, 
    .woocommerce button.button.alt.disabled:hover, 
    .woocommerce button.button.alt:disabled, 
    .woocommerce button.button.alt:disabled:hover, 
    .woocommerce button.button.alt:disabled[disabled], 
    .woocommerce button.button.alt:disabled[disabled]:hover, 
    .woocommerce input.button.alt.disabled, 
    .woocommerce input.button.alt.disabled:hover, 
    .woocommerce input.button.alt:disabled, 
    .woocommerce input.button.alt:disabled:hover, 
    .woocommerce input.button.alt:disabled[disabled], 
    .woocommerce input.button.alt:disabled[disabled]:hover,
    .woocommerce .widget_price_filter .ui-slider .ui-slider-handle
    .ht-main-navigation .current_page_item > a,
    .ht-main-navigation .current-menu-item > a,
    .ht-main-navigation .current_page_ancestor > a,
    .ht-main-navigation li:hover > a,
    .page-template-home-template .ht-main-navigation li:hover > a,
    .home.blog .ht-main-navigation li:hover > a,
    .page-template-home-template .ht-main-navigation .current > a,
    .home.blog .ht-main-navigation .current > a,
    .featured-post:before,
    .ht-top-footer .social-profile-icons ul li:hover,
    .woocommerce ul.products li.product .button,
    footer#ht-colophon .social-profile-icons ul li:hover,
    #blog-box .blog-read-more a,
    .news-social-icon ul li:hover,
    .newsletter-form-box input[type='email']
    {
    	border-color: {$primColor};
    }

	#ht-masthead,
    .woocommerce-error, 
    .woocommerce-info, 
    .woocommerce-message{
    	border-top-color: {$primColor};
    }

    .nav-next a:after{
    	border-left-color: {$primColor};
    }

    .nav-previous a:after{
    	border-right-color: {$primColor};
    }

    .ht-active .ht-service-icon{
    	box-shadow: 0px 0px 0px 2px #FFF, 0px 0px 0px 4px {$primColor};
    }

    .woocommerce ul.products li.product .onsale:after{
    	border-color: transparent transparent {$darker_color} {$darker_color};
    }

    .woocommerce span.onsale:after{
    	border-color: transparent {$darker_color} {$darker_color} transparent
    }


    @media screen and (max-width: 1000px){
    	.toggle-bar,
    	.ht-main-navigation .ht-menu{
    		background:{$primColor}
    	}
    }";


    // heading text colour 
    $headingColor = get_theme_mod('lz_fitness_title_color', '#fe5722');
    $custom_css .= '.title-color{color:'.$headingColor.';}';

	// START SECONDARY COLOR CSS
    $secondary = get_theme_mod('theme_secondary_color', '#ffffff');
    $custom_css .='
    .secondry-bg{
       // background-color:'.$secondary.'
    }	 


    {border-color: '.$secondary.';}

	#ht-newslatter-section .lz-newslatter-heading,

    {color:'.$secondary.';}	 


    {border-color: '.$secondary.';}


    {background-color:'.$secondary.'}
    ';
    // ENDS SECONDARY COLOR CSS

    if(get_theme_mod('lz_fitness_premium_featured_section_background') == 'on' ){
    	$custom_css .= '#featured-post-section {background-image: url(\''.get_theme_mod('lz_fitness_featured_bg_image').'\');background-position: top;background-size: cover;}';
    }else{
    	$color = get_theme_mod('lz_fitness_featured_bg_color', '#ffffff');
    	if('#ffffff' != $color){
    		$custom_css .= '#featured-post-section, .ht-featured-icon {background-color: '.$color.';}
    		.ht-featured-link a {border-color: '.$color.';color: '.$color.';}
             #featured-post-section, .ht-featured-icon{}
    		';
    	}else{
    		$custom_css .= '#featured-post-section {background-color: '.$color.';color:#666;}';
    	}
    }
    // about section
    if(get_theme_mod('lz_fitness_premium_aboutus_section_background') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_about_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.png';
        
        $custom_css .= '#ht-about-us-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}';
    }else{
        $color = get_theme_mod('lz_fitness_about_bg_color', '#ffffff');
        if('#ffffff' != $color){
            $custom_css .= '#ht-about-us-section {background-color: '.$color.';} .about-post{border-color:'.$color.';}';
        }
    }
    // Banner section 
    if(get_theme_mod('lz_fitness_premium_categories_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_categories_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= 'section#product-category-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}'; 
    }else{
        $color = get_theme_mod('lz_fitness_categories_bg_color', '#ffffff');
        if('#ffffff' != $color){
            $custom_css .= 'section#product-category-section {background-color: '.$color.';}';
        }
    } 
    // Team section 
    if(get_theme_mod('lz_fitness_premium_team_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_team_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= '#ht-team-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}'; 
    }else{
        $color = get_theme_mod('lz_fitness_team_bg_color', '#f6f6f6');
        if('#f6f6f6' != $color){
            $custom_css .= '#ht-team-section {background-color: '.$color.';}';
        }
    } 
    //facility-section
    if(get_theme_mod('lz_fitness_premium_facility_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_facility_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= '#recent-post-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}'; 
    }else{
        $color = get_theme_mod('lz_fitness_facility_bg_color', '#f6f6f6');
        if('#f6f6f6' != $color){
            $custom_css .= '#recent-post-section {background-color: '.$color.';}';
        }
    } 
    //Top sellar-section
    if(get_theme_mod('lz_fitness_premium_topproduct_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_topproduct_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= 'section#top-product-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}'; 
    }else{
        $color = get_theme_mod('lz_fitness_topproduct_bg_color', '#f6f6f6');
        if('#f6f6f6' != $color){
            $custom_css .= 'section#top-product-section {background-color: '.$color.';}';
        }
    } 
     //support
    if(get_theme_mod('lz_fitness_premium_support_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_support_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.png';
        
        $custom_css .= 'section#support-post-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}';
    }else{
        $color = get_theme_mod('lz_fitness_support_bg_color', '#ffffff');
        if('#ffffff' != $color){
            $custom_css .= 'section#support-post-section {background-color: '.$color.';} .support-post{border-color:'.$color.';}';
        }
    }
    // Testimonial section
    if(get_theme_mod('lz_fitness_premium_testimonials_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_testimonials_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= '#testimonials-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}'; 
    }else{
        $color = get_theme_mod('lz_fitness_testimonials_bg_color', '#f6f6f6');
        if('#f6f6f6' != $color){
            $custom_css .= '#testimonials-section {background-color: '.$color.';}';
        }
    } 
    // gym 
    if(get_theme_mod('lz_fitness_premium_gym_section_background') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_gym_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.png';
        
        $custom_css .= '#time-address-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}';
    }else{
        $color = get_theme_mod('lz_fitness_gym_bg_color', '#ffffff');
        if('#ffffff' != $color){
            $custom_css .= '#time-address-section {background-color: '.$color.';} .time-post{border-color:'.$color.';}';
        }
    }
    //appointment
    if(get_theme_mod('lz_fitness_premium_appointment_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_appointment_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= '#ht-appintment-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}'; 
    }else{
        $color = get_theme_mod('lz_fitness_appointment_bg_color', '#f6f6f6');
        if('#f6f6f6' != $color){
            $custom_css .= '#ht-appintment-section {background-color: '.$color.';}';
        }
    } 
    //blog
    if(get_theme_mod('lz_fitness_premium_blog_section_background') == 'on' ){
    	$custom_css .= '#ht-blog-section {background-image: url(\''.get_theme_mod('lz_fitness_blog_bg_image').'\');background-position: top;background-size: cover;}';
    }else{
    	$color = get_theme_mod('lz_fitness_blog_bg_color', '#ffffff');
    	if('#ffffff' != $color){
    		$custom_css .= '#ht-blog-section, .ht-blog-read-more a {background-color: '.$color.';} .ht-blog-post{border-color:'.$color.';}';
    	}
    }
    // pricing 
    
    if(get_theme_mod('lz_fitness_premium_pricing_section_background') == 'on' ){
        $custom_css .= '#ht-princing-post-section {background-image: url(\''.get_theme_mod('lz_fitness_pricing_bg_image').'\');background-position: top;background-size: cover;}';
    }else{
        $color = get_theme_mod('lz_fitness_pricing_bg_color', '#ffffff');
        if('#ffffff' != $color){
            $custom_css .= '#ht-princing-post-section, #ht-princing-post-section .ht-featured-icon {background: '.$color.';}#ht-princing-post-section .ht-featured-link a {border-color: '.$color.';color: '.$color.';}';
        }else{
            // $custom_css .= '#ht-princing-post-section {background-image: url(\''. get_template_directory_uri().'/images/man-461195_1280.jpg'.'\');background-position: top;background-size: cover;}';
            $custom_css .= '.ht-plan-block{border-color:'.$primColor.'}';
        }
    }
     // new newsletter section 
    if(get_theme_mod('lz_fitness_premium_lz_newslatter_section_background','off') == 'on' ){

        $bgimg = get_theme_mod('lz_fitness_lz_newslatter_bg_image');
        $img = !empty($bgimg)?$bgimg:get_template_directory_uri().'/images/default-gray.jpg';
        
        $custom_css .= 'section#ht-newsletter-section {background-image: url("'.$img.'");background-position: top;background-size: cover;}';
    }else{
        $color = get_theme_mod('lz_fitness_lz_newslatter_bg_color', '#f1f1f1');
        if('#f1f1f1' != $color){
            $custom_css .= 'section#ht-newsletter-section {background-color: '.$color.';}';
        }
    } 
//

	//about us heading & text color
    $aboutHeadingColor = get_theme_mod('lz_fitness_aboutus_page_HeadingColor', '#333333');
    $aboutTextColor = get_theme_mod('lz_fitness_aboutus_page_TextColor', '#333333');
    $custom_css .= '#ht-about-us-section .ht-section-title, .ht-content.lz-about-text h3{color: '.$aboutHeadingColor.';} 
    section#ht-about-us-section .ht-section-tagline, #ht-about-us-section ul li{color: '. $aboutTextColor.';}';

//Support heading & text color
    $supportTitleColor = get_theme_mod('lz_fitness_support_HeadingColor', '#000000');
    $supportDescColor = get_theme_mod('lz_fitness_support_DescriptionColor', '#000000');
    $supportIconColor = get_theme_mod('lz_fitness_support_IconColor', '#000000');
    $custom_css .= 'section#support-post-section h5 {color: '.$supportTitleColor.';} 
    .support-post p {color: '.$supportDescColor.';} .support-icon span.fa{color: '.$supportIconColor.';} ';

 // main header background color
    $HeaderHeadingColor = get_theme_mod('lz_fitness_header_backgroundColor', '#ffffff');
    $MHeaderHeadingColor = get_theme_mod('lz_fitness_header_TbackgroundColor', '#000');
     $MHeadercarticonColor = get_theme_mod('lz_fitness_header_carticonColor', '#eeeeee');
      $MHeadercategoryboxColor = get_theme_mod('lz_fitness_header_CategoryboxColor', '#ffffff');
       $MHeadercategoryboxtextColor = get_theme_mod('lz_fitness_header_CategoryTextColor', '#000000');

    $custom_css .= 'header#ht-masthead, .header-main-box, .lower-header {background-color: '.$HeaderHeadingColor.';} header#ht-masthead .main-header {background-color: '.$MHeaderHeadingColor.';}.total-count.pull-left{background-color: '.$MHeadercarticonColor.';} header#ht-masthead .product-cat{background-color: '.$MHeadercategoryboxColor.';} .product-cat li a{color: '.$MHeadercategoryboxtextColor.';}'; 


	//facility heading & text color
    $facilityHeadingColor = get_theme_mod('lz_fitness_facility_HeadingColor', '#ffffff');
    $facilityTextColor = get_theme_mod('lz_fitness_facility_TextColor', '#232222');
    $facilityTitleColor = get_theme_mod('lz_fitness_facility_TitleColor', '#000000');
    $facilityIconColor = get_theme_mod('lz_fitness_facility_IconColor', '#ffffff');
    $ProductTitleWrapColor = get_theme_mod('lz_fitness_facility_ProductTitleWrapColor', '#ffffff');
    $PreviewButtonColor = get_theme_mod('lz_fitness_facility_PreviewButtonColor', '#88b14b');

    $custom_css .= 'h2.ht-section-title.lz-recentproduct-heading{color: '.$facilityHeadingColor.';} 
    section#recent-post-section .total-products-title-wrap h6 {color: '. $facilityTextColor.';} section#recent-post-section span.price {color: '. $facilityTitleColor.';} section#recent-post-section ul li i.fa, section#recent-post-section ul li b{color: '. $facilityIconColor.';}section#recent-post-section .total-products-title-wrap{background-color: '. $ProductTitleWrapColor.';}section#recent-post-section ul li:last-child{background-color: '. $PreviewButtonColor.';}';

//Banner heading & text color
    $bannerHeadingColor = get_theme_mod('product_category_Heading_color', '#000000');
    $bannerSubtextColor = get_theme_mod('product_category_text_color', '#000000');
    $bannerTextColor = get_theme_mod('product_category_Discounttext_color', '#ffffff');
    $bannerButtonColor = get_theme_mod('product_category_Button_color', '#000000');
    $bannerBoxColor = get_theme_mod('product_category_box_color', '#ec000a');
    $bannerOutlineColor = get_theme_mod('product_category_outline_color', '#ffffff');

    $custom_css .= 'section#product-category-section h5 a {color: '.$bannerHeadingColor.';} 
    .discount {color: '. $bannerTextColor.';} section#product-category-section button {color: '. $bannerButtonColor.';} .special-banner{background-color: '. $bannerBoxColor.';}.banner-text{color: '. $bannerSubtextColor.';}section#product-category-section .main-banner h5{outline-color: '. $bannerOutlineColor.';}';

//slider heading & text color
    $sliderHeadingColor = get_theme_mod('lz_fitness_slider_HeadingColor', '#ffffff');
    $sliderSubtextColor = get_theme_mod('lz_fitness_slider_TextColor', '#ffffff');
    $sliderSubtextssColor = get_theme_mod('lz_fitness_slider_TextssColor', '#ffffff');
    $sliderButtonColor = get_theme_mod('lz_fitness_slider_ButtonColor', '#6a9529');
    $sliderBorderColor = get_theme_mod('lz_fitness_slider_BorderColor', '#ffffff');
    $sliderButtonTextcolor = get_theme_mod('lz_fitness_slider_ButtonTextcolor', '#ffffff');
    
    $custom_css .= '.ht-slide-caps-title {color: '.$sliderHeadingColor.';} 
    .ht-slide-cap-title.animated.fadeInDown {color: '. $sliderSubtextColor.';} .ht-slide-cap-descmore a {background-color: '. $sliderButtonColor.';}.ht-slide-cap-title.animated.fadeInDown:before, .ht-slide-cap-title.animated.fadeInDown:after{border-color: '.$sliderBorderColor.';}.ht-slide-cap-desc.animated.fadeInDown{color: '.$sliderSubtextssColor.';} .ht-slide-cap-descmore a{color: '.$sliderButtonTextcolor.';}';
 

	// featured heading & text color
    $featuredHeadingColor = get_theme_mod('lz_fitness_featured_HeadingColor', '#ffffff');
    $featuredTextColor = get_theme_mod('lz_fitness_featured_TextColor', '#232222');
    $featuredPriceColor = get_theme_mod('lz_fitness_featuredPrice_TextColor', '#000000');
    $featuredIconColor = get_theme_mod('lz_fitness_featuredIcon_TextColor', '#ffffff');
     $featuredWrapColor = get_theme_mod('lz_fitness_producttitlewrap_TextColor', '#ffffff');
      $PreviewButtonColor = get_theme_mod('lz_fitness_PreviewButtonColor_TextColor', '#88b14b');
    $custom_css .= '.lz-featured-heading{color: '.$featuredHeadingColor.';} 
    .total-product-title-wrap h6{color: '.$featuredTextColor.';}section#featured-post-section span.price{color: '.$featuredPriceColor.';}section#featured-post-section ul li i.fa, section#featured-post-section ul li b{color: '.$featuredIconColor.';}section#featured-post-section .total-product-title-wrap{background-color: '.$featuredWrapColor.';}section#featured-post-section ul li:last-child{background-color: '.$PreviewButtonColor.';}';  
    //// TOpsellar heading & text color
    $topsellarHeadingColor = get_theme_mod('lz_fitness_topsellar_HeadingColor', '#ffffff');
    $topsellarTextColor = get_theme_mod('lz_fitness_topsellar_TextColor', '#232222');
    $topsellarPriceColor = get_theme_mod('lz_fitness_topsellarPrice_TextColor', '#000000');
    $topsellarIconColor = get_theme_mod('lz_fitness_topsellarIcon_TextColor', '#ffffff');
    $ProductTitleWrapcolor = get_theme_mod('lz_fitness_ProductTitleWrapcolor_TextColor', '#ffffff');
    $PreviewButtoncolor = get_theme_mod('lz_fitness_PreviewButtoncolor_TextColor', '#88b14b');
    $custom_css .= '.lz-topsellar-heading {color: '.$topsellarHeadingColor.';} 
    section#top-product-section h6{color: '.$topsellarTextColor.';}section#top-product-section span.price{color: '.$topsellarPriceColor.';}section#top-product-section ul li i.fa, section#top-product-section ul li b{color: '.$topsellarIconColor.';}section#top-product-section .topsellar-products-title-wrap{background-color: '.$ProductTitleWrapcolor.';} section#top-product-section ul li:last-child{background-color: '.$PreviewButtoncolor.';} ';  

	//team heading & text color
    $teamHeadingColor = get_theme_mod('lz_fitness_team_HeadingColor', '#2b2b2b');
    $teamTextColor = get_theme_mod('lz_fitness_team_TextColor', '#424242');
    $teamTitleColor = get_theme_mod('lz_fitness_team_TitleColor', '#363636');
    $custom_css .= 'h2.ht-section-title.lz-team-heading{color: '.$teamHeadingColor.';} 
    .ht-section-tagline.lz-team-text, .ht-team-member .ht-team-designation{color: '. $teamTextColor.';} .ht-team-member h6{color: '. $teamTitleColor.';}';



	//testimonials heading & text color
    $testimonialsTitleColor = get_theme_mod('lz_fitness_testimonials_TitleColor', '#ffffff');
    $testimonialsHeadingColor = get_theme_mod('lz_fitness_testimonials_HeadingColor', '#82B440');
    $testimonialsTextColor = get_theme_mod('lz_fitness_testimonials_TextColor', '#424242');
    $custom_css .= '#testimonials-section h6{color: '.$testimonialsHeadingColor.';} 
    #testimonials-section p{color: '. $testimonialsTextColor.';} h2.testimonial-heading.ht-section-title{color: '. $testimonialsTitleColor.';}';

    //
    
	//gym heading & text color
    // timing and address section
    $timingHeadingColor = get_theme_mod('lz_fitness_gym_HeadingColor', '#323232');
    $timingTextColor = get_theme_mod('lz_fitness_gym_TextColor', '#232222');
    $custom_css .= '.lz-gym-heading{color: '.$timingHeadingColor.';} 
    .lz-fitness-time .days-time-day-time{color: '.$timingTextColor.';}';
    //


	//appointment heading & text color

    $appointmentHeadingColor = get_theme_mod('lz_fitness_appointment_HeadingColor', '#323232');
    $appointmentTextColor = get_theme_mod('lz_fitness_appointment_TextColor', '#424242');
    $appointmentSubTextColor = get_theme_mod('lz_fitness_appointment_SubTextColor', '#424242');
    $appointmentIconColor = get_theme_mod('lz_fitness_appointment_IconColor', '#ffffff');

    $custom_css .= '.lz-appointment-heading{color: '.$appointmentHeadingColor.';} 
    .ht-section-tagline.lz-appointment-text{color: '. $appointmentTextColor.';} .appointment-content{color: '. $appointmentSubTextColor.';} .appointment-icon span.fa{color: '. $appointmentIconColor.';}';


	//blog heading & text color
    $blogHeadingColor = get_theme_mod('lz_fitness_blog_HeadingColor', '#2b2b2b');
    $blogSubHeadingColor = get_theme_mod('lz_fitness_blog_SubheadingColor', '#424242');
    $blogTitleColor = get_theme_mod('lz_fitness_blog_TitleColor', '#444');
    $blogTextColor = get_theme_mod('lz_fitness_blog_TextColor', '#333333');
    $custom_css .= '.lz-blog-heading {color: '.$blogHeadingColor.';} 
    .lz-blog-text{color: '. $blogSubHeadingColor.';} .ht-blog-excerpt h5 a {color: '. $blogTitleColor.';} .ht-blog-excerpt p{color: '. $blogTextColor.';}';

	//plan heading & text color
    $planHeadingColor = get_theme_mod('lz_fitness_plan_HeadingColor', '#2b2b2b');
    $planTextColor = get_theme_mod('lz_fitness_plan_TextColor', '#4d4d4d');
    $custom_css .= '#ht-princing-post-section .lz-plan-heading {color: '.$planHeadingColor.';} #pricing-page .ht-princing-excerpt ul li{color: '.$planTextColor.';}
    ';

	//newslatter heading & text color
    $newslatterHeadingColor = get_theme_mod('lz_newslatter_HeadingColor', '#000000');
    $newslatterTextColor = get_theme_mod('lz_newslatter_TextColor', '#6a9529');
    $newslatterIconColor = get_theme_mod('lz_newslatterIcon_TextColor', '#6a9529');
    $newslatterSocialIconColor = get_theme_mod('lz_newslatterSocialIcon_TextColor', '#373737');

    $custom_css .= 'h2.ht-section-title.lz-newslatter-heading {color: '.$newslatterHeadingColor.';} h2.ht-section-title.lz-newslatter-heading span {color: '.$newslatterTextColor.';}section#ht-newsletter-section i.fa.fa-envelope{color: '.$newslatterIconColor.';}section#ht-newsletter-section ul li a{color: '.$newslatterSocialIconColor.';}.news-social-icon ul li{border-color: '.$newslatterSocialIconColor.';}';

   

    $custom = get_post_custom( isset($post->ID) );
    $image_id = get_post_meta( isset($post->ID), '_listing_image_id', true );
    $thumbnail_html = wp_get_attachment_image_src( $image_id, 'larger');

    // echo '<pre />'; print_r($custom);
    if(!empty($custom['useColor']) && $custom['useColor'][0]==1){
        if( isset( $custom['page_bg_color'][0] ) ){
            $custom_css .= '#innerpage-box{background-color:'.$custom['page_bg_color'][0].';}';
        }
    }elseif(!empty($custom['useColor']) && $custom['useColor'][0]==0){
        if( isset( $custom['_listing_image_id'][0]) ){
            $custom_css .= '#innerpage-box{background-image: url(\''.$thumbnail_html[0].'\');background-position: center;background-attachment: fixed;background-origin: content-box;background-size: cover;}';
        }
    }else {
        if( isset( $custom['_listing_image_id'][0]) ){
            $custom_css .= '#innerpage-box{background:none}';
        }
    }

    $custom_css .='.border{border:1px solid #fff;}';

    return punte_css_strip_whitespace($custom_css);
}

