/* Shared three-language selector and Arabic layout. Existing Chinese/English designs are retained. */
#langToggle.ls-lang-select, #lsLangToggle.ls-lang-select {
  display: block !important; width: 112px !important; min-width: 112px !important;
  max-width: 100%; height: 40px !important; padding: 0 10px !important;
  border: 1px solid #dce6ee !important; border-radius: 6px !important;
  background: #fff !important; color: #102033 !important; cursor: pointer;
  font: 600 15px/1.5 Tahoma, Arial, sans-serif !important;
}
.ls-lang-select:focus-visible { outline: 3px solid #00877f; outline-offset: 3px; }
.ls-lang-actions { flex-shrink: 0; }
html[lang="ar"] body { font-family: Tahoma, Arial, "Segoe UI", sans-serif; }
body[data-lang="ar"] [data-en] { display: none !important; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] p, html[lang="ar"] a, html[lang="ar"] button,
html[lang="ar"] label, html[lang="ar"] b, html[lang="ar"] strong,
html[lang="ar"] span { letter-spacing: normal; word-break: normal; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.5; }
html[lang="ar"] .nav { gap: 16px; }
html[lang="ar"] .nav-links, html[lang="ar"] .nav-menu { gap: 18px; }
html[lang="ar"] .nav-actions { padding-left: 0; padding-right: 16px; border-left: 0; border-right: 1px solid #e6edf3; }
html[lang="ar"] .nav-submenu, html[lang="ar"] .sub { left: auto; right: 0; text-align: right; min-width: 240px; }
html[lang="ar"] .console-dropdown { left: 0; right: auto; }
html[lang="ar"] .hero-copy { text-align: right; }
html[lang="ar"] .hero-copy h1 { font-size: clamp(36px, 4vw, 58px); line-height: 1.5; }
html[lang="ar"] .hero-copy .hero-subtitle { font-size: clamp(20px, 2vw, 28px); }
html[lang="ar"] .hero-copy .hero-lead { line-height: 1.85; }
html[lang="ar"] .hero.category-hero h1, html[lang="ar"] .product-banner h1 { font-size: clamp(28px, 4vw, 48px); }
html[lang="ar"] .ls-consult-form, html[lang="ar"] .buy-form,
html[lang="ar"] .param-row, html[lang="ar"] .shop-title,
html[lang="ar"] .fact, html[lang="ar"] .foot-grid { text-align: right; }
html[lang="ar"] th { text-align: start; }
html[lang="ar"] ul, html[lang="ar"] ol { padding-left: 0; padding-right: 24px; }
html[lang="ar"] input, html[lang="ar"] textarea { text-align: start; }
html[lang="ar"] input::placeholder, html[lang="ar"] textarea::placeholder { direction: rtl; text-align: right; }
html[lang="ar"] .price-line, html[lang="ar"] .qty,
html[lang="ar"] .hero-controls, html[lang="ar"] .hero-dots,
html[lang="ar"] .honor-track, html[lang="ar"] .honor-carousel,
html[lang="ar"] a[href^="tel:"], html[lang="ar"] a[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] .price-line small, html[lang="ar"] .price-line span { direction: rtl; }
html[lang="ar"] .foot-bottom { flex-wrap: wrap; }
html[lang="ar"] .page-subnav a { white-space: normal; line-height: 1.6; }
html[lang="ar"] .param-row span, html[lang="ar"] .foot-grid a { overflow-wrap: anywhere; }
@media (max-width: 1100px) and (min-width: 861px) {
  .site-header .nav, .top .nav { flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 12px; }
  .nav-links, .nav-menu { order: 3; flex: 1 0 100%; justify-content: center; gap: 18px; }
  .nav-links > a, .nav-item > a { padding-block: 14px; }
}
@media (max-width: 860px) {
  html[lang="ar"] .nav-actions, html[lang="ar"] .ls-lang-actions { margin-left: 0 !important; margin-right: auto !important; padding-right: 0; border: 0; }
  html[lang="ar"] .nav-menu > a, html[lang="ar"] .nav-item > a,
  html[lang="ar"] .nav-links > a, html[lang="ar"] .nav-links > .nav-item > a { text-align: right !important; }
  html[lang="ar"] .sub, html[lang="ar"] .nav-submenu { padding: 0 14px 0 0 !important; min-width: 0; }
  html[lang="ar"] .sub a, html[lang="ar"] .nav-submenu a { text-align: right; }
  html[lang="ar"] .hero-copy { padding: 48px 24px 84px; min-height: 520px; }
  html[lang="ar"] .hero-copy h1 { font-size: 36px; }
  html[lang="ar"] .hero-copy .hero-subtitle { font-size: 22px; }
  html[lang="ar"] .page-subnav a { white-space: nowrap; }
}
@media (max-width: 380px) {
  .brand img { max-width: 105px !important; }
  #langToggle.ls-lang-select, #lsLangToggle.ls-lang-select { width: 96px !important; min-width: 96px !important; }
}
html[lang="ar"] .hero-copy h1 { color: #efcf8e; -webkit-text-fill-color: #efcf8e; }
html[lang="ar"] .floating-consult, html[lang="ar"] .float { right: auto; left: 22px; }
html[lang="ar"] .nav-item:last-child .sub,
html[lang="ar"] .nav-item:last-child .nav-submenu { right: auto; left: 0; }
.top .nav { display: flex; justify-content: space-between; }
.top .nav > .brand { flex-shrink: 0; }
html[lang="ar"] .nav-item .sub { transform: translateY(8px); }
html[lang="ar"] .nav-item:hover .sub,
html[lang="ar"] .nav-item:focus-within .sub { transform: translateY(0); }
html[lang="ar"] .nav-item:nth-last-child(-n+2) .sub,
html[lang="ar"] .nav-item:nth-last-child(-n+2) .nav-submenu { right: auto; left: 0; }
html[lang="ar"] .color-detail-panel { max-height: calc(100vh - 48px); overflow-y: auto; }
html[lang="ar"] .color-detail-close { right: auto; left: 18px; }
html[lang="ar"] .color-count { white-space: nowrap; }
