/* Header main menu — icons + sentence case + «Ещё...» overflow */
.header-main-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 50;
  box-sizing: border-box;
}

.header-main-menu__track {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow: hidden;
}

.header-main-menu__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.header-main-menu__item:hover {
  color: #3b6fd9;
  background: rgba(59, 111, 217, 0.06);
}

.header-main-menu__icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  display: block;
}

.header-main-menu__item:hover .header-main-menu__icon {
  color: #3b6fd9;
}

.header-main-menu__item--sale {
  color: #c62828;
}

.header-main-menu__item--sale .header-main-menu__icon {
  color: #e57373;
}

.header-main-menu__item--sale:hover {
  color: #b71c1c;
  background: rgba(198, 40, 40, 0.06);
}

.header-main-menu__item--new {
  color: #2e7d32;
}

.header-main-menu__item--new .header-main-menu__icon {
  color: #81c784;
}

.header-main-menu__item--new:hover {
  color: #1b5e20;
  background: rgba(46, 125, 50, 0.06);
}

.header-main-menu__item.is-overflow {
  display: none !important;
}

.header-main-menu__more {
  position: relative;
  flex: 0 0 auto;
  margin-left: 0;
  z-index: 60;
}

.header-main-menu__more[hidden] {
  display: none !important;
}

.header-main-menu__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(59, 111, 217, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  color: #1e4a7a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}

.header-main-menu__more-btn:hover,
.header-main-menu__more.is-open .header-main-menu__more-btn {
  background: rgba(59, 111, 217, 0.12);
  color: #3b6fd9;
  border-color: rgba(59, 111, 217, 0.4);
}

.header-main-menu__caret {
  width: 9px;
  height: 9px;
  transition: transform 0.15s ease;
}

.header-main-menu__more.is-open .header-main-menu__caret {
  transform: rotate(180deg);
}

.header-main-menu__panel {
  position: fixed;
  z-index: 50000;
  min-width: 220px;
  max-width: min(320px, 80vw);
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(30, 74, 122, 0.14);
  background-color: #ffffff;
  background-image: linear-gradient(165deg, #fff 0%, #eef5fc 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.header-main-menu__panel[hidden] {
  display: none !important;
}

.header-main-menu__panel-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
}

.header-main-menu__panel-link:hover {
  background: rgba(59, 111, 217, 0.08);
  color: #3b6fd9;
}

.header-main-menu__panel-link--sale {
  color: #c62828;
}

.header-main-menu__panel-link--new {
  color: #2e7d32;
}

/* Keep «Каталог» free of menu overflow */
.page-header-illustration #header .nav-secondary-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center;
  column-gap: 20px;
  overflow: visible;
}

.page-header-illustration #header .nav-secondary-bar__col--left {
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
  overflow: visible;
}

.page-header-illustration #header .nav-secondary-bar__col--right {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  justify-self: end;
  align-self: center;
}

.page-header-illustration #header .nav-wrapper {
  overflow: visible;
}

.page-header-illustration #header .nav-catalog,
.page-header-illustration #header .catalog-btn-nav {
  position: relative;
  z-index: 3;
}

@media (max-width: 1023px) {
  .header-main-menu {
    display: none;
  }
}
