/* RTL overrides for Arabic */

html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Sans Arabic', 'Poppins', sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    font-family: 'Noto Sans Arabic', 'League Spartan', sans-serif;
}

/* Phone numbers, emails — keep LTR */
html[dir="rtl"] .ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

/* Centered blocks stay centered */
html[dir="rtl"] .section-header,
html[dir="rtl"] .section-cta,
html[dir="rtl"] .shop-empty,
html[dir="rtl"] .cart-empty,
html[dir="rtl"] .about-milestone,
html[dir="rtl"] .hero-card--photo,
html[dir="rtl"] .shop-pagination {
    text-align: center;
}

html[dir="rtl"] .section-header--left,
html[dir="rtl"] .section-cta--left {
    text-align: right;
}

html[dir="rtl"] .client-logos-carousel {
    direction: ltr;
}

/* ========== HEADER ========== */
html[dir="rtl"] .header-top-inner,
html[dir="rtl"] .header-inner,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .footer-cta-inner,
html[dir="rtl"] .footer-bottom {
    direction: rtl;
}

html[dir="rtl"] .logo {
    margin-right: 0;
    margin-left: 12px;
    justify-content: flex-end;
}

html[dir="rtl"] .logo-img {
    object-position: right center;
}

html[dir="rtl"] .main-nav {
    margin-right: 0;
    margin-left: 12px;
    justify-content: flex-start;
}

html[dir="rtl"] .nav-cta {
    margin-left: 0;
    margin-right: 8px;
}

html[dir="rtl"] .nav-dropdown-menu {
    left: auto;
    right: 0;
    text-align: right;
}

html[dir="rtl"] .nav-dropdown-sub a {
    padding: 8px 28px 8px 16px !important;
}

html[dir="rtl"] .lang-switcher {
    margin-left: 0;
    margin-right: 12px;
}

html[dir="rtl"] .mobile-toggle {
    margin-right: 0;
    margin-left: 4px;
}

@media (min-width: 769px) {
    html[dir="rtl"] .logo {
        margin-left: 24px;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .logo {
        margin-left: 8px;
    }

    html[dir="rtl"] .nav-links {
        text-align: right;
    }

    html[dir="rtl"] .nav-cta {
        margin-right: 0 !important;
    }
}

/* ========== LAYOUT GRIDS ========== */
html[dir="rtl"] .hero-layout,
html[dir="rtl"] .shop-layout,
html[dir="rtl"] .pdp-layout,
html[dir="rtl"] .cart-layout,
html[dir="rtl"] .contact-layout,
html[dir="rtl"] .contact-cards,
html[dir="rtl"] .contact-card,
html[dir="rtl"] .split-layout,
html[dir="rtl"] .about-dual,
html[dir="rtl"] .faq-layout,
html[dir="rtl"] .cta-form-layout,
html[dir="rtl"] .about-cta,
html[dir="rtl"] .footer-grid,
html[dir="rtl"] .trust-items,
html[dir="rtl"] .category-grid,
html[dir="rtl"] .shop-grid,
html[dir="rtl"] .product-grid,
html[dir="rtl"] .features-grid,
html[dir="rtl"] .industries-grid,
html[dir="rtl"] .testimonials-grid,
html[dir="rtl"] .about-timeline,
html[dir="rtl"] .process-timeline,
html[dir="rtl"] .about-process-grid,
html[dir="rtl"] .about-vision-grid,
html[dir="rtl"] .about-metier-grid {
    direction: rtl;
}

/* ========== CONTENT ALIGNMENT ========== */
html[dir="rtl"] .pdp-breadcrumb,
html[dir="rtl"] .shop-toolbar,
html[dir="rtl"] .pdp-spec-row,
html[dir="rtl"] .cart-item,
html[dir="rtl"] .cart-items-header,
html[dir="rtl"] .about-milestone-body,
html[dir="rtl"] .process-timeline--images .process-step,
html[dir="rtl"] .process-timeline--images .about-process-step,
html[dir="rtl"] .feature-card,
html[dir="rtl"] .industry-card,
html[dir="rtl"] .product-card-body,
html[dir="rtl"] .shop-card-body,
html[dir="rtl"] .shop-sidebar-block,
html[dir="rtl"] .pdp-panel,
html[dir="rtl"] .pdp-description-content,
html[dir="rtl"] .product-description-content,
html[dir="rtl"] .contact-info,
html[dir="rtl"] .contact-form,
html[dir="rtl"] .faq-intro,
html[dir="rtl"] .cta-form-text,
html[dir="rtl"] .footer-brand,
html[dir="rtl"] .footer-col {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .process-timeline--images .process-step,
html[dir="rtl"] .process-timeline--images .about-process-step {
    text-align: right;
}

html[dir="rtl"] .faq-question {
    text-align: right;
}

/* Borders & spacing */
html[dir="rtl"] .industry-card {
    border-left: none;
    border-right: 4px solid var(--primary);
}

html[dir="rtl"] .about-mission-quote {
    border-left: none;
    border-right: 4px solid var(--primary);
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 28px 32px 28px 28px;
}

html[dir="rtl"] .footer-cat-sub {
    padding-left: 0;
    padding-right: 14px;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

html[dir="rtl"] .shop-category-sub {
    padding: 0 8px 0 0;
}

html[dir="rtl"] .shop-category-sub a {
    padding: 8px 24px 8px 12px;
}

html[dir="rtl"] .shop-category-count {
    text-align: left;
}

html[dir="rtl"] .pdp-description-content ul,
html[dir="rtl"] .product-description-content ul {
    padding-right: 1.25rem;
    padding-left: 0;
    margin-right: 0;
    margin-left: 0;
}

/* Mirror horizontal arrows only */
html[dir="rtl"] .category-link svg,
html[dir="rtl"] .shop-card-link svg,
html[dir="rtl"] .pdp-back svg,
html[dir="rtl"] .hero-actions .btn svg,
html[dir="rtl"] .about-cta-actions .btn svg,
html[dir="rtl"] .cta-form-section .btn svg,
html[dir="rtl"] .contact-form .btn svg {
    transform: scaleX(-1);
}

html[dir="rtl"] .about-timeline::before {
    transform: scaleX(-1);
}

html[dir="rtl"] .process-timeline--images .process-number,
html[dir="rtl"] .process-timeline--images .about-process-num {
    left: auto;
    right: 14px;
}

/* Forms */
html[dir="rtl"] input:not([type="checkbox"]):not([type="radio"]),
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}

html[dir="rtl"] .cart-qty-input,
html[dir="rtl"] .pdp-qty-row input {
    text-align: center;
}

/* WhatsApp float */
html[dir="rtl"] .whatsapp-float {
    left: 24px;
    right: auto;
}

@media (max-width: 768px) {
    html[dir="rtl"] .whatsapp-float {
        left: 16px;
        right: auto;
    }

    html[dir="rtl"] .about-milestone {
        text-align: center;
    }
}

html[dir="rtl"] .admin-header,
html[dir="rtl"] .admin-header-text,
html[dir="rtl"] .admin-dashboard,
html[dir="rtl"] .admin-toolbar,
html[dir="rtl"] .admin-quick-actions,
html[dir="rtl"] .admin-card-head,
html[dir="rtl"] .admin-stat-content,
html[dir="rtl"] .admin-table th,
html[dir="rtl"] .admin-table td,
html[dir="rtl"] .admin-form-bar-inner {
    direction: rtl;
    text-align: right;
}

@media (max-width: 1024px) {
    html[dir="rtl"] .admin-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    html[dir="rtl"] .admin-sidebar.open {
        transform: translateX(0);
    }
}

html[dir="rtl"] .admin-row-actions {
    direction: rtl;
}

html[dir="rtl"] .admin-search {
    direction: rtl;
}
