<!-- footer small menu -->
<?php	
    $electromix_footer_menu_hs				= get_theme_mod( 'footer_menu_hs','1');
	$electromix_footer_menu_home_hs			= get_theme_mod( 'footer_menu_home_hs','1');
	$electromix_footer_menu_cart_hs			= get_theme_mod( 'footer_menu_cart_hs','1');
	$electromix_footer_menu_account_hs		= get_theme_mod( 'footer_menu_account_hs','1');
	$electromix_footer_menu_categories_hs	= get_theme_mod( 'footer_menu_categories_hs','1');
	
if($electromix_footer_menu_hs!='0' && class_exists( 'woocommerce' )): ?>
<div id="footer-small" class="footer-small d-lg-none d-block">
	<div class="container px-0">
		<div class="position-relative d-flex justify-content-between">
			<?php if($electromix_footer_menu_home_hs=='1'): ?>
			<div class="footer-mobile-menu">
				<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
					<i class="fa-solid fa-house"></i>
					<span><?php echo esc_html__('Home','electromix'); ?></span>
				</a>
			</div>
			<?php endif; ?>
		
			<?php if($electromix_footer_menu_account_hs=='1'): ?>
			<div class="footer-mobile-menu">
				<a href="<?php echo esc_url(get_permalink( get_option('woocommerce_myaccount_page_id') )); ?>">
					<i class="fa-solid fa-user"></i>
					<span><?php echo esc_html__('Account','electromix'); ?></span>
				</a>
			</div>
			<?php endif; ?>
			
			<?php if($electromix_footer_menu_cart_hs=='1'): ?>
			<div class="footer-mobile-menu">
				<a href="<?php echo esc_url( wc_get_cart_url() ); ?>">
					<i class="fa fa-shopping-cart"></i>
					<span><?php echo esc_html__('Cart','electromix'); ?></span>
				</a>					
			</div>
			<?php endif; ?>

			<?php if($electromix_footer_menu_categories_hs=='1'): ?>
			<div class="footer-mobile-menu">
				<a href="javascript:void(0)" class="category-toggle category-toggle-mobile" data-target="#category-popup-mobile">
					<i class="fa fa-th-large"></i>
					<span><?php echo esc_html__('Categories','electromix'); ?></span>
				</a>
				<!-- Start: Docker Category Popup -->
				<div class="docker-widget-popup docker-left docker-mobile" id="category-popup-mobile">
					<div class="docker-overlay-layer"></div>
					<div class="docker-div">
						<div class="docker-anim">
							<div class="docker-top">
								<button type="button" class="docker-widget-close close-style"></button>
							</div>
							<div class="switcher-tab">
								<button category="categories" class="active-bg" ><i class="fa fa-archive"></i> <?php echo esc_html__('Category','electromix'); ?></button>
								<button category="menu" class="cat-menu-bt"><i class="fa fa-bars"></i> <?php echo esc_html__('Menu','electromix'); ?></button>
							</div>
							<div class="docker-category">
								<div class="docker-right-list w-100">
									<?php do_action( 'electromix_hdr_mobile_browse_cat' ); ?>
									<nav class="menubar main-navbar d-none" id="AVMenu">
										<?php do_action('electromix_main_nav');	?>
									</nav>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<?php endif; ?>
			<div class="nav-indicator">
				<div class="indicator-anim"></div>
			</div>
		</div>
	</div>
</div>
<?php endif; ?>
<!-- footer small menu end -->

<?php 
$electromix_footer_bg_clr	= get_theme_mod('footer_bg_clr','#313131');
?>

<footer id="footer-section" class="footer-section footer-one">
	<div class="container position-relative">
		<div class="bg-shape wow fadeInDown"></div>
	</div>
	<div class="footer-content">
		<div class="container">
			<div class="row">
				<div class="col-lg-4 col-12 wow fadeInUp" data-wow-delay="0ms" data-wow-duration="1500ms">
					<div class="widget-left d-block px-lg-4 px-1">
					<?php  electromix_get_sidebars( 'electromix-footer-left' ); ?>
					</div>
				</div>
				<div class="col-lg-8 col-12 wow fadeInUp" data-wow-delay="0ms" data-wow-duration="1500ms">
					<div class="row gy-2 footer-widgets">						
							<div class="col-lg-4 mb-xl-0 mb-4">
							   <?php electromix_get_sidebars( 'electromix-footer-widget'); ?>
							</div>
						
							<div class="col-lg-4 mb-xl-0 mb-4">
							   <?php electromix_get_sidebars( 'electromix-footer-widget-2'); ?>
							</div>
						
							<div class="col-lg-4 mb-xl-0 mb-4">
								<?php electromix_get_sidebars( 'electromix-footer-widget-3'); ?>
							</div>						
					 </div>	
				</div>
			</div>
		</div>
	</div>
	
	<?php if ( class_exists( 'Ecommerce_Comp_Customizer' ) ) { ?>
	<?php 
		$electromix_hs_footer_middle	= get_theme_mod( 'hs_footer_middle','1');
		$electromix_footer_middle_wid_ttl = get_theme_mod('footer_middle_wid_ttl');
		$electromix_footer_mid_wid_contents = get_theme_mod('footer_mid_wid_contents', foot_mid_wid_imgs());
		$electromix_footer_info_contents 			= get_theme_mod('footer_info_contents',electromix_get_info_default());
		if($electromix_hs_footer_middle != '0' ):
	?>
	<div class="footer-middle">
		<div class="container">
			<div class="row gy-2">
				<div class="col-md-4 col-12 wow fadeInUp" data-wow-delay="0ms" data-wow-duration="1500ms">
					<div class="widget-left">
						<div class="widget textwidget px-lg-3">
							<h4 class="widget-title"><?php echo esc_html($electromix_footer_middle_wid_ttl) ?></h4>							
							<div class="brand">				
							<?php
									if ( ! empty( $electromix_footer_mid_wid_contents ) ) {
									$electromix_footer_mid_wid_contents = json_decode( $electromix_footer_mid_wid_contents );
									foreach ( $electromix_footer_mid_wid_contents as $electromix_footer_mid_wid_content ) {
										$electromix_image = ! empty( $electromix_footer_mid_wid_content->image_url ) ? apply_filters( 'electromix_pro_translate_single_string', $electromix_footer_mid_wid_content->image_url, 'Footer Middle Widget section' ) : '';
									?>
									<a href="javascript:void(0);"><img src="<?php echo esc_url($electromix_image); ?>" alt="<?php echo esc_attr__('image','electromix'); ?>"></a>	
							<?php }} ?>
							</div>
						</div>								
					</div>
				</div>
				<div class="col-md-8 col-12 wow fadeInUp" data-wow-delay="200ms" data-wow-duration="1500ms">
					<div class="widget-right d-flex align-items-center justify-content-between gap-2 flex-wrap">
					<?php
					
						if ( ! empty( $electromix_footer_info_contents ) ) {
						$electromix_footer_info_contents = json_decode( $electromix_footer_info_contents );
						foreach ( $electromix_footer_info_contents as $electromix_footer_info_content ) {
							$electromix_title = ! empty( $electromix_footer_info_content->title ) ? apply_filters( 'electromix_pro_translate_single_string', $electromix_footer_info_content->title, 'Footer Info section' ) : '';
							$electromix_text = ! empty( $electromix_footer_info_content->text ) ? apply_filters( 'electromix_pro_translate_single_string', $electromix_footer_info_content->text, 'Footer Info section' ) : '';
							$electromix_link = ! empty( $electromix_footer_info_content->link ) ? apply_filters( 'electromix_pro_translate_single_string', $electromix_footer_info_content->link, 'Footer Info section' ) : '';				
							$electromix_icon = ! empty( $electromix_footer_info_content->icon_value ) ? apply_filters( 'electromix_pro_translate_single_string', $electromix_footer_info_content->icon_value, 'Footer Info section' ) : '';
					?>
						<aside class="widget widget-contact">
							<h4 class="widget-title"></h4>
							<div class="contact-area d-flex align-items-center">
								<div class="contact-icon wave-effect"><i class="fa <?php if($electromix_icon): echo esc_attr($electromix_icon); endif; ?>"></i></div>
								<div class="contact-info flex-grow-1">
									<p class="text">
										<span><?php if($electromix_title): echo esc_html($electromix_title); endif; ?></span>
										<a href="<?php if($electromix_link): echo esc_url($electromix_link); endif; ?>"><?php if($electromix_text): echo esc_html($electromix_text); endif; ?></a>
									</p>
								</div>
							</div>
						</aside>
					<?php }} ?>
					</div>
				</div>
			</div>
		</div>
	</div>
	<?php  endif; ?>
	
	<?php 
		$electromix_hs_above_footer		= get_theme_mod( 'hs_above_footer','1');
		$electromix_footer_abv_wid_ttl = get_theme_mod('footer_abv_wid_ttl');
		$electromix_footer_abv_wid_contents = get_theme_mod('footer_abv_wid_contents', foot_abv_wid_imgs());
		$electromix_footer_abv_wid2_ttl = get_theme_mod('footer_abv_wid2_ttl');
	?>
	<?php if($electromix_hs_above_footer != '0' ): ?>
	<div class="footer-above">
            <div class="container">
                <div class="row gy-2">                   
					<div class="col-md-4 col-12 wow fadeInUp" data-wow-delay="0ms" data-wow-duration="1500ms">
					<div class="widget-left">
						<div class="widget textwidget px-3">
							<h4 class="widget-title"><?php echo esc_html($electromix_footer_abv_wid_ttl); ?></h4>
							<div class="brand d-flex align-items-center justify-content-between">				
							<?php
									if ( ! empty( $electromix_footer_abv_wid_contents ) ) {
									$electromix_footer_abv_wid_contents = json_decode( $electromix_footer_abv_wid_contents );
									foreach ( $electromix_footer_abv_wid_contents as $electromix_footer_abv_wid_content ) {							
										$electromix_image = ! empty( $electromix_footer_abv_wid_content->image_url ) ? apply_filters( 'electromix_pro_translate_single_string', $electromix_footer_abv_wid_content->image_url, 'Footer Info section' ) : '';
									?>
									<a href="javascript:void(0);"><img src="<?php echo esc_url($electromix_image); ?>" alt="<?php echo esc_attr__('image','electromix'); ?>"></a>	
							<?php }} ?>
							</div>
						</div>								
					</div>
				</div>
					
				<div class="col-md-8 col-12 wow fadeInUp" data-wow-delay="200ms" data-wow-duration="1500ms">
					<div class="widget-right">
						<aside class="widget widget_nav_menu d-flex">
							<h4 class="widget-title"><?php echo esc_html($electromix_footer_abv_wid2_ttl); ?></h4>
							<div class="menu-pages-container">
								<aside class="widget widget_nav_menu d-flex">
									<div class="menu-pages-container">
										<?php 
											wp_nav_menu( 
												array(  
													'theme_location' => 'footer_menu',
													'container'  => '',
													'menu_class' => 'menu',
													'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
													'walker' => new WP_Bootstrap_Navwalker()
													 ) 
												);
										?>   
									</div>
								</aside>	
							</div>
						</aside>
					</div>
				</div>
			</div>
		</div>
	</div>	
	<?php endif; } ?>
			
	<div class="footer-copyright">
            <div class="container">
                <div class="row align-items-center">
                    <div class="col-lg-4 col-12 wow fadeInUp" data-wow-delay="0ms" data-wow-duration="1500ms">
                        <div class="widget-left px-3">
                            <div class="widget textwidget">
                                <div class="brand">
                                    <p class="copyright-text">
									<?php 
										$electromix_footer_first_custom 		= get_theme_mod('footer_first_custom','Copyright &copy; [current_year] | Powered by [theme_author]');
										$electromix_electromix_copyright_allowed_tags = array(
											'[current_year]' => wp_date( 'Y' ),
											'[site_title]'   => get_bloginfo( 'name' ),
											'[theme_author]' => sprintf(
												'<a href="#">%s</a>',
												esc_html__( 'Electromix', 'electromix' )
											),
										);

										echo apply_filters('electromix_footer_copyright', wp_kses_post(electromix_str_replace_assoc($electromix_electromix_copyright_allowed_tags, $electromix_footer_first_custom)));
									?>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-8 col-12 wow fadeInUp" data-wow-delay="200ms" data-wow-duration="1500ms">
						<div class="widget-right">
							<div class="left-part">
                            <?php echo electromix_get_sidebars('electromix-footer-copy-1'); ?>
							</div>
							<div class="right-part">
							<?php echo electromix_get_sidebars('electromix-footer-copy-2'); ?>
							</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>	
</footer>
<!-- END FOOTER -->

<!-- START: SCROLL UP -->
<?php 
	$electromix_hs_scroller 	= get_theme_mod('hs_scroller','1');	
	if($electromix_hs_scroller == '1') :
?>
	<button type="button" class="scrollup style-1">
        <span class="scroll-text"><?php echo esc_html__('scroll','electromix');?></span><span class="scroll-line"><span class="scroll-point"></span></span>
    </button>
<?php endif; ?>
<!-- END: SCROLL UP -->
	<?php wp_footer(); ?>
	</body>
</html>
