<?php $options = kaveh_get_options(); ?>
            <!-- Start Nav -->
            <header class="nav-mobile-three nav-mobile-sticky">
              <div class="nav-mobile-three-up">
                <div class="container d-flex align-items-center">
                  <!-- Start Logo -->
                  <a href="<?php echo home_url(); ?>" class="nav-mobile-two-logo">
                    <img src="<?php echo $options['kaveh_logo_up'] ?>" alt="<?php echo get_bloginfo('name'); ?>"
                      width="78" height="26">
                  </a>
                  <!-- End Logo -->
                  <!-- Start Auth -->
                  <div class="nav-mobile-three-auth position-relative d-flex align-items-center me-2 ms-auto">
                    <a <?php if (!is_user_logged_in() && $options['kaveh_login_redirect'] === '1'): ?> data-auth-toggle="modal"
                          data-auth-target="auth-gajmarket" <?php else: ?>
                          href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>" <?php endif; ?> class="stretched-link" aria-label="auth"></a>
                    <?php
                          if (is_user_logged_in()) {
                              // Get the current user object
                              $current_user = wp_get_current_user();
                              // Get the Gravatar URL for the current user
                              $avatar_url = get_avatar_url($current_user->user_email, array('size' => 30));
                          } else {
                              // Fallback image URL
                              $avatar_url = esc_url(KAVEH_TEMPLATE_URI) . '/assets/images/user2.png';
                          }
                          ?>
                          <img class="me-1" src="<?php echo $avatar_url; ?>" alt="avatar" width="33" height="33">
                    <?php if (is_user_logged_in()): ?>
                    <?php 
                    $first_name = get_user_meta( get_current_user_id(), 'first_name', true );
                    $last_name = get_user_meta( get_current_user_id(), 'last_name', true );
                    ?>
                    <div>
                      <div class="name"> <?php echo $first_name . ' ' . $last_name; ?> </div>
                      <div class="wellcome"> <?php esc_html_e('Welcome', 'kavehTheme'); ?> </div>
                    </div>
                    <?php endif; ?>
                  </div>
                  <!-- End Auth -->
                  <?php if (class_exists('woocommerce')): ?>
                  <!-- Start Cart -->
                  <a data-open-cart="true" href="javascript:void(0)"
                    class="nav-mobile-cart nav-mobile-three-cart d-flex align-items-center justify-content-center position-relative">
                    <i class="icon-shopping-cart"></i>
                    <span
                      class="position-absolute rounded-circle d-flex align-items-center justify-content-center text-white top-0 start-0">
                      <div class="mob_cart_tot"> <?php echo WC()->cart->get_cart_contents_count(); ?> </div> </span>
                  </a>
                  <!-- End Cart -->
                  <?php endif; ?>
                  <!-- Start Btn Nav -->
                  <button type="button"
                    class="btn-nav-header btn-nav-kkheader p-0"
                    aria-label="btn nav">
                    <i class="icon-grid-2"></i>
                  </button>
                  <!-- Start Btn Nav -->
                </div>
              </div>
              <div class="nav-mobile-three-down">
                <div class="container d-flex align-items-center">
                  <form method="post" action="#" class="position-relative">
                    <button type="submit" class="p-0 position-absolute top-50 translate-middle-y" aria-label="search">
                      <i class="icon-search-3"></i>
                    </button>
                    <input id="maninpu" type="text" name="search" class="form-control maninpu" placeholder="<?php esc_attr_e('Search for your desired product', 'kavehTheme'); ?>">
                  </form>
                  <!-- Start Cart -->
                  <a href="javascript:void(0)"
                    class="nav-mobile-cart nav-mobile-three-cart d-none align-items-center justify-content-center position-relative">
                    <i class="icon-shopping-cart"></i>
                    <span
                      class="position-absolute rounded-circle d-flex align-items-center justify-content-center text-white top-0 start-0">
                      8 </span>
                  </a>
                  <!-- End Cart -->
                  <!-- Start Btn Nav -->
                  <button type="button"
                    class="btn-nav-header btn-nav-kkheader p-0 d-none"
                    aria-label="btn nav">
                    <i class="icon-grid-2"></i>
                  </button>
                  <!-- Start Btn Nav -->
                </div>
               
              </div>
            </header>
            <!-- End Nav -->