/**
 * Ajial RTL Support Styles
 * 
 * CSS for proper RTL (Right-to-Left) display in Arabic language
 */

/* General RTL styles for Arabic language */
html[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

/* Shop page RTL styles */
html[lang="ar"] .ajial-shop-header .shop-breadcrumb {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .ajial-shop-header .shop-title {
    text-align: right;
}

html[lang="ar"] .ajial-shop-sidebar {
    float: right;
    width: 100%;
}

html[lang="ar"] .ajial-shop-sidebar .filter-title {
    text-align: right;
    width: 100%;
    display: block;
}

html[lang="ar"] .ajial-shop-sidebar .filter-options {
    text-align: right;
    width: 100%;
}

html[lang="ar"] .ajial-shop-sidebar .filter-options label {
    margin-right: 0;
    margin-left: 10px;
}

html[lang="ar"] .ajial-shop-sidebar .price-range-slider .price-inputs .price-input {
    float: right;
}

html[lang="ar"] .ajial-shop-sidebar .price-range-slider .price-inputs .price-separator {
    float: right;
    margin: 0 10px;
}

/* Sidebar categories RTL styles */
html[lang="ar"] .ajial-shop-sidebar .sidebar-section {
    width: 100%;
}

html[lang="ar"] .ajial-shop-sidebar .category-list {
    width: 100%;
}

html[lang="ar"] .ajial-shop-sidebar .category-list li {
    width: 100%;
    display: block;
}

html[lang="ar"] .ajial-shop-sidebar .category-list li a {
    width: 100%;
    display: block;
    padding: 8px 10px;
}

/* Product grid RTL styles */
html[lang="ar"] .products-grid .product-category-title {
    text-align: right;
}

html[lang="ar"] .ajial-product-card {
    text-align: right;
}

html[lang="ar"] .ajial-product-card .ajial-product-title {
    text-align: right;
}

html[lang="ar"] .ajial-product-card .ajial-product-price {
    text-align: right;
}

html[lang="ar"] .ajial-product-card .ajial-product-attributes {
    text-align: right;
}

html[lang="ar"] .ajial-product-card .ajial-quantity-selector {
    float: right;
}

html[lang="ar"] .ajial-product-card .ajial-add-to-cart-wrapper {
    float: left;
}

/* Shop controls RTL styles */
html[lang="ar"] .shop-controls .product-count {
    float: right;
}

html[lang="ar"] .shop-controls .view-options {
    float: left;
}

html[lang="ar"] .shop-controls .view-options .view-option {
    float: right;
    margin-left: 0;
    margin-right: 10px;
}

html[lang="ar"] .shop-controls .view-options .view-option:first-child {
    margin-right: 0;
}

/* Pagination RTL styles */
html[lang="ar"] .woocommerce-pagination {
    text-align: right;
}

html[lang="ar"] .woocommerce-pagination .page-numbers li {
    float: right;
}

/* Fix for icons and buttons in RTL mode */
html[lang="ar"] .ajial-product-card .quantity-button {
    transform: rotate(180deg);
}

html[lang="ar"] .ajial-product-card .ajax-add-to-cart i {
    margin-right: 0;
    margin-left: 5px;
}

/* My Account RTL styles */
html[lang="ar"] .wc-my-account-tabs {
    direction: rtl;
}

html[lang="ar"] .wc-my-account-tabs .user-profile {
    text-align: right;
}

html[lang="ar"] .wc-my-account-tabs .user-profile .user-info {
    text-align: right;
}

html[lang="ar"] .wc-my-account-tabs .woocommerce-MyAccount-navigation ul li {
    text-align: right;
}

html[lang="ar"] .wc-my-account-tabs .woocommerce-MyAccount-navigation ul li a:before {
    float: right;
    margin-left: 10px;
    margin-right: 0;
}

html[lang="ar"] .woocommerce-MyAccount-content {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .section-title {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-order-details {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-customer-details {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-customer-details address {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-table--order-details {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-table--order-details th {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-table--order-details td {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content form .form-row {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content form .form-row label {
    text-align: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
    float: right;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-Address-title .edit {
    float: left;
}

html[lang="ar"] .woocommerce-MyAccount-content .woocommerce-address-fields__field-wrapper {
    text-align: right;
}

html[lang="ar"] .woocommerce-form-login,
html[lang="ar"] .woocommerce-form-register,
html[lang="ar"] .woocommerce-ResetPassword {
    text-align: right;
}

html[lang="ar"] .woocommerce-form-login .form-row,
html[lang="ar"] .woocommerce-form-register .form-row,
html[lang="ar"] .woocommerce-ResetPassword .form-row {
    text-align: right;
}

html[lang="ar"] .woocommerce-form-login .form-row label,
html[lang="ar"] .woocommerce-form-register .form-row label,
html[lang="ar"] .woocommerce-ResetPassword .form-row label {
    text-align: right;
}

html[lang="ar"] .woocommerce-form-login .woocommerce-form-login__rememberme,
html[lang="ar"] .woocommerce-form-register .woocommerce-form-login__rememberme {
    float: right;
}

html[lang="ar"] .woocommerce-form-login .lost_password,
html[lang="ar"] .woocommerce-form-register .lost_password {
    text-align: right;
}

html[lang="ar"] .go-back-link {
    text-align: right;
}

/* Enhanced RTL alignment for Arabic text */
html[lang="ar"] * {
    /* text-align: right; */
}

html[lang="ar"] .woocommerce-MyAccount-content p,
html[lang="ar"] .woocommerce-MyAccount-content h1,
html[lang="ar"] .woocommerce-MyAccount-content h2,
html[lang="ar"] .woocommerce-MyAccount-content h3,
html[lang="ar"] .woocommerce-MyAccount-content h4,
html[lang="ar"] .woocommerce-MyAccount-content h5,
html[lang="ar"] .woocommerce-MyAccount-content h6,
html[lang="ar"] .woocommerce-MyAccount-content span,
html[lang="ar"] .woocommerce-MyAccount-content div {
    text-align: right !important;
}

html[lang="ar"] .woocommerce-form-login p,
html[lang="ar"] .woocommerce-form-register p,
html[lang="ar"] .woocommerce-ResetPassword p {
    text-align: right !important;
}

html[lang="ar"] .woocommerce-form-login h2,
html[lang="ar"] .woocommerce-form-register h2,
html[lang="ar"] .woocommerce-ResetPassword h2 {
    text-align: right !important;
}

/* Single Product page RTL styles */
html[lang="ar"] .single-product h1.product_title.entry-title,
html[lang="ar"] .product_title.entry-title,
html[lang="ar"] h1.product_title.entry-title {
    color: var(--primary-1, #004a61);
    text-align: right !important;
    font-family: "Poppins-Bold", sans-serif;
    font-size: 36px;
    font-weight: 700;
    position: relative;
    margin-bottom: 25px;
    display: block;
    width: 100%;
}

html[lang="ar"] .single-product h1.product_title.entry-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: #fcb900;
    border-radius: 2px;
}

/* Additional single product page RTL styles */
html[lang="ar"] .single-product .woocommerce-product-details__short-description,
html[lang="ar"] .single-product .woocommerce-product-details__short-description p,
html[lang="ar"] .single-product .product_meta,
html[lang="ar"] .single-product .price,
html[lang="ar"] .single-product .quantity,
html[lang="ar"] .single-product .variations,
html[lang="ar"] .single-product .variations_form,
html[lang="ar"] .single-product .woocommerce-variation,
html[lang="ar"] .single-product .woocommerce-variation-price,
html[lang="ar"] .single-product .woocommerce-variation-availability,
html[lang="ar"] .single-product .cart,
html[lang="ar"] .single-product .woocommerce-tabs,
html[lang="ar"] .single-product .related.products,
html[lang="ar"] .single-product .up-sells.products {
    text-align: right !important;
}

/* Fix cart button icon in RTL */
html[lang="ar"] .single_add_to_cart_button:before,
html[lang="ar"] .add_to_cart_button:before,
html[lang="ar"] .product_type_simple:before {
    margin-right: 0;
    margin-left: 10px;
}

/* Fix category and share labels */
html[lang="ar"] .single-product .product_meta .posted_in,
html[lang="ar"] .single-product .product_meta .tagged_as,
html[lang="ar"] .single-product .share-this-product {
    text-align: right !important;
    display: block;
}

/* Fix quantity input in RTL */
html[lang="ar"] .single-product .quantity {
    float: right;
    margin-right: 0;
    margin-left: 10px;
}

/* Fix price display in RTL */
html[lang="ar"] .single-product .price {
    direction: rtl;
}

/* Checkout button in Arabic */
html[lang="ar"] .checkout-button,
html[lang="ar"] .woocommerce-checkout-review-order-table .checkout-button,
html[lang="ar"] .wc-proceed-to-checkout .checkout-button,
html[lang="ar"] a.checkout-button {
    font-family: 'Tajawal', sans-serif !important;
}

html[lang="ar"] .single-product .checkout-button {
    direction: rtl;
    text-align: center;
    font-family: 'Tajawal', sans-serif !important;
}
