/* Catalogue mega menu (dark panel) */
header.header.main-header,
header.main-header .header-sticky,
header.main-header .navbar,
.main-menu,
.nav-menu-wrapper,
.main-menu ul.navbar-nav {
  overflow: visible !important;
}

@media (min-width: 901px) {
  .main-menu .has-mega {
    position: static;
  }
}

.has-mega > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none !important;
}

.has-mega .mega-chevron {
  flex: none;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.has-mega:hover .mega-chevron,
.has-mega:focus-within .mega-chevron,
.has-mega.open .mega-chevron {
  transform: rotate(180deg);
}

.has-mega .mega {
  position: fixed;
  top: var(--ecs-mega-top, 96px);
  left: 50%;
  width: min(1100px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: #0f2240;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1200;
  margin-top: 0;
  pointer-events: none;
}

.has-mega .mega::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.has-mega:hover .mega,
.has-mega:focus-within .mega,
.has-mega.open .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.mega-intro {
  padding: 32px;
  background: linear-gradient(160deg, #16305a, #0b1b33);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mega-intro .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--orange);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.mega-intro .eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--orange);
}

.mega-intro h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  color: #fff;
  text-transform: none;
}

.mega-intro p {
  margin: 0 0 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: none;
}

.mega-intro .btn {
  align-self: flex-start;
  padding: 12px 22px;
  font-size: 15px;
  margin-top: auto;
  border-radius: 999px;
  text-transform: none !important;
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 16px;
  align-content: start;
}

.mega-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px !important;
  overflow: hidden;
  text-decoration: none !important;
  text-align: left;
  transition: background 0.2s ease;
  text-transform: none !important;
}

.mega-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.mega-item .ico {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 106, 26, 0.14);
  color: var(--orange);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.mega-item b {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  text-transform: none !important;
}

.mega-item small {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13.5px;
  line-height: 1.45;
  text-transform: none !important;
}

.mega-item:hover b {
  color: var(--orange);
}

/* Hide legacy injected mega */
.ecs-mega-menu {
  display: none !important;
}

@media (max-width: 900px) {
  .has-mega .mega {
    position: static;
    width: 100%;
    transform: none;
    grid-template-columns: 1fr;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    margin-top: 8px;
    box-shadow: none;
    border-radius: 12px;
  }

  .has-mega.open .mega {
    display: grid;
  }

  .mega-intro {
    display: none;
  }

  .mega-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Mega menu polish (alignment, gap, open state, centering) --- */
.mega-intro,
.mega-intro * {
  text-align: left !important;
}

.mega-intro h3 {
  font-size: 24px;
  margin: 14px 0 10px;
}

.has-mega:hover > a,
.has-mega:focus-within > a,
.has-mega.open > a {
  color: var(--orange) !important;
}

.has-mega > a svg {
  transition: transform 0.2s ease;
}

.has-mega:hover > a svg,
.has-mega.open > a svg {
  transform: rotate(180deg);
}

.mega-item b::after {
  content: "→";
  margin-left: 8px;
  opacity: 0;
  transform: translateX(-4px);
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mega-item:hover b::after {
  opacity: 1;
  transform: none;
}

.mega-item:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
