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

.im-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  height: 100%;
}

/* ── Desktop nav ── */
.im-nav { flex: 1; height: 100%; }

.im-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
  height: 100%;
}

.im-item > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  height: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--im-text, #1a1a1a);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.im-item > a:hover,
.im-item.active > a {
  color: var(--im-accent, #e86c2c);
  border-bottom-color: var(--im-accent, #e86c2c);
}

.im-arr {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .45;
  flex-shrink: 0;
  transition: transform .2s;
}
.im-item.active .im-arr { transform: rotate(180deg); opacity: 1; }

/* ── Mega panel ── */
.im-panel {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: #fff;
  border-top: 2px solid var(--im-accent, #e86c2c);
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 8px 28px rgba(0,0,0,.09);
  z-index: 9999;
}
.im-panel.open { display: block; }

.im-panel-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: flex;
}

.im-col {
  flex: 1;
  padding: 0 20px;
  border-right: 1px solid #ebebeb;
  min-width: 0;
}
.im-col:first-child { padding-left: 0; }
.im-col:last-child  { border-right: none; padding-right: 0; }

.im-col h5 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--im-accent, #e86c2c);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ebebeb;
}

.im-col ul { list-style: none; margin: 0; padding: 0; }
.im-col ul li a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--im-text, #1a1a1a);
  text-decoration: none;
  line-height: 1.35;
  transition: color .12s;
}
.im-col ul li a:hover { color: var(--im-accent, #e86c2c); }
.im-col ul li a .im-icon { font-size: 14px; width: 15px; flex-shrink: 0; margin-top: 1px; opacity: .4; }
.im-col ul li a:hover .im-icon { opacity: 1; }

/* ── Right actions ── */
.im-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 16px;
}

.im-search-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--im-text, #1a1a1a);
  display: flex; align-items: center;
  transition: color .15s;
}
.im-search-btn:hover { color: var(--im-accent, #e86c2c); }

.im-cta {
  display: inline-flex;
  align-items: center;
  background: var(--im-accent, #e86c2c);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 22px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity .15s;
}
.im-cta:hover { opacity: .88; }

.im-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  background: none; border: none; cursor: pointer;
  padding: 6px 4px; gap: 5px;
}
.im-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--im-text, #1a1a1a);
  transition: all .25s;
}
.im-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.im-burger.open span:nth-child(2) { opacity: 0; }
.im-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Search bar ── */
.im-search-bar {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: #f7f8fa;
  border-bottom: 1px solid #e8e8e8;
  z-index: 9998;
}
.im-search-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.im-search-inner .search-form { flex: 1; display: flex; gap: 8px; }
.im-search-inner .search-field {
  flex: 1; padding: 9px 14px;
  border: 1px solid #ddd; font-size: 14px; outline: none;
}
.im-search-inner .search-field:focus { border-color: var(--im-accent, #e86c2c); }
.im-search-inner .search-submit {
  background: var(--im-accent, #e86c2c);
  color: #fff; border: none;
  padding: 9px 18px; font-size: 14px; cursor: pointer;
}

/* ── Mobile drawer ── */
.im-drawer {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: #fff;
  border-top: 2px solid var(--im-accent, #e86c2c);
  border-bottom: 1px solid #e8e8e8;
  z-index: 9997;
  overflow-y: auto;
  max-height: 80vh;
}

.im-mob-sec { border-bottom: 1px solid #ebebeb; }

.im-mob-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: none; border: none;
  font-size: 13.5px; font-weight: 600;
  color: var(--im-text, #1a1a1a);
  cursor: pointer; text-align: left;
}
.im-mob-toggle:hover { background: #f7f8fa; color: var(--im-accent, #e86c2c); }

.im-mob-arr {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .45; flex-shrink: 0;
  transition: transform .2s;
}
.im-mob-toggle[aria-expanded="true"] .im-mob-arr { transform: rotate(180deg); opacity: 1; }

.im-mob-body { background: #f7f8fa; }
.im-mob-body ul { list-style: none; margin: 0; padding: 0; }
.im-mob-body ul li a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 28px;
  font-size: 13.5px; color: var(--im-text, #1a1a1a);
  text-decoration: none;
  border-bottom: 1px solid #ebebeb;
}
.im-mob-body ul li:last-child a { border-bottom: none; }
.im-mob-body ul li a:hover { color: var(--im-accent, #e86c2c); background: #fff; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .im-nav    { display: none; }
  .im-burger { display: flex; }
}
@media (max-width: 480px) {
  .im-cta { font-size: 12px; padding: 10px 12px; }
}

/* Fix: give Nex's header a relative position so panel anchors correctly */
.main-header,
.fixed-header-box,
.header-content-wrapper {
  position: relative !important;
  overflow: visible !important;
}

/* Fix: reduce font size + padding so items don't wrap */
.im-item > a {
  padding: 0 10px;
  font-size: 13px;
}