/* Header Responsive Styles */

/* 1. Top Promotion Bar */
.top-promo-bar {
  background-color: #003366; /* Dark Blue */
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
  overflow: hidden;
}

.marquee-wrapper {
  white-space: nowrap;
  overflow: hidden;
}

.marquee-track {
  display: inline-block;
  animation: marquee-slide 30s linear infinite;
}

.marquee-item {
  display: inline-block;
  margin-right: 50px;
}

.marquee-item a {
  color: #ffcc00; /* Yellow highlight */
  font-weight: bold;
  text-decoration: none;
  margin-left: 5px;
}

@keyframes marquee-slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* Scrolls half if content is duplicated */
}

/* 2. Main Header */
.main-header {
  background: #fff;
  padding: 15px 0;
  border-bottom: 1px solid #e5e5e5;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 15px;
}

/* Logo */
.logo img {
  max-height: 60px; /* Reduced for better proportion */
  width: auto;
}

/* Search Bar */
/* Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-item {
  display: flex;
  flex-direction: row; /* Icon beside text */
  align-items: center;
  text-decoration: none;
  color: #333;
  font-size: 14px; /* Increased base size */
  font-weight: 600; /* Bold text */
  transition: color 0.3s;
  gap: 8px; /* Spacing between icon and text */
}

.action-item i {
  font-size: 18px;
  margin-bottom: 0; /* Remove bottom margin */
  color: #333; /* Darker icon color */
}

.action-item:hover,
.action-item:hover i {
  color: #0056b3;
}

/* Mobile Toggle */
.menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

/* Mobile Specific Elements (Hidden on Desktop) */
.mobile-cart-icon,
.mobile-menu-actions {
  display: none;
}

/* .nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
} */

/* .nav-item {
  position: relative;
} */

/* Level 1 Links */
/* .nav-item > a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s;
}

.nav-item > a:hover,
.nav-item > a.active {
  background: rgba(255, 255, 255, 0.15);
} */

.nav-arrow {
  font-size: 10px;
  margin-left: 5px;
  opacity: 0.8;
}

.nav-item:hover .submenu {
  display: block; /* Show on hover */
}

/* Level 2 Links */
.submenu li a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s;
}

.submenu li:last-child a {
  border-bottom: none;
}

/* Level 3 Submenu (if any) - Optional */
.submenu ul {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 0;
}

.submenu li:hover > ul {
  display: block;
}

/* ===========================
   RESPONSIVE (Mobile & Tablet)
   =========================== */

/* Tablet (Max 992px) */
@media (max-width: 992px) {
  .header-row {
    gap: 10px;
  }

  .logo img {
    height: 50px !important;
  }

  .search-wrapper {
    margin: 0 10px;
  }

  .nav-item > a {
    padding: 12px 10px;
    font-size: 12px;
  }
}

/* Mobile (Max 768px) */
@media (max-width: 768px) {
  /* Redesigned Mobile Layout */
  .header-row {
    padding: 10px 15px;
    position: relative;
    flex-wrap: wrap;
    gap: 0;
  }

  /* 1. Menu Toggle (Left) */
  .menu-toggle {
    display: block;
    order: 1;
    width: 40px;
  }

  /* 2. Logo (Center / Left-Center) */
  .logo {
    order: 2;
    flex: 1;
    text-align: center;
    margin: 0;
    display: flex;
    justify-content: center;
  }
  .logo img {
    max-height: 45px;
  }

  /* 3. Mobile Cart (Right) */
  .mobile-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 3;
    width: 40px;
    height: 40px;
    color: #333;
    font-size: 22px;
    position: relative;
  }

  /* 4. Search Bar (New Line) */
  .search-wrapper {
    order: 4;
    width: 100%;
    margin: 10px 0 0 0;
    flex-basis: 100%;
  }

  /* Hide Old Desktop Actions */
  .header-actions {
    display: none !important;
  }

  /* Show Mobile Menu Actions inside Sidebar */
  .mobile-menu-actions {
    display: block;
  }

  /* Navigation Bar: Turn into Mobile Menu (Sidebar/Drawer) */
  .nav-bar {
    display: none; /* Hide by default, toggle via JS */

    position: fixed; /* Or absolute relative to header */
    top: 0;
    left: 0;
    width: 80%; /* Drawer width */
    height: 100vh;
    background: #fff;
    z-index: 2000;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    padding-top: 20px;
  }

  .nav-bar.mobile-active {
    display: block;
  }

  /* Mobile Nav List */
  .nav-list {
    flex-direction: column;
  }

  .nav-item > a {
    color: #333;
    border-bottom: 1px solid #eee;
    padding: 15px;
  }

  .nav-item > a:hover,
  .nav-item > a.active {
    background: #f5f5f5;
    color: #0056b3;
  }

  .nav-arrow {
    float: right;
    transform: rotate(-90deg); /* Point right */
  }

  /* Mobile Submenu */
  .submenu {
    position: static; /* Stack vertically */
    box-shadow: none;
    border-top: none;
    background: #f9f9f9;
    display: none; /* Toggle via JS/CSS target */
    padding-left: 20px;
  }

  .nav-item.active-submenu .submenu {
    display: block;
  }

  .submenu li a {
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
  }

  /* Overlay for mobile menu */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
  }

  .menu-overlay.active {
    display: block;
  }
}
