 /* ===============================
   Premium Navbar Styles
   Jungle Mart - Enhanced Design
================================= */

.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 125, 50, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(46, 125, 50, 0.1);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100%;
  margin: 0;
  left: 0;
  right: 0;
}

.nav-container {
  display: flex;
  justify-content: flex-start; /* Align items to the left */
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 var(--page-gap, 20px); /* consistent side padding */
  gap: 0; /* Removed gap to make navbar content stretch fully */
}

.nav-links {
  display: flex;
  flex-grow: 1; /* Allow nav-links to take remaining space */
  justify-content: flex-start; /* Align nav links to the left */
  gap: 30px;
  margin: 0; /* Remove any margin that might cause centering */
  max-width: 100%; /* Ensure full width */
  align-items: center;
  width: 100%;
}

.logo, .nav-toggle {
  flex-shrink: 0; /* Prevent shrinking to keep edges flush */
}

.logo {
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  color: var(--jungle-dark);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo:hover {
  color: var(--jungle-green);
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-dark);
  font-weight: 500;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--jungle-green);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--jungle-green);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.cart-count {
  background: var(--jungle-green);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-left: 5px;
  transition: all 0.3s ease;
}

.nav-links a:hover .cart-count {
  background: var(--jungle-dark);
  transform: scale(1.1);
}

.nav-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--jungle-dark);
  background: none;
  border: none;
  padding: 5px;
  transition: all 0.3s ease;
}

.nav-toggle:hover {
  color: var(--jungle-green);
  transform: scale(1.1);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--white);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(46, 125, 50, 0.1);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.1);
    gap: 15px;
  }
  
  .nav-links.show {
    display: flex;
    animation: slideDown 0.3s ease;
  }
  
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
    width: 100%;
  }
  
  .nav-links a:last-child {
    border-bottom: none;
  }
  
  .nav-toggle {
    display: block;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Navbar scroll effect */
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(46, 125, 50, 0.15);
}

/* Search bar in navbar */
.nav-search {
  position: relative;
  display: block;
  margin: 0; /* Removed auto margin to prevent centering */
  max-width: 100%; /* Set max-width to 100% for full width */
  width: 100%;
  flex: 3; /* Give search bar even more priority in the layout */
}

.nav-search-input {
  padding: 14px 130px 14px 20px; /* Increased right padding to fit buttons inside */
  border: 1px solid rgba(46, 125, 50, 0.3);
  border-radius: 30px;
  font-size: 18px;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  min-width: 300px; /* Adjusted minimum width */
  box-sizing: border-box;
}

.nav-search-input:focus {
  outline: none;
  border-color: var(--jungle-green);
  box-shadow: 0 0 5px 2px rgba(46, 125, 50, 0.3);
}

.nav-search-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  font-size: 0;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-search-btn:hover {
  background-color: rgba(46, 125, 50, 0.15);
  transform: scale(1.1);
}

.voice-search-btn {
  right: 150px;
}

.image-search-btn {
  right: 110px;
}

.submit-search-btn {
  right: 5px;
  padding: 10px 22px;
  border-radius: 30px;
  background-color: var(--jungle-green);
  color: white;
  font-weight: 600;
  font-size: 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.4);
}

.submit-search-btn:hover {
  background-color: var(--jungle-dark);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.6);
  transform: scale(1.05);
}

.nav-search-icon {
  width: 20px;
  height: 20px;
  display: block;
  filter: brightness(0) saturate(100%) invert(33%) sepia(72%) saturate(360%) hue-rotate(81deg) brightness(92%) contrast(88%);
}

/* User menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(46, 125, 50, 0.15);
  padding: 10px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.user-menu:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 10px 20px;
  color: var(--gray-dark);
  text-decoration: none;
  transition: all 0.3s ease;
}

.user-dropdown a:hover {
  background: rgba(46, 125, 50, 0.1);
  color: var(--jungle-green);
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--jungle-green);
  color: var(--white);
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(46, 125, 50, 0.3);
  z-index: 1001;
  animation: slideInRight 0.3s ease;
}

.notification.success {
  background: var(--jungle-green);
}

.notification.error {
  background: #e74c3c;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
