/* ===========================
   GLOBAL RTL RESET
=========================== */

html[dir="rtl"], body[dir="rtl"] {
    direction: rtl !important;
    text-align: right !important;
}

/* تحويل اتجاه الفلكس */
* {
    letter-spacing: 0 !important;
}

.row, .d-flex, .flex-row {
    flex-direction: row-reverse !important;
}

.text-start {
    text-align: right !important;
}

.text-end {
    text-align: left !important;
}

/* ===========================
   RTL FIX – SPACING
=========================== */

/* قلب الـ margin */
.ml-1, .ms-1 { margin-right: .25rem !important; margin-left: 0 !important; }
.ml-2, .ms-2 { margin-right: .5rem !important; margin-left: 0 !important; }
.ml-3, .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
.ml-auto, .ms-auto { margin-right: auto !important; margin-left: unset !important; }

/* قلب الـ padding */
.pl-1, .ps-1 { padding-right: .25rem !important; padding-left: 0 !important; }
.pl-2, .ps-2 { padding-right: .5rem !important; padding-left: 0 !important; }
.pl-3, .ps-3 { padding-right: 1rem !important; padding-left: 0 !important; }

/* ===========================
   NAVBAR + HEADER
=========================== */

.navbar-nav {
    padding-right: 0 !important;
}

.navbar .mx-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.header-menu__item, 
.header-menu__link {
    text-align: right !important;
}

/* قلب اتجاه قائمة اللغات */
.lang--dropdown .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

.dropdown-menu {
    text-align: right !important;
}

.navbar-toggler {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ===========================
   SELECT2 RTL
=========================== */

.select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 10px !important;
    right: auto !important;
}

.select2-container--default .select2-selection--single {
    padding-right: 8px !important;
}

/* ===========================
   SLIDERS + ICONS
=========================== */

.slick-prev {
    right: -10px !important;
    left: auto !important;
}

.slick-next {
    left: -10px !important;
    right: auto !important;
}

.fa-angle-left:before {
    content: "\f105"; /* قلب الاتجاه */
}
.fa-angle-right:before {
    content: "\f104";
}

/* ===========================
   CARDS & PRODUCT ITEMS
=========================== */

.product-card, .service-card {
    direction: rtl !important;
}

.product-card__user,
.product-card__stats {
    flex-direction: row-reverse !important;
}

.product-card__user img {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

/* ===========================
   SIDEBAR RTL
=========================== */

.offcanvas-sidebar {
    right: 0 !important;
    left: auto !important;
}

.offcanvas-sidebar .btn--close {
    left: 15px !important;
    right: auto !important;
}

.offcanvas-sidebar-list li {
    text-align: right !important;
}

/* ===========================
   FORMS RTL FIX
=========================== */

.form-control,
.form-select {
    text-align: right !important;
}

.input-group-text {
    border-radius: 0 5px 5px 0 !important;
}

.input-group .form-control {
    border-radius: 5px 0 0 5px !important;
}

.toggle-password {
    left: 10px !important;
    right: auto !important;
}

/* ===========================
   FOOTER RTL
=========================== */

.footer-menu__item,
.footer-menu__link {
    text-align: right !important;
}

.social-list {
    flex-direction: row-reverse !important;
}

/* ===========================
   MISC FIXES
=========================== */

.breadcrumb {
    text-align: right !important;
}

.page-top__left {
    flex-direction: row-reverse !important;
}

.page-top__right {
    justify-content: flex-start !important;
}

.layout-toggle-btns {
    flex-direction: row-reverse !important;
}

/* زر البحث */
.search-form .input-group {
    flex-direction: row-reverse !important;
}

/* سعر الفلترة */
.price-filter__wrapper input {
    text-align: center !important;
}
