.navbar {
  background: #ffffff !important;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  animation: navbarSlideDown 0.6s ease-out;
}

@keyframes navbarSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(30px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand:hover {
  transform: translateY(-1px);
  color: #007aff !important;
}

.navbar-brand img {
  height: 32px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-brand i {
  color: #007aff;
  margin-right: 8px;
  transition: all 0.3s ease;
  font-size: 1.25rem;
}

.navbar-brand:hover i {
  color: #0056cc;
  transform: scale(1.1);
}

.nav-link {
  color: #1d1d1f !important;
  font-weight: 500;
  padding: 0.75rem 1.25rem !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  border-radius: 8px;
  margin: 0 0.25rem;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: #007aff !important;
  background: rgba(0, 122, 255, 0.08);
  transform: translateY(-1px);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: #007aff;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::after {
  width: 60%;
}

.nav-item.active .nav-link {
  color: #007aff !important;
  background: rgba(0, 122, 255, 0.1);
}

.nav-item.active .nav-link::after {
  width: 60%;
}

/* Search Form */
.form-inline {
  margin-right: 1rem;
}

.input-group {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-control {
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: #f5f5f7;
  color: #1d1d1f;
  transition: all 0.3s ease;
}

.form-control:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: #86868b;
}

.btn-outline-light {
  background: #007aff;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background: #0056cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Cart Button */
.cart-btn {
  background: #007aff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-btn:hover {
  background: #0056cc;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
  text-decoration: none;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff3b30;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid #ffffff;
}

/* Dropdown */
.dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  color: #1d1d1f;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(0, 122, 255, 0.08);
  color: #007aff;
  transform: translateX(4px);
}

.dropdown-divider {
  border-color: rgba(0, 0, 0, 0.06);
  margin: 0.5rem 0;
}

/* Navbar Toggler */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(29, 29, 31, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
  }
  
  .navbar-nav {
    margin: 1rem 0;
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
    border-radius: 8px;
  }
  
  .form-inline {
    margin: 1rem 0;
    width: 100%;
  }
  
  .input-group {
    width: 100%;
  }
  
  .cart-btn {
    margin: 0.5rem 0;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .navbar-brand img {
    height: 28px;
  }
  
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .navbar-collapse {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .navbar {
    background: #1d1d1f !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .navbar.scrolled {
    background: rgba(29, 29, 31, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .navbar-brand {
    color: #ffffff !important;
  }
  
  .nav-link {
    color: #ffffff !important;
  }
  
  .nav-link:hover {
    background: rgba(0, 122, 255, 0.15);
  }
  
  .form-control {
    background: #2d2d30;
    color: #ffffff;
  }
  
  .form-control:focus {
    background: #3d3d40;
  }
  
  .dropdown-menu {
    background: rgba(29, 29, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .dropdown-item {
    color: #ffffff;
  }
  
  .dropdown-item:hover {
    background: rgba(0, 122, 255, 0.15);
  }
  
  .navbar-collapse {
    background: rgba(29, 29, 31, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
}