/* @base — header (100% 宽度) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  gap: 24px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo img {
  width: 120px;
  height: 37px;
  display: block;
}

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

.site-header__nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.site-header__nav-item:hover {
  color: var(--primary);
}

.site-header__nav-item--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.site-header__search {
  display: flex;
  align-items: center;
  width: 221px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: 24px;
  flex-shrink: 0;
}

.site-header__search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text-secondary);
}

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

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

.site-header__user {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.site-header.is-logged-in .site-header__user {
  display: flex;
}

.site-header.is-logged-in .site-header__auth {
  display: none;
}

.site-header__user:hover .site-header__username {
  color: var(--primary);
}

.site-header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
  display: block;
}

.site-header__username {
  font-size: 13.8px;
  line-height: 24px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.site-header__username:empty,
.site-header__username[hidden] {
  display: none;
}

.site-header__auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.site-header__auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 32px;
  padding: 5px 16px;
  border: 1px solid var(--primary);
  border-radius: 2px;
  background: transparent;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.site-header__auth-btn:hover {
  background: rgba(236, 72, 153, 0.06);
}

@media (max-width: 767px) {
  .site-header {
    display: none;
  }
}

/* ===== H5: header-h5.css ===== */

/* @base — H5 header */

.site-header-h5 {
  position: sticky;
  top: 0;
  display: none;
  width: 100%;
  height: 56px;
  background: var(--bg-card);
  overflow: hidden;
}

.site-header-h5__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 12px;
}

.site-header-h5__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.site-header-h5__menu img {
  width: 28px;
  height: 28px;
}

.site-header-h5__title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #292929;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header-h5__logo {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.site-header-h5__logo img {
  width: auto;
  height: 26px;
}

.site-header-h5__user {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.site-header-h5__user img,
.site-header-h5__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  .site-header-h5 {
    display: block;
    z-index: 200;
  }
}

/* H5 侧滑菜单 */
.h5-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  pointer-events: none;
}

.h5-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.h5-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.h5-drawer.is-open .h5-drawer__overlay {
  opacity: 1;
}

.h5-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 212px;
  height: 100%;
  background: var(--bg-card);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.h5-drawer.is-open .h5-drawer__panel {
  transform: translateX(0);
}

.h5-drawer__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
  padding: 60px 10px 18px;
  background: url("../images/h5_nav_bg.png") no-repeat left top / 100% auto;
}

.h5-drawer__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.h5-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.h5-drawer__brand {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--text-title);
}

.h5-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6.67px;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.h5-drawer__search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: 999px;
}

.h5-drawer__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
  font-family: inherit;
}

.h5-drawer__search-input::placeholder {
  color: var(--text-placeholder);
}

.h5-drawer__search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.h5-drawer__search-btn img {
  width: 20px;
  height: 20px;
}

.h5-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 180px;
}

.h5-drawer__nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--bg-h5);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-title);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.h5-drawer__nav-item--active {
  background: var(--tag-bg);
  border: 1px solid var(--primary);
  color: var(--primary);
}

body.h5-drawer-open {
  overflow: hidden;
}
