/* ===== HEADER STYLES - COMPACT VERSION (MASTRIQ GREEN) ===== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #ffffff;
  border-bottom: 1px solid #eaeaea;
  width: 100%;
  filter: none !important;
  backdrop-filter: none !important;
  transform: none !important;
}

.nav-bar {
  width: 100%;
  margin: 0;
  padding: 0.4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #ffffff;
  position: relative;
}

/* Brand Section */
.brand-wrap {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand-logo {
  max-width: 160px;
  height: auto;
  display: block;
}

.brand {
  font-family: 'Eurostile Extended', 'Eurostile', 'Eurostile LT Std', 'Orbitron', 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 460;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: 2px;
  line-height: 1.1;
  text-transform: lowercase;
}

.brand-tagline {
  font-size: 0.55rem;
  margin-top: 0.2rem;
  color: #1a1a1a;
  letter-spacing: 0.5px;
  white-space: nowrap;
  font-weight: 500;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav > a,
.nav-item > a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  padding: 0.3rem 0;
  cursor: pointer;
}

.nav > a:hover,
.nav-item > a:hover {
  color: #76b900;
}

.nav > a.active,
.nav-item > a.active {
  color: #76b900;
}

.nav > a.active::after,
.nav-item > a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #76b900;
  border-radius: 2px;
}

/* Mega Menu */
.nav-item {
  position: static;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  border-top: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  top: 100%;
}

.mega-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 2rem;
}

.mega-categories {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid #eaeaea;
  padding-right: 1.5rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #4a4a4a;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.category-item i {
  font-size: 1rem;
  width: 24px;
  transition: transform 0.3s ease;
}

.category-item:hover {
  background: #76b900 !important;
  color: #000000 !important;
  transform: translateX(5px);
}

.category-item.active {
  background: #76b900 !important;
  color: #000000 !important;
  box-shadow: 0 4px 12px rgba(118, 185, 0, 0.3);
}

.mega-products {
  flex: 1;
}

.product-section {
  display: none;
}

.product-section.active {
  display: block;
}

.product-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
}

/* Add relative positioning to the product item */
.mega-product-item {
  position: relative;      /* required for absolute badge placement */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: #ffffff;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #eaeaea;
}


.mega-product-item:hover {
  transform: translateY(-5px);
  border-color: #76b900;
}

.mega-product-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}

.mega-product-info strong {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1a1a1a;
  display: block;
  margin-bottom: 0.2rem;
}

/* Badge as a crown (top-right corner of the image) */
.badge-new {
  position: absolute;
  top: 8px;                 /* distance from top of the container */
  right: 8px;               /* distance from right of the container */
  display: inline-block;
  font-size: 0.55rem;
  padding: 2px 6px;
  border-radius: 12px;
  background: #76b900;
  color: #0a0c12;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  z-index: 2;               /* ensure it stays above the image */
}

/* Header Extras */


/* Header extras – compact contact info (same style as footer) */
.header-extras {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.header-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;          /* same as footer */
  font-weight: 500;
  color: #4a5568;             /* muted grey, like footer text */
  text-decoration: none;
  transition: all 0.2s;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}

.header-contact-link i {
  font-size: 0.7rem;          /* same size as text */
  color: #76b900;             /* Mastriq green */
  transition: transform 0.2s;
}

.header-contact-link:hover {
  color: #76b900;
  border-bottom-color: #76b900;
}

.header-contact-link:hover i {
  transform: translateY(-1px);
}

/* On mobile: hide text, keep only icons (still compact) */
@media (max-width: 768px) {
  .header-extras {
    gap: 0.5rem;
  }
   .nav {
    gap: 0 !important;   /* removes extra vertical spacing between stacked items */
  }
  
  /* Optional: ensure consistent padding and no extra margins on nav-item */
  .nav-item {
    margin: 0;
  }

  .header-contact-link .contact-text {
    display: none;
  }
  .header-contact-link i {
    font-size: 0.9rem;
  }
}

.menu-toggle {
  display: none;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-bar {
    padding: 0.3rem 1rem;
  }
  .brand-logo {
    max-width: 120px;
  }
  .brand {
    font-size: 1.1rem;
  }
  .brand-tagline {
    font-size: 0.5rem;
    white-space: normal;
  }
  .menu-toggle {
    display: flex !important;
    background: #76b900 !important;
    border: 2px solid #000000 !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    color: #000000 !important;
    padding: 0.3rem !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    z-index: 100001 !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    filter: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .header-extras {
    gap: 0.3rem;
  }
  .search-toggle,
  .lang-toggle {
    padding: 0.3rem;
    font-size: 0.75rem;
  }
  .sign-in-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
  }
  .nav {
    position: fixed !important;
    top: 58px !important;
    left: -100% !important;
    width: 85% !important;
    max-width: 320px !important;
    height: calc(100vh - 58px) !important;
    background: #ffffff !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 1rem 1.2rem 2rem !important;
    transition: left 0.3s ease !important;
    z-index: 100000 !important;
    gap: 0 !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15) !important;
  }
  .nav.open {
    left: 0 !important;
  }
  .nav > a,
  .nav-item {
    width: 100%;
    display: block;
    border-bottom: 1px solid #eaeaea;
  }
  .nav > a {
    font-size: 0.95rem;
    padding: 0.8rem 0;
  }
  .nav-item > a {
    padding: 0.8rem 0;
    font-size: 0.95rem;
  }
  .mega-menu {
    position: static !important;
    width: 100% !important;
    box-shadow: none !important;
    display: none !important;
    background: #f9fafb !important;
    border-radius: 12px !important;
  }
  .nav-item.active .mega-menu {
    display: block !important;
  }
  .mega-container {
    flex-direction: column;
    padding: 0.8rem !important;
    gap: 0.8rem !important;
  }
  .mega-categories {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #eaeaea !important;
    padding: 0 0 0.6rem 0 !important;
    display: flex !important;
    gap: 0.6rem !important;
    flex-wrap: wrap !important;
  }
  .category-item {
    flex: 1 !important;
    justify-content: center !important;
    padding: 0.5rem !important;
    font-size: 0.8rem !important;
  }
  .product-scroll {
    flex-direction: column !important;
    overflow-x: visible !important;
    gap: 0.6rem !important;
    max-height: 300px !important;
    overflow-y: auto !important;
  }
  .mega-product-item {
    flex-direction: row !important;
    min-width: auto !important;
    text-align: left !important;
    gap: 0.8rem !important;
    padding: 0.6rem !important;
    align-items: center !important;
  }
  .mega-product-item img {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 0 !important;
  }
  .menu-overlay {
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    height: calc(100vh - 58px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
  }
  .menu-overlay.active {
    display: block;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .nav-bar {
    padding: 0.2rem 0.8rem;
  }
  .brand-logo {
    max-width: 90px;
  }
  .brand-tagline {
    display: none;
  }
  .menu-toggle {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }
  .nav {
    top: 50px !important;
    height: calc(100vh - 50px) !important;
  }
  .menu-overlay {
    top: 50px;
    height: calc(100vh - 50px);
  }
}

/* No blur enforcement */
html, body,
.main-header,
.nav-bar,
.brand-wrap,
.header-extras,
.mega-menu,
.nav,
.menu-toggle,
.menu-overlay {
  filter: none !important;
  backdrop-filter: none !important;
}

/* Active underline animation */
.nav > a.active::after,
.nav-item > a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #76b900;
  border-radius: 2px;
  animation: slideUnderline 0.3s ease;
}

@keyframes slideUnderline {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

.mega-product-item.active-product {
  border-color: #76b900;
  background: rgba(118, 185, 0, 0.1);
  transform: translateY(-2px);
}

.mega-product-item.active-product strong {
  color: #76b900;
}