/*
 * Qafex Complete RTL Stylesheet
 * Covers: Header, Search, Icons, Services, Categories, Products, Footer, WooCommerce
 */

/* =====================================================
   1. HEADER - Search Bar
   ===================================================== */
/* Flip search button border-radius */
body.rtl .search-form .search-submit {
    border-radius: 5px 0 0 5px !important;
}
body.rtl .search-form .search-category-field {
    border-radius: 0 5px 5px 0 !important;
}
/* Search form margin flip */
body.rtl .search-form {
    margin-left: 0 !important;
    margin-right: 85px !important;
}

/* =====================================================
   2. HEADER - Cart/Wishlist Badge Position
   ===================================================== */
body.rtl .header-cart-button .header-cart-total {
    right: auto !important;
    left: -8px !important;
}
body.rtl .header-wishlist-button .header-wishlist-total {
    right: auto !important;
    left: -8px !important;
}

/* =====================================================
   3. HEADER - Contact Info
   ===================================================== */
body.rtl .contact-button-wrap .contact-label {
    text-align: right !important;
}

/* =====================================================
   4. HEADER - Cart Content Padding (theme override)
   ===================================================== */
body.rtl .header-cart-button .header-cart-content {
    padding-left: 5px !important;
    padding-right: 0 !important;
}

/* =====================================================
   5. ELEMENTOR - Stretched Sections RTL Fix
   ===================================================== */
body.rtl .elementor-section-stretched {
    right: 0 !important;
    left: auto !important;
    width: 100vw !important;
}

/* =====================================================
   6. ELEMENTOR - Icon Box (Service Blocks)
   ===================================================== */
body.rtl .elementor-icon-box-wrapper {
    flex-direction: row-reverse !important;
}
body.rtl .elementor-icon-box-icon {
    margin-left: 15px !important;
    margin-right: 0 !important;
}
body.rtl .elementor-icon-box-content {
    text-align: right !important;
}

/* =====================================================
   7. ELEMENTOR - Icon List
   ===================================================== */
body.rtl .elementor-icon-list-item {
    flex-direction: row-reverse !important;
}
body.rtl .elementor-icon-list-icon {
    margin-left: 5px !important;
    margin-right: 0 !important;
}
body.rtl .elementor-icon-list-text {
    text-align: right !important;
}

/* =====================================================
   8. ELEMENTOR - Headings & Text
   ===================================================== */
body.rtl .elementor-widget-heading .elementor-heading-title {
    text-align: right !important;
}
body.rtl .elementor-widget-text-editor {
    text-align: right !important;
}

/* =====================================================
   9. ELEMENTOR - Brands/Carousel
   ===================================================== */
body.rtl .elementor-widget-tmcore-brand .elementor-brands {
    direction: ltr !important;
}
body.rtl .swiper-wrapper {
    flex-direction: row !important;
}
body.rtl .swiper-container,
body.rtl .swiper {
    direction: ltr !important;
}

/* =====================================================
   10. WOOCOMMERCE - Product Page Buttons
   ===================================================== */
body.rtl .wrap_compare_wishlist {
    display: flex !important;
    flex-direction: row-reverse !important;
    gap: 10px !important;
}
body.rtl .wrap_compare_wishlist .woosc-btn,
body.rtl .wrap_compare_wishlist .woosw-btn {
    flex: none !important;
    border-radius: 5px !important;
}

/* =====================================================
   11. WOOCOMMERCE - Product Summary
   ===================================================== */
body.rtl .product .summary {
    text-align: right !important;
}
body.rtl .product .summary .price {
    direction: rtl !important;
}
body.rtl .woocommerce-product-rating {
    direction: rtl !important;
}
body.rtl .quantity {
    direction: ltr !important;
}
body.rtl .product_meta {
    text-align: right !important;
}

/* =====================================================
   12. WOOCOMMERCE - Product Grid
   ===================================================== */
body.rtl ul.products li.product {
    text-align: right !important;
}
body.rtl .woocommerce-loop-product__title {
    text-align: right !important;
}

/* =====================================================
   13. WOOCOMMERCE - Cart & Checkout
   ===================================================== */
body.rtl .woocommerce table.cart td.actions {
    text-align: left !important;
}
body.rtl .woocommerce-checkout .form-row {
    text-align: right !important;
}

/* =====================================================
   14. NAVIGATION - Arrows Flip
   ===================================================== */
body.rtl .nav-previous .base-svg-iconset,
body.rtl .nav-next .base-svg-iconset {
    transform: rotate(180deg) !important;
}

/* =====================================================
   15. FOOTER - Widget Text Alignment
   ===================================================== */
body.rtl .site-footer .widget {
    text-align: right !important;
}
body.rtl .site-footer .widget-title {
    text-align: right !important;
}
body.rtl .footer-html-inner {
    text-align: right !important;
}
body.rtl .footer-navigation ul {
    text-align: right !important;
}
body.rtl .footer-social-wrap .footer-social-inner-wrap {
    justify-content: flex-end !important;
}

/* =====================================================
   16. BREADCRUMBS
   ===================================================== */
body.rtl .base-breadcrumbs {
    text-align: right !important;
}
body.rtl .base-breadcrumbs .separator {
    transform: rotate(180deg) !important;
}

/* =====================================================
   17. SIDEBAR & WIDGETS
   ===================================================== */
body.rtl .widget ul li {
    text-align: right !important;
}
body.rtl .widget ul li a {
    text-align: right !important;
}
body.rtl .product-filter .widget {
    text-align: right !important;
}

/* =====================================================
   18. GENERAL - Lists & Content
   ===================================================== */
body.rtl .entry-content ul,
body.rtl .entry-content ol {
    padding-left: 0 !important;
    padding-right: 2em !important;
}

/* =====================================================
   19. VERTICAL MENU
   ===================================================== */
body.rtl .vertical-navigation .vertical-menu-container > ul > li > a {
    text-align: right !important;
}
body.rtl .vertical-navigation .sub-menu {
    left: auto !important;
    right: 100% !important;
}

/* =====================================================
   20. SCROLL TO TOP BUTTON
   ===================================================== */
body.rtl #bt-scroll-up.scroll-up-side-right {
    right: auto !important;
    left: 30px !important;
}
body.rtl #bt-scroll-up.scroll-up-side-left {
    left: auto !important;
    right: 30px !important;
}
