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

if ( ! function_exists( 'furnituremart_header_style' ) ) :

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

	$topheader_logowidth = esc_attr(get_theme_mod('topheader_logowidth','100'));
	$collection_disable_section = esc_attr(get_theme_mod('collection_disable_section','YES'));
	$newarrival_disable_section = esc_attr(get_theme_mod('newarrival_disable_section','YES'));


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


		<?php 
		
		?>


		.site-logo img {
			width: <?php echo apply_filters('furnituremart_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 .tophead {
			background: <?php echo esc_attr(get_theme_mod('header_topheadbgcolor')); ?>;
		}

		header .tophead .spbtn a,header .tophead .Ac_lgin a {
			color: <?php echo esc_attr(get_theme_mod('header_topheadtextcolor')); ?>;
		}

		.header-section {
			background: <?php echo esc_attr(get_theme_mod('header_bgcolor')); ?>;
		}

		.nav-toggle {
			color: <?php echo esc_attr(get_theme_mod('header_menuhamburgericoncolor')); ?> !important;
		}

		.nav-toggle {
			background: <?php echo esc_attr(get_theme_mod('header_menuhamburgericonbgcolor')); ?> !important;
		}

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

		.modal-menu li {
			border-color: <?php echo esc_attr(get_theme_mod('header_brdmenuscolor')); ?>;
		}

		button.close-nav-toggle {
			color: <?php echo esc_attr(get_theme_mod('header_menuscloseiconcolor')); ?>;
		}

		button.close-nav-toggle {
			background: <?php echo esc_attr(get_theme_mod('header_menuscloseiconbgcolor')); ?>;
		}

		.primary-menu > li > .icon,button.sub-menu-toggle {
			color: <?php echo esc_attr(get_theme_mod('header_menuiconcolor')); ?>;
		}

		button.sub-menu-toggle {
			background: <?php echo esc_attr(get_theme_mod('header_submenuiconbgcolor')); ?>;
		}

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

		header #formButton:after, header button[type="submit"] {
			color: <?php echo esc_attr(get_theme_mod('header_searchbariconcolor')); ?> !important;
		}

		header .top-form form, header button[type="submit"] {
			background: <?php echo esc_attr(get_theme_mod('header_searchbarbgcolor')); ?> !important;
		}

		header .acc i {
			color: <?php echo esc_attr(get_theme_mod('header_acciconcolor')); ?> !important;
		}

		header .h-cart span {
			color: <?php echo esc_attr(get_theme_mod('header_cartnumcolor')); ?> !important;
		}

		header .h-cart span {
			background: <?php echo esc_attr(get_theme_mod('header_cartnumbgcolor')); ?> !important;
		}
		
		.header-section .prd-category li a {
			color: <?php echo esc_attr(get_theme_mod('header_categoriescolor')); ?> !important;
		}


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

		.hero-style a.ReadMore {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?>;
		}

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

		.hero-style a.ReadMore:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxthrvcolor')); ?>;
		}

		.hero-style a.ReadMore:hover {
			background: <?php echo esc_attr(get_theme_mod('slider_btnbghrvcolor')); ?>;
		}

		.slider-area .furniture_martswiper-button-next i, .slider-area .furniture_martswiper-button-prev i {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconcolor')); ?>;
		}

		.slider-area .furniture_martswiper-button-next i:hover, .slider-area .furniture_martswiper-button-prev i:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconhovrcolor')); ?>;
		}

		.hero-slider .furniture_martswiper-pagination-bullet {
			background: <?php echo esc_attr(get_theme_mod('slider_paginationcolor')); ?>;
		}

		.hero-slider .furniture_martswiper-pagination-bullet-active {
			background: <?php echo esc_attr(get_theme_mod('slider_activepaginationcolor')); ?>;
		}
.slider-area .sliderinn-img{
	background-image: linear-gradient(-90deg, transparent -8%, <?php echo esc_attr(get_theme_mod('slider_overlaycolor')); ?> 90%);
}

		
		/* collection */

		#collection-section .section-title h4 {
			color: <?php echo esc_attr(get_theme_mod('collection_subheadingcolor')); ?>;
		}

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

		#collection-section .pro-cat-content h5 a {
			color: <?php echo esc_attr(get_theme_mod('collection_titlecolor')); ?>;
		}

		#collection-section .pro-cat-content h3 a {
			color: <?php echo esc_attr(get_theme_mod('collection_descriptioncolor')); ?>;
		}

		#collection-section .p_oly {
			background-image: linear-gradient(to top, <?php echo esc_attr(get_theme_mod('collection_titlebgcolor')); ?> 5%, transparent 20%);
		}

		#collection-section {
			background: <?php echo esc_attr(get_theme_mod('collection_sectionbgcolor')); ?>;
		}
	

	
		/* newarrival */
		#newarrivalproduct-product-section .section-title h2 {
			color: <?php echo esc_attr(get_theme_mod('newarrival_headingcolor')); ?>;
		}

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

		#newarrivalproduct-product-section .regular-price .amount {
			color: <?php echo esc_attr(get_theme_mod('newarrival_regularpricecolor')); ?>;
		}

		#newarrivalproduct-product-section .sale-price .amount {
			color: <?php echo esc_attr(get_theme_mod('newarrival_salepricecolor')); ?>;
		}

		#newarrivalproduct-product-section {
			background: <?php echo esc_attr(get_theme_mod('newarrival_sectionbgcolor')); ?>;
		}


	

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

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

		.footer-area {
			background: <?php echo esc_attr(get_theme_mod('footer_bgcolor')); ?>;
		}

		.footer-area .footer-widget .w-title {
			color: <?php echo esc_attr(get_theme_mod('footer_widegtstitlecolor')); ?>;
		}

		.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,
		.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li {
			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 i{
			color: <?php echo esc_attr(get_theme_mod('footer_backtotopiconcolor')); ?>;
		}

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

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

		
	<?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 ($collection_disable_section == 1):
	?>
		#collection-section {
			display: none;
		}
	<?php
		else :
	?>
		#collection-section {
			display: block;
		}
	<?php endif; ?>

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


	</style>
	<?php
}
endif;
