/**
 * ningdongpower — 顶栏会员/询盘篮/语言切换（暗色导航同行）
 * 槽位：.web_head .head_right > ul.xy-header-extra-nav
 */
:root {
  --xy-member-nav-avatar-bg: #b01b2e;
  --xy-member-nav-avatar-color: #fff;
  --xy-member-nav-avatar-size: 26px;
  --xy-member-nav-font-size: 13px;
  --xy-member-nav-icon-size: 18px;
  --xy-basket-badge-bg: #b01b2e;
  --xy-basket-badge-color: #fff;
  --xy-basket-nav-icon-size: 18px;
  --xy-lang-accent: #b01b2e;
}

.web_head .head_layer,
.web_head .layout,
.web_head .head_right {
  overflow: visible !important;
}

.web_head .head_right {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0;
  overflow: visible !important;
  position: relative;
  z-index: 30;
}

.web_head .head_right .xy-header-extra-nav {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 8px 0 12px !important;
  list-style: none !important;
  vertical-align: middle !important;
  overflow: visible !important;
  height: 45px;
}

.web_head .head_right .xy-header-extra-nav > li {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  line-height: 1 !important;
  overflow: visible !important;
}

.web_head .head_right .xy-header-extra-nav .xy-member-nav,
.web_head .head_right .xy-header-extra-nav .xy-basket-nav,
.web_head .head_right .xy-header-extra-nav .xy-wishlist-nav {
  color: #fff !important;
  opacity: 1 !important;
}

.web_head .head_right .xy-header-extra-nav a {
  color: #fff !important;
}

.web_head .head_right .xy-header-extra-nav .xy-member-nav-login,
.web_head .head_right .xy-header-extra-nav .xy-basket-nav > a,
.web_head .head_right .xy-header-extra-nav .xy-basket-nav .icon,
.web_head .head_right .xy-header-extra-nav .xy-basket-nav .icon > i,
.web_head .head_right .xy-header-extra-nav .xy-basket-nav .icon > svg {
  color: #fff !important;
  fill: currentColor !important;
}

.web_head .head_right:has(.xy-header-search) > .btn--search {
  display: none !important;
}

.web_head .head_right:has(.xy-header-lang) > .change-language {
  display: none !important;
}

.web_head .xy-header-search-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  line-height: 1 !important;
}

.web_head .xy-header-search-btn .icon,
.web_head .xy-header-search-btn .icon > i,
.web_head .xy-header-search-btn .icon > svg {
  color: #fff !important;
  fill: currentColor !important;
}

body:has(.xy-header-extra-nav .xy-basket-nav) .xy-header-extra-fallback,
body:has(.xy-header-extra-nav .xy-member-nav) .xy-header-extra-fallback {
  display: none !important;
}

/* —— gtranslate 语言切换美化（暗色顶栏） —— */
.web_head .xy-header-lang {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  overflow: visible !important;
}

.web_head .xy-header-lang-switcher {
  line-height: 1 !important;
  overflow: visible !important;
}

.web_head .xy-header-lang-switcher #gt_float_wrapper {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  height: auto !important;
  width: auto !important;
  z-index: 40 !important;
  display: block !important;
  overflow: visible !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher {
  position: relative !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  border-radius: 0 !important;
  overflow: visible !important;
  line-height: 1 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt-selected {
  background: transparent !important;
  float: none !important;
  cursor: pointer !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt-selected .gt-current-lang {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 4px !important;
  min-height: 32px !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt-selected .gt-current-lang:hover {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  opacity: 0.85 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt-selected .gt-current-lang .gt-lang-code {
  position: static !important;
  top: auto !important;
  max-width: 3em !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher img {
  width: 18px !important;
  height: 12px !important;
  max-width: 18px !important;
  max-height: 12px !important;
  margin: 0 !important;
  border-radius: 2px !important;
  vertical-align: middle !important;
  object-fit: cover !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt-selected .gt-current-lang span.gt_float_switcher-arrow {
  height: 12px !important;
  width: 12px !important;
  background-size: 9px !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 285 285'><path d='M282 76.5l-14.2-14.3a9 9 0 0 0-13.1 0L142.5 174.4 30.3 62.2a9 9 0 0 0-13.2 0L3 76.5a9 9 0 0 0 0 13.1l133 133a9 9 0 0 0 13.1 0l133-133a9 9 0 0 0 0-13z' style='fill:%23ffffff'/></svg>") !important;
  opacity: 0.9 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: 280px !important;
  max-width: min(280px, calc(100vw - 24px)) !important;
  max-height: min(70vh, calc(100vh - 110px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 8px !important;
  margin: 0 !important;
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18) !important;
  z-index: 9999 !important;
  float: none !important;
  white-space: normal !important;
  display: none !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: min-content !important;
  align-content: start !important;
  box-sizing: border-box !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options.gt-open {
  display: grid !important;
  opacity: 1 !important;
  transform: none !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options a {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  color: #333 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-decoration: none !important;
  float: none !important;
  background: transparent !important;
  border-radius: 6px !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options a:hover {
  background: rgba(176, 27, 46, 0.08) !important;
  color: #b01b2e !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options a img {
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 12px !important;
  margin: 0 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options a.gt-lang-extra {
  display: none !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options.gt-expanded {
  width: 480px !important;
  max-width: min(480px, calc(100vw - 24px)) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options.gt-expanded a.gt-lang-extra {
  display: flex !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options a.gt-lang-more {
  grid-column: 1 / -1 !important;
  justify-content: center !important;
  color: #b01b2e !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  border-top: 1px solid #eee !important;
  margin-top: 4px !important;
  padding: 10px 8px 6px !important;
  border-radius: 0 !important;
}

.web_head .xy-header-lang-switcher .gt_float_switcher .gt_options a.gt-lang-more:hover {
  background: transparent !important;
  color: #8a1524 !important;
}

.web_head:has(.gt_options.gt-open) {
  z-index: 1001;
  overflow: visible !important;
}

@media only screen and (max-width: 950px) {
  /* 手机用顶部 mobile-head / 底栏，隐藏桌面顶栏语言搜索等 */
  .web_head .head_right,
  .web_head .head_right .xy-header-extra-nav {
    display: none !important;
  }

  .web_head .xy-header-lang-switcher .gt_float_switcher .gt_options,
  .web_head .xy-header-lang-switcher .gt_float_switcher .gt_options.gt-expanded {
    width: auto !important;
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
