/* HD Integrity - language switcher */
.hd-lang {
  position: relative;
  display: flex;
  align-items: center;
}

.hd-lang__btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.hd-lang__btn:hover { opacity: 0.7; }
.hd-lang__code { line-height: 1; }

.hd-lang__menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 0.6rem 0;
  min-width: 17rem;
  max-height: 60vh;
  overflow-y: auto;
  list-style: none;
  background: rgb(var(--color-background, 255 255 255));
  border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.12);
  border-radius: 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hd-lang__menu[hidden] { display: none; }

.hd-lang__menu a {
  display: block;
  padding: 0.7rem 1.6rem;
  font-size: 1.4rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.hd-lang__menu a:hover { background: rgba(var(--color-foreground, 18 18 18), 0.06); }
.hd-lang__menu a.is-active { font-weight: 600; }

.hd-lang--float {
  position: fixed;
  right: 1.6rem;
  bottom: 8rem;
  z-index: 55;
  background: rgb(var(--color-background, 255 255 255));
  border: 1px solid rgba(var(--color-foreground, 18 18 18), 0.15);
  border-radius: 0.4rem;
}

.hd-lang--float .hd-lang__menu { top: auto; bottom: 100%; }

/* geo suggestion bar */
.hd-lang-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  padding: 1.2rem 4.8rem 1.2rem 1.6rem;
  font-size: 1.4rem;
  background: rgb(18 18 18);
  color: #fff;
}

.hd-lang-bar__go {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.hd-lang-bar__x {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

/* RTL — the theme is authored LTR, so flip the layout primitives it relies on */
[dir="rtl"] body,
[dir="rtl"] .rte,
[dir="rtl"] .banner__text,
[dir="rtl"] .footer-block { text-align: right; }

[dir="rtl"] ul,
[dir="rtl"] ol { padding-right: 2rem; padding-left: 0; }

[dir="rtl"] .list-unstyled,
[dir="rtl"] .list-menu { padding-right: 0; }

[dir="rtl"] .breadcrumbs__list,
[dir="rtl"] .header__inline-menu,
[dir="rtl"] .footer__content-top { direction: rtl; }

[dir="rtl"] .slider,
[dir="rtl"] .product-media-gallery,
[dir="rtl"] .marquee { direction: ltr; }

[dir="rtl"] .slider > *,
[dir="rtl"] .marquee > * { direction: rtl; }

/* Hero banner keeps its authored LTR composition - the headline, stats row and
   button pair sit against the left edge of the photo on purpose. Text inside
   still shapes RTL via the browser's bidi algorithm. */
[dir="rtl"] .image-banner,
[dir="rtl"] .banner-content,
[dir="rtl"] .banner-box,
[dir="rtl"] .banner-heading,
[dir="rtl"] .banner-text,
[dir="rtl"] .hd-stats-row,
[dir="rtl"] .banner-buttons {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .hd-lang__menu { right: auto; left: 0; }
[dir="rtl"] .hd-lang-bar { padding: 1.2rem 1.6rem 1.2rem 4.8rem; }
[dir="rtl"] .hd-lang-bar__x { right: auto; left: 1.2rem; }

@media screen and (max-width: 749px) {
  .hd-lang__btn { padding: 0.6rem; }
  .hd-lang-bar { flex-wrap: wrap; justify-content: flex-start; }
}
