html {
  scroll-behavior: smooth;
}

.navbar {
  background-color: #004771;
  padding: 15px 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease-in-out;
}

.navbar-brand img:hover {
  transform: scale(1.1);
}

.nav-link {
  color: white !important;
  font-size: 18px;
  font-weight: 500;
  padding: 10px 18px;
  transition: all 0.4s ease-in-out;
  border-radius: 5px;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: #4CBB17;
  transition: all 0.4s ease-in-out;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #4CBB17 !important;
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 100%;
}

/* Cart Icon Styling */
.cart-hover {
  font-size: 1.2rem;
  color: white;
  transition: all 0.4s ease;
  display: inline-block;
}

.cart-hover:hover {
  color: #7CFC00;
  transform: scale(1.2) rotate(15deg);
  text-shadow: 0 0 8px #7CFC00, 0 0 12px #7CFC00;
}

/* Premium Custom Toggler Styles with Mind-Blowing Animations */
.custom-toggler {
  border: none !important;
  background: transparent !important;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  outline: none !important;
  box-shadow: none !important;
  position: relative;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.custom-toggler::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(124, 252, 0, 0.1), transparent);
  border-radius: 8px;
  opacity: 0;
  transition: all 0.4s ease;
  transform: translateX(-100%) rotate(45deg);
}

.custom-toggler:hover::before {
  opacity: 1;
  transform: translateX(100%) rotate(45deg);
}

.custom-toggler:focus,
.custom-toggler:focus-visible,
.custom-toggler:active {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(124, 252, 0, 0.3) !important;
  border: none !important;
  background: rgba(124, 252, 0, 0.05) !important;
}

.custom-toggler:hover {
  transform: scale(1.05);
  background: rgba(124, 252, 0, 0.08) !important;
}

/* Individual Toggler Bars with Premium Animations */
.toggler-bar {
  width: 25px;
  height: 3px;
  background: linear-gradient(90deg, #7CFC00, #32CD32, #7CFC00);
  background-size: 200% 100%;
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
  position: relative;
  overflow: hidden;
}

.toggler-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left 0.6s ease;
}

.custom-toggler:hover .toggler-bar {
  background-position: 100% 0;
  transform: scaleX(1.1);
  box-shadow: 0 0 8px rgba(124, 252, 0, 0.6);
}

.custom-toggler:hover .toggler-bar::before {
  left: 100%;
}

/* Active/Clicked State - Transform to X */
.custom-toggler[aria-expanded="true"] .top-bar {
  transform: translateY(7px) rotate(45deg);
  background: linear-gradient(90deg, #4CBB17, #7CFC00, #4CBB17);
  box-shadow: 0 0 10px rgba(76, 187, 23, 0.8);
}

.custom-toggler[aria-expanded="true"] .middle-bar {
  opacity: 0;
  transform: scaleX(0) rotate(180deg);
}

.custom-toggler[aria-expanded="true"] .bottom-bar {
  transform: translateY(-7px) rotate(-45deg);
  background: linear-gradient(90deg, #4CBB17, #7CFC00, #4CBB17);
  box-shadow: 0 0 10px rgba(76, 187, 23, 0.8);
}

/* Pulsing Effect when Active */
.custom-toggler[aria-expanded="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 107, 107, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Staggered Animation for Bars */
.custom-toggler .top-bar {
  animation-delay: 0s;
}

.custom-toggler .middle-bar {
  animation-delay: 0.1s;
}

.custom-toggler .bottom-bar {
  animation-delay: 0.2s;
}

/* Hover Effects with Individual Bar Animations */
.custom-toggler:hover .top-bar {
  transform: translateX(2px) rotate(2deg);
}

.custom-toggler:hover .middle-bar {
  transform: scaleX(1.15);
}

.custom-toggler:hover .bottom-bar {
  transform: translateX(-2px) rotate(-2deg);
}

/* Loading Effect on Click */
.custom-toggler:active .toggler-bar {
  animation: loadingPulse 0.6s ease-in-out;
}

@keyframes loadingPulse {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.3) scaleX(1.2);
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
  }
}

/* Responsive adjustments for premium toggler */
@media (max-width: 370px) {
  .toggler-bar {
    width: 20px;
  }
  
  .custom-toggler[aria-expanded="true"] .top-bar {
    transform: translateY(6px) rotate(45deg);
  }
  
  .custom-toggler[aria-expanded="true"] .bottom-bar {
    transform: translateY(-6px) rotate(-45deg);
  }
}

@media (max-width: 350px) {
  .toggler-bar {
    width: 18px;
    height: 2.5px;
  }
  
  .custom-toggler[aria-expanded="true"] .top-bar {
    transform: translateY(5.5px) rotate(45deg);
  }
  
  .custom-toggler[aria-expanded="true"] .bottom-bar {
    transform: translateY(-5.5px) rotate(-45deg);
  }
}

@media (max-width: 320px) {
  .toggler-bar {
    width: 16px;
    height: 2px;
  }
  
  .custom-toggler {
    padding: 6px;
  }
  
  .custom-toggler[aria-expanded="true"] .top-bar {
    transform: translateY(5px) rotate(45deg);
  }
  
  .custom-toggler[aria-expanded="true"] .bottom-bar {
    transform: translateY(-5px) rotate(-45deg);
  }
}

/* For screens 370px and below */
@media (max-width: 370px) {
  .logo-responsive {
    height: 35px !important; /* Smaller logo on narrow screens */
  }
  
  .navbar {
    padding: 10px 15px; /* Reduce navbar padding */
  }
  
  .cart-hover {
    font-size: 1.1rem; /* Slightly smaller cart icon */
  }
  
  .toggler-bar {
    width: 20px; /* Smaller toggler bars */
  }
}

/* For screens 350px and below - even more compact */
@media (max-width: 350px) {
  .logo-responsive {
    height: 30px !important; /* Even smaller logo */
  }
  
  .navbar {
    padding: 8px 12px; /* Even less padding */
  }
  
  .cart-hover {
    font-size: 1rem; /* Smaller cart icon */
  }
  
  .toggler-bar {
    width: 18px; /* Even smaller toggler bars */
    height: 2.5px; /* Slightly thinner bars */
  }
}

/* For very narrow screens 320px and below */
@media (max-width: 320px) {
  .logo-responsive {
    height: 28px !important; /* Very small logo */
  }
  
  .navbar {
    padding: 6px 10px; /* Minimal padding */
  }
  
  .navbar-brand {
    margin-right: 8px !important; /* Reduce logo margin */
  }
  
  .cart-hover {
    font-size: 0.95rem; /* Even smaller cart icon */
  }
  
  .toggler-bar {
    width: 16px; /* Very small toggler bars */
    height: 2px; /* Thinner bars */
  }
  
  .custom-toggler {
    padding: 3px; /* Reduce toggler padding */
  }
}
