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

if ( ! function_exists( 'freshfoodrestaurant_header_style' ) ) :

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

	$topheader_logowidth = esc_attr(get_theme_mod('topheader_logowidth','auto'));

	$freshfoodrestaurant_logo_top_padding = esc_attr(get_theme_mod('freshfoodrestaurant_logo_top_padding','2'));
	$freshfoodrestaurant_logo_left_padding = esc_attr(get_theme_mod('freshfoodrestaurant_logo_left_padding','2'));
	$freshfoodrestaurant_logo_bottom_padding = esc_attr(get_theme_mod('freshfoodrestaurant_logo_bottom_padding','2'));
	$freshfoodrestaurant_logo_right_padding = esc_attr(get_theme_mod('freshfoodrestaurant_logo_right_padding','2'));


  	$featuredproducts_disable_section = esc_attr(get_theme_mod('featuredproducts_disable_section','YES'));
  	$aboutus_disable_section = esc_attr(get_theme_mod('aboutus_disable_section','YES'));


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


		<?php 
		
		?>


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

		.site-logo img {
			padding-top: <?php echo apply_filters('freshfoodrestaurant_topheader', $freshfoodrestaurant_logo_top_padding); ?>px;
			padding-left: <?php echo apply_filters('freshfoodrestaurant_topheader', $freshfoodrestaurant_logo_left_padding); ?>px;
			padding-bottom: <?php echo apply_filters('freshfoodrestaurant_topheader', $freshfoodrestaurant_logo_bottom_padding); ?>px;
			padding-right: <?php echo apply_filters('freshfoodrestaurant_topheader', $freshfoodrestaurant_logo_right_padding); ?>px;
		}


		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 .socialicon a i {
			color: <?php echo esc_attr(get_theme_mod('header_topheadiconscolor')); ?>;
		}

		header .socialicon a:hover i {
			color: <?php echo esc_attr(get_theme_mod('header_topheadiconshvrcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li a, .main-header .navbar .navbar-menu ul li.dropdown>a::after {
			color: <?php echo esc_attr(get_theme_mod('header_menuscolor')); ?>;
		}

		.main-header .navbar .navbar-nav > li:hover a, .main-header .navbar .navbar-nav > li.focus a, .main-header .navbar .navbar-nav > li.active a, .main-header .navbar .navbar-nav > li a.active,.main-header .navbar .navbar-menu ul li:hover.dropdown>a::after {
			color: <?php echo esc_attr(get_theme_mod('header_menushovercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:not(.remove) {
			color: <?php echo esc_attr(get_theme_mod('header_submenutextcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu>.dropdown:after {
			color: <?php echo esc_attr(get_theme_mod('header_submenutexticoncolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:not(.remove) {
			border-left-color: <?php echo esc_attr(get_theme_mod('header_submenusbordercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:hover {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbghovercolor')); ?> !important;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:hover{
			color: <?php echo esc_attr(get_theme_mod('header_submenustxthovercolor')); ?>;
		}
	
		header .wclit a i{
			color: <?php echo esc_attr(get_theme_mod('header_accountcarticoncolor')); ?>;
		}

		header .wclit li {
			background: <?php echo esc_attr(get_theme_mod('header_accountcarticonbgcolor')); ?>;
		}

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

		header .h-cart span {
			background: <?php echo esc_attr(get_theme_mod('header_cartnumberbgcolor')); ?>;
		}
		
		header a.contactus, header .hbtn .contactus i {
			color: <?php echo esc_attr(get_theme_mod('header_btntxtcolor')); ?>;
		}

		header a.contactus {
			background: <?php echo esc_attr(get_theme_mod('header_btnbgcolor')); ?>;
		}

		header a.contactus:hover, header .hbtn .contactus:hover i {
			color: <?php echo esc_attr(get_theme_mod('header_btntxthrvcolor')); ?>;
		}
		





		.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 a.contactus {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?>;
		}

		.hero-style a.contactus {
			background: <?php echo esc_attr(get_theme_mod('slider_btn1bgcolor')); ?> !important;
		}

		.hero-style a.contactus:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_btn1txthrvcolor')); ?> !important;
		}

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

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

		.next-sec-tab a {
			background: <?php echo esc_attr(get_theme_mod('slider_scrolldownarrowbgcolor')); ?> !important;
		}

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

		.hero-slider .fresh_food_restaurantswiper-button-prev, 
		.hero-slider .fresh_food_restaurantswiper-button-next {
			background: <?php echo esc_attr(get_theme_mod('slider_arrowiconbgcolor')); ?> !important;
		}

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


		/* featuredproducts */
		#featuredproduct-product-section .section-title h4 {
			color: <?php echo esc_attr(get_theme_mod('featuredproducts_subheadingcolor')); ?>;
		}

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

		#featuredproduct-product-section .product-grid {
			background: <?php echo esc_attr(get_theme_mod('featuredproducts_boxbgcolor')); ?>;
		}

		#featuredproduct-product-section .product-image i.fa-regular.fa-heart {
			color: <?php echo esc_attr(get_theme_mod('featuredproducts_iconcolor')); ?>;
		}

		#featuredproduct-product-section .product-image i.fa-regular.fa-heart {
			background: <?php echo esc_attr(get_theme_mod('featuredproducts_iconbgcolor')); ?>;
		}

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

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

		#featuredproduct-product-section .price bdi {
			color: <?php echo esc_attr(get_theme_mod('featuredproducts_pricecolor')); ?>;
		}

		#featuredproduct-product-section .btn a {
			color: <?php echo esc_attr(get_theme_mod('featuredproducts_viewallbtntextcolor')); ?>;
		}

		#featuredproduct-product-section .btn a {
			background: <?php echo esc_attr(get_theme_mod('featuredproducts_viewallbtnbgcolor')); ?>;
		}

		#featuredproduct-product-section .btn a:hover {
			color: <?php echo esc_attr(get_theme_mod('featuredproducts_viewallbtntexthvrcolor')); ?>;
		}


		/* about us */
		#aboutus-section .imgtitlebx h4,
		#aboutus-section .imgtitlebx h6 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_imgheadingcolor')); ?>;
		}

		#aboutus-section .abt_img_description p {
			color: <?php echo esc_attr(get_theme_mod('aboutus_imgdescriptioncolor')); ?>;
		}

		#aboutus-section .abt_img_description {
			background: <?php echo esc_attr(get_theme_mod('aboutus_imgdescriptionbgcolor')); ?>;
		}

		#aboutus-section .abt-dbx h2 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_titlecolor')); ?>;
		}

		#aboutus-section .abt-box {
			color: <?php echo esc_attr(get_theme_mod('aboutus_descriptioncolor')); ?>;
		}

		#aboutus-section .abt-btn a {
			color: <?php echo esc_attr(get_theme_mod('aboutus_btntextcolor')); ?>;
		}
		
		#aboutus-section .abt-btn a {
			background: <?php echo esc_attr(get_theme_mod('aboutus_btnbgcolor')); ?>;
		}

		#aboutus-section .abt-btn a:hover {
			color: <?php echo esc_attr(get_theme_mod('aboutus_btntexthrvcolor')); ?> !important;
		}

		

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

		.copy-right {
			border-color: <?php echo esc_attr(get_theme_mod('footer_copyrightbrdcolor')); ?>;
		}

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

		.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 li:before, .page-template-home-template .footer-area li:before, .page .footer-area li:before, .single .footer-area li:before {
			color: <?php echo esc_attr(get_theme_mod('footer_iconcolor')); ?>;
		}

		.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_scrolltotopiconcolor')); ?>;
		}

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

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

		
	<?php  ?>


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



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


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



	</style>
	<?php
}
endif;
