/*
RTL Stylesheet for Arabic E-Commerce Theme
This file contains all the RTL-specific styles for proper Arabic language support
*/

/* Base RTL Styles */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Sans Arabic', 'Tajawal', 'Cairo', 'Amiri', 'Scheherazade New', Arial, sans-serif;
}

body.rtl * {
    direction: rtl;
}

/* Typography Adjustments for Arabic */
body.rtl h1, 
body.rtl h2, 
body.rtl h3, 
body.rtl h4, 
body.rtl h5, 
body.rtl h6 {
    font-family: 'Tajawal', 'Noto Sans Arabic', 'Cairo', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
}

body.rtl p,
body.rtl li,
body.rtl span {
    font-family: 'Noto Sans Arabic', 'Tajawal', Arial, sans-serif;
    line-height: 1.8;
    text-align: right;
}

/* Header RTL Adjustments */
body.rtl .header-contact {
    text-align: left;
}

body.rtl .header-contact span {
    margin-left: 20px;
    margin-right: 0;
}

body.rtl .header-social {
    text-align: right;
}

body.rtl .header-social a {
    margin-left: 10px;
    margin-right: 0;
}

body.rtl .main-navigation {
    flex-direction: row-reverse;
}

body.rtl .site-branding {
    text-align: right;
}

body.rtl .navigation-wrapper {
    flex-direction: row-reverse;
}

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

body.rtl .nav-menu li {
    margin: 0 0 0 30px;
}

body.rtl .nav-menu li:first-child {
    margin-left: 0;
}

body.rtl .nav-menu li:last-child {
    margin-right: 0;
}

/* Dropdown Menu RTL */
body.rtl .nav-menu .sub-menu {
    right: 0;
    left: auto;
    text-align: right;
}

body.rtl .nav-menu .sub-menu li {
    margin: 0;
}

body.rtl .nav-menu .sub-menu a {
    padding: 10px 20px 10px 15px;
}

/* Header Actions RTL */
body.rtl .header-actions {
    flex-direction: row-reverse;
}

body.rtl .header-actions > div {
    margin-left: 15px;
    margin-right: 0;
}

body.rtl .header-actions > div:first-child {
    margin-left: 0;
}

/* Search Form RTL */
body.rtl .search-form-wrapper {
    right: 0;
    left: auto;
}

body.rtl .search-form input[type="search"] {
    padding: 10px 40px 10px 15px;
    text-align: right;
}

body.rtl .search-form .search-submit {
    right: auto;
    left: 10px;
}

/* Cart RTL */
body.rtl .mini-cart-wrapper {
    right: 0;
    left: auto;
}

body.rtl .cart-count,
body.rtl .wishlist-count {
    right: auto;
    left: -8px;
}

/* Mobile Menu RTL */
body.rtl .mobile-menu-toggle span {
    transform-origin: right center;
}

body.rtl .mobile-menu {
    right: 0;
    left: auto;
}

body.rtl .mobile-nav-menu {
    text-align: right;
}

body.rtl .mobile-nav-menu a {
    padding: 15px 20px 15px 0;
}

/* Content RTL Adjustments */
body.rtl .row {
    flex-direction: row-reverse;
}

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

/* Hero Section RTL */
body.rtl .hero-section {
    text-align: center; /* Keep center for hero */
}

body.rtl .hero-title,
body.rtl .hero-subtitle {
    text-align: center;
}

/* Category Grid RTL */
body.rtl .category-card {
    text-align: center; /* Keep center for cards */
}

body.rtl .category-content {
    text-align: center;
}

/* Post Content RTL */
body.rtl .post-card {
    text-align: right;
}

body.rtl .entry-meta {
    text-align: right;
}

body.rtl .entry-meta span {
    margin-left: 15px;
    margin-right: 0;
}

body.rtl .entry-meta span:first-child {
    margin-left: 0;
}

body.rtl .read-more {
    float: left;
}

/* Pagination RTL */
body.rtl .pagination {
    direction: rtl;
}

body.rtl .page-numbers {
    margin: 0 0 0 5px;
}

body.rtl .page-numbers:first-child {
    margin-left: 0;
}

/* Sidebar RTL */
body.rtl .widget {
    text-align: right;
}

body.rtl .widget ul {
    text-align: right;
}

body.rtl .widget ul li {
    text-align: right;
}

/* Footer RTL */
body.rtl .footer-widgets-grid {
    direction: rtl;
}

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

body.rtl .footer-bottom .row {
    flex-direction: row-reverse;
}

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

body.rtl .footer-nav-menu {
    display: flex;
    justify-content: flex-start;
    flex-direction: row-reverse;
}

body.rtl .footer-nav-menu li {
    margin: 0 0 0 20px;
}

body.rtl .footer-nav-menu li:first-child {
    margin-left: 0;
}

/* WooCommerce RTL Adjustments */
body.rtl .woocommerce .products {
    direction: rtl;
}

body.rtl .woocommerce .product {
    text-align: center;
}

body.rtl .woocommerce .product .woocommerce-loop-product__title {
    text-align: center;
}

body.rtl .woocommerce .product .price {
    text-align: center;
}

body.rtl .woocommerce .product .button {
    text-align: center;
}

body.rtl .woocommerce .cart-collaterals {
    float: left;
}

body.rtl .woocommerce .cart_totals {
    text-align: right;
}

body.rtl .woocommerce table.shop_table {
    direction: rtl;
}

body.rtl .woocommerce table.shop_table th,
body.rtl .woocommerce table.shop_table td {
    text-align: right;
}

body.rtl .woocommerce .quantity input {
    text-align: center;
}

body.rtl .woocommerce .checkout .form-row {
    text-align: right;
}

body.rtl .woocommerce .checkout .form-row label {
    text-align: right;
}

body.rtl .woocommerce .checkout .form-row input,
body.rtl .woocommerce .checkout .form-row textarea,
body.rtl .woocommerce .checkout .form-row select {
    text-align: right;
}

/* Product Single Page RTL */
body.rtl .woocommerce div.product .summary {
    text-align: right;
}

body.rtl .woocommerce div.product .product_title {
    text-align: right;
}

body.rtl .woocommerce div.product .price {
    text-align: right;
}

body.rtl .woocommerce div.product .woocommerce-product-details__short-description {
    text-align: right;
}

body.rtl .woocommerce div.product form.cart {
    text-align: right;
}

body.rtl .woocommerce div.product .woocommerce-tabs {
    direction: rtl;
}

body.rtl .woocommerce div.product .woocommerce-tabs ul.tabs {
    text-align: right;
    border-bottom: 1px solid #ddd;
    border-right: none;
}

body.rtl .woocommerce div.product .woocommerce-tabs ul.tabs li {
    float: right;
    margin: 0 0 0 2px;
}

body.rtl .woocommerce div.product .woocommerce-tabs .panel {
    text-align: right;
}

/* Breadcrumbs RTL */
body.rtl .woocommerce-breadcrumb {
    text-align: right;
    direction: rtl;
}

body.rtl .woocommerce-breadcrumb a {
    margin: 0 0 0 5px;
}

/* Forms RTL */
body.rtl input[type="text"],
body.rtl input[type="email"],
body.rtl input[type="password"],
body.rtl input[type="search"],
body.rtl input[type="tel"],
body.rtl input[type="url"],
body.rtl textarea,
body.rtl select {
    text-align: right;
    direction: rtl;
}

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

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

/* Buttons RTL */
body.rtl .btn {
    text-align: center;
}

/* Icons RTL Adjustments */
body.rtl .fa-chevron-left:before {
    content: "\f054"; /* chevron-right */
}

body.rtl .fa-chevron-right:before {
    content: "\f053"; /* chevron-left */
}

body.rtl .fa-angle-left:before {
    content: "\f105"; /* angle-right */
}

body.rtl .fa-angle-right:before {
    content: "\f104"; /* angle-left */
}

body.rtl .fa-arrow-left:before {
    content: "\f061"; /* arrow-right */
}

body.rtl .fa-arrow-right:before {
    content: "\f060"; /* arrow-left */
}

/* Back to Top Button RTL */
body.rtl .back-to-top {
    left: 20px;
    right: auto;
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
    body.rtl .nav-menu {
        flex-direction: column;
        text-align: right;
    }
    
    body.rtl .nav-menu li {
        margin: 0;
    }
    
    body.rtl .header-actions {
        flex-direction: row-reverse;
    }
    
    body.rtl .mobile-menu {
        right: 0;
        left: auto;
    }
    
    body.rtl .category-grid {
        text-align: center;
    }
    
    body.rtl .footer-bottom .row {
        flex-direction: column;
        text-align: center;
    }
    
    body.rtl .footer-nav-menu {
        justify-content: center;
        margin-top: 15px;
    }
}

/* Arabic Number Styling */
body.rtl .arabic-numbers {
    font-feature-settings: "lnum" 1;
}

/* Improve Arabic Text Rendering */
body.rtl {
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "liga", "kern";
    font-feature-settings: "liga", "kern";
}

/* Arabic Typography Enhancements */
body.rtl h1, body.rtl h2, body.rtl h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.rtl h4, body.rtl h5, body.rtl h6 {
    font-weight: 600;
}

body.rtl p, body.rtl li {
    font-weight: 400;
    word-spacing: 0.1em;
}

/* Improve readability for Arabic text */
body.rtl .entry-content,
body.rtl .page-content,
body.rtl .comment-content {
    line-height: 1.9;
    word-spacing: 0.05em;
}

/* Arabic punctuation adjustments */
body.rtl .entry-content p,
body.rtl .page-content p {
    text-align: justify;
    text-justify: inter-word;
}

@media (max-width: 600px) {
    body.rtl .entry-content p,
    body.rtl .page-content p {
        text-align: right;
    }
}

