/**
 * RTL stylesheet — loaded automatically when lang=ar
 * Mirrors layout for right-to-left reading direction
 */

/* ── Base direction ─────────────────────────────────────────── */
body { direction: rtl; text-align: right; }

/* ── Navigation ─────────────────────────────────────────────── */
.main-nav .container { flex-direction: row-reverse; }
.main-nav ul          { flex-direction: row-reverse; }
.breadcrumb           { flex-direction: row-reverse; }
.breadcrumb-sep       { transform: scaleX(-1); }

/* ── Top bar ────────────────────────────────────────────────── */
.top-bar .container { flex-direction: row-reverse; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero-slide-content { text-align: right; }
.hero-btns          { flex-direction: row-reverse; }

/* ── Product cards ──────────────────────────────────────────── */
.product-card-spec    { flex-direction: row-reverse; }
.product-card-actions { flex-direction: row-reverse; }
.product-cta-box      { flex-direction: row-reverse; }
.product-trust-row    { flex-direction: row-reverse; justify-content: flex-end; }

/* ── Product detail layout ──────────────────────────────────── */
.product-detail-layout { direction: rtl; }
.product-detail-tags   { flex-direction: row-reverse; justify-content: flex-end; }
.product-detail-meta   { flex-direction: row-reverse; }

/* ── Stats ──────────────────────────────────────────────────── */
.stats-grid    { direction: rtl; }
.stat-item     { direction: rtl; }

/* ── Quote band ─────────────────────────────────────────────── */
.quote-band-inner { flex-direction: row-reverse; }
.quote-trust      { text-align: right; }
.quote-trust-item { flex-direction: row-reverse; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer-grid    { direction: rtl; }
.footer-col ul  { text-align: right; }
.footer-social  { flex-direction: row-reverse; }
.footer-bottom  { flex-direction: row-reverse; }
.footer-brand   { text-align: right; }

/* ── Section heads ──────────────────────────────────────────── */
.section-head          { text-align: right; }
.section-head.centered { text-align: center; }
.section-head p        { margin: 0; }

/* ── Trust cards ────────────────────────────────────────────── */
.trust-card { text-align: right; }

/* ── Sector cards ───────────────────────────────────────────── */
.sector-card-footer { flex-direction: row-reverse; }

/* ── Category grid ──────────────────────────────────────────── */
.mcat-grid { direction: rtl; }

/* ── Page hero ──────────────────────────────────────────────── */
.page-hero .container { text-align: right; }
.page-hero h1         { text-align: right; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group label  { text-align: right; }
.qf-group label    { text-align: right; }
input, textarea, select { text-align: right; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-form-inner { flex-direction: row-reverse; }

/* ── RFQ modal ──────────────────────────────────────────────── */
#rfq-modal          { direction: rtl; text-align: right; }
#rfq-modal label    { text-align: right; }
#rfq-overlay > div  { direction: rtl; }

/* ── About ──────────────────────────────────────────────────── */
.about-list li         { padding: 8px 24px 8px 0; }
.about-list li::before { left: auto; right: 0; }

/* ── Buyer sidebar ──────────────────────────────────────────── */
.buyer-sidebar nav ul li a { border-left: none; border-right: 3px solid transparent; flex-direction: row-reverse; }
.buyer-sidebar nav ul li a.active { border-left-color: transparent; border-right-color: var(--b-amber); }
.buyer-sidebar-user { text-align: right; }
.buyer-sidebar-name,
.buyer-sidebar-label,
.buyer-sidebar-email { text-align: right; }

/* ── Buyer dashboard ────────────────────────────────────────── */
.bstat      { direction: rtl; text-align: right; }
.bstat-top  { flex-direction: row-reverse; }
.dash-hero-left { text-align: right; }
.dash-hero { flex-direction: row-reverse; }
.dash-quick-actions { flex-direction: row-reverse; }
.buyer-section-head { flex-direction: row-reverse; }
.buyer-section-head h2::before { margin-right: 0; margin-left: 8px; }

/* ── Chat ───────────────────────────────────────────────────── */
.chat-msg.admin-msg { align-self: flex-start; flex-direction: row; }
.chat-msg.buyer-msg { align-self: flex-end;   flex-direction: row-reverse; }
.chat-msg.admin-msg .msg-bubble { border-radius: 12px; border-bottom-left-radius: 4px; border-bottom-right-radius: 12px; }
.chat-msg.buyer-msg .msg-bubble { border-radius: 12px; border-bottom-right-radius: 4px; border-bottom-left-radius: 12px; }
.chat-input-row { flex-direction: row-reverse; }

/* ── News ───────────────────────────────────────────────────── */
.news-card-footer { flex-direction: row-reverse; }

/* ── Tables ─────────────────────────────────────────────────── */
.buyer-table th,
.buyer-table td  { text-align: right; }
.spec-key        { text-align: right; }
.spec-val        { text-align: right; }

/* ── Contact info ───────────────────────────────────────────── */
.contact-info-list li  { flex-direction: row-reverse; }
.contact-layout        { flex-direction: row-reverse; }

/* ── Specific Arabic font stack ─────────────────────────────── */
body[lang="ar"] {
    font-family: 'Segoe UI', 'Arial', 'Noto Sans Arabic',
                 'Cairo', Tahoma, sans-serif;
    letter-spacing: 0;
    line-height: 1.8;
}

/* ── Search form in nav ─────────────────────────────────────── */
.search-form { flex-direction: row-reverse; }
.search-form input { text-align: right; }
