.sj-mega {
  --sj-accent: var(--wd-primary-color, #f97316);
  --sj-text: #1f2937;
  --sj-muted: #6b7280;
  --sj-line: #eef1f5;
  position: relative;
  display: inline-flex;
  z-index: 10050;
  font-family: inherit;
}

.sj-mega *,
.sj-mega *::before,
.sj-mega *::after {
  box-sizing: border-box;
}

.sj-mega .sj-mega__toggle,
.whb-header .sj-mega .sj-mega__toggle,
.wd-header-text .sj-mega .sj-mega__toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-height: 52px !important;
  padding: 6px 8px 6px 18px !important;
  border: 1px solid #edf1f5 !important;
  border-radius: 999px !important;
  background: #fff !important;
  background-color: #fff !important;
  color: #111827 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background .2s ease, border-color .2s ease;
}

.sj-mega .sj-mega__toggle:hover,
.sj-mega.is-open .sj-mega__toggle,
.whb-header .sj-mega .sj-mega__toggle:hover {
  background: #fff !important;
  background-color: #fff !important;
  border-color: #e2e8f0 !important;
  color: #111827 !important;
  box-shadow: none !important;
}

.sj-mega__toggle-text {
  color: #111827;
  white-space: nowrap;
}

.sj-mega__burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: #2563eb;
}

.sj-mega__burger span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.sj-mega__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  width: min(1180px, 94vw);
  min-height: 460px;
  max-height: min(74vh, 680px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sj-line);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.sj-mega__dropdown[hidden] {
  display: none;
}

.sj-mega__parents {
  flex: 0 0 238px;
  overflow-y: auto;
  background: #fff;
  border-left: 1px solid var(--sj-line);
}

.sj-mega__parent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: var(--sj-text) !important;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.sj-mega__parent:hover,
.sj-mega__parent.is-active {
  background: #fff;
  color: var(--sj-accent) !important;
  border-bottom-color: var(--sj-accent);
}

.sj-mega__parent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: inherit;
}

.sj-mega__parent-icon svg,
.sj-mega__parent-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.sj-mega__content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 26px 28px;
  background: #fff;
}

.sj-mega__pane {
  display: none;
}

.sj-mega__pane.is-active {
  display: block;
}

.sj-mega__cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px 32px;
}

.sj-mega__col-title {
  display: inline-block;
  margin-bottom: 8px;
  padding-right: 10px;
  border-right: 3px solid var(--sj-accent);
  color: #111827 !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
  text-decoration: none !important;
}

.sj-mega__col-title:hover {
  color: var(--sj-accent) !important;
}

.sj-mega__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sj-mega__list li + li {
  margin-top: 2px;
}

.sj-mega__list a {
  color: var(--sj-muted) !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.85;
  text-decoration: none !important;
}

.sj-mega__list a:hover {
  color: var(--sj-accent) !important;
}

.sj-mega__empty {
  margin: 48px 0;
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 1024px) {
  .sj-mega {
    width: 100%;
  }

  .sj-mega__toggle {
    width: 100%;
    justify-content: space-between;
    padding: 6px 8px 6px 16px;
  }

  .sj-mega__dropdown {
    position: static;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin-top: 8px;
    flex-direction: column;
  }

  .sj-mega__parents {
    flex: none;
    display: flex;
    overflow-x: auto;
    border-left: 0;
    border-bottom: 1px solid var(--sj-line);
  }

  .sj-mega__parent {
    white-space: nowrap;
  }

  .sj-mega__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sj-mega__cols {
    grid-template-columns: 1fr;
  }
}
