/* RTL (Right-to-Left) Styles for Arabic */

body.ar {
    direction: rtl;
    text-align: right;
}

/* Header RTL */
.ar .navbar {
    flex-direction: row-reverse;
}

.ar .nav-menu {
    flex-direction: row-reverse;
}

.ar .nav-right {
    flex-direction: row-reverse;
}

.ar .language-switcher {
    flex-direction: row-reverse;
}

/* Mobile Menu RTL */
.ar .mobile-menu {
    right: auto;
    left: -300px;
}

.ar .mobile-menu.active {
    left: 0;
}

.ar .mobile-menu-header {
    flex-direction: row-reverse;
}

/* Hero Section RTL */
.ar .hero-text {
    text-align: center; /* Keep center for hero */
}

/* Categories RTL */
.ar .category-info {
    left: auto;
    right: 20px;
}

/* Products RTL */
.ar .product-price {
    flex-direction: row-reverse;
}

/* Blog RTL */
.ar .blog-meta {
    flex-direction: row-reverse;
}

/* Footer RTL */
.ar .footer-bottom-content {
    flex-direction: row-reverse;
}

.ar .social-links {
    flex-direction: row-reverse;
}

.ar .newsletter-form {
    flex-direction: row-reverse;
}

.ar .features-grid {
    direction: rtl;
}

.ar .feature-item {
    flex-direction: row-reverse;
    text-align: right;
}

/* Icons RTL adjustments */
.ar .cart-count {
    right: auto;
    left: -8px;
}

.ar .next-btn {
    transform: scaleX(-1);
}

/* Typography adjustments for Arabic */
.ar h1, .ar h2, .ar h3, .ar h4, .ar h5, .ar h6 {
    font-weight: 600;
}

.ar .hero-title {
    font-weight: 700;
    line-height: 1.3;
}

.ar .nav-link {
    font-weight: 500;
}

/* Spacing adjustments for Arabic text */
.ar .hero-subtitle {
    letter-spacing: 0.5px;
}

.ar .hero-btn {
    letter-spacing: 0.5px;
}

/* Grid RTL adjustments */
.ar .categories-grid {
    direction: rtl;
}

.ar .products-grid {
    direction: rtl;
}

.ar .blog-grid {
    direction: rtl;
}

.ar .instagram-grid {
    direction: rtl;
}

.ar .footer-grid {
    direction: rtl;
}

/* Form RTL */
.ar .newsletter-form input {
    text-align: right;
}

/* Mobile Menu RTL */
.ar .mobile-menu {
    right: auto;
    left: -300px;
}

.ar .mobile-menu.active {
    left: 0;
    right: auto;
}

/* Responsive RTL adjustments */
@media (max-width: 968px) {
    .ar .mobile-menu-toggle {
        order: -1;
    }
    
    .ar .nav-right {
        order: 1;
    }
}

@media (max-width: 640px) {
    .ar .footer-grid {
        text-align: center;
    }
    
    .ar .feature-item {
        text-align: center;
        flex-direction: column;
    }
    
    .ar .social-links {
        justify-content: center;
    }
}

/* Arabic number styles */
.ar .cart-count,
.ar .current-price,
.ar .old-price {
    font-family: var(--font-primary); /* Keep English numbers */
}

/* Ensure proper text alignment for mixed content */
.ar .product-info h3,
.ar .blog-content h3,
.ar .category-info h3 {
    text-align: right;
}

.ar .section-header {
    text-align: center;
}

/* Placeholder text RTL */
.ar .placeholder-image {
    font-family: var(--font-primary);
}

/* Button hover effects RTL */
.ar .hero-btn:hover {
    transform: translateY(-2px);
}

.ar .product-item:hover {
    transform: translateY(-5px);
}

.ar .category-item:hover {
    transform: translateY(-5px);
}

.ar .blog-item:hover {
    transform: translateY(-5px);
}

.ar .instagram-item:hover {
    transform: scale(1.05);
}

/* Geometric shapes adjustments for RTL */
.ar .shape-1 {
    left: auto;
    right: 10%;
}

.ar .shape-2 {
    left: auto;
    right: 15%;
}

.ar .shape-3 {
    right: auto;
    left: 20%;
}

.ar .shape-4 {
    right: auto;
    left: 10%;
}

.ar .shape-5 {
    left: auto;
    right: 60%;
}

.ar .shape-6 {
    right: auto;
    left: 40%;
}

.ar .shape-7 {
    left: auto;
    right: 30%;
}

.ar .shape-8 {
    right: auto;
    left: 30%;
}

/* Back to Top Button RTL */
.ar .back-to-top {
    right: auto !important;
    left: 30px !important;
}

/* Bottom Navigation RTL */
.ar .bottom-nav {
    direction: rtl;
}

.ar .bottom-nav-content {
    flex-direction: row-reverse;
}

/* ================================
   PRODUCT DETAILS RTL STYLES
   ================================ */

.ar .product-main {
    direction: rtl;
}

.ar .thumbnails {
    direction: rtl;
}

.ar .product-price .currency {
    margin-right: 0;
    margin-left: 5px;
}

.ar .size-options,
.ar .color-options {
    direction: rtl;
}

.ar .product-actions {
    direction: rtl;
}

.ar .add-to-cart-btn {
    flex-direction: row-reverse;
}

.ar .whatsapp-btn {
    flex-direction: row-reverse;
}

.ar .meta-item {
    direction: rtl;
    text-align: right;
}

.ar .tab-headers {
    direction: rtl;
}

.ar .tab-content {
    direction: rtl;
    text-align: right;
}

.ar .additional-info-table {
    direction: rtl;
}

.ar .additional-info-table td:first-child {
    text-align: right;
}

.ar .modal-close {
    right: auto;
    left: 0;
}

@media (max-width: 768px) {
    .ar .close-btn {
        right: auto;
        left: 15px;
    }
}

/* ================================
   CHECKOUT PAGE RTL STYLES
   ================================ */

.ar .checkout-layout {
    direction: rtl;
}

.ar .form-row {
    direction: rtl;
}

.ar .info-icon {
    right: auto;
    left: 15px;
}

.ar .form-label {
    left: auto;
    right: 12px;
}

.ar .shipping-name,
.ar .payment-name {
    margin-left: 0;
    margin-right: 12px;
}

.ar .discount-input {
    direction: rtl;
}

.ar .cart-item {
    direction: rtl;
}

.ar .item-quantity {
    right: auto;
    left: -8px;
}

.ar .total-row {
    direction: rtl;
}

.ar .payment-icons {
    margin-left: 0;
    margin-right: 30px;
}

@media (max-width: 768px) {
    .ar .payment-icons {
        margin-right: 0;
        margin-left: 0;
    }
}

.ar .bottom-nav-item span {
    font-family: 'Tajawal', sans-serif;
}

@media (max-width: 768px) {
    .ar .back-to-top {
        left: 20px !important;
        right: auto !important;
        bottom: 80px !important; /* Match the main CSS */
    }
}