/* ===== RTL Overrides for Arabic Pages ===== */

/* Body direction */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* Company name stays LTR */
[dir="rtl"] .site-name {
  direction: ltr;
  unicode-bidi: plaintext;
}

/* Navigation: reverse order of items */
[dir="rtl"] header nav {
  flex-direction: row-reverse;
}

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

/* Nav margin-left on lang switcher → margin-right */
[dir="rtl"] .lang-switcher {
  margin-left: 0 !important;
  margin-right: 8px !important;
}

/* Hero section */
[dir="rtl"] .product-hero h1,
[dir="rtl"] .product-hero p {
  direction: rtl;
}

/* Buttons margin direction */
[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-secondary {
  margin: 8px 0 8px 8px;
}

/* Trust cards: border-right instead of border-left */
[dir="rtl"] .trust-item,
[dir="rtl"] [style*="border-left:4px solid #25d366"] {
  border-left: none !important;
  border-right: 4px solid #25d366 !important;
}

/* Lists: move bullet to right */
[dir="rtl"] .entry-content ul li,
[dir="rtl"] .entry-content ol li {
  padding-left: 0;
  padding-right: 20px;
}
[dir="rtl"] .entry-content ul li::before {
  left: auto;
  right: 0;
}

/* Breadcrumbs */
[dir="rtl"] .breadcrumb {
  direction: rtl;
}

/* Footer */
[dir="rtl"] footer .footer-brand {
  text-align: right !important;
}
[dir="rtl"] footer .footer-brand p {
  text-align: right !important;
}
[dir="rtl"] footer .footer-brand img {
  margin: 0 0 16px !important;
}
[dir="rtl"] footer .footer-info > div > div {
  text-align: right !important;
}

/* Float Contact Stack: move to LEFT side */
[dir="rtl"] #fc-stack {
  right: auto !important;
  left: 14px !important;
}

/* Float label: show on LEFT side of button */
[dir="rtl"] .fc-label {
  right: auto !important;
  left: 62px !important;
  transition: opacity 0.25s ease, left 0.25s ease;
}
[dir="rtl"] .fc-item:hover .fc-label {
  right: auto !important;
  left: 60px !important;
}

/* Float label arrow: flip to left */
[dir="rtl"] .fc-label::after {
  right: auto !important;
  left: -6px !important;
  border-left: none;
  border-right: 6px solid #333;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Mobile: float stack on left */
@media(max-width:480px) {
  [dir="rtl"] #fc-stack {
    right: auto !important;
    left: 8px !important;
  }
}

/* Mobile menu: RTL text alignment */
@media (max-width: 768px) {
  [dir="rtl"] header nav {
    flex-direction: column !important;
  }
  [dir="rtl"] header nav a {
    text-align: right !important;
  }
  [dir="rtl"] header nav .dropdown-menu a {
    padding-left: 20px !important;
    padding-right: 36px !important;
  }
  [dir="rtl"] .lang-dropdown a {
    padding-left: 20px !important;
    padding-right: 36px !important;
  }
  [dir="rtl"] .menu-toggle {
    margin-left: 0 !important;
    margin-right: auto !important;
  }
}

/* Float Form Panel: position on LEFT */
[dir="rtl"] #float-form-panel {
  right: auto !important;
  left: 14px !important;
}

/* Specs table wrapper: RTL scrolling */
[dir="rtl"] .specs-table-wrap {
  direction: ltr;
}
[dir="rtl"] .specs-table-wrap table {
  direction: rtl;
}

/* Product specs table: first column border */
[dir="rtl"] .specs-table th:first-child,
[dir="rtl"] .specs-table td:first-child {
  border-left: 1px solid #e0e0e0;
}

/* Mobile panel */
@media(max-width:480px) {
  [dir="rtl"] #float-form-panel {
    right: 0 !important;
    left: 0 !important;
  }
}

/* Quick Links list: align right */
[dir="rtl"] .footer-links {
  text-align: right !important;
}

/* Form placeholders should display RTL */
[dir="rtl"] input,
[dir="rtl"] textarea {
  text-align: right;
}

/* Footer form submit button alignment */
[dir="rtl"] .footer form button,
[dir="rtl"] #footer-quote-form button {
  align-self: flex-start;
}
