<?php
function lightingshop_custom_header_setup() {
	add_theme_support( 'custom-header', apply_filters( 'lightingshop_custom_header_args', array(
		'default-image'          => '',
		'default-text-color'     => '646464',
		'width'                  => 2000, 
		'height'                 => 200,
		'flex-height'            => true,
		'wp-head-callback'       => 'lightingshop_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'lightingshop_custom_header_setup' );

if ( ! function_exists( 'lightingshop_header_style' ) ) :

function lightingshop_header_style() {
	$header_text_color = get_header_textcolor();

	$slider_disable_section = esc_attr(get_theme_mod('slider_disable_section','YES'));
  	$banner_disable_section = esc_attr(get_theme_mod('banner_disable_section','YES'));
	$topheader_logowidth = esc_attr(get_theme_mod('topheader_logowidth','50'));
	$featured_disable_section = esc_attr(get_theme_mod('featured_disable_section','YES'));

	?>
	<style type="text/css">


		<?php 
		
		?>

		.site-logo img {
			width: <?php echo apply_filters('lightingshop_topheader', $topheader_logowidth); ?>%;
			height: 100%;
		}


		header.site-header .site-title {
			color: <?php echo esc_attr(get_theme_mod('topheader_sitetitlecol')); ?>;

		}

		header.site-header .site-logo a {
			text-decoration-color: <?php echo esc_attr(get_theme_mod('topheader_sitetitlecol')); ?> !important;
		}

		p.site-description {
			color: <?php echo esc_attr(get_theme_mod('topheader_taglinecol')); ?>;
		}
		


		
	 
	
		header .tpf-head {
			background: <?php echo esc_attr(get_theme_mod('header_topheadbgcolor')); ?>;
		}

		.tpf-head .tpdetel a {
			color: <?php echo esc_attr(get_theme_mod('header_topheadtextcolor')); ?>;
		}

		.tpf-head .tpdetel i {
			color: <?php echo esc_attr(get_theme_mod('header_searchiconcolor')); ?>;
		}

		.tpf-head .tpdetel a:hover span {
			color: <?php echo esc_attr(get_theme_mod('header_topheadtexthrvcolor')); ?>;
		}

		.tpf-head .social-icon li i {
			color: <?php echo esc_attr(get_theme_mod('header_topheadiconscolor')); ?>;
		}
		

		.tpf-head .social-icon li i:hover {
			color: <?php echo esc_attr(get_theme_mod('header_topheadiconshvrcolor')); ?>;
		}
		
		
		.headfer-content {
			background: <?php echo esc_attr(get_theme_mod('header_bgcolor')); ?>;
		}

		.primary-menu a {
			color: <?php echo esc_attr(get_theme_mod('header_menuscolor')); ?>;
		}

		.primary-menu a:hover, .primary-menu a:focus, .primary-menu .current_page_ancestor,
		.primary-menu li.current-menu-item > a, .primary-menu li.current-menu-item > .link-icon-wrapper > a {
			color: <?php echo esc_attr(get_theme_mod('header_menushovercolor')); ?>;
		}

		.primary-menu li ul li a {
			color: <?php echo esc_attr(get_theme_mod('header_submenutextcolor')); ?>;
		}

		.primary-menu ul {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.primary-menu ul::after {
			border-bottom-color: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.primary-menu > li > .icon {
			color: <?php echo esc_attr(get_theme_mod('header_submenusiconcolor')); ?>;
		}

		.primary-menu li ul li a:hover{
			color: <?php echo esc_attr(get_theme_mod('header_submenustxthovercolor')); ?> !important;
		}

		.bpf-head .icon li i {
			color: <?php echo esc_attr(get_theme_mod('header_iconscolor')); ?> !important;
		}

		.bpf-head .icon li i:hover {
			color: <?php echo esc_attr(get_theme_mod('header_iconhover_color')); ?> !important;
		}
	




		

		.hero-style .slide-title h2 {
			color: <?php echo esc_attr(get_theme_mod('slider_titlecolor')); ?> !important;
		}

		.hero-style .slide-text p {
			color: <?php echo esc_attr(get_theme_mod('slider_descriptioncolor')); ?>;
		}

		.hero-style .slide-btns a {
			background: <?php echo esc_attr(get_theme_mod('slider_btnbgcolor')); ?>;
		}

		.hero-style .slide-btns a {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?> !important;
			border-color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?> !important;
		}
 
		.hero-style .slide-btns a:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxthovercolor')); ?> !important;
		}

		.hero-style .lighting_shopswiper-button-next i, .hero-style .lighting_shopswiper-button-prev i {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconcolor')); ?> !important;
		}

			.hero-style .lighting_shopswiper-button-next i:hover, 
			.hero-style .lighting_shopswiper-button-prev i:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconhovercolor')); ?> !important;
		}



		
		#banner-section .banner-content h2 {
			color: <?php echo esc_attr(get_theme_mod('banner_offertextcolor')); ?>;
		}

		#banner-section .banner-content h3 {
			color: <?php echo esc_attr(get_theme_mod('banner_titlecolor')); ?>;
		}
		
		#banner-section .banner-button a {
			color: <?php echo esc_attr(get_theme_mod('banner_buttntextcolor')); ?>;
		}
		
		#banner-section .banner-button a {
			background: <?php echo esc_attr(get_theme_mod('banner_buttonbgcolor')); ?>;
		}
		
		#banner-section .banner-button a:hover {
			background: <?php echo esc_attr(get_theme_mod('banner_buttonbghovercolor')); ?>;
		}
 
		section#slider-section {
			padding-top: <?php echo esc_attr(get_theme_mod('lightingshop_slider_top_padding')); ?>em !important;
		}

		section#slider-section {
			padding-bottom: <?php echo esc_attr(get_theme_mod('lightingshop_slider_bottom_padding')); ?>em !important;
		}


		#banner-section {
			padding-top: <?php echo esc_attr(get_theme_mod('lightingshop_banner_top_padding')); ?>em !important;
		}

		#banner-section {
			padding-bottom: <?php echo esc_attr(get_theme_mod('lightingshop_banner_bottom_padding')); ?>em !important;
		}

		#banner-section .b_right img, #banner-section .b_left img {
			height: <?php echo esc_attr(get_theme_mod('lightingshop_banner_image_height')); ?>px !important;
		}




		#featuredproduct-product-section .section-title h2 {
			color: <?php echo esc_attr(get_theme_mod('featuredproduct_headingcolor')); ?>;
		}

		#featuredproduct-product-section .section-title:before {
			border-bottom-color: <?php echo esc_attr(get_theme_mod('featuredproduct_headingbrdcolor')); ?>;
		}

		#featuredproduct-product-section .section-title p {
			color: <?php echo esc_attr(get_theme_mod('featuredproduct_subheadingcolor')); ?>;
		}

		#featuredproduct-product-section .pcontent h3  {
			color: <?php echo esc_attr(get_theme_mod('featuredproduct_titlecolor')); ?>;
		}

		#featuredproduct-product-section .regular-price,#featuredproduct-product-section .regular-price .woocommerce-Price-amount.amount{
			color: <?php echo esc_attr(get_theme_mod('featuredproduct_regularpricecolor')); ?>;
		}

		#featuredproduct-product-section .sale-price .woocommerce-Price-amount.amount{
			color: <?php echo esc_attr(get_theme_mod('featuredproduct_salepricecolor')); ?>;
		}

		#featuredproduct-product-section {
			padding-top: <?php echo esc_attr(get_theme_mod('lightingshop_featuredproduct_top_padding')); ?>em !important;
		}

		#featuredproduct-product-section {
			padding-bottom: <?php echo esc_attr(get_theme_mod('lightingshop_featuredproduct_bottom_padding')); ?>em !important;
		}

		#featuredproduct-product-section .product-image img {
			height: <?php echo esc_attr(get_theme_mod('lightingshop_featuredproduct_image_height')); ?>px !important;
		}




		.copy-right {
			background: <?php echo esc_attr(get_theme_mod('footer_copyrightbgcolor')); ?>;
		}

		.copy-right p,.copy-right p a {
			color: <?php echo esc_attr(get_theme_mod('footer_copyrightcolor')); ?>;
		}

		.footer-area .widget_text, .footer-area .widget_text p, .wp-block-latest-comments__comment-excerpt p, .wp-block-latest-comments__comment-date, .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt, .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta,.footer-area .widget_block h1, .footer-area .widget_block h2, .footer-area .widget_block h3, .footer-area .widget_block h4, .footer-area .widget_block h5, .footer-area .widget_block h6,.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li a {
			color: <?php echo esc_attr(get_theme_mod('footer_textcolor')); ?>;
		}

		.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li a:hover {
			color: <?php echo esc_attr(get_theme_mod('footer_listhovercolor')); ?>;
		}

		.scroll-top {
			color: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconcolor')); ?>;
		}

		.scroll-top .f-oly {
			background: <?php echo esc_attr(get_theme_mod('footer_scrolltotopbgcolor')); ?>;
		}

		.scroll-top:hover {
			background: <?php echo esc_attr(get_theme_mod('footer_scrolltotopbghrvcolor')); ?>;
		}

		
	<?php  ?>


	<?php
		if ( ! display_header_text() ) :
	?>
		.site-title,
		.site-description {
			position: absolute;
			clip: rect(1px, 1px, 1px, 1px);
		}
	<?php
		else :
	?>
		h4.site-title{
			color: #<?php echo esc_attr( $header_text_color ); ?>;
		}
	<?php endif; ?>


	<?php
        if ($slider_disable_section == 1):
	?>
		.slidercontent {
			display: none;
		}
	<?php
		else :
	?>
		
	<?php endif; ?>


	<?php
        if ($banner_disable_section == 1):
	?>
		#banner-section {
			display: none;
		}
	<?php
		else :
	?>
		#banner-section {
			display: block;
		}
	<?php endif; ?>


	<?php
        if ($featured_disable_section == 1):
	?>
		#featuredproduct-product-section {
			display: none;
		}
	<?php
		else :
	?>
		#featuredproduct-product-section {
			display: block;
		}
	<?php endif; ?>


	</style>
	<?php
}
endif;
