/*
 * RTL Stylesheet for Elegance Green Theme
 * Arabic and other RTL languages support
 */

/* Arabic Font Family */
html[lang="ar"] body,
html[lang="ar-SA"] body,
html[lang="ar-EG"] body,
body.rtl {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar-SA"] h1,
html[lang="ar-SA"] h2,
html[lang="ar-SA"] h3,
html[lang="ar-SA"] h4,
html[lang="ar-SA"] h5,
html[lang="ar-SA"] h6 {
    font-family: 'Cairo', 'Playfair Display', Georgia, serif;
}

/* Base RTL */
html[dir="rtl"] body,
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Header Top Bar */
.rtl .header-top {
    direction: rtl;
}

.rtl .header-top .container {
    flex-direction: row-reverse;
}

.rtl .header-top-left,
.rtl .header-top-right {
    flex-direction: row-reverse;
}

/* Header */
.rtl .header-inner {
    flex-direction: row-reverse;
}

.rtl .header-actions {
    flex-direction: row-reverse;
}

.rtl .header-top-left {
    flex-direction: row-reverse;
}

.rtl .header-top-right {
    flex-direction: row-reverse;
}

.rtl .header-contact {
    margin-left: 15px;
    margin-right: 0;
}

.rtl .nav-menu {
    flex-direction: row-reverse;
}

.rtl .nav-menu > li > a::after {
    left: auto;
    right: 0;
}

.rtl .sub-menu {
    left: auto;
    right: 0;
    text-align: right;
}

.rtl .sub-menu li a:hover {
    padding-left: var(--space-lg);
    padding-right: var(--space-xl);
}

/* Mobile Menu */
.rtl .mobile-menu {
    left: auto;
    right: -320px;
}

.rtl .mobile-menu.active {
    right: 0;
}

.rtl .mobile-menu-header {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl .mobile-nav-menu {
    text-align: right;
}

.rtl .mobile-nav-menu li {
    text-align: right;
}

.rtl .mobile-nav-menu a {
    text-align: right;
}

/* Hero Section */
.rtl .hero-modern {
    direction: rtl;
}

.rtl .hero-image-side {
    right: auto;
    left: 5%;
}

.rtl .hero-content-modern {
    margin-left: 0;
    margin-right: auto;
    max-width: 600px;
}

@media (min-width: 993px) {
    .rtl .hero-content-modern {
        padding-right: 0;
        padding-left: 52%;
        max-width: 100%;
    }
}

.rtl .hero-image-wrapper {
    flex-direction: row-reverse;
}

/* Flip floating cards to match RTL composition */
.rtl .hero-floating-card.card-1 {
    left: auto;
    right: -20px;
}

.rtl .hero-floating-card.card-2 {
    right: auto;
    left: -30px;
}

.rtl .hero-floating-card.card-3 {
    left: auto;
    right: 10%;
}

.rtl .hero-modern .container {
    position: relative;
    z-index: 3;
}

.rtl .hero-title-modern {
    line-height: 1.15;
}

@media (max-width: 992px) {
    .rtl .hero-image-side {
        right: auto;
        left: auto;
    }

    .rtl .hero-content-modern {
        text-align: right;
    }
}

.rtl .hero-content-modern {
    text-align: right;
}

.rtl .hero-buttons-modern {
    justify-content: flex-start;
}

.rtl .btn-modern svg {
    transform: rotate(180deg);
}

.rtl .hero-stats {
    justify-content: flex-start;
}

.rtl .hero-stats {
    justify-content: flex-start;
}

.rtl .hero-floating-card.card-1 {
    left: auto;
    right: 5%;
}

.rtl .hero-floating-card.card-2 {
    left: auto;
    right: 10%;
}

.rtl .hero-floating-card.card-3 {
    left: auto;
    right: 15%;
}

.rtl .hero-content {
    text-align: right;
}

.rtl .hero-buttons {
    justify-content: flex-start;
}

.rtl .hero-image {
    right: auto;
    left: -5%;
}

/* Product Cards */
.rtl .product-badges {
    left: auto;
    right: var(--space-md);
}

.rtl .product-actions {
    right: auto;
    left: var(--space-md);
    transform: translateX(-10px);
}

.rtl .product-card:hover .product-actions {
    transform: translateX(0);
}

/* Cart Count */
.rtl .cart-count {
    right: auto;
    left: 2px;
}

/* Footer */
.rtl .footer-grid {
    direction: rtl;
}

.rtl .footer-widget h5::after {
    left: auto;
    right: 0;
}

.rtl .footer-links a:hover {
    padding-left: 0;
    padding-right: var(--space-sm);
}

.rtl .footer-contact li {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl .social-links {
    flex-direction: row-reverse;
}

/* Breadcrumbs */
.rtl .breadcrumb {
    flex-direction: row-reverse;
}

/* Blog */
.rtl .blog-meta {
    flex-direction: row-reverse;
}

.rtl .read-more {
    flex-direction: row-reverse;
}

.rtl .read-more svg {
    transform: rotate(180deg);
}

/* Pagination */
.rtl .pagination {
    flex-direction: row-reverse;
}

/* Buttons */
.rtl .btn {
    flex-direction: row-reverse;
}

/* Forms */
.rtl input,
.rtl textarea,
.rtl select {
    text-align: right;
}

.rtl .form-label {
    text-align: right;
}

/* WooCommerce */
.rtl .woocommerce ul.products {
    direction: rtl;
}

.rtl .woocommerce div.product div.summary {
    padding-left: 0;
    padding-right: var(--space-2xl);
}

.rtl .woocommerce .woocommerce-breadcrumb {
    text-align: right;
}

.rtl .woocommerce-cart table.cart th,
.rtl .woocommerce-cart table.cart td {
    text-align: right;
}

/* Banner */
.rtl .banner-features {
    flex-direction: row-reverse;
}

.rtl .banner-feature {
    flex-direction: row-reverse;
}

/* Feature Cards */
.rtl .feature-card {
    text-align: right;
}

/* Section Header */
.rtl .section-header {
    text-align: right;
}

/* Sidebar */
.rtl .sidebar {
    padding-left: 0;
    padding-right: var(--space-2xl);
}

/* Back to Top */
.rtl .back-to-top {
    right: auto;
    left: var(--space-xl);
}

/* Newsletter */
.rtl .newsletter-form {
    flex-direction: row-reverse;
}

/* Testimonials */
.rtl .testimonial-author {
    flex-direction: row-reverse;
}

.rtl .testimonial-info {
    text-align: right;
}

/* Search Overlay */
.rtl .search-close {
    right: auto;
    left: 30px;
}

.rtl .search-form-overlay {
    flex-direction: row-reverse;
}

/* Category Overlay */
.rtl .category-overlay {
    text-align: right;
}

/* Post Navigation */
.rtl .post-navigation {
    flex-direction: row-reverse;
}

/* Comments */
.rtl .comment-list {
    padding-right: 0;
}

.rtl .comment-author {
    flex-direction: row-reverse;
}

/* Flex utilities */
.rtl .flex-between {
    flex-direction: row-reverse;
}

/* Grid adjustments */
@media (max-width: 992px) {
    .rtl .sidebar {
        padding-right: 0;
    }
}

/* Header Contact */
.rtl .header-contact {
    flex-direction: row-reverse;
}

/* Star Rating */
.rtl .product-rating {
    flex-direction: row-reverse;
}

.rtl .stars {
    flex-direction: row-reverse;
}

/* Price */
.rtl .product-price {
    flex-direction: row-reverse;
}

/* Quantity */
.rtl .quantity-wrapper {
    flex-direction: row-reverse;
}

.rtl .quantity-btn.minus {
    border-radius: 0 4px 4px 0;
}

.rtl .quantity-btn.plus {
    border-radius: 4px 0 0 4px;
}

/* Post Meta */
.rtl .post-meta {
    flex-direction: row-reverse;
}

.rtl .post-meta span {
    flex-direction: row-reverse;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tags */
.rtl .post-tags {
    text-align: right;
}

/* WooCommerce Messages */
.rtl .woocommerce-message,
.rtl .woocommerce-info,
.rtl .woocommerce-error {
    text-align: right;
    padding-left: 20px;
    padding-right: 50px;
}

.rtl .woocommerce-message::before,
.rtl .woocommerce-info::before,
.rtl .woocommerce-error::before {
    left: auto;
    right: 20px;
}

/* Widget */
.rtl .widget {
    text-align: right;
}

.rtl .widget-title {
    text-align: right;
}

/* Footer Bottom */
.rtl .footer-bottom-inner {
    flex-direction: row-reverse;
}

.rtl .payment-methods {
    flex-direction: row-reverse;
}

/* Mobile Product Cards Fix */
@media (max-width: 768px) {
    .rtl .products-grid,
    .rtl .woocommerce ul.products {
        direction: rtl;
    }
    
    .rtl .product-card,
    .rtl .woocommerce ul.products li.product {
        text-align: right;
    }
    
    .rtl .product-badges {
        left: auto;
        right: 6px;
    }
    
    .rtl .product-actions {
        right: auto;
        left: 6px;
    }
    
    .rtl .product-info {
        text-align: right;
    }
    
    .rtl .woocommerce ul.products li.product .price {
        text-align: right;
        direction: rtl;
    }
}

/* Shop Sidebar RTL */
.rtl .shop-sidebar {
    left: auto;
    right: -100%;
}

.rtl .shop-sidebar.active {
    right: 0;
}

.rtl .sidebar-close {
    right: auto;
    left: 15px;
}

.rtl .filter-list li a {
    flex-direction: row-reverse;
}

.rtl .filter-list li a:hover,
.rtl .filter-list li.active a {
    transform: translateX(-5px);
}

/* Header Actions RTL */
.rtl .header-actions {
    flex-direction: row-reverse;
}

.rtl .language-switcher .lang-dropdown {
    left: 0;
    right: auto;
}

/* Mobile View RTL Fixes */
@media (max-width: 992px) {
    .rtl .shop-sidebar {
        right: -100%;
        left: auto;
    }
    
    .rtl .shop-sidebar.active {
        right: 0;
    }
}

/* ============================================
   WOOCOMMERCE CHECKOUT RTL
   ============================================ */
.rtl .woocommerce-checkout .col2-set,
.rtl .woocommerce-checkout .woocommerce-billing-fields,
.rtl .woocommerce-checkout .woocommerce-shipping-fields,
.rtl .woocommerce-checkout .woocommerce-additional-fields {
    text-align: right;
}

.rtl .woocommerce form .form-row {
    text-align: right;
}

.rtl .woocommerce form .form-row label {
    text-align: right;
}

.rtl .woocommerce form .form-row-first {
    float: right;
}

.rtl .woocommerce form .form-row-last {
    float: left;
}

.rtl .woocommerce-checkout #payment ul.payment_methods {
    text-align: right;
}

.rtl .woocommerce-checkout #payment ul.payment_methods li {
    text-align: right;
}

.rtl .woocommerce #payment #place_order {
    float: left;
}

.rtl .woocommerce-order-received .woocommerce-order-details,
.rtl .woocommerce-order-received .woocommerce-customer-details {
    text-align: right;
}

/* ============================================
   WOOCOMMERCE MY ACCOUNT RTL
   ============================================ */
.rtl .woocommerce-MyAccount-navigation {
    float: right;
    text-align: right;
}

.rtl .woocommerce-MyAccount-navigation ul {
    text-align: right;
    padding-right: 0;
}

.rtl .woocommerce-MyAccount-content {
    float: left;
    text-align: right;
}

.rtl .woocommerce-account .addresses .title h3 {
    text-align: right;
}

.rtl .woocommerce-account .addresses .title .edit {
    float: left;
}

.rtl .woocommerce-orders-table,
.rtl .woocommerce-table--order-details {
    text-align: right;
}

/* ============================================
   WOOCOMMERCE CART RTL
   ============================================ */
.rtl .woocommerce-cart-form {
    text-align: right;
}

.rtl .woocommerce table.shop_table {
    text-align: right;
}

.rtl .woocommerce table.shop_table th,
.rtl .woocommerce table.shop_table td {
    text-align: right;
}

.rtl .woocommerce .cart-collaterals .cart_totals {
    float: left;
    text-align: right;
}

.rtl .woocommerce .cart-collaterals .cart_totals table {
    text-align: right;
}

.rtl .woocommerce .wc-proceed-to-checkout {
    text-align: left;
}

.rtl .woocommerce a.remove {
    float: left;
}

.rtl .woocommerce .quantity .qty {
    text-align: center;
}

/* ============================================
   WOOCOMMERCE SINGLE PRODUCT RTL
   ============================================ */
.rtl .woocommerce div.product {
    text-align: right;
}

.rtl .woocommerce div.product div.images {
    float: right;
}

.rtl .woocommerce div.product div.summary {
    float: left;
    text-align: right;
}

.rtl .woocommerce div.product .product_title {
    text-align: right;
}

.rtl .woocommerce div.product .woocommerce-product-rating {
    text-align: right;
}

.rtl .woocommerce div.product p.price {
    text-align: right;
}

.rtl .woocommerce div.product .woocommerce-product-details__short-description {
    text-align: right;
}

.rtl .woocommerce div.product form.cart {
    text-align: right;
}

.rtl .woocommerce div.product form.cart .variations {
    text-align: right;
}

.rtl .woocommerce div.product form.cart .variations td.label {
    text-align: right;
    padding-left: 10px;
    padding-right: 0;
}

.rtl .woocommerce div.product .woocommerce-tabs ul.tabs {
    text-align: right;
    padding-right: 0;
}

.rtl .woocommerce div.product .woocommerce-tabs ul.tabs li {
    float: right;
    margin-left: 10px;
    margin-right: 0;
}

.rtl .woocommerce div.product .woocommerce-tabs .panel {
    text-align: right;
}

.rtl .woocommerce .product_meta {
    text-align: right;
}

.rtl .woocommerce .product_meta > span {
    display: block;
    text-align: right;
}

/* ============================================
   WOOCOMMERCE NOTICES RTL
   ============================================ */
.rtl .woocommerce-message,
.rtl .woocommerce-info,
.rtl .woocommerce-error li {
    text-align: right;
    padding-right: 50px !important;
    padding-left: 20px !important;
}

.rtl .woocommerce-message::before,
.rtl .woocommerce-info::before,
.rtl .woocommerce-error li::before {
    left: auto;
    right: 15px;
}

.rtl .woocommerce-message .button,
.rtl .woocommerce-info .button {
    float: left;
    margin-left: 0;
    margin-right: 15px;
}

/* ============================================
   WOOCOMMERCE FORMS RTL
   ============================================ */
.rtl .woocommerce-form-login,
.rtl .woocommerce-form-register,
.rtl .woocommerce-ResetPassword {
    text-align: right;
}

.rtl .woocommerce-form-login .woocommerce-form-login__rememberme {
    text-align: right;
}

.rtl .woocommerce-form-login .woocommerce-form-login__submit {
    float: right;
}

.rtl .woocommerce form .show-password-input {
    left: 10px;
    right: auto;
}

/* ============================================
   WOOCOMMERCE MINICART/DROPDOWN RTL
   ============================================ */
.rtl .widget_shopping_cart .cart_list li {
    text-align: right;
    padding-right: 60px;
    padding-left: 20px;
}

.rtl .widget_shopping_cart .cart_list li a.remove {
    left: auto;
    right: 0;
}

.rtl .widget_shopping_cart .cart_list li img {
    float: right;
    margin-left: 10px;
    margin-right: 0;
}

.rtl .widget_shopping_cart .total {
    text-align: right;
}

.rtl .widget_shopping_cart .buttons {
    text-align: right;
}

/* ============================================
   WOOCOMMERCE RELATED/UPSELL RTL
   ============================================ */
.rtl .woocommerce .related.products,
.rtl .woocommerce .up-sells,
.rtl .woocommerce .cross-sells {
    text-align: right;
}

.rtl .woocommerce .related.products h2,
.rtl .woocommerce .up-sells h2,
.rtl .woocommerce .cross-sells h2 {
    text-align: right;
}

/* ============================================
   DIR ATTRIBUTE RTL - For browsers that use dir attribute
   ============================================ */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .site-header,
html[dir="rtl"] .site-content,
html[dir="rtl"] .site-footer {
    direction: rtl;
}

```