[dir="rtl"] .mobile-header-actions {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .mobile-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #f4f5f7;
    color: #17506b;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease;
    text-decoration: none;
}

[dir="rtl"] .mobile-icon-btn:hover,
[dir="rtl"] .mobile-icon-btn:focus {
    background-color: #17506b;
    color: #fff;
    box-shadow: 0 6px 16px rgba(23, 80, 107, 0.2);
}

[dir="rtl"] .mobile-icon-btn:focus {
    outline: none;
}

[dir="rtl"] .mobile-icon-btn i {
    pointer-events: none;
}

[dir="rtl"] .mobile-cart-btn .cart-count-badge {
    right: auto;
    left: 4px;
}

[dir="rtl"] .nav-desktop-actions {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .mobile-nav-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1rem;
}

[dir="rtl"] .mobile-offcanvas-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

[dir="rtl"] .mobile-offcanvas-nav .collapse .list-unstyled {
    padding-right: 1rem;
    padding-left: 0;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

[dir="rtl"] .mobile-offcanvas-nav .collapse.show {
    margin-bottom: 0.5rem;
}

[dir="rtl"] .mobile-offcanvas-link {
    direction: rtl;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f5f7fa;
    border-radius: 12px;
    text-decoration: none;
    color: #1d2939;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

[dir="rtl"] .mobile-offcanvas-link .fa-chevron-down {
    margin-right: 0;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

[dir="rtl"] .mobile-offcanvas-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

[dir="rtl"] .mobile-offcanvas-sublink {
    text-align: right;
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #344054;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

[dir="rtl"] .mobile-offcanvas-sublink:hover,
[dir="rtl"] .mobile-offcanvas-sublink:focus {
    background: rgba(23, 80, 107, 0.08);
    color: #17506b;
}

[dir="rtl"] .mobile-offcanvas-search .input-group-text {
    border-radius: 0 999px 999px 0;
}

[dir="rtl"] .mobile-offcanvas-search .form-control {
    border-radius: 999px 0 0 999px;
}

[dir="rtl"] .mobile-offcanvas-search .input-group {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

[dir="rtl"] .mobile-offcanvas-search .form-control {
    border: none;
    padding: 0.75rem;
    background-color: #f4f6f8;
}

[dir="rtl"] .mobile-offcanvas-search .form-control:focus {
    box-shadow: none;
}

[dir="rtl"] .mobile-offcanvas-languages h6 {
    color: #17506b;
    font-size: 0.95rem;
}

[dir="rtl"] .mobile-offcanvas-actions .btn {
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

[dir="rtl"] .mobile-offcanvas-languages .btn-group > .btn {
    text-align: right;
}

[dir="rtl"] .mobile-offcanvas-logo {
    margin-right: 0;
    margin-left: 0.75rem;
}

[dir="rtl"] .mobile-nav-offcanvas .offcanvas-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-nav-offcanvas .offcanvas-header .d-flex {
    flex-direction: row-reverse;
}

/* RTL Support Styles */

/* RTL Margin Utilities */
/* In RTL: me (margin-end) = left, ms (margin-start) = right */
[dir="rtl"] .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .me-4 {
    margin-right: 0 !important;
    margin-left: 1.5rem !important;
}

[dir="rtl"] .me-5 {
    margin-right: 0 !important;
    margin-left: 3rem !important;
}

[dir="rtl"] .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

[dir="rtl"] .ms-4 {
    margin-left: 0 !important;
    margin-right: 1.5rem !important;
}

[dir="rtl"] .ms-5 {
    margin-left: 0 !important;
    margin-right: 3rem !important;
}

/* RTL Padding Utilities */
[dir="rtl"] .pe-1 {
    padding-right: 0 !important;
    padding-left: 0.25rem !important;
}

[dir="rtl"] .pe-2 {
    padding-right: 0 !important;
    padding-left: 0.5rem !important;
}

[dir="rtl"] .pe-3 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

[dir="rtl"] .ps-1 {
    padding-left: 0 !important;
    padding-right: 0.25rem !important;
}

[dir="rtl"] .ps-2 {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}

[dir="rtl"] .ps-3 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

/* RTL Navigation */

[dir="rtl"] .auth-buttons {
    flex-direction: row-reverse;
}

/* RTL Footer */
[dir="rtl"] .footer-contact-item {
    text-align: right;
}

[dir="rtl"] .footer-post {
}

/* RTL Search and User Actions */
[dir="rtl"] .search-container {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .user-actions {
    margin-left: 0;
    margin-right: 1rem;
}

/* RTL User Dropdown */
[dir="rtl"] .user-dropdown-menu .dropdown-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .user-dropdown-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .user-name {
    margin-left: 0;
    margin-right: 8px;
}

/* RTL Specific Navbar Adjustments */
[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}

/* RTL WhatsApp Button */
[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 40px;
}

@media screen and (max-width: 768px) {
    [dir="rtl"] .whatsapp-float {
        right: auto;
        left: 20px;
    }
}
