/* ===== HEADER STYLES ===== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-normal);
}

/* Header Top Bar */
.header-top {
  background-color: rgba(0, 13, 26, 0.95);
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-contact-info {
  display: flex;
  gap: var(--spacing-md);
}

.header-info-item {
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.header-info-item:hover {
  color: var(--white);
}

.header-info-item i {
  color: var(--secondary-color);
  font-size: 0.8rem;
}

.header-social {
  display: flex;
  gap: 10px;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.header-social a:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.header-social a::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  color: var(--white);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 10;
  pointer-events: none;
}

.header-social a:hover::after {
  opacity: 1;
  visibility: visible;
  top: 80%;
}

/* Header Main Area */
.header-main {
  background: linear-gradient(to right, #001a33 0%, #003366 100%);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Logo Styles */
.logo-wrapper {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--white);
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo img {
  width: 100px;
  height: auto;
  margin-right: 10px;
  filter: brightness(1.3) contrast(1.1); /* Enhanced brightness for better visibility */
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 1));
  transition: transform var(--transition-normal);
}

.logo:hover img {
  transform: rotate(5deg);
}

.brand-text h1 {
  font-size: 1.25rem;
  margin-bottom: 0;
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.75);
}

.logo:hover .brand-text h1 {
  color: var(--secondary-color);
}

.brand-text p {
  font-size: 0.875rem;
  margin-bottom: 0;
  color: var(--info);
  font-weight: 500;
  text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.75);
}

/* Navigation Styles */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--white);
  font-weight: 500;
  padding: 0rem 0;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.75);
  position: relative;
  transition: all var(--transition-fast);
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover {
  opacity: 1;
  color: var(--white);
  transform: translateY(-2px);
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.75));
  background-color: var(--secondary-color);
  transition: width var(--transition-normal);
}

.nav-link:hover:after {
  width: 100%;
}

.nav-link.active {
  color: var(--white);
  opacity: 1;
  font-weight: 600;
}

.dropdown-icon {
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

/* CTA Button */
.nav-link.cta-btn {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  gap: 0.8rem;
  opacity: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.nav-link.cta-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.nav-link.cta-btn:after {
  display: none;
}

/* Mega Menu Styles */
.mega-menu-parent {
  position: relative;
}

.mega-menu {
  position: absolute;
  left: 45%;
  top: 150%;
  transform: translateX(-50%) translateY(20px);
  width: 100%;
  min-width: min(1200px, 195vw);
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-top: 3px solid #0077b6;
  border-radius: 0 0 8px 8px;
  padding: 20px 0;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  max-height: 80vh;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.sticky .mega-menu {
  top: 190%;
  transition: var(--transition-normal);
}

.mega-menu-parent:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  height: 100%;
}

.mega-menu-main-categories {
  width: 30%;
  padding-right: 20px;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.mega-menu-category-group {
  margin-bottom: 25px;
  border-bottom: 2px solid rgb(134, 134, 134);
}

.category-group-title {
  font-size: 18px;
  color: #333;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

.mega-menu-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu-category {
  margin-bottom: 8px;
}

.mega-menu-category > a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: #555;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  gap: 10px;
}

.mega-menu-category > a:hover {
  background-color: rgba(0, 119, 182, 0.1);
  color: #0077b6;
}

.mega-menu-category i {
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: #0077b6;
}

.mega-menu-right {
  width: 70%;
  padding-left: 20px;
}

.featured-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 4fr);
  gap: 15px;
}

.featured-product-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.featured-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: #0077b6;
}

.featured-product-image {
  height: 180px;
  overflow: hidden;
}

.featured-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-product-card:hover .featured-product-image img {
  transform: scale(1.05);
}

.featured-product-info {
  padding: 15px;
}

.featured-product-info h4 {
  color: #0077b6;
  font-size: 16px;
  margin: 0 0 5px 0;
  font-weight: 600;
}

.featured-product-info p {
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .mega-menu-container {
    flex-direction: column;
  }
  
  .mega-menu-main-categories,
  .mega-menu-featured {
    width: 100%;
    padding: 0;
  }
  
  .mega-menu-main-categories {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  
  .featured-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .mega-menu {
    min-width: 95vw;
    left: 0;
    transform: translateX(0) translateY(20px);
  }
  
  .mega-menu-parent:hover .mega-menu {
    transform: translateX(0) translateY(0);
  }
  
  .featured-products-grid {
    grid-template-columns: 1fr;
  }
  
  .mega-menu-category > a {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .category-group-title {
    font-size: 16px;
  }
}

/* Search Toggle */
.nav-search {
  display: flex;
  align-items: center;
}

.search-toggle {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.9;
  transition: all var(--transition-fast);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.search-toggle:hover {
  opacity: 1;
  color: var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 26, 51, 0.98);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal) cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(5px);
}

header.sticky .search-overlay {
  background: rgba(0, 26, 51, 0.95);
  backdrop-filter: blur(10px);
  top: 100%;
  left: 0;
  width: 100%;
  height: auto;
  padding: 20px 0;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-form {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.search-form input {
  width: 100%;
  padding: 1.5rem 2rem;
  padding-right: 120px;
  border: none;
  border-bottom: 2px solid var(--secondary-color);
  background: transparent;
  color: var(--white);
  font-size: 1.5rem;
  outline: none;
  transition: all var(--transition-fast);
  border-radius: 0;
}

.search-form input:focus {
  border-bottom-color: var(--white);
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
}

.search-submit,
.search-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit {
  right: 70px;
  font-size: 1.2rem;
  opacity: 0.8;
  padding: 0.5rem;
}

.search-submit:hover {
  opacity: 1;
  color: var(--secondary-color);
  transform: translateY(-50%) scale(1.1);
}

.search-close {
  right: 20px;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.search-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) rotate(90deg);
}

.search-suggestions {
  margin-top: 2.5rem;
  text-align: center;
  animation: fadeIn 0.6s 0.2s ease-out both;
}

.search-suggestions h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.suggestion-tags {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.suggestion-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestion-tags a:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: transparent;
}

/* Mobile Menu Button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--white);
  position: absolute;
  left: 0;
  transition: all var(--transition-fast);
  border-radius: 3px;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  backdrop-filter: blur(5px);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Header Progress Bar */
.header-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
  width: 0;
  transition: width 0.1s ease;
}

/* Sticky Header */
.main-header.sticky {
  background: rgba(0, 26, 51, 0.95);
  backdrop-filter: blur(10px);
}

.main-header.sticky .header-top {
  display: none;
}

.main-header.sticky .header-main {
  background: transparent;
  box-shadow: none;
}

.main-header.sticky .logo img {
  width: 75px;
}

.main-header.sticky .brand-text h1 {
  font-size: 1.15rem;
}

.main-header.sticky .brand-text p {
  font-size: 0.8rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .mega-menu {
    min-width: 100%;
    left: 0;
    right: 0;
  }
  
  .mega-menu-container {
    padding: 0 var(--spacing-md);
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 992px) {
  .header-main .container {
    height: 70px;
  }
  
  .logo img {
    width: 50px;
  }
  
  .brand-text h1 {
    font-size: 1.1rem;
  }
  
  .brand-text p {
    font-size: 0.8rem;
  }
  
  .hamburger {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--primary-gradient);
    flex-direction: column;
    gap: 0;
    padding: 100px var(--spacing-lg) var(--spacing-lg);
    transition: right var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-menu li:last-child {
    border-bottom: none;
  }
  
  .nav-link {
    display: flex;
    padding: var(--spacing-md) 0;
    justify-content: space-between;
  }
  
  .nav-link:after {
    display: none;
  }
  
  .mega-menu-parent {
    flex-direction: column;
  }
  
  .mega-menu {
    position: static;
    width: 100%;
    min-width: auto;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    opacity: 1;
    transform: none;
    display: block !important;
  }
  
  .mega-menu-parent.active .mega-menu {
    max-height: 1000px;
    padding: var(--spacing-md) 0;
  }
  
  .mega-menu-container {
    flex-direction: column;
    padding: 0;
  }
  
  .mega-menu-left {
    width: 100%;
    border-right: none;
    padding: 0;
    margin-bottom: var(--spacing-md);
  }
  
  .mega-menu-right {
    padding: 0;
    max-height: none;
  }
  
  .mega-menu-content {
    display: block !important;
    opacity: 1 !important;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .mega-menu-footer {
    margin-top: var(--spacing-md);
  }
  
  .dropdown-icon {
    transform: rotate(-90deg);
    transition: transform var(--transition-fast);
  }
  
  .mega-menu-parent.active .dropdown-icon {
    transform: rotate(0deg);
  }
  
  .nav-search {
    order: -1;
    margin-bottom: var(--spacing-md);
    width: 100%;
  }
  
  .search-toggle {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
    height: auto;
  }
  
  .nav-link.cta-btn {
    margin-top: var(--spacing-md);
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  
  .header-main .container {
    height: 60px;
  }
  
  .search-form input {
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
    padding-right: 100px;
  }
  
  .search-submit {
    right: 60px;
  }
  
  .search-close {
    right: 15px;
  }
}

@media (max-width: 576px) {
  .logo img {
    width: 40px;
  }
  
  .brand-text h1 {
    font-size: 1rem;
  }
  
  .brand-text p {
    font-size: 0.75rem;
  }
  
  .nav-menu {
    width: 280px;
  }
  
  .search-suggestions h4 {
    font-size: 1rem;
  }
  
  .suggestion-tags a {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .main-header.sticky .logo img {
    width: 40px;
  }
  
  .main-header.sticky .brand-text h1 {
    font-size: 0.9rem;
  }
  
  .main-header.sticky .brand-text p {
    font-size: 0.7rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar for mega menu */
.mega-menu-right::-webkit-scrollbar {
  width: 5px;
  border: none;
}

.mega-menu-right::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0px;
}

.mega-menu-right::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0px;
  border: none;
  outline: none;
}

.mega-menu-right::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.1);
}