@charset "utf-8";
/* =========================================================================
   前台多语言组件样式  HillABC i18n v1.0
   包含：语言切换器、RTL（阿拉伯语）方向修正
   ========================================================================= */

/* ------------------------------------------------------------ 语言切换器 */
.lang-switch {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1;
  z-index: 1200;
}

.lang-switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: inherit;
  text-decoration: none;
  transition: background .18s, border-color .18s;
  white-space: nowrap;
}
.lang-switch-toggle:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .5);
  text-decoration: none;
}

/* 白底场景（顶栏为浅色时）自动适配 */
.top .lang-switch-toggle { color: #6B6A64; border-color: #DCD9D0; }
.top .lang-switch-toggle:hover { background: #F2F1EC; border-color: #C9C5BA; }

.lang-globe {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.4px solid currentColor;
  position: relative;
  flex: 0 0 13px;
  opacity: .85;
}
.lang-globe::before,
.lang-globe::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.lang-globe::before { width: 5px; height: 13px; border-top: 0; border-bottom: 0; }
.lang-globe::after  { width: 13px; height: 4px;  border-left: 0; border-right: 0; opacity: .55; }

.lang-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .7;
  margin-top: 2px;
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  max-height: 420px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #FFFFFF;
  border: 1px solid #E7E5DE;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(24, 24, 20, .12);
  display: none;
}
[dir="rtl"] .lang-switch-menu { right: auto; left: 0; }

.lang-switch.open .lang-switch-menu { display: block; }

.lang-switch-menu li { margin: 0; padding: 0; }
.lang-switch-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #1A1917 !important;
  text-decoration: none;
  font-size: 13px;
  transition: background .14s;
}
.lang-switch-menu li a:hover { background: #F4F3EE; text-decoration: none; }
.lang-switch-menu li.active a { background: #E7F2EE; color: #FF6A00 !important; font-weight: 600; }

.lang-native { font-size: 13px; }
.lang-name {
  font-size: 11.5px;
  color: #9C9A92;
  flex: 0 0 auto;
}
.lang-switch-menu li.active .lang-name { color: #FF6A00; opacity: .75; }

/* ------------------------------------------------------------ RTL 修正 */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .fl,
[dir="rtl"] .pull-left { float: right !important; }
[dir="rtl"] .fr,
[dir="rtl"] .pull-right { float: left !important; }
[dir="rtl"] ul, [dir="rtl"] ol { padding-right: 0; }
[dir="rtl"] .top-left { float: right; }
[dir="rtl"] .top-right,
[dir="rtl"] .top-right_t1 { float: left; }
[dir="rtl"] .nav-left { float: right; }
[dir="rtl"] .menu li { float: right; }
[dir="rtl"] .arrow,
[dir="rtl"] .ico-arrow { transform: scaleX(-1); }
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="password"],
[dir="rtl"] textarea { text-align: right; }
[dir="rtl"] .lang-switch-toggle { direction: ltr; }

/* 数字与拉丁字母在 RTL 下的可读性 */
[dir="rtl"] .num,
[dir="rtl"] .price,
[dir="rtl"] .count { direction: ltr; display: inline-block; unicode-bidi: embed; }

/* ------------------------------------------- 会员中心顶栏适配（float 布局）
   会员中心老顶栏有一条 .nav-right a { float: left }：
   它会把 .lang-switch-toggle 浮出 .lang-switch，容器宽高塌陷，
   下拉菜单的 top: calc(100% + 8px) 就算不准（会盖住按钮本身）。
   这里把容器改回 inline-flex 并给足行高，让下拉稳定贴在顶栏下沿。 */
.m-nav .nav-right .top-lang { line-height: normal; }

.m-nav .nav-right .top-lang .lang-switch {
  display: inline-flex;
  align-items: center;
  height: 72px;
}

.m-nav .nav-right .top-lang .lang-switch-toggle {
  float: none;
  height: 30px;
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
  color: #FF6A00;
}
.m-nav .nav-right .top-lang .lang-switch-toggle:hover {
  background: rgba(255, 106, 0, .08);
  border-color: rgba(255, 106, 0, .20);
  color: #FF6A00;
}
.m-nav .nav-right .top-lang .lang-cur { color: inherit; }

/* 下拉项：老顶栏有 .nav-right ul li{float:left} 和 .nav-right a{float:left}，
   会把菜单项挤成两列、行高也串味，这里全部还原成单列块级 */
.m-nav .nav-right .top-lang .lang-switch-menu li {
  float: none;
  width: 100%;
  margin-left: 0;
}
.m-nav .nav-right .top-lang .lang-switch-menu li a {
  float: none;
  display: flex;
  width: 100%;
  height: auto;
  line-height: 1.4;
}

@media (max-width: 992px) {
  .m-nav .nav-right .top-lang .lang-switch { height: 62px; }
}
