/* ============================================================
   ITQAAN E-COMMERCE | RTL (Arabic) Overrides
   ============================================================ */

/* Import Arabic-friendly fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@300;400;500;600;700&display=swap');

/* Base RTL — prevent horizontal overflow */
html[dir="rtl"],
html[dir="rtl"] body {
    overflow-x: hidden;
    max-width: 100vw;
}

html[dir="rtl"] body {
    font-family: 'Noto Kufi Arabic', 'Montserrat', -apple-system, sans-serif;
    text-align: right;
}

/* Serif font override for Arabic */
html[dir="rtl"] .hero__content h1,
html[dir="rtl"] .section-title,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 {
    font-family: 'Noto Kufi Arabic', 'Playfair Display', Georgia, serif;
}

/* Nav — keep LTR layout so hamburger stays left, cart stays right */
html[dir="rtl"] .site-nav { direction: ltr; }
html[dir="rtl"] .mobile-menu { direction: rtl; text-align: center; }
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
html[dir="rtl"] .mobile-lang-dropdown { left: auto; right: 0; }

/* Breadcrumbs */
html[dir="rtl"] .breadcrumbs { direction: rtl; }
html[dir="rtl"] .breadcrumbs__sep { transform: scaleX(-1); display: inline-block; }

/* Form elements */
html[dir="rtl"] .form-input,
html[dir="rtl"] .form-textarea,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"] {
    direction: ltr;
    text-align: left;
}

/* Buttons */
html[dir="rtl"] .btn svg { margin-left: 8px; margin-right: 0; }

/* Cart sidebar — slide from left in RTL */
html[dir="rtl"] .cart-sidebar { right: auto; left: 0; transform: translateX(-100%); }
html[dir="rtl"] .cart-open .cart-sidebar { transform: translateX(0); }
html[dir="rtl"] .cart-sidebar__header { flex-direction: row-reverse; }
html[dir="rtl"] .cart-item { direction: rtl; }
html[dir="rtl"] .cart-item__remove { margin-left: 0; margin-right: auto; }

/* Cart page */
html[dir="rtl"] .cart-table__item { direction: rtl; }
html[dir="rtl"] .cart-table__right { text-align: left; }
html[dir="rtl"] .cart-summary__row { direction: rtl; }

/* Product grid */
html[dir="rtl"] .product-card__badge { right: auto; left: 12px; }

/* Product detail */
html[dir="rtl"] .product-detail__info { text-align: right; }
html[dir="rtl"] .qty-selector { direction: ltr; }

/* Category filter — keep horizontal scroll working */
html[dir="rtl"] .category-filter { direction: rtl; }

/* Account tabs */
html[dir="rtl"] .account-sidebar { border-right: none; border-left: 1px solid var(--border-color); }
html[dir="rtl"] .account-sidebar a { padding-left: 0; padding-right: 16px; }

/* Profile / Checkout grids */
html[dir="rtl"] .profile-grid { direction: rtl; }
html[dir="rtl"] .checkout-grid { direction: rtl; }
html[dir="rtl"] .form-row { direction: rtl; }

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

/* Order confirm */
html[dir="rtl"] .order-confirm { text-align: center; }

/* Details/FAQ */
html[dir="rtl"] details summary { padding-right: 0; padding-left: 20px; }
html[dir="rtl"] details summary::after { right: auto; left: 0; }

/* Referral / Gift codes — keep LTR */
html[dir="rtl"] .gift-code,
html[dir="rtl"] .referral-code { direction: ltr; text-align: center; }

/* Letter spacing adjustments (less spacing for Arabic) */
html[dir="rtl"] .nav-logo { letter-spacing: 4px; }
html[dir="rtl"] .nav-logo small { letter-spacing: 0; }
html[dir="rtl"] .nav-links a { letter-spacing: 0; }

/* Notification toasts */
html[dir="rtl"] .toast { direction: rtl; }

/* Social icons */
html[dir="rtl"] .social-icons { direction: ltr; }

/* Hero content */
html[dir="rtl"] .hero__content { direction: rtl; }

/* Container sections */
html[dir="rtl"] .page-header { direction: rtl; }
html[dir="rtl"] .container { direction: rtl; }
html[dir="rtl"] .section-padding { direction: rtl; }
