/* ==========================================================================
   Comprehensive RTL (Arabic) Stylesheet for Front Theme
   ========================================================================== */

html[dir="rtl"],
html[lang="ar"] {
    direction: rtl;
}

html[dir="rtl"] body,
html[lang="ar"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Zain', 'Noto Kufi Arabic', sans-serif;
}

/* Base Text & Alignment Overrides */
html[dir="rtl"] .text-start,
html[lang="ar"] .text-start {
    text-align: right !important;
}

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

html[dir="rtl"] .float-start,
html[lang="ar"] .float-start {
    float: right !important;
}

html[dir="rtl"] .float-end,
html[lang="ar"] .float-end {
    float: left !important;
}

/* Header & Main Navigation RTL */
html[dir="rtl"] .logo-area,
html[lang="ar"] .logo-area {
    margin-right: 0 !important;
    margin-left: 30px !important;
}

html[dir="rtl"] .main-nav-one ul li.has-dropdown,
html[lang="ar"] .main-nav-one ul li.has-dropdown {
    margin-right: 0 !important;
    margin-left: 16px !important;
}

html[dir="rtl"] .main-nav-one ul li.has-dropdown a.nav-link,
html[lang="ar"] .main-nav-one ul li.has-dropdown a.nav-link {
    padding-right: 15px !important;
    padding-left: 20px !important;
}

html[dir="rtl"] .main-nav-one ul li.has-dropdown a::before,
html[lang="ar"] .main-nav-one ul li.has-dropdown a::before {
    right: auto !important;
    left: 4px !important;
}

html[dir="rtl"] .main-nav-one ul li.has-dropdown .submenu,
html[lang="ar"] .main-nav-one ul li.has-dropdown .submenu {
    left: auto !important;
    right: 0 !important;
    text-align: right !important;
}

html[dir="rtl"] .main-nav-one ul li.has-dropdown .submenu li a,
html[lang="ar"] .main-nav-one ul li.has-dropdown .submenu li a {
    text-align: right !important;
    padding: 12px 12px 12px 35px !important;
}

html[dir="rtl"] .header-one .main-nav-desk nav ul li.has-droupdown .submenu.inner-page .sub-dropdown::after,
html[dir="rtl"] .header-three .main-nav-desk nav ul li.has-droupdown .submenu.inner-page .sub-dropdown::after,
html[lang="ar"] .header-one .main-nav-desk nav ul li.has-droupdown .submenu.inner-page .sub-dropdown::after,
html[lang="ar"] .header-three .main-nav-desk nav ul li.has-droupdown .submenu.inner-page .sub-dropdown::after {
    right: auto !important;
    left: 25px !important;
    content: "\f104" !important; /* Chevron Left for RTL submenus */
}

html[dir="rtl"] .main-nav-one ul li.has-dropdown .submenu .third-lvl,
html[lang="ar"] .main-nav-one ul li.has-dropdown .submenu .third-lvl {
    left: auto !important;
    right: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Language Switcher & Actions Area */
html[dir="rtl"] .actions-area,
html[lang="ar"] .actions-area {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .lang-switch-btn,
html[lang="ar"] .lang-switch-btn {
    direction: ltr; /* Keeps icon + text order neat */
}



/* Mobile Menu & Side Drawer - Controlled Visibility */
html[dir="rtl"] .side-bar,
html[lang="ar"] .side-bar {
    right: auto !important;
    left: -105% !important;
    transition: all 600ms ease;
}

html[dir="rtl"] .side-bar.show,
html[lang="ar"] .side-bar.show {
    right: auto !important;
    left: 0 !important;
}

html[dir="rtl"] .side-bar button.close-icon-menu,
html[lang="ar"] .side-bar button.close-icon-menu {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .mobile-menu-main nav ul li.has-droupdown::after,
html[lang="ar"] .mobile-menu-main nav ul li.has-droupdown::after {
    right: auto !important;
    left: 0 !important;
}

/* Decorative Lines, Title Underlines & Underline Accents (left: 0 -> right: 0) */
html[dir="rtl"] .single-footer-one-wrapper .single-footer-component .title-area::after,
html[dir="rtl"] .footer-style-8 .single-footer-component .title-area::after,
html[dir="rtl"] .single-footer-component .title-area::after,
html[dir="rtl"] .solari-title-area-four span.pre-title::after,
html[dir="rtl"] .solari-title-area-three span.pre-title::after,
html[dir="rtl"] span.pre-title::after,
html[dir="rtl"] .title-area::after,
html[dir="rtl"] .title::after,
html[lang="ar"] .single-footer-one-wrapper .single-footer-component .title-area::after,
html[lang="ar"] .footer-style-8 .single-footer-component .title-area::after,
html[lang="ar"] .single-footer-component .title-area::after,
html[lang="ar"] .solari-title-area-four span.pre-title::after,
html[lang="ar"] .solari-title-area-three span.pre-title::after,
html[lang="ar"] span.pre-title::after,
html[lang="ar"] .title-area::after,
html[lang="ar"] .title::after {
    left: auto !important;
    right: 0 !important;
}

/* Left-aligned Content Blocks */
html[dir="rtl"] .title-area-left,
html[dir="rtl"] .left-banner-content-area,
html[dir="rtl"] .left-banner-content-area-two,
html[lang="ar"] .title-area-left,
html[lang="ar"] .left-banner-content-area,
html[lang="ar"] .left-banner-content-area-two {
    text-align: right !important;
}

/* Badges & Icons */
html[dir="rtl"] .actions-area .cart i::after,
html[lang="ar"] .actions-area .cart i::after {
    left: auto !important;
    right: -8px !important;
}

/* Icons & Input Groups */
html[dir="rtl"] .search-input-area i,
html[dir="rtl"] .search-input-area .fa-search,
html[lang="ar"] .search-input-area i,
html[lang="ar"] .search-input-area .fa-search {
    right: auto !important;
    left: 15px !important;
}

html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
    text-align: right;
}

/* Breadcrumbs & Arrows */
html[dir="rtl"] .breadcrumb li::after,
html[lang="ar"] .breadcrumb li::after {
    content: "\f104" !important;
    margin-left: 8px;
    margin-right: 8px;
}

/* Slider & Swiper Nav Controls */
html[dir="rtl"] .swiper-button-next,
html[lang="ar"] .swiper-button-next {
    left: 10px !important;
    right: auto !important;
}

html[dir="rtl"] .swiper-button-prev,
html[lang="ar"] .swiper-button-prev {
    right: 10px !important;
    left: auto !important;
}

/* General Margin & Padding Flipping Utilities */
html[dir="rtl"] .ms-1, html[lang="ar"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
html[dir="rtl"] .ms-2, html[lang="ar"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
html[dir="rtl"] .ms-3, html[lang="ar"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
html[dir="rtl"] .me-1, html[lang="ar"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
html[dir="rtl"] .me-2, html[lang="ar"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
html[dir="rtl"] .me-3, html[lang="ar"] .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }

html[dir="rtl"] .ps-1, html[lang="ar"] .ps-1 { padding-right: 0.25rem !important; padding-left: 0 !important; }
html[dir="rtl"] .ps-2, html[lang="ar"] .ps-2 { padding-right: 0.5rem !important; padding-left: 0 !important; }
html[dir="rtl"] .ps-3, html[lang="ar"] .ps-3 { padding-right: 1rem !important; padding-left: 0 !important; }
html[dir="rtl"] .pe-1, html[lang="ar"] .pe-1 { padding-left: 0.25rem !important; padding-right: 0 !important; }
html[dir="rtl"] .pe-2, html[lang="ar"] .pe-2 { padding-left: 0.5rem !important; padding-right: 0 !important; }
html[dir="rtl"] .pe-3, html[lang="ar"] .pe-3 { padding-left: 1rem !important; padding-right: 0 !important; }
