.locale-bar {
  position: relative;
  z-index: 3;
  width: 100%;
}

/* 商品信息区内嵌版：去掉上下留白，左对齐，不撑满整行 */
.locale-bar--inline .locale-bar__inner {
  justify-content: flex-start;
  padding-block: 0;
}
.locale-bar--inline .locale-bar__item,
.locale-bar--inline .locale-bar__inner > form {
  max-width: 200px;
}
.locale-bar--inline .locale-bar__btn {
  padding-block: 9px;
}
.locale-bar__inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding-block: 10px;
}
.locale-bar__inner > form {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: 280px;
}
.locale-bar__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: 280px;
  width: 100%;
}
.locale-bar__btn {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding: calc(var(--button-border-thickness) + 7px) calc(var(--button-border-thickness) + 14px);
  font-size: var(--body3-font-size);
}
.locale-bar__glyph {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  opacity: 0.75;
}
.locale-bar__glyph svg { width: 100%; height: 100%; }
.locale-bar__glyph--cur {
  width: auto;
  min-width: 14px;
  height: auto;
  font-size: 1.05em;
  line-height: 1;
  font-weight: var(--body-bold-font-weight);
  opacity: 0.9;
}
.locale-bar__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.locale-bar__arrow {
  display: inline-flex;
  flex: 0 0 auto;
  margin-inline-start: auto;
  width: 10px;
  transition: transform 180ms ease;
}
.locale-bar__btn[aria-expanded="true"] .locale-bar__arrow {
  transform: rotate(180deg);
}
.locale-bar__panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 100%;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  background: rgb(var(--color-background));
  border: 1px solid rgba(var(--color-button-secondary-border), 1);
  border-radius: var(--button-border-radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.locale-bar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.locale-bar__opt {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  border-radius: var(--button-border-radius);
}
.locale-bar__opt:hover {
  background: rgba(var(--color-button-secondary-border), 0.1);
}
.locale-bar__opt[data-selected] {
  font-weight: var(--body-bold-font-weight);
}
.locale-bar__opt[data-selected]::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
@media (--mobile) {
  .locale-bar__inner > form,
  .locale-bar__item {
    max-width: none;
  }
  .locale-bar__panel {
    width: max(100%, 220px);
  }
}

/* Google 翻译引擎：藏到屏幕外，页面上不出现第二个入口 */
.locale-bar__engine {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.goog-te-banner-frame,
.goog-te-balloon-frame,
.skiptranslate > iframe { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }

/* 切换语言后的「翻译中」提示 + 进度条 */
.lb-tr {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  animation: lb-tr-in 0.28s ease both;
}
.lb-tr__card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 10px 16px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  position: relative;
}
.lb-tr__spin {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.16);
  border-top-color: #111;
  animation: lb-tr-spin 0.8s linear infinite;
}
.lb-tr__txt {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #111;
  white-space: nowrap;
}
.lb-tr__bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 7px;
  height: 3px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.lb-tr__bar i {
  display: block;
  height: 100%;
  width: 4%;
  border-radius: 3px;
  background: #111;
  transition: width 0.2s ease;
}
.lb-tr--done .lb-tr__spin {
  border-color: #111;
  border-top-color: transparent;
  animation-duration: 0.5s;
}
.lb-tr--out {
  opacity: 0;
  transition: opacity 0.35s ease;
}
@keyframes lb-tr-spin {
  to { transform: rotate(360deg); }
}
@keyframes lb-tr-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 749px) {
  .lb-tr__card { min-width: 160px; padding: 9px 14px 13px; }
}
