.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

body.admin-bar .header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .header {
    top: 46px;
  }
}

.header__inner {
  display: flex;
  flex-direction: column;
}

.header__top {
  padding: 10px 0 24px;
  background-color: var(--color-white);
}

.header__top-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__logo {
  height: 75px;
  width: auto;
}

.header__logo img {
  height: 100%;
  width: auto;
}

.header__phone {
  position: relative;
}

.header__phone-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.header__contacts {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  width: 100%;
  max-width: 234px;
  background-color: var(--color-white);
  z-index: 5;
  border-radius: 4px;
}

.header__contacts .btn {
  padding: 11.5px 0;
  width: 100%;
}

.header__phones {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background-color: #EEF2F3;
}

a.header__phone-text:hover {
  color: #696969;
}

a.header__phone-text:hover span {
  color: #696969;
}

.header__socials {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.header__socials-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header__social {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #696969;
  font-size: 14px;
  line-height: 130%;
}

.header__dnav {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-start;
  width: 100%;
}

.header__social svg {
  width: 26px;
}

.header__social:hover {
  color: var(--color-text);
}

.header__address {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background-color: #EEF2F3;
}

.header__address-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 130%;
}

.header__contacts.open {
  display: flex;
  flex-direction: column;
}

.header__contacts-title {
  font-size: 12px;
  line-height: 130%;
  color: #A4A4A4;
}

.header__phone-btn .icon-box {
  flex-shrink: 0;
  height: 44px;
  width: 44px;
}

.header__phone-text {
  font-weight: 600;
  line-height: 130%;
  font-size: 16px;
}

.header__phone-text span {
  font-size: 24px;
}

.header__worktime {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
}

.header__worktime .icon-box {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
}

.header__top-wrapper {
  width: 100%;
  max-width: 786px;
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header__bottom {
  background-color: #D9DDDE;
  width: 100%;
  padding: 20px 0;
}

.header__search-btn {
  font-size: 0;
  color: transparent;
  cursor: pointer;
}

.header__nav-link {
  font-weight: 600;
  font-size: 14px;
  line-height: 130%;
  text-transform: uppercase;
  text-align: center;
}

.header__nav-dropdown {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  position: relative;
}



.header__nav-content {
  display: none;
  position: absolute;
  top: calc(100%);
  padding: 12px;
  gap: 10px;
  flex-direction: column;
  background-color: var(--color-white);
  width: max-content;
  max-width: 200px;
}
.header__nav-dropdown:hover .header__nav-content {
  display: flex;
}

/* .header__nav-content.open {
  display: flex;
} */

.header__nav-subdropdown {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  position: relative;
}

.header__nav-subcontent {
  display: none;
  padding: 12px;
  gap: 10px;
  padding: 12px;
  flex-direction: column;
  background-color: var(--color-white);
  position: absolute;
  top: 0;
  left: calc(100%);
  width: max-content;
  max-width: 200px;
}

.header__nav-item {
  font-size: 14px;
  color: #232325;
  display: flex;
  width: 100%;
  line-height: 130%;
}

.header__nav-item:hover {
  color: #696969;
}

.header__nav-subdropdown:hover .header__nav-subcontent {
  display: flex;
}

/* .header__nav-subcontent.open {
  display: flex;
} */

.header__bottom-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: relative;
}

.header__search-btn {
  transition: 0.2s scale ease;
}

.header__search-btn:hover {
  scale: 1.2;
}

.header__search-wrapper {
  width: 100%;
  position: absolute;
  top: calc(100% + 20px);
  left: 0;
  display: none;
  height: 44px;
  box-shadow: 0px 2.33px 2.33px 0px #00000040;
}

.header__search-wrapper.open {
  display: flex;
}

.header__search-submit {
  position: absolute;
  left: 6px;
  top: 45%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 0;
  color: transparent;
}

.header__search-input {
  font-size: 16px;
  line-height: 130%;
  padding: 8px;
  padding-left: 36px;
  background-color: var(--color-white);
  border-radius: 2px;
  width: 100%;
}

.header__search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  box-shadow: 0px 4px 12px 0px #00000020;
  border-radius: 2px;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.header__search-results.open {
  display: flex;
}

.header__search-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 130%;
  color: #232325;
  border-bottom: 1px solid #EEF2F3;
  transition: background 0.15s;
}

.header__search-item:last-child {
  border-bottom: none;
}

.header__search-item:hover {
  background-color: #EEF2F3;
}

.header__search-empty {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 130%;
  color: #A4A4A4;
}

.header__nav-btn {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  transform-origin: center right;
  transition: 0.2s scale ease;
}

.header__nav-btn:hover {
  scale: 1.5;
}

.header__nav-subbtn {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  transform-origin: center right;
  transition: 0.2s scale ease;
}

.header__nav-subbtn:hover {
  scale: 1.5;
}


.header__mobile-nav, .mobile-menu, .header__burger {
  display: none;
}

@media (max-width: 1280px) {
  .header__logo {
    height: 55px;
  }
}

@media (max-width: 1080px) {
  .header__nav-dropdown {
    display: none;
  }

  .header__search-btn {
    display: none;
  }

  .header__search {
    width: 100%;
  }

  .header__search-wrapper {
    display: flex;
    position: initial;
    box-shadow: none;
    height: 32px;
    width: 100%;
  }

  .header__search-input {
    width: 100%;
  }

  .header__bottom {
    padding: 8px 0;
  }

  .header__burger {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0;
    color: transparent;
    width: 32px;
    height: 32px;
    position: relative;
    background: radial-gradient(79.55% 79.55% at 50% 20.45%, #EF4155 0%, #B3001E 61.54%, #7F242B 96.15%);
    border-radius: 2px;
    cursor: pointer;
  }

  .header__burger-close {
    opacity: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
  }

  .header__burger-open {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
  }

  .header__top-wrapper .btn {
    display: none;
  }

  .header__worktime {
    display: none;
  }

  .header__top-wrapper {
    justify-content: flex-end;
  }

  .header__top {
    padding: 10px 0 8px;
    position: relative;
  }

  .header__phone {
    position: initial;
  }

  .header__phone .icon-box {
    width: 26px;
    height: 26px;
  }

  .header__phone .icon-box svg {
    width: 18px;
    height: 18px;
  }

  .header__phone-text {
    font-size: 16px;
  }

  .header__phone-text span {
    font-size: 20px;
  }

  .header__logo {
    height: 50px;
  }

  .header__dnav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .header__mobile-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    right: -20px;
    top: calc(100% + 8px);
    background-color: #EEF2F3;
    padding: 16px;
    gap: 16px;
  }

  .mobile-menu.open .mobile-nav {
    display: flex;
  }

  .mobile-nav {
    width: 100%;
    max-width: 234px;
  }

  .mobile-nav__dropdown {
    display: grid;
    grid-template-rows: max-content 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease, gap 0.3s ease;
    gap: 0;
  }

  .mobile-nav__dropdown.open {
    grid-template-rows: max-content 1fr;
    gap: 12px;
  }

  .mobile-nav__wrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-nav__btn {
    width: 30px;
    flex-shrink: 0;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
  }
  
  .mobile-nav__btn svg {
      width: 16px;
      height: auto;
  }

  .mobile-nav__link {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    line-height: 130%;
  }

  .mobile-nav__content {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav__subdropdown {
    display: grid;
    grid-template-rows: max-content 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease, gap 0.3s ease;
    gap: 0;
  }

  .mobile-nav__subcontent {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 12px;
  }

  .mobile-nav__subdropdown.open {
    grid-template-rows: max-content 1fr;
    gap: 12px;
  }

  .mobile-nav__item {
    font-size: 14px;
    line-height: 130%;
  }
}

/* ── Header top burger menu ─────────────────────────────────────────────── */

.header__top-menu {
  position: relative;
  flex-shrink: 0;
}

.header__top-burger {
  width: 44px;
  height: 44px;
  position: relative;
  background: radial-gradient(79.55% 79.55% at 50% 20.45%, #EF4155 0%, #B3001E 61.54%, #7F242B 96.15%);
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 2px;
  justify-content: center;
}

.header__top-burger-open,
.header__top-burger-close {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.header__top-burger-close {
  opacity: 0;
}

#hdr-top-menu.open .header__top-burger-open {
  opacity: 0;
}

#hdr-top-menu.open .header__top-burger-close {
  opacity: 1;
}

.header__top-nav {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: #EEF2F3;
  padding: 16px;
  min-width: 180px;
  z-index: 20;
  box-shadow: 0px 4px 12px 0px #00000020;
}

#hdr-top-menu.open .header__top-nav {
  display: block;
}

.header__top-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.header__top-nav-list li a {
  font-size: 14px;
  font-weight: 600;
  line-height: 130%;
  color: #232325;
  text-transform: uppercase;
  transition: color 0.2s ease;
  display: block;
}

.header__top-nav-list li a:hover {
  color: var(--color-red);
}

.header__top-nav-list li span {
  font-size: 14px;
  font-weight: 600;
  line-height: 130%;
  color: #A4A4A4;
  text-transform: uppercase;
  display: block;
}

/* ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .header__logo {
    height: 34px;
  }

  .header__phone-text {
    font-size: 10px;
  }

  .header__phone-text span {
    font-size: 16px;
  }

  .header__top-burger {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .header__logo {
    height: 30px;
  }
}