/* HEADER */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition:
    padding 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1280px;
  margin-inline: auto;
  justify-content: space-between;
  padding: 20px 0;
  transition: padding 0.3s ease;
}

.site-header.scrolled .header-inner {
  padding-block: 12px;
}

/* ЛОГО */

.header-logo {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  flex-shrink: 0;
}

.site-header.scrolled .header-logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.logo-img {
  display: block;
  height: 36px;
  width: auto;
}

/* НАВИГАЦИЯ */

.header-nav {
  margin-left: auto;
}

.header-nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav__item {
  position: relative;
}

.header-nav__link {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.header-nav__link:hover {
  color: #bb1f11;
}

/* ДРОПДАУН */

.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
}

.header-nav__item.has-dropdown:hover .header-dropdown,
.header-nav__item.has-dropdown:focus-within .header-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-dropdown li a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: #1a1a1a;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.header-dropdown li a:hover {
  color: #bb1f11;
}

/* ИКОНКИ ДЕЙСТВИЙ */

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-search-btn,
.header-account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #1a1a1a;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.header-search-btn:hover,
.header-account-btn:hover {
  color: #bb1f11;
}

.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: background 0.2s ease;
}

.header-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #1a1a1a;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.header-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-burger.open span:nth-child(2) {
  opacity: 0;
}

.header-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* СТРОКА ПОИСКА */

.header-search-bar {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease;
  border-top: 1px solid transparent;
}

.header-search-bar.open {
  max-height: 80px;
  opacity: 1;
  border-top-color: rgba(0, 0, 0, 0.08);
}

.header-search-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin-inline: auto;
  padding: 14px 40px;
}

.header-search-bar__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #1a1a1a;
  background: transparent;
}

.header-search-bar__input::placeholder {
  color: #999;
}

.header-search-bar__submit,
.header-search-bar__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.header-search-bar__submit:hover {
  color: #bb1f11;
}

.header-search-bar__close:hover {
  color: #1a1a1a;
}

/* МОБИЛЬНОЕ МЕНЮ */

.header-mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px 24px 24px;
  gap: 4px;
  position: fixed;
  top: calc(var(--header-h, 64px) - 3px);
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100svh - var(--header-h, 64px) + 3px);
  overflow-y: auto;
  z-index: 999;
}

.header-mobile-menu.open {
  display: flex;
}

.header-mobile-menu__footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-mobile-menu__footer-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  padding: 0 14px 6px;
}

.header-mobile-menu__footer a,
.header-mobile-menu__footer address {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: #555;
  text-decoration: none;
  line-height: 1.5;
}

.header-mobile-menu__footer a:hover {
  color: #bb1f11;
}

.header-mobile-menu__footer-legal {
  padding-top: 10px;
}

.header-mobile-menu__footer-legal a {
  font-size: 12px;
  color: #999;
  text-decoration: underline;
  padding: 4px 14px;
}

.header-mobile-menu a {
  display: block;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.header-mobile-menu .mobile-submenu-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  padding: 16px 14px 6px;
}

.policy-page {
  padding-block: 110px;
}

.current {
  color: #bb1f11;
}

/* ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА */
.header-lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 5px 10px;
  border: 1px solid #bb1f11;
  background: transparent;
}

.header-lang-switch__item {
  display: inline-block;
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #1a1a1a;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.header-lang-switch__item.is-active {
  background: #bb1f11;
  color: #fff;
}

.header-lang-switch__item:not(.is-active):hover {
  color: #bb1f11;
}

.header-lang-switch__divider {
  color: #ccc;
  font-size: 12px;
}

.header-lang-switch--mobile {
  display: none;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #bb1f11;
  background: transparent;
}

.header-lang-switch--mobile .header-lang-switch__divider {
  color: #ccc;
  font-size: 12px;
}

/* АДАПТИВ */

@media (max-width: 1024px) {
  .header-inner {
    padding: 16px 24px;
    gap: 16px;
  }

  .header-search-bar__inner {
    padding-inline: 24px;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .header-burger {
    display: flex;
  }

  .header-inner {
    padding: 14px 20px;
    gap: 12px;
    margin-inline: 0;
  }

  .site-header.scrolled .header-inner {
    padding-block: 10px;
  }

  .header-logo {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .logo-img {
    height: 28px;
  }

  .header-search-bar__inner {
    padding-inline: 20px;
  }

  .header-lang-switch--mobile {
    display: flex;
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding: 12px 16px;
    gap: 8px;
  }

  .logo-img {
    height: 24px;
  }

  .header-search-btn,
  .header-account-btn {
    width: 36px;
    height: 36px;
  }

  .header-search-bar__inner {
    padding-inline: 16px;
    gap: 8px;
  }

  .header-search-bar__input {
    font-size: 15px;
  }

  .header-mobile-menu {
    padding: 12px 16px 20px;
  }

  .header-mobile-menu a {
    padding: 10px 12px;
    font-size: 15px;
  }

  .header-mobile-menu .mobile-submenu-title {
    padding: 12px 12px 4px;
  }
}
