.site-header {
  width: 100%;
  height: 90px;
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--color-black-alpha-5);
  backdrop-filter: blur(2px);
}

.site-header__inner {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 10px 16px;
  justify-content: center;
  align-items: center;
  display: flex;
  gap: 55px;
}

.site-header__left {
  justify-content: flex-start;
  align-items: center;
  gap: 60px;
  display: flex;
}

.site-header__logo-wrap {
  justify-content: flex-start;
  align-items: flex-end;
  display: flex;
  text-decoration: none;
  color: inherit;
}

a.site-header__nav-item {
  text-decoration: none;
  color: inherit;
}

.site-header__logo {
  display: block;
  width: auto;
  height: 24px;
}

@media (min-width: 769px) {
  .site-header__logo-wrap {
    order: -1;
  }

  .site-header__nav {
    justify-content: flex-start;
    align-items: center;
    gap: 50px;
    display: flex;
    flex-direction: row;
    position: static;
    transform: none;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    overflow: visible;
    border: none;
    box-shadow: none;
  }

  /* Desktop: hide mobile drawer chrome, keep horizontal nav */
  .site-header__drawer-backdrop,
  .site-header__drawer-top,
  .site-header__drawer-footer {
    display: none;
  }

  .site-header__drawer-main {
    display: flex;
    align-items: center;
    gap: 50px;
  }
}

.site-header__nav-item {
  justify-content: center;
  align-items: center;
  gap: 4px;
  display: flex;
}

.site-header__nav-item--wide {
  width: 50px;
}

.site-header__nav-text {
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
  white-space: nowrap;
}

.site-header__nav-text--active {
  color: var(--color-primary-500);
}

.site-header__dropdown-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.site-header__nav-dropdown.is-open .site-header__dropdown-icon {
  transform: rotate(180deg);
}

.site-header__nav-dropdown {
  position: relative;
}

.site-header__nav-trigger {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.site-header__nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 108px;
  display: none;
  flex-direction: column;
  border-radius: 6px;
  border: 1px solid var(--color-neutral-50);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 110;
}

.site-header__nav-dropdown.is-open .site-header__nav-menu {
  display: flex;
}

.site-header__nav-menu-item {
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
}

.site-header__nav-menu-item:hover {
  background: var(--color-neutral-50);
}

.site-header__nav-menu-item--active {
  color: var(--color-primary-500);
  font-weight: 500;
}

.site-header__nav-menu-item + .site-header__nav-menu-item {
  border-top: 1px solid var(--color-neutral-50);
}

.site-header__right {
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  display: flex;
}

.site-header__search {
  width: 400px;
  padding: 10px 18px;
  background: var(--surface-input);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border-radius: 9999px;
  border: 1px solid var(--color-black-alpha-5);
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.site-header__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 20px;
}

.site-header__search-input::placeholder {
  color: var(--text-placeholder);
}

.site-header__search-input::-webkit-search-cancel-button {
  display: none;
}

.site-header__search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-right: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.site-header__search-clear.is-visible {
  display: inline-flex;
}

.site-header__search-clear--popup,
.site-header__search-clear--popup.is-visible {
  display: none;
  margin-right: 0;
}

.site-header__search-clear-icon {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.site-header__search-submit {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-header__search-trigger--h5 {
  display: none;
}

.site-header__search-overlay {
  display: none;
}

.site-header__search-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  pointer-events: none;
}

.site-header__search-icon--h5 {
  display: none;
}

.site-header__avatar--guest {
  background: var(--color-primary-alpha-10);
  position: relative;
}

.site-header__avatar--guest::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 7px;
  width: 8px;
  height: 9px;
  background: var(--color-primary-500);
  border-radius: 6px 1px 6px 6px;
}

.site-header__avatar--guest::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 17px;
  width: 16px;
  height: 7px;
  background: var(--color-primary-500);
  border-radius: 9999px;
}

.site-header__avatar--guest .site-header__avatar-img {
  display: none;
}

.site-header__divider {
  width: 1px;
  height: 12px;
  background: var(--color-black-alpha-10);
}

.site-header__user {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  display: flex;
  text-decoration: none;
}

.site-header__avatar {
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 999px;
  flex-shrink: 0;
}

.site-header__avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.site-header__user-name {
  justify-content: center;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
  word-wrap: break-word;
}

.site-header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.site-header__toggle-icon {
  display: block;
}

/* H5 left drawer navigation */

@media (max-width: 768px) {
  body.site-header-drawer-open {
    overflow: hidden;
  }

  .site-header__drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.site-header--open .site-header__drawer-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .site-header__nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 260;
    width: min(303px, 81vw);
    padding: 60px 36px;
    box-sizing: border-box;
    background: var(--surface-foreground);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border: none;
    box-shadow: none;
  }

  body.site-header--open .site-header__nav {
    transform: translateX(0);
  }

  .site-header__drawer-top {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .site-header__drawer-close {
    position: absolute;
    top: 26px;
    right: 36px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
  }

  .site-header__drawer-close-icon {
    display: block;
    width: 24px;
    height: 24px;
  }

  .site-header__drawer-logo {
    height: 36px;
    width: auto;
    display: block;
  }

  .site-header__drawer-main {
    align-self: stretch;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 11px;
  }

  .site-header__drawer-main > .site-header__nav-item,
  .site-header__drawer-main > .site-header__nav-dropdown > .site-header__nav-trigger {
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    border-radius: 9px;
    border: 1px solid var(--color-black-alpha-5);
    background: var(--surface-foreground);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
  }

  .site-header__drawer-main > .site-header__nav-dropdown > .site-header__nav-trigger {
    justify-content: space-between;
  }

  .site-header__drawer-main > .site-header__nav-item.site-header__nav-item--active,
  .site-header__drawer-main > .site-header__nav-dropdown--active > .site-header__nav-trigger {
    padding-left: 23px;
    padding-right: 23px;
  }

  .site-header__drawer-main > .site-header__nav-item {
    text-decoration: none;
    color: inherit;
  }

  .site-header__drawer-main .site-header__nav-item--wide {
    width: 100%;
  }

  .site-header__drawer-main .site-header__nav-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: var(--text-primary);
  }

  .site-header__drawer-main .site-header__nav-text--active {
    color: var(--color-primary-500);
    font-weight: 500;
  }

  .site-header__drawer-main .site-header__dropdown-icon {
    display: block;
    width: 12px;
    height: 8px;
    content: url('/static/images/tringle_down_grey.svg');
  }

  .site-header__drawer-main > .site-header__nav-dropdown {
    align-self: stretch;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: none;
  }

  .site-header__drawer-main .site-header__nav-menu {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    min-width: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
    padding: 11px 12px 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .site-header__drawer-main .site-header__nav-dropdown.is-open .site-header__nav-menu {
    display: flex;
  }

  .site-header__drawer-main .site-header__nav-menu-item {
    padding: 0;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .site-header__drawer-main .site-header__nav-menu-item--active {
    color: var(--color-primary-500);
    font-weight: 500;
  }

  .site-header__drawer-main .site-header__nav-menu-item + .site-header__nav-menu-item {
    border-top: none;
  }

  .site-header__drawer-footer {
    display: flex;
    width: 100%;
    margin-top: auto;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .site-header__drawer-contacts {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 12px;
    opacity: 0.8;
    color: var(--text-primary);
    font-size: 14px;
    font-family: PingFang SC, sans-serif;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
  }
  .site-header__drawer-contacts span a {
    color: var(--text-primary);
  }

  .site-header__drawer-social {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .site-header__drawer-social-icon img {
    width: 24px;
    height: 24px;
    display: block;
  }

  .site-header__drawer-social-divider {
    width: 1px;
    height: 15px;
    background: var(--color-black-alpha-20);
  }

  .site-header {
    height: 48px;
    min-height: 48px;
    background: var(--surface-foreground);
    backdrop-filter: none;
    border-bottom: none;
    overflow: hidden;
    display: block;
    position: sticky;
    top: 0;
  }

  .site-header__inner {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 12px;
    height: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    max-width: none;
    padding: 0;
    box-sizing: border-box;
    gap: 0;
  }

  .site-header__left {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    gap: 0;
  }

  .site-header__drawer-backdrop,
  .site-header__nav {
    position: fixed;
  }

  body:not(.site-header--open) .site-header__nav {
    transform: translateX(-100%);
  }

  .site-header__toggle {
    display: flex;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 0;
  }

  .site-header__toggle-icon {
    width: 24px;
    height: 24px;
  }

  .site-header__logo-wrap {
    flex: none;
    position: static;
    transform: none;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 4px;
  }

  .site-header__logo {
    width: 74px;
    height: 24px;
    display: block;
    object-fit: contain;
  }

  .site-header__right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: none;
    gap: 12px;
  }

  .site-header__search-icon--pc {
    display: none;
  }

  .site-header__search-icon--h5 {
    display: block;
    width: 24px;
    height: 24px;
  }

  .site-header__search-input--pc,
  .site-header__search-submit--pc,
  .site-header__search-clear--pc,
  .site-header__search-clear--pc.is-visible {
    display: none;
  }

  .site-header__search-clear--popup.is-visible {
    display: inline-flex;
  }

  .site-header__search-trigger--h5 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
  }

  .site-header__search {
    flex: none;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header__search-icon {
    width: 24px;
    height: 24px;
    pointer-events: none;
  }

  .site-header__search-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.site-header-search-open .site-header__search-overlay {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
  }

  body.site-header-search-open {
    overflow: hidden;
  }

  .site-header__search-backdrop {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .site-header__search-panel {
    position: absolute;
    top: 56px;
    left: 16px;
    right: 16px;
    z-index: 1;
  }

  .site-header__search-popup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-foreground);
    border-radius: 36px;
    overflow: hidden;
  }

  .site-header__search-popup-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: PingFang SC, sans-serif;
    font-weight: 400;
    line-height: 20px;
  }

  .site-header__search-popup-input::placeholder {
    color: #757575;
  }

  .site-header__search-popup-input::-webkit-search-cancel-button {
    display: none;
  }

  .site-header__search-popup-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border: none;
    border-radius: 999px;
    background: var(--color-primary-500);
    color: #fff;
    font-size: 12px;
    font-family: PingFang SC, sans-serif;
    font-weight: 400;
    line-height: 18px;
    cursor: pointer;
    white-space: nowrap;
  }

  .site-header__divider {
    display: none;
  }

  .site-header__user {
    flex-shrink: 0;
    gap: 0;
  }

  .site-header__avatar {
    width: 24px;
    height: 24px;
  }

  .site-header__avatar--guest::before {
    left: 9px;
    top: 5.25px;
    width: 6px;
    height: 6.75px;
  }

  .site-header__avatar--guest::after {
    left: 6px;
    top: 12.75px;
    width: 12px;
    height: 5.25px;
  }

  .site-header__user-name {
    display: none;
  }
}

@media (max-width: 1024px) {
  .site-header__left {
    gap: 16px;
  }
}
