/**
 * OTOEKO RTL (Right-to-Left) Override — Arabic language support
 * Loaded conditionally when lang=ar
 */

/* Font family override for Arabic */
html[dir="rtl"] body,
html[dir="rtl"] .site-header,
html[dir="rtl"] .site-footer,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] button {
    font-family: 'Noto Sans Arabic', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Text alignment */
html[dir="rtl"] body {
    text-align: right;
}

/* Flexbox direction reversal for key layouts */
html[dir="rtl"] .top-bar-inner,
html[dir="rtl"] .header-main-inner,
html[dir="rtl"] .header-nav-inner,
html[dir="rtl"] .catalog-breadcrumb,
html[dir="rtl"] .pd-page-top,
html[dir="rtl"] .checkout-main {
    direction: rtl;
}

/* Search bar */
html[dir="rtl"] .search-bar input {
    text-align: right;
    padding-right: 1rem;
    padding-left: 3rem;
}
html[dir="rtl"] .search-bar button {
    right: auto;
    left: 0;
}

/* Breadcrumb chevrons flip */
html[dir="rtl"] .catalog-breadcrumb-sep i {
    transform: scaleX(-1);
}

/* Product grid card text */
html[dir="rtl"] .product-card {
    text-align: right;
}

/* Cart and mini-cart */
html[dir="rtl"] .mini-cart-drawer {
    right: auto !important;
    left: 0 !important;
    transform: translateX(-100%) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    border-radius: 0 20px 20px 0;
}
html[dir="rtl"] .mini-cart-drawer.active {
    transform: translateX(0) !important;
}

/* Toast notifications */
html[dir="rtl"] #otoeko-toast-container {
    right: auto;
    left: 1.5rem;
}

/* Margin/padding utilities that need flipping */
html[dir="rtl"] .ml-auto { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .mr-auto { margin-right: 0; margin-left: auto; }

/* Footer */
html[dir="rtl"] .footer-content {
    direction: rtl;
}
