/* ==========================================================================
   MadaPower - RTL Specific CSS (Arabic)
   أنماط خاصة باللغة العربية (RTL)
   ========================================================================== */

body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

/* Flip icons that should be direction-aware */
body.rtl .nav-link .material-symbols-rounded,
body.rtl .nav-mobile-link .material-symbols-rounded {
    /* Keep original direction for icons */
}

/* Adjust icon directions for arrows */
body.rtl .feature-link .material-symbols-rounded,
body.rtl .service-link .material-symbols-rounded {
    transform: scaleX(-1);
}

body.rtl .breadcrumb .material-symbols-rounded {
    transform: scaleX(-1);
}

body.rtl .email-arrow {
    transform: scaleX(-1);
}

body.rtl .email-item:hover .email-arrow {
    transform: translateX(-4px) scaleX(-1);
}

/* Fix for cycle arrows in RTL */
body.rtl .cycle-arrow .material-symbols-rounded,
body.rtl .cycle-connector .material-symbols-rounded {
    transform: scaleX(-1);
}

/* Adjust spacing for RTL */
body.rtl .product-badge {
    inset-inline-start: 12px;
    inset-inline-end: auto;
}

body.rtl .product-category-badge {
    inset-inline-end: 12px;
    inset-inline-start: auto;
}

/* Numbers should remain LTR even in RTL */
body.rtl .price-value,
body.rtl .product-price,
body.rtl .stat-value,
body.rtl .cart-item-price,
body.rtl .subtotal-value,
body.rtl .stat-number,
body.rtl .checkout-item-total {
    direction: ltr;
    display: inline-block;
}

/* Phone numbers stay LTR */
body.rtl .top-bar-info span:nth-child(2),
body.rtl .info-value,
body.rtl .email-detail-phone {
    direction: ltr;
    unicode-bidi: embed;
}

/* Search input adjustments for RTL */
body.rtl .search-input {
    padding: 12px 44px 12px 40px;
}

body.rtl .search-icon {
    inset-inline-start: auto;
    inset-inline-end: 14px;
}

body.rtl .search-clear {
    inset-inline-end: auto;
    inset-inline-start: 12px;
}

/* Form inputs RTL */
body.rtl .form-input {
    text-align: right;
}

/* Toast slideIn animation in RTL */
body.rtl .toast {
    animation: slideInRTL var(--transition);
}

@keyframes slideInRTL {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Hero cards position in RTL */
body.rtl .hero-card-1 {
    left: auto;
    right: -10%;
}

body.rtl .hero-card-2 {
    right: auto;
    left: -10%;
}

body.rtl .hero-card-3 {
    left: auto;
    right: 5%;
}

/* Quantity selector in RTL */
body.rtl .quantity-selector {
    direction: ltr;
}

/* Fix text alignment for some elements */
body.rtl .text-start {
    text-align: right;
}

body.rtl .text-end {
    text-align: left;
}

/* Footer copyright in RTL */
body.rtl .footer-bottom {
    text-align: right;
}

/* Numbers in stats */
body.rtl .project-stat {
    direction: ltr;
}

body.rtl .project-stat .stat-label {
    direction: rtl;
    text-align: right;
}

/* Specs in RTL */
body.rtl .spec-item {
    text-align: right;
}

/* Better Arabic typography */
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6 {
    letter-spacing: 0;
}

body.rtl .section-badge {
    letter-spacing: 0;
}

/* Fix checkbox label in RTL */
body.rtl .checkbox-label {
    flex-direction: row-reverse;
}

/* Back to top in RTL */
body.rtl .back-to-top {
    inset-inline-end: 24px;
    inset-inline-start: auto;
}

/* Toast position in RTL */
body.rtl .toast-container {
    inset-inline-start: auto;
    inset-inline-end: 24px;
}
