/* ========================================
   MARN - RTL Support
   Arabic Language Adaptations
======================================== */

/* Import Arabic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --font-primary-ar: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading-ar: 'Tajawal', sans-serif;
}

html[dir="rtl"] body {
  font-family: var(--font-primary-ar);
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .btn,
html[dir="rtl"] .nav-link {
  font-family: var(--font-heading-ar);
}

/* Navigation RTL */
html[dir="rtl"] .nav-menu {
  margin-right: auto;
  margin-left: 0;
}

html[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .nav-logo {
  margin-left: var(--space-md);
  margin-right: 0;
}

/* Search RTL */
html[dir="rtl"] .search-container .search-btn {
  right: auto;
  left: var(--space-xs);
}

html[dir="rtl"] .search-results {
  text-align: right;
}

/* Hero Section RTL */
html[dir="rtl"] .hero-text {
  direction: rtl;
}

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

/* About Section RTL */
html[dir="rtl"] .about-text p {
  text-align: justify;
}

html[dir="rtl"] .vm-icon {
  transform: scaleX(-1);
  /* Keep icon orientation correct if needed, usually icons don't flip unless directional */
}

/* Revert icon flip if it looks weird */
html[dir="rtl"] .vm-icon {
  transform: none;
}

/* Products Section RTL */
html[dir="rtl"] .section-title::after {
  left: 50%;
  transform: translateX(50%);
}



html[dir="rtl"] .product-card:hover .product-arrow {
  transform: translateX(-5px);
}

/* Contact Section RTL */
html[dir="rtl"] .contact-info {
  text-align: right;
}

html[dir="rtl"] .contact-icon {
  margin-left: var(--space-md);
  margin-right: 0;
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
  text-align: right;
}

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

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

html[dir="rtl"] .dropdown-toggle i {
  margin-left: 0;
  margin-right: var(--space-xs);
}

/* Product Specific RTL */
html[dir="rtl"] .breadcrumb-list li:not(:last-child)::after {
  margin-left: 0;
  margin-right: var(--space-sm);
  content: '/';
  /* Or maybe '\' or just keep '/' */
}

/* Search box in products */
html[dir="rtl"] .search-box input {
  padding-left: 50px;
  padding-right: var(--space-md);
}

html[dir="rtl"] .search-btn {
  right: auto;
  left: var(--space-xs);
}

/* Badges */
html[dir="rtl"] .product-badge {
  right: auto;
  left: var(--space-sm);
}

/* Product Specs */
html[dir="rtl"] .spec-item {
  flex-direction: row;
}

/* Close buttons */
html[dir="rtl"] .modal-close {
  margin-right: auto;
  margin-left: 0;
}

/* Flip arrow icons mostly */
html[dir="rtl"] .fa-arrow-right:before {
  content: "\f060";
  /* arrow-left */
}

html[dir="rtl"] .fa-chevron-right:before {
  content: "\f053";
  /* chevron-left */
}

/* Adjust margins generally if using margin-left/right explicitly in main css */
/* Since CSS variables don't swap automatically, we might need manual overrides */

/* Removed incorrect list-view override */