* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Segoe UI, sans-serif;
}

.home-banner {
  position: relative;
  z-index: 1 !important;
}

.header {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10000 !important;
  border-bottom: 3px solid #ff6b35;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 1400px;
  margin: auto;
  padding: 0 20px;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  text-decoration: none;
  color: #111;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Desktop Menu */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s ease;
  position: relative;
  padding: 5px 0;
  display: block;
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  transition: width 0.3s ease;
}

.nav-menu > li > a:hover::after {
  width: 100%;
}

.nav-menu > li > a:hover {
  color: #ff6b35;
}

/* Mega Menu Dropdown - UPDATED */
.mega-dropdown {
  position: static !important;
}

.mega-menu {
  position: absolute !important;
  top: 80px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background: #fff !important;
  border-radius: 0 0 20px 20px !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-20px) !important;
  transition: all 0.4s ease !important;
  z-index: 9999 !important;
  padding: 50px 20px !important;
  display: block !important;
}

/* Mega Menu Container - 4 columns for 8 items (2 rows) */
.mega-menu-container {
  max-width: 1000px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 40px 30px !important;
}

/* Individual Mega Item - Circular Design */
.mega-item {
  position: relative !important;
  text-align: center !important;
  transition: transform 0.3s ease !important;
  display: block !important;
}

.mega-item:hover {
  transform: translateY(-10px) !important;
}

.mega-item a {
  text-decoration: none !important;
  color: #333 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 15px !important;
}

/* Circular Image Container */
.mega-img-circle {
  width: 140px !important;
  height: 140px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  position: relative !important;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%) !important;
  padding: 5px !important;
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.25) !important;
  transition: all 0.4s ease !important;
}

.mega-item:hover .mega-img-circle {
  box-shadow: 0 12px 35px rgba(255, 107, 53, 0.4) !important;
  transform: scale(1.05) !important;
}

/* Inner circle for white background */
.mega-img-circle::before {
  content: '' !important;
  position: absolute !important;
  top: 5px !important;
  left: 5px !important;
  right: 5px !important;
  bottom: 5px !important;
  background: #fff !important;
  border-radius: 50% !important;
  z-index: 1 !important;
}

.mega-img-circle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  position: relative !important;
  z-index: 2 !important;
  transition: transform 0.5s ease !important;
  padding: 5px !important;
}

.mega-item:hover .mega-img-circle img {
  transform: scale(1.1) rotate(5deg) !important;
}

/* Category Title */
.mega-item h4 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #222 !important;
  transition: color 0.3s ease !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mega-item:hover h4 {
  color: #ff6b35 !important;
}

/* Remove description styles */
.mega-item p {
  display: none !important;
}

/* Desktop hover - Show mega menu */
@media (min-width: 969px) {
  .mega-dropdown:hover .mega-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }
}

/* Tablet - 3 columns */
@media (max-width: 1024px) and (min-width: 769px) {
  .mega-menu-container {
    grid-template-columns: repeat(3, 1fr) !important;
    max-width: 750px !important;
  }
  
  .mega-img-circle {
    width: 120px !important;
    height: 120px !important;
  }
}

/* Mobile - 2 columns */
@media (max-width: 768px) and (min-width: 481px) {
  .mega-menu-container {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 400px !important;
  }
  
  .mega-img-circle {
    width: 110px !important;
    height: 110px !important;
  }
  
  .mega-item h4 {
    font-size: 14px !important;
  }
}


/* Actions */
.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.signup-btn {
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
  transition: all 0.3s ease;
}

.signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* ================================================
   CART BUTTON WITH FLIPKART-STYLE BADGE
   ================================================ */

.cart-btn {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
  padding: 5px;
}

.cart-btn:hover {
  transform: scale(1.1);
}

/* Cart Badge - Flipkart Style */
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.5);
  border: 2px solid white;
  opacity: 0;
  visibility: hidden;
  transform: scale(0);
  transition: all 0.3s ease;
  z-index: 10;
}

.cart-badge.has-items {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Badge animation when items are added */
@keyframes badgePop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.cart-badge.pop {
  animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Badge pulse animation */
@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.cart-badge.pulse {
  animation: badgePulse 0.6s ease-in-out;
}

.mobile-menu-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: none;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: #fff;
  max-height: 0;
  overflow-y: auto;
  transition: max-height 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  z-index: 9998;
}

.mobile-menu.active {
  max-height: calc(100vh - 80px);
}

.mobile-nav {
  list-style: none;
  padding: 20px;
}

.mobile-nav > li {
  margin-bottom: 5px;
}

.mobile-nav a {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-nav > li > a:hover {
  background: rgba(255, 107, 53, 0.1);
  color: #ff6b35;
  padding-left: 20px;
}

/* Mobile Dropdown */
.mobile-dropdown > a {
  cursor: pointer;
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding-left: 0;
  list-style: none;
}

.mobile-dropdown.active .mobile-submenu {
  max-height: 500px;
  margin-top: 8px;
}

.mobile-submenu li {
  margin: 0;
}

.mobile-submenu a {
  padding: 10px 15px 10px 30px;
  font-size: 14px;
}

/* Tablet adjustments */
@media (max-width: 1200px) {
  .mega-menu-container {
    max-width: 900px !important;
    gap: 20px !important;
  }
  
  .mega-img {
    height: 160px !important;
  }
}

/* Small tablets - 2 columns */
@media (max-width: 900px) and (min-width: 769px) {
  .mega-menu-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Responsive */
@media (min-width: 969px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-btn {
    display: none !important;
  }
}

@media (max-width: 968px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .header-container {
    height: 70px;
  }
  
  .logo {
    font-size: 22px;
  }
  
  .logo-icon {
    padding: 8px;
  }
  
  .signup-btn {
    padding: 10px 18px;
    font-size: 10px !important;
  }
  
  .cart-btn {
    font-size: 22px;
  }
  
  /* Mobile cart badge adjustments */
  .cart-badge {
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    padding: 0 5px;
  }
}

/* Carousel fix */
.carousel,
.carousel-inner,
.carousel-item {
  z-index: 1 !important;
}

/* Small Mobile - 2 columns smaller */
@media (max-width: 480px) {
  .mega-menu {
    padding: 30px 15px !important;
  }
  
  .mega-menu-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px 15px !important;
  }
  
  .mega-img-circle {
    width: 90px !important;
    height: 90px !important;
  }
  
  .mega-item h4 {
    font-size: 13px !important;
  }

  .signup-btn{
    font-size: 10px !important;
  }
  
  .cart-btn {
    font-size: 20px;
  }
}