
.component-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-color);
    height: 50px;
    --header-text-color: var(--color-light-text);

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 0 120px;
    gap: 40px;
}

.component-header.high-level-than-header {
  z-index: 31;
}

.component-header_left {
    /* position: absolute;
    left: 120px;
    top: 0; */
    height: 100%;
    display: flex;
    align-items: center;
    color: rgb(var(--header-text-color));
    font-size: 14px;
    font-weight: 400;
    line-height: 19.6px;
    gap: 16px;
}

.component-header_left_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 20px;
}

.component-header_left_icon img {
    width: 100%;
    height: auto;
}

.component-header_left_icon-default {
    width: 30px;
    height: 20px;
    background-color: #ddd;
}

.component-header_left_text {
    margin-left: 12px;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #FFFFFF;
}

.component-header_center {
    /* padding-right: 90px; */
    /* font-size: 18px;
    font-weight: 400;
    line-height: 25.2px; */
    color: rgb(var(--header-text-color));
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
}

@keyframes scroll-x {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.component-header_center .announcement-text {
  white-space: nowrap;
}

.component-header_center .announcement-text:nth-child(2) {
  display: none;
}

.component-header_center.scrolling .announcement-text {
  animation: scroll-x var(--scroll-duration, 10s) 1s linear infinite;
  display: flex;
  padding-right: 40px;
  white-space: pre;
}

.component-header_center.scrolling:hover .announcement-text {
  animation-play-state: paused;
}

.component-header_center a,
.component-header_center a:hover {
    text-decoration: underline;
    color: inherit;
}

.component-header_right {
    /* position: absolute;
    right: 120px;
    top: 0; */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
    color: rgb(var(--header-text-color));
    /* 图标组贴近屏幕右边，只留 24px 呼吸位。不改容器 padding：左右 padding 不对称会把中间公告挤偏 */
    margin-right: -96px;
}

.component-header_right_text {
    font-size: 14px;
    font-weight: 400;
    line-height: 19.6px;
    text-align: left;
}

.component-header_right_text a,
.component-header_right_text a:hover {
    text-decoration: underline;
}

.component-header_right_text count-down {
    min-width: 130px;
    display: inline-block;
}

.component-header_right_line {
    margin: 0 30px;
    height: 21px;
    border-left: 1px solid rgb(var(--header-text-color));
}

.component-header_right_login {
    display: flex;
    align-items: center;
}

.component-header_right_login_icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    transition: opacity .2s;
}

.component-header .component-header_right_login_icon,
.component-header .component-header_right_login_icon:hover {
    color: rgb(var(--header-text-color));
}

.component-header_right_login_icon:hover {
    opacity: .75;
}

.component-header_right_login_icon_default {
    width: 28px;
    height: 28px;
    background: #D9D9D9;
    margin-right: 6px;
}

.component-header_right_login_text {
    text-align: left;
    color: rgb(var(--header-text-color)) !important;
}

/* 顶栏里的搜索 / 购物车：图标自带写死的深灰填色，在深色顶栏上要改成跟文字同色 */
.component-header_right_icons {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 18px;
}

.component-header_right_icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: rgb(var(--header-text-color));
    line-height: 0;
    cursor: pointer;
    background: none;
    border: 0;
    transition: opacity .2s;
}

.component-header_right_icon:hover {
    opacity: .75;
}

/* 购物车是 <a>：base.css 的 a:not(.button) 会把字色改成深色，图标用 currentColor 就跟着变黑 */
.component-header .component-header_right_icon:not(.button),
.component-header .component-header_right_icon:not(.button):hover {
    color: rgb(var(--header-text-color));
}

.component-header_right_icon svg {
    width: 19px;
    height: auto;
}

.component-header_right_cart svg {
    width: 26px;
}

.component-header_right_icon svg path {
    fill: currentColor;
}

.component-header_right_cart #cart-icon-bubble-wrapper,
.component-header_right_cart .cart-icon-bubble-global {
    display: flex;
    align-items: center;
}

/* 数量角标：不论刷新后渲染出来的是哪种标记，都压成右上角的小圆点 */
.component-header_right_cart .cart-count-bubble,
.component-header_right_cart [class*="count"] {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    color: var(--theme-color, #1c1b19);
    text-align: center;
    background: rgb(var(--header-text-color));
    border-radius: 999px;
}

@media (max-width: 1200px) {
  .component-header, .component-menu-header_title-block {
    padding: 0 60px !important;
  }

  .component-header_right {
    margin-right: -36px;
  }
}