/**
 * Onyshop RTL Styles (Arabic Support)
 * Chargé automatiquement quand dir="rtl"
 */

/* Base RTL */
html[dir="rtl"] {
  direction: rtl;
}

/* Police arabe */
html[dir="rtl"] body {
  font-family: 'Cairo', 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* Flexbox inversions */
html[dir="rtl"] .navbar .container,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .search-form,
html[dir="rtl"] .product-card,
html[dir="rtl"] .footer-grid,
html[dir="rtl"] .breadcrumb,
html[dir="rtl"] .form-row {
  flex-direction: row-reverse;
}

/* Marges et paddings */
html[dir="rtl"] .nav-link i,
html[dir="rtl"] .btn i {
  margin-right: 0;
  margin-left: 4px;
}

html[dir="rtl"] .mobile-menu-content a i {
  margin-right: 0;
  margin-left: 10px;
}

/* Logo */
html[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

/* Search form */
html[dir="rtl"] .search-form input {
  text-align: right;
  padding-left: 40px;
  padding-right: 16px;
}

html[dir="rtl"] .search-form button {
  left: 8px;
  right: auto;
}

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

html[dir="rtl"] .product-badge {
  left: auto;
  right: 10px;
}

/* Mobile menu */
html[dir="rtl"] .mobile-menu {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

html[dir="rtl"] .mobile-menu.open {
  transform: translateX(0);
}

/* Footer */
html[dir="rtl"] .footer-links {
  text-align: right;
}

/* Forms */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: right;
}

html[dir="rtl"] label {
  text-align: right;
  display: block;
}

/* Tables */
html[dir="rtl"] table {
  direction: rtl;
}

html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

/* Breadcrumb */
html[dir="rtl"] .breadcrumb-sep {
  transform: rotate(180deg);
}

/* Price display */
html[dir="rtl"] .price {
  direction: ltr;
  display: inline-block;
}

/* Icons in buttons - flip arrows */
html[dir="rtl"] .btn-back i,
html[dir="rtl"] .btn-next i {
  transform: scaleX(-1);
}

/* Dropdown menus */
html[dir="rtl"] .dropdown-menu {
  left: auto;
  right: 0;
}

/* Toast notifications */
html[dir="rtl"] .toast {
  left: 20px;
  right: auto;
}

/* Back to top button */
html[dir="rtl"] .back-to-top {
  left: 20px;
  right: auto;
}

/* Bottom nav */
html[dir="rtl"] .bottom-nav-items {
  flex-direction: row-reverse;
}

/* Dashboard sidebar */
html[dir="rtl"] .dashboard-sidebar {
  border-right: none;
  border-left: 1px solid var(--border);
}

/* Stats cards */
html[dir="rtl"] .stat-card {
  text-align: right;
}

html[dir="rtl"] .stat-card i {
  margin-left: 0;
  margin-right: auto;
}

/* Order status badges */
html[dir="rtl"] .status-badge i {
  margin-right: 0;
  margin-left: 4px;
}

/* Shop page */
html[dir="rtl"] .shop-header {
  text-align: right;
}

html[dir="rtl"] .shop-stats {
  flex-direction: row-reverse;
}

/* Product page */
html[dir="rtl"] .product-gallery {
  order: 2;
}

html[dir="rtl"] .product-details {
  order: 1;
  text-align: right;
}

/* Lang switcher */
.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 10px;
}

html[dir="rtl"] .lang-switcher {
  margin-left: 0;
  margin-right: 10px;
}

.lang-btn {
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
  background: rgba(0, 98, 51, 0.1);
}

/* Google Fonts import (add to header) */
/* @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap'); */
