/* RTL (Right-to-Left) Support for Arabic */

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

/* Header adjustments */
body.rtl .header-content {
    flex-direction: row-reverse;
}

body.rtl .nav-menu {
    flex-direction: row-reverse;
}

body.rtl .language-switcher .dropdown-content {
    right: auto;
    left: 0;
}

/* Grid adjustments */
body.rtl .grid {
    direction: rtl;
}

/* Form adjustments */
body.rtl .form-control {
    text-align: right;
}

body.rtl .form-group label {
    text-align: right;
}

/* Button adjustments */
body.rtl .btn {
    text-align: center;
}

/* Cart adjustments */
body.rtl .basket-item {
    flex-direction: row-reverse;
}

body.rtl .quantity-controls {
    flex-direction: row-reverse;
}

/* Footer adjustments */
body.rtl .footer-content {
    direction: rtl;
}

body.rtl .footer-section {
    text-align: right;
}

/* Order summary adjustments */
body.rtl .order-total {
    text-align: left;
}

/* Pagination adjustments */
body.rtl .pagination {
    flex-direction: row-reverse;
}

/* Card adjustments */
body.rtl .card {
    text-align: right;
}

/* Filter adjustments */
body.rtl .filter-group {
    flex-direction: row-reverse;
}

/* Mobile menu adjustments */
@media (max-width: 768px) {
    body.rtl .nav-menu {
        text-align: right;
    }
    
    body.rtl .nav-menu a {
        text-align: right;
    }
}

/* Dropdown adjustments for RTL */
body.rtl .dropdown-content {
    left: 0;
    right: auto;
}

/* Text alignment for specific elements */
body.rtl .hero {
    text-align: center; /* Keep hero centered */
}

body.rtl .section-title {
    text-align: center; /* Keep section titles centered */
}

/* Price alignment */
body.rtl .price {
    text-align: right;
}

/* Cart icon positioning */
body.rtl .cart-count {
    right: auto;
    left: -5px;
}

/* Basket item specific adjustments */
body.rtl .basket-item img {
    margin-left: 1rem;
    margin-right: 0;
}

/* Order information adjustments */
body.rtl .order-summary {
    text-align: right;
}

/* Contact form adjustments */
body.rtl .contact-info {
    text-align: right;
}

/* Arabic font improvements */
body.rtl.ar {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    line-height: 1.8; /* Better line height for Arabic */
}

/* Improve Arabic text rendering in cards */
body.rtl.ar .card h3,
body.rtl.ar .card p,
body.rtl.ar .section-title,
body.rtl.ar .hero h1 {
    font-weight: normal; /* Arabic text looks better with normal weight */
}

/* Better spacing for Arabic */
body.rtl.ar .nav-menu {
    gap: 1.5rem; /* Adjust spacing for Arabic text */
}

body.rtl.ar .btn {
    padding: 0.75rem 2.5rem; /* More padding for Arabic text */
}