/* Arabic / right-to-left layout */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .dropdown-menu,
html[dir="rtl"] .modal-content {
  direction: rtl;
  text-align: right;
}

/* Numeric quantity controls remain visually centred in both directions. */
html[dir="rtl"] .product-quantity-input input {
  direction: ltr;
  text-align: center;
}

html[dir="rtl"] .dropdown-menu {
  --bs-position: start;
}

html[dir="rtl"] .dropdown-menu-end {
  --bs-position: end;
}

html[dir="rtl"] .dropdown-toggle::after {
  margin-left: 0;
  margin-right: .255em;
}

html[dir="rtl"] .form-check {
  padding-left: 0;
  padding-right: 1.5em;
}

html[dir="rtl"] .form-check .form-check-input {
  float: right;
  margin-left: 0;
  margin-right: -1.5em;
}

html[dir="rtl"] .input-group > :not(:first-child) {
  margin-left: 0;
  margin-right: -1px;
}

html[dir="rtl"] .input-group > :first-child {
  border-radius: 0 .375rem .375rem 0;
}

html[dir="rtl"] .input-group > :last-child {
  border-radius: .375rem 0 0 .375rem;
}

html[dir="rtl"] .site-sidebar {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

html[dir="rtl"] .site-sidebar.active {
  transform: translateX(0);
}

html[dir="rtl"] .sidebar-close-btn,
html[dir="rtl"] .modal-close-btn {
  left: 15px;
  right: auto;
}

html[dir="rtl"] .owl-carousel {
  direction: rtl;
}

html[dir="rtl"] .fa-arrow-right::before,
html[dir="rtl"] .la-arrow-right::before,
html[dir="rtl"] .las.la-angle-right::before,
html[dir="rtl"] .las.la-chevron-right::before {
  display: inline-block;
  transform: scaleX(-1);
}

html[dir="rtl"] .fa-arrow-left::before,
html[dir="rtl"] .la-arrow-left::before,
html[dir="rtl"] .las.la-angle-left::before,
html[dir="rtl"] .las.la-chevron-left::before {
  display: inline-block;
  transform: scaleX(-1);
}

html[dir="rtl"] .text-start {
  text-align: right !important;
}

html[dir="rtl"] .text-end {
  text-align: left !important;
}

html[dir="rtl"] .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html[dir="rtl"] .me-auto {
  margin-right: 0 !important;
  margin-left: auto !important;
}
