/* RTL Styles */

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .headertop__left {
  padding-left: 0;
  padding-right: 270px;
}

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

html[dir="rtl"] .headerbg .navbar-brand img {
  transform: scaleX(-1);
}

html[dir="rtl"] .navbar-nav {
  padding-left: 0;
  padding-right: 15px;
}

html[dir="rtl"] .nav-link {
  text-align: right;
}

html[dir="rtl"] ul {
  padding-right: 0;
}

html[dir="rtl"] .bg-primary,
html[dir="rtl"] .bg-colored.primary:before {
  background-color: #b9d432 !important;
}

@media (min-width: 1200px) {
  html[dir="rtl"] .navbar-expand-xl {
    flex-direction: row-reverse;
  }
}

/* RTL Styles */

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .headertop__left {
    padding-left: 0;
    padding-right: 270px;
}

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

html[dir="rtl"] .headerbg .navbar-brand img {
    transform: scaleX(-1);
}

html[dir="rtl"] .navbar-nav {
    padding-left: 0;
    padding-right: 15px;
}

html[dir="rtl"] .nav-link {
    text-align: right;
}

html[dir="rtl"] ul {
    padding-right: 0;
}

html[dir="rtl"] .bg-primary,
html[dir="rtl"] .bg-colored.primary:before {
    background-color: #b9d432 !important;
}

@media (min-width: 1200px) {
    html[dir="rtl"] .navbar-expand-xl {
        flex-direction: row-reverse;
    }
}

body {
    direction: rtl;
    text-align: right;
}

.container {
    /* margin-left: 0; */
    margin-right: auto;
}

.navbar {
    float: right;
}

.navbar .menu {
    float: right;
}

.navbar .menu li {
    float: right;
    margin-left: 0;
    margin-right: 15px;
}

.button {
    float: right;
    margin-left: 0;
    margin-right: 10px;
}

/* تعديل الهوامش والتوسعات */
.content {
    padding-left: 0;
    padding-right: 20px;
}

.footer {
    text-align: right;
}

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

/* 🔧 ضبط اتجاه حقل البحث وزر البحث في RTL */
html[dir="rtl"] .search form>div {
    flex-direction: row-reverse;
}

html[dir="rtl"] .search input.form-control {
    text-align: right;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

html[dir="rtl"] .search button {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

/* ===================================
   RTL Styles for Shop Filters & Sort
   =================================== */

/* Shop Controls */
html[dir="rtl"] .shop-controls {
    direction: rtl;
}

html[dir="rtl"] .controls-left {
    flex-direction: row-reverse;
}

html[dir="rtl"] .filter-toggle-btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .products-count {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sort-wrapper {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sort-label {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sort-select {
    text-align: right;
    padding: 4px 12px 4px 30px;
    background-position: left 8px center;
}

/* Filter Cards RTL */
html[dir="rtl"] .filters-grid {
    direction: rtl;
}

html[dir="rtl"] .filter-card-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .filter-label {
    text-align: right;
}

html[dir="rtl"] .filter-subtitle {
    text-align: right;
}

/* Category Dropdown RTL */
html[dir="rtl"] .category-wrapper select,
html[dir="rtl"] .ts-wrapper .ts-control {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .category-dropdown-btn {
    left: 14px;
    right: auto;
}

html[dir="rtl"] .ts-dropdown .option {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .ts-dropdown .option[data-level="1"] {
    padding-right: 48px;
    padding-left: 20px;
}

html[dir="rtl"] .ts-dropdown .option[data-level="2"] {
    padding-right: 70px;
    padding-left: 20px;
}

html[dir="rtl"] .option-text::before {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .option-parent {
    direction: rtl;
}

html[dir="rtl"] .option-parent i {
    margin-left: 5px;
    margin-right: 0;
    transform: scaleX(-1);
}

/* Price Range RTL */
html[dir="rtl"] .price-display {
    flex-direction: row-reverse;
}

html[dir="rtl"] .price-range-inputs-horizontal {
    flex-direction: row-reverse;
}

html[dir="rtl"] .price-badge {
    direction: rtl;
}

html[dir="rtl"] .price-amount::before {
    margin-left: 2px;
    margin-right: 0;
}

/* Filter Actions RTL */
html[dir="rtl"] .filter-actions-group {
    direction: rtl;
}

html[dir="rtl"] .apply-filter-btn,
html[dir="rtl"] .clear-filter-btn {
    flex-direction: row-reverse;
}

/* Active Badge RTL */
html[dir="rtl"] .active-badge {
    margin-right: 4px;
    margin-left: 0;
}

/* No Products State RTL */
html[dir="rtl"] .no-products-state {
    direction: rtl;
    text-align: center;
}