.mobile-header-actions,
.mobile-nav-title,
.mobile-nav-collapse,
.mobile-search-tabs,
.mobile-header-backdrop {
  display: none;
}

@media (max-width: 768px) {
  body.mobile-search-open,
  body.mobile-nav-open {
    overflow: hidden;
  }

  .header-box01 {
    width: 100%;
    min-width: 0;
    height: 56px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(42, 51, 66, 0.08);
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
    z-index: 1001;
  }

  .header-box01 .container-header {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .header-box01 img.header-left {
    width: min(69.333vw, 260px);
    max-width: calc(100vw - 158px);
    height: auto;
    margin: 0;
  }

  .header-box01 .container-header > a {
    display: flex;
    min-width: 0;
    align-items: center;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    order: 2;
    flex: none;
  }

  .mobile-header-actions button {
    display: flex;
    width: 24px;
    height: 24px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #c9ced8;
    border-radius: 7px;
    background: #fff;
    box-sizing: border-box;
    position: relative;
  }

  .mobile-search-toggle > span {
    display: block;
    width: 10px;
    height: 10px;
    border: 1.5px solid #8993a6;
    border-radius: 50%;
    box-sizing: border-box;
    position: relative;
    top: auto;
    left: auto;
    transform: translate(-1px, -1px);
  }

  .mobile-search-toggle > span::after {
    width: 5px;
    height: 1.5px;
    background: #8993a6;
    border-radius: 2px;
    content: '';
    position: absolute;
    right: -4px;
    bottom: -2px;
    transform: rotate(45deg);
  }

  .mobile-nav-toggle {
    flex-direction: column;
    gap: 3px;
  }

  .mobile-nav-toggle > span {
    display: block;
    width: 12px;
    height: 1.5px;
    border-radius: 2px;
    background: #8993a6;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-nav-open .mobile-nav-toggle > span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
  }

  .mobile-nav-open .mobile-nav-toggle > span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-open .mobile-nav-toggle > span:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .header-box01 .header-right {
    display: flex;
    width: 48px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    order: 1;
    flex: none;
  }

  .header-box01 .header-right .login-box.login-new,
  .header-box01 .header-right .login-box {
    display: flex;
    margin: 0;
  }

  .header-box01 .header-right .login-box > a,
  .header-box01 .success-login > a,
  .header-box01 .success-login > span {
    display: none !important;
  }

  .header-box01 .header-right .login-box .btn-default.btn {
    display: inline-flex;
    width: 48px;
    height: 24px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #ff3f29;
    border-radius: 20px;
    background: #ff3f29;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
    color: #fff;
    font-size: 14px;
    line-height: 22px;
  }

  .header-box01 .header-right .success-login {
    width: 48px;
    height: 56px;
    justify-content: center;
  }

  .header-box01 .header-right .success-login > img {
    width: 37px;
    height: 37px;
    margin: 0;
    border: 1px solid #707070;
    border-radius: 50%;
    object-fit: cover;
  }

  .mobile-header-backdrop {
    display: none;
    background: rgba(24, 28, 35, 0.35);
    position: fixed;
    z-index: 1;
    top: 56px;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .mobile-search-open .mobile-header-backdrop,
  .mobile-nav-open .mobile-header-backdrop {
    display: block;
  }

  /* 登录遮罩从 Header 下方开始，保留顶部操作区域。 */
  #loginDialog.login-popup-box {
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    top: 56px;
  }

  .header-box01 .header-center {
    display: none;
    width: 100%;
    max-height: calc(100vh - 56px);
    margin: 0;
    padding: 20px 16px 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    background: #fff;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 8px 16px rgba(42, 51, 66, 0.14);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    position: absolute;
    z-index: 3;
    top: 56px;
    left: 0;
  }

  .mobile-nav-open .header-box01 .header-center {
    display: grid;
    animation: mobile-header-panel-in 0.2s ease-out both;
  }

  .header-box01 .mobile-nav-title {
    display: block;
    margin: 0;
    color: #555;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    grid-column: 1 / -1;
    order: 0;
  }

  .header-box01 .header-center > .seach-box {
    display: none;
  }

  .header-box01 .header-center > .nav-li {
    display: contents;
  }

  .header-box01 .header-center .nav-li > .nav-item {
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(42, 51, 66, 0.14);
    color: #555;
    font-size: 14px;
    font-weight: 400;
    line-height: 36px;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    order: 10;
  }

  .header-box01 .header-center .mobile-nav-item-0 > .nav-item { order: 1; }
  .header-box01 .header-center .mobile-nav-item-1 > .nav-item { order: 2; }
  .header-box01 .header-center .mobile-nav-item-2 > .nav-item { order: 3; }

  .header-box01 .header-center .header-active > .nav-item,
  .header-box01 .header-center .mobile-nav-selected > .nav-item {
    border-bottom: 3px solid #ff3f29;
    background: #f7f7f7;
    color: #ff3f29;
    font-weight: 600;
    line-height: 34px;
  }

  .header-box01 .header-center .nav-li > .down-menu {
    display: none;
    width: auto;
    margin: -2px -2px 2px;
    padding: 12px 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    border: 0;
    border-radius: 5px;
    background: #f7f7f7;
    box-shadow: 0 3px 10px rgba(42, 51, 66, 0.12);
    box-sizing: border-box;
    position: static;
    grid-column: 1 / -1;
    order: 4;
  }

  .header-box01 .header-center .mobile-nav-selected > .down-menu {
    display: grid;
  }

  .header-box01 .down-menu .down-menu-li {
    height: 28px;
    padding: 0 5px;
    border: 1px solid #e3e5e9;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(42, 51, 66, 0.1);
    color: #555;
    font-size: 13px;
    line-height: 26px;
    text-align: center;
    overflow: hidden;
  }

  .header-box01 .down-menu .down-menu-item {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-box01 .mobile-nav-collapse {
    display: block;
    height: 36px;
    margin-top: 2px;
    grid-column: 1 / -1;
    order: 99;
  }

  .header-box01 .mobile-nav-collapse button {
    display: block;
    width: 100%;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .header-box01 .mobile-nav-collapse span {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-top: 2px solid #293241;
    border-left: 2px solid #293241;
    transform: translateY(5px) rotate(45deg);
  }

  .mobile-search-open .header-box01 .header-center-with-search {
    display: block;
    width: 0;
    height: 0;
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  .mobile-search-open .header-box01 .header-center-with-search > :not(.mobile-search-panel) {
    display: none !important;
  }

  .mobile-search-panel,
  .main-home-tips .mobile-search-panel,
  .header-box01 .header-center > .mobile-search-panel {
    display: none;
    width: auto;
    height: 106px;
    margin: 0;
    padding: 14px 10px 12px;
    flex-wrap: wrap;
    align-content: space-between;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 10px rgba(42, 51, 66, 0.18);
    box-sizing: border-box;
    position: fixed;
    z-index: 1003;
    top: 68px;
    right: 15px;
    left: 15px;
  }

  .mobile-search-open .mobile-search-panel,
  .mobile-search-open .main-home-tips .mobile-search-panel,
  .mobile-search-open .header-box01 .header-center > .mobile-search-panel {
    display: flex;
    animation: mobile-header-panel-in 0.2s ease-out both;
  }

  .mobile-search-tabs {
    display: flex;
    width: 100%;
    height: 28px;
    align-items: flex-start;
    gap: 26px;
    padding-left: 6px;
    box-sizing: border-box;
  }

  .mobile-search-tabs button {
    height: 28px;
    padding: 0 0 7px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #4a5260;
    font-size: 14px;
    line-height: 19px;
  }

  .mobile-search-tabs button.active {
    border-bottom-color: #ff3f29;
    color: #ff3f29;
  }

  .mobile-search-panel .seach-select {
    display: none;
  }

  .mobile-search-panel .form-control {
    display: block;
    width: calc(100% - 42px);
    height: 34px;
    padding: 6px 12px;
    border: 0;
    border-radius: 8px 0 0 8px;
    background: #f0f0f0;
    box-shadow: none;
    color: #555;
    font-size: 14px;
    line-height: 22px;
  }

  .mobile-search-panel .btn,
  .main-home-tips .mobile-search-panel .btn {
    display: block;
    width: 42px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: #ff3f29;
    color: transparent;
    font-size: 0;
    position: relative;
  }

  .mobile-search-panel .btn::before {
    width: 14px;
    height: 14px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 8px;
    left: 12px;
  }

  .mobile-search-panel .btn::after {
    width: 6px;
    height: 1.5px;
    border-radius: 2px;
    background: #fff;
    content: '';
    position: absolute;
    top: 21px;
    left: 24px;
    transform: rotate(45deg);
  }

  .mobile-search-panel .btn .icons {
    display: none;
  }

  @keyframes mobile-header-panel-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
