/* RTL Support for Arabic Stores */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Avenir Next World Arabic Font for RTL */
[dir="rtl"] * {
    font-family: 'Avenir Next World Arabic', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

[dir="rtl"] body {
    font-family: 'Avenir Next World Arabic', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    direction: rtl;
    text-align: right;
}

/* RTL Navigation - Fixed Order */
[dir="rtl"] .navbar-nav {
    flex-direction: row !important;
}

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

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

[dir="rtl"] .navbar-nav .nav-link i {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* RTL Header */
[dir="rtl"] .store-header .col-md-6:first-child {
    text-align: right !important;
}

[dir="rtl"] .store-header .col-md-6:last-child {
    text-align: left !important;
}

[dir="rtl"] .store-header .d-flex.justify-content-end {
    justify-content: flex-start !important;
}

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

/* RTL Navigation Brand */
[dir="rtl"] .navbar-brand {
    margin-right: 0 !important;
    margin-left: 2rem !important;
}

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

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

/* RTL Search and Cart */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .cart-icon {
    margin-left: 1rem !important;
    margin-right: 0 !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;
}

/* RTL Footer */
[dir="rtl"] .store-footer .text-end {
    text-align: left !important;
}

[dir="rtl"] .store-footer .social-links a {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}

/* RTL Language Switcher */
[dir="rtl"] .language-switcher .dropdown-toggle {
    text-align: right;
}

[dir="rtl"] .language-switcher .dropdown-item {
    text-align: right;
}

/* RTL Currency Badge */
[dir="rtl"] .currency-badge {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

/* RTL Top Bar */
[dir="rtl"] .top-bar {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .top-bar .d-flex.justify-content-between {
    flex-direction: row-reverse;
}

/* RTL Announcement Bar */
[dir="rtl"] .announcement-bar {
    direction: rtl;
    text-align: right;
}

/* RTL Responsive */
@media (max-width: 768px) {
    [dir="rtl"] .navbar-nav {
        flex-direction: column !important;
        text-align: right;
    }
    
    [dir="rtl"] .store-header .row {
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .store-header .col-md-6:first-child {
        text-align: center !important;
    }
    
    [dir="rtl"] .store-header .col-md-6:last-child {
        text-align: center !important;
    }
    
    [dir="rtl"] .navbar-toggler {
        margin-left: 0;
        margin-right: auto;
    }
    
    [dir="rtl"] .navbar-brand {
        margin-right: 0;
        margin-left: 1rem;
    }
}

/* RTL Button Groups */
[dir="rtl"] .btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

[dir="rtl"] .btn-group > .btn:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* RTL Dropdowns */
[dir="rtl"] .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
}

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

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

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

[dir="rtl"] .dropdown-item i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .dropdown-toggle::after {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* RTL Forms */
[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .form-text {
    text-align: right;
}

/* RTL Tables */
[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

/* RTL Alerts */
[dir="rtl"] .alert {
    text-align: right;
}

/* RTL Modals */
[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

[dir="rtl"] .modal-footer {
    justify-content: flex-start;
}

/* RTL Pagination */
[dir="rtl"] .pagination {
    justify-content: flex-start;
}

/* RTL Breadcrumbs */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/");
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* RTL Progress Bars */
[dir="rtl"] .progress-bar {
    float: right;
}

/* RTL Badges */
[dir="rtl"] .badge {
    direction: rtl;
}

/* RTL Tooltips */
[dir="rtl"] .tooltip {
    direction: rtl;
}

/* RTL Popovers */
[dir="rtl"] .popover {
    direction: rtl;
}

/* RTL Carousels */
[dir="rtl"] .carousel-control-prev {
    right: 0;
    left: auto;
}

[dir="rtl"] .carousel-control-next {
    left: 0;
    right: auto;
}

/* RTL Accordion */
[dir="rtl"] .accordion-button {
    text-align: right;
}

[dir="rtl"] .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
}

/* RTL List Groups */
[dir="rtl"] .list-group-item {
    text-align: right;
}

/* RTL Input Groups */
[dir="rtl"] .input-group-text {
    border-left: 0;
    border-right: 1px solid #ced4da;
}

[dir="rtl"] .input-group > .form-control:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

[dir="rtl"] .input-group > .form-control:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* RTL Support - Footer Section */

/* Footer RTL Direction */
.store-footer[dir="rtl"],
.store-footer[lang="ar"],
.store-footer[lang="fa"],
.store-footer[lang="he"],
.store-footer[lang="ur"] {
    direction: rtl;
    text-align: right;
}

/* Footer RTL Typography */
.store-footer[dir="rtl"] h5,
.store-footer[dir="rtl"] h6,
.store-footer[lang="ar"] h5,
.store-footer[lang="ar"] h6,
.store-footer[lang="fa"] h5,
.store-footer[lang="fa"] h6,
.store-footer[lang="he"] h5,
.store-footer[lang="he"] h6,
.store-footer[lang="ur"] h5,
.store-footer[lang="ur"] h6 {
    font-family: var(--footer-rtl-font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
    text-align: right;
}

.store-footer[dir="rtl"] p,
.store-footer[dir="rtl"] div,
.store-footer[lang="ar"] p,
.store-footer[lang="ar"] div,
.store-footer[lang="fa"] p,
.store-footer[lang="fa"] div,
.store-footer[lang="he"] p,
.store-footer[lang="he"] div,
.store-footer[lang="ur"] p,
.store-footer[lang="ur"] div {
    font-family: var(--footer-rtl-text-font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
    text-align: right;
}

/* Footer RTL Layout Adjustments */
.store-footer[dir="rtl"] .row > div,
.store-footer[lang="ar"] .row > div,
.store-footer[lang="fa"] .row > div,
.store-footer[lang="he"] .row > div,
.store-footer[lang="ur"] .row > div {
    text-align: right;
}

/* Footer RTL Navigation Links */
.store-footer[dir="rtl"] .nav-links a:hover,
.store-footer[lang="ar"] .nav-links a:hover,
.store-footer[lang="fa"] .nav-links a:hover,
.store-footer[lang="he"] .nav-links a:hover,
.store-footer[lang="ur"] .nav-links a:hover {
    transform: translateX(-5px);
}

.store-footer[dir="rtl"] .nav-links a::before,
.store-footer[lang="ar"] .nav-links a::before,
.store-footer[lang="fa"] .nav-links a::before,
.store-footer[lang="he"] .nav-links a::before,
.store-footer[lang="ur"] .nav-links a::before {
    right: 0;
    left: auto;
}

.store-footer[dir="rtl"] .nav-links a:hover::before,
.store-footer[lang="ar"] .nav-links a:hover::before,
.store-footer[lang="fa"] .nav-links a:hover::before,
.store-footer[lang="he"] .nav-links a:hover::before,
.store-footer[lang="ur"] .nav-links a:hover::before {
    width: 100%;
}

/* Footer RTL Social Navigation */
.store-footer[dir="rtl"] .social-nav,
.store-footer[lang="ar"] .social-nav,
.store-footer[lang="fa"] .social-nav,
.store-footer[lang="he"] .social-nav,
.store-footer[lang="ur"] .social-nav {
    justify-content: flex-start;
}

/* Footer RTL Search Navigation */
.store-footer[dir="rtl"] .search-nav input,
.store-footer[lang="ar"] .search-nav input,
.store-footer[lang="fa"] .search-nav input,
.store-footer[lang="he"] .search-nav input,
.store-footer[lang="ur"] .search-nav input {
    padding-left: 3rem;
    padding-right: 1rem;
    text-align: right;
}

.store-footer[dir="rtl"] .search-nav button,
.store-footer[lang="ar"] .search-nav button,
.store-footer[lang="fa"] .search-nav button,
.store-footer[lang="he"] .search-nav button,
.store-footer[lang="ur"] .search-nav button {
    left: 0.5rem;
    right: auto;
}

/* Footer RTL Language Navigation */
.store-footer[dir="rtl"] .language-nav,
.store-footer[lang="ar"] .language-nav,
.store-footer[lang="fa"] .language-nav,
.store-footer[lang="he"] .language-nav,
.store-footer[lang="ur"] .language-nav {
    justify-content: flex-start;
}

/* Footer RTL Pagination */
.store-footer[dir="rtl"] .pagination-nav,
.store-footer[lang="ar"] .pagination-nav,
.store-footer[lang="fa"] .pagination-nav,
.store-footer[lang="he"] .pagination-nav,
.store-footer[lang="ur"] .pagination-nav {
    justify-content: center;
}

/* Footer RTL Breadcrumb */
.store-footer[dir="rtl"] .breadcrumb-nav,
.store-footer[lang="ar"] .breadcrumb-nav,
.store-footer[lang="fa"] .breadcrumb-nav,
.store-footer[lang="he"] .breadcrumb-nav,
.store-footer[lang="ur"] .breadcrumb-nav {
    justify-content: flex-start;
}

/* Footer RTL Column Order */
.store-footer[dir="rtl"][data-columns="2"] .row > div:first-child,
.store-footer[lang="ar"][data-columns="2"] .row > div:first-child,
.store-footer[lang="fa"][data-columns="2"] .row > div:first-child,
.store-footer[lang="he"][data-columns="2"] .row > div:first-child,
.store-footer[lang="ur"][data-columns="2"] .row > div:first-child {
    order: 2;
}

.store-footer[dir="rtl"][data-columns="2"] .row > div:last-child,
.store-footer[lang="ar"][data-columns="2"] .row > div:last-child,
.store-footer[lang="fa"][data-columns="2"] .row > div:last-child,
.store-footer[lang="he"][data-columns="2"] .row > div:last-child,
.store-footer[lang="ur"][data-columns="2"] .row > div:last-child {
    order: 1;
}

/* Footer RTL Grid System */
.store-footer[dir="rtl"][data-grid="css-grid"] .row,
.store-footer[lang="ar"][data-grid="css-grid"] .row,
.store-footer[lang="fa"][data-grid="css-grid"] .row,
.store-footer[lang="he"][data-grid="css-grid"] .row,
.store-footer[lang="ur"][data-grid="css-grid"] .row {
    direction: rtl;
}

/* Footer RTL Mobile Adjustments */
@media (max-width: 768px) {
    .store-footer[dir="rtl"] .social-nav,
    .store-footer[lang="ar"] .social-nav,
    .store-footer[lang="fa"] .social-nav,
    .store-footer[lang="he"] .social-nav,
    .store-footer[lang="ur"] .social-nav {
        justify-content: center;
    }
    
    .store-footer[dir="rtl"] .nav-links,
    .store-footer[lang="ar"] .nav-links,
    .store-footer[lang="fa"] .nav-links,
    .store-footer[lang="he"] .nav-links,
    .store-footer[lang="ur"] .nav-links {
        text-align: center;
    }
    
    .store-footer[dir="rtl"] .breadcrumb-nav,
    .store-footer[lang="ar"] .breadcrumb-nav,
    .store-footer[lang="fa"] .breadcrumb-nav,
    .store-footer[lang="he"] .breadcrumb-nav,
    .store-footer[lang="ur"] .breadcrumb-nav {
        justify-content: center;
    }
    
    .store-footer[dir="rtl"] .language-nav,
    .store-footer[lang="ar"] .language-nav,
    .store-footer[lang="fa"] .language-nav,
    .store-footer[lang="he"] .language-nav,
    .store-footer[lang="ur"] .language-nav {
        justify-content: center;
    }
}

/* Footer RTL Print Styles */
@media print {
    .store-footer[dir="rtl"],
    .store-footer[lang="ar"],
    .store-footer[lang="fa"],
    .store-footer[lang="he"],
    .store-footer[lang="ur"] {
        direction: rtl;
        text-align: right;
    }
}

/* Footer RTL High Contrast */
@media (prefers-contrast: high) {
    .store-footer[dir="rtl"],
    .store-footer[lang="ar"],
    .store-footer[lang="fa"],
    .store-footer[lang="he"],
    .store-footer[lang="ur"] {
        border-right: 2px solid currentColor;
        border-left: none;
    }
}

/* Footer RTL Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .store-footer[dir="rtl"] .nav-links a:hover,
    .store-footer[lang="ar"] .nav-links a:hover,
    .store-footer[lang="fa"] .nav-links a:hover,
    .store-footer[lang="he"] .nav-links a:hover,
    .store-footer[lang="ur"] .nav-links a:hover {
        transform: none;
    }
}








