<?php
/**
 * The template for displaying the header
 *
 * @package ShoBe
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">
	<?php wp_head(); ?>

</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
    <a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'shobe' ); ?></a>
    <nav class="navbar navbar-expand-lg navbar-light sticky" id="navbar">
        <div class="container-fluid">
            <a class="navbar-brand logo fw-bolder fs-24 text-dark" href="<?php echo esc_url( home_url('/') );?>">
				<?php 
	            if( has_custom_logo() ):
	                the_custom_logo();
	            else:    
	             bloginfo( 'title' ); 
				 endif;
				?>
            </a>

            <div class="navbar-header">
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-collapse-1" aria-expanded="false" aria-label="<?php esc_attr_e( 'Menu', 'shobe' ) ?>">
                    <span class="bi bi-list"></span>
                </button>
            </div>
     		

            <div class="collapse navbar-collapse " id="navbar-collapse-1">
            <?php 
                wp_nav_menu( 
                    array( 
                        'theme_location' 	=> 'shobe_main_menu', 
                        'depth' 			=> 3,
                        'container'         => '',
                        'menu_class'        => 'nav navbar-nav ms-auto',
                        'fallback_cb'       => 'WP_Bootstrap_Navwalker::fallback',
                        'walker'            => new WP_Bootstrap_Navwalker(),
                    ) 
                ); 
											
										?>
                
                <aside class="widget fs-14">
                    <?php get_search_form(); ?>
                </aside>
                <?php if( class_exists( 'WooCommerce' ) ): ?>
                <div class="cart-icon text-right">
                    <a href="<?php echo esc_url( get_permalink( get_option('woocommerce_myaccount_page_id') ) ); ?>" ><span class="bi bi-person-circle"></span></a>

                    <a href="<?php echo esc_url( wc_get_cart_url() ); ?>"><span class="bi bi-cart2"></span><span class="items"><?php echo esc_html( WC()->cart->get_cart_contents_count() ); ?></span></a>
                </div>
                <?php endif; ?>
            </div>

        </div>
    </nav>
    <!-- END NAVBAR -->