/**
 * Woodmart Arabic RTL - Extra Styles
 * إصلاحات إضافية للمشاكل المعقدة
 */

/* ============================================
   ADVANCED SEARCH FIXES
   ============================================ */

html[dir="rtl"] .wd-search-wrap {
    direction: rtl;
}

html[dir="rtl"] .woodmart-search-form {
    direction: rtl;
}

html[dir="rtl"] .woodmart-search-form input[type="text"],
html[dir="rtl"] .woodmart-search-form input[type="search"] {
    padding-right: 20px;
    padding-left: 50px;
}

html[dir="rtl"] .woodmart-search-form .search-button {
    left: 0;
    right: auto;
}

html[dir="rtl"] .woodmart-search-form .search-button:before {
    content: "\f110";
}

html[dir="rtl"] .wd-search-by-title .searchsubmit {
    left: 0;
    right: auto;
}

html[dir="rtl"] .autocomplete-suggestion {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .search-choice {
    direction: rtl;
}

/* ============================================
   PRODUCT QUICK VIEW
   ============================================ */

html[dir="rtl"] .quick-view-modal {
    direction: rtl;
}

html[dir="rtl"] .quick-view-content {
    direction: rtl;
}

html[dir="rtl"] .quick-view-content .product_title {
    text-align: right;
}

html[dir="rtl"] .quick-view-content .woocommerce-product-rating {
    direction: rtl;
}

html[dir="rtl"] .quick-view-content .woocommerce-product-details__short-description {
    text-align: right;
}

html[dir="rtl"] .quick-view-content .cart {
    direction: rtl;
}

html[dir="rtl"] .wd-popup-quick-view {
    direction: rtl;
}

html[dir="rtl"] .wd-popup-quick-view .product {
    direction: rtl;
}

/* ============================================
   PRODUCT VARIATIONS
   ============================================ */

html[dir="rtl"] .woodmart-swatch {
    direction: rtl;
}

html[dir="rtl"] .swatch-label {
    direction: rtl;
}

html[dir="rtl"] .swatch-wrapper {
    direction: rtl;
}

html[dir="rtl"] .selected swatch-wrapper {
    direction: rtl;
}

html[dir="rtl"] input[type="radio"].swatch-radio:checked + .swatch-wrapper {
    direction: rtl;
}

/* ============================================
   SHOPPING CART ADDED ANIMATION
   ============================================ */

html[dir="rtl"] .added_to_cart {
    direction: rtl;
    text-align: right;
}

/* ============================================
   CART DROPDOWN
   ============================================ */

html[dir="rtl"] .wd-cart-dropdown {
    left: auto;
    right: 0;
    direction: rtl;
}

html[dir="rtl"] .wd-cart-dropdown:before,
html[dir="rtl"] .wd-cart-dropdown:after {
    left: auto;
    right: 20px;
}

html[dir="rtl"] .woodmart-cart-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woodmart-cart-content .woocommerce-mini-cart {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-mini-cart li {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-mini-cart li a:not(.remove) {
    margin-left: 0;
    margin-right: 20px;
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .woocommerce-mini-cart .quantity {
    margin-left: 0;
    margin-right: 20px;
}

html[dir="rtl"] .woocommerce-mini-cart__total {
    text-align: right;
}

html[dir="rtl"] .woocommerce-mini-cart__buttons {
    text-align: right;
    direction: rtl;
}

/* ============================================
   CART PAGE
   ============================================ */

html[dir="rtl"] .woocommerce-cart-form {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-cart-form table {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-cart-form .product-name {
    text-align: right;
}

html[dir="rtl"] .woocommerce-cart-form .product-thumbnail {
    direction: ltr;
}

html[dir="rtl"] .woocommerce-cart-form .product-remove {
    text-align: center;
}

html[dir="rtl"] .cart-empty {
    text-align: right;
}

html[dir="rtl"] .return-to-shop {
    text-align: right;
}

/* ============================================
   CHECKOUT ADDITIONAL FIELDS
   ============================================ */

html[dir="rtl"] .woocommerce-additional-fields {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-additional-fields fieldset {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-additional-fields h3 {
    text-align: right;
}

html[dir="rtl"] .woocommerce-checkout-review-order-table {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-checkout-review-order-table th,
html[dir="rtl"] .woocommerce-checkout-review-order-table td {
    text-align: right;
}

/* ============================================
   THANK YOU PAGE
   ============================================ */

html[dir="rtl"] .woocommerce-order {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-order-confirmation {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-order-details {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-customer-details {
    direction: rtl;
    text-align: right;
}

/* ============================================
   MY ACCOUNT PAGE
   ============================================ */

html[dir="rtl"] .woocommerce-MyAccount-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-MyAccount-content p {
    text-align: right;
}

html[dir="rtl"] .woocommerce-edit-address-form {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-edit-account-form {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-EditAccountForm {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-EditAccountForm fieldset {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-EditAccountForm legend {
    text-align: right;
}

/* ============================================
   LOST PASSWORD
   ============================================ */

html[dir="rtl"] .woocommerce-lost-password {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-lost-password form {
    direction: rtl;
}

/* ============================================
   LOGIN REGISTER
   ============================================ */

html[dir="rtl"] .woocommerce-form-login {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-form-login .lost_password {
    text-align: left;
}

html[dir="rtl"] .woocommerce-form-register {
    direction: rtl;
    text-align: right;
}

/* ============================================
   ORDER TRACKING
   ============================================ */

html[dir="rtl"] .woocommerce-order-tracking {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .order-again {
    direction: rtl;
    text-align: right;
}

/* ============================================
   SHIPPING CALCULATOR
   ============================================ */

html[dir="rtl"] .shipping-calculator-button {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .shipping-calculator-form {
    direction: rtl;
}

html[dir="rtl"] .shipping-calculator-form select {
    direction: rtl;
}

html[dir="rtl"] .shipping-calculator-form button {
    direction: rtl;
}

/* ============================================
   COUPON INPUT
   ============================================ */

html[dir="rtl"] .coupon-input-wrap {
    direction: rtl;
}

html[dir="rtl"] .coupon-input-wrap input {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .coupon-input-wrap button {
    left: 0;
    right: auto;
}

/* Applied Coupon */
html[dir="rtl"] .woocommerce-remove-coupon {
    direction: ltr;
}

/* ============================================
   REVIEWS
   ============================================ */

html[dir="rtl"] #reviews {
    direction: rtl;
}

html[dir="rtl"] #reviews #comments {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] #reviews #comments h2 {
    text-align: right;
}

html[dir="rtl"] .commentlist {
    direction: rtl;
}

html[dir="rtl"] .commentlist .comment {
    direction: rtl;
}

html[dir="rtl"] .comment-text {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .comment-text .meta {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .comment-form-rating label {
    direction: rtl;
}

/* ============================================
   WOOCOMMERCE MESSAGES
   ============================================ */

html[dir="rtl"] .woocommerce-error {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-info {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-message {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-success {
    direction: rtl;
    text-align: right;
}

/* ============================================
   VARIABLE PRODUCT
   ============================================ */

html[dir="rtl"] .variations_form {
    direction: rtl;
}

html[dir="rtl"] .variations_form .variations {
    direction: rtl;
}

html[dir="rtl"] .single_variation_wrap {
    direction: rtl;
    text-align: right;
}

/* ============================================
   GROUPED PRODUCT
   ============================================ */

html[dir="rtl"] .group_table {
    direction: rtl;
}

html[dir="rtl"] .group_table td {
    text-align: right;
}

html[dir="rtl"] .group_table td:last-child {
    direction: ltr;
}

/* ============================================
   SALE BANNER
   ============================================ */

html[dir="rtl"] .sale-price-text {
    direction: ltr;
}

/* ============================================
   PRODUCT IMAGES THUMBNAILS
   ============================================ */

html[dir="rtl"] .flex-direction-nav {
    direction: ltr;
}

html[dir="rtl"] .flex-direction-nav li {
    direction: ltr;
}

html[dir="rtl"] .flex-direction-nav .flex-prev {
    left: auto;
    right: 0;
}

html[dir="rtl"] .flex-direction-nav .flex-next {
    right: auto;
    left: 0;
}

/* ============================================
   TABS PANELS
   ============================================ */

html[dir="rtl"] .woocommerce-tabs .panel {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .woocommerce-tabs .panel h2 {
    text-align: right;
}

html[dir="rtl"] .woocommerce-tabs .panel ul {
    padding-right: 20px;
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */

html[dir="rtl"] .related.products {
    direction: rtl;
}

html[dir="rtl"] .related.products h2 {
    text-align: right;
}

/* ============================================
   UPSELLS
   ============================================ */

html[dir="rtl"] .upsells.products {
    direction: rtl;
}

html[dir="rtl"] .upsells.products h2 {
    text-align: right;
}

/* ============================================
   CROSS SELLS
   ============================================ */

html[dir="rtl"] .cross-sells {
    direction: rtl;
}

html[dir="rtl"] .cross-sells h2 {
    text-align: right;
}

/* ============================================
   CART COLLATERALS
   ============================================ */

html[dir="rtl"] .cart-collaterals {
    direction: rtl;
}

html[dir="rtl"] .cart-collaterals .cart_totals {
    float: left;
    direction: rtl;
}

html[dir="rtl"] .cart_totals table {
    direction: rtl;
}

html[dir="rtl"] .cart_totals table th,
html[dir="rtl"] .cart_totals table td {
    text-align: right;
}

html[dir="rtl"] .wc-proceed-to-checkout {
    text-align: left;
    direction: rtl;
}

/* ============================================
   ACCOUNT CONTENT
   ============================================ */

html[dir="rtl"] .woocommerce-account .woocommerce-MyAccount-content {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-account .woocommerce-MyAccount-content .woocommerce-table--order-downloads {
    direction: rtl;
}

/* ============================================
   WOOCOMMERCE NOTICES
   ============================================ */

html[dir="rtl"] ul.woocommerce-error {
    direction: rtl;
    padding-right: 3em;
    text-align: right;
}

/* ============================================
   AJAX ADD TO CART
   ============================================ */

html[dir="rtl"] .ajax-add-to-cart {
    direction: rtl;
}

html[dir="rtl"] .ajax-add-to-cart.added {
    direction: rtl;
}

/* ============================================
   PRODUCT IMAGE ZOOM
   ============================================ */

html[dir="rtl"] .zoom-images-container {
    direction: ltr;
}

/* ============================================
   PRICE FILTER WIDGET
   ============================================ */

html[dir="rtl"] .woocommerce-widget-price-filter .price_slider_wrapper {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-widget-price-filter .price_label {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-widget-price-filter .price_label span {
    direction: ltr;
}

/* ============================================
   ACTIVE FILTERS
   ============================================ */

html[dir="rtl"] .woocommerce-widget-active-filters {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-widget-active-filters .woocommerce-remove-all-filters {
    direction: ltr;
}

/* ============================================
   RESET FILTERS BUTTON
   ============================================ */

html[dir="rtl"] .woocommerce-widget-layered-nav-dropdown__submit {
    direction: rtl;
}

/* ============================================
   STAR RATING
   ============================================ */

html[dir="rtl"] .star-rating > span {
    direction: ltr;
}

html[dir="rtl"] .star-rating::before {
    direction: ltr;
}

html[dir="rtl"] .woocommerce-product-rating {
    direction: ltr;
}

/* ============================================
   PRODUCT ATTRIBUTES TABLE
   ============================================ */

html[dir="rtl"] .woocommerce-product-attributes {
    direction: rtl;
}

html[dir="rtl"] .woocommerce-product-attributes th {
    text-align: right;
}

html[dir="rtl"] .woocommerce-product-attributes td {
    text-align: right;
}

/* ============================================
   WOODMART ELEMENTS
   ============================================ */

/* Woodmart Price Table */
html[dir="rtl"] .woodmart-price-table {
    direction: rtl;
}

html[dir="rtl"] .woodmart-price-table .woodmart-plan-title {
    text-align: right;
}

/* Woodmart Testimonials */
html[dir="rtl"] .testimonial-content {
    direction: rtl;
    text-align: right;
}

/* Woodmart Blog Posts */
html[dir="rtl"] .blog-post-loop {
    direction: rtl;
}

html[dir="rtl"] .blog-post-loop .post-title {
    text-align: right;
}

html[dir="rtl"] .blog-post-loop .post-excerpt {
    text-align: right;
}

/* Woodmart Portfolio */
html[dir="rtl"] .portfolio-entry {
    direction: rtl;
}

/* ============================================
   FINAL RTL ENFORCEMENT
   ============================================ */

html[dir="rtl"] .wd-rtl {
    direction: rtl !important;
}

html[dir="rtl"] .rtl {
    direction: rtl !important;
}

/* Force all text to be right-aligned except prices and numbers */
html[dir="rtl"] p:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] h1:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] h2:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] h3:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] h4:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] h5:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] h6:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] span:not(.price):not(.amount):not(.woocommerce-Price-amount):not(.star-rating),
html[dir="rtl"] li:not(.price):not(.amount):not(.woocommerce-Price-amount):not(.star-rating),
html[dir="rtl"] td:not(.price):not(.amount):not(.woocommerce-Price-amount):not(.star-rating),
html[dir="rtl"] th:not(.price):not(.amount):not(.woocommerce-Price-amount):not(.star-rating),
html[dir="rtl"] label:not(.price):not(.amount):not(.woocommerce-Price-amount),
html[dir="rtl"] div:not(.price):not(.amount):not(.woocommerce-Price-amount):not(.star-rating):not(.woocommerce-mini-cart__total):not(.wc-block-components-product-price__value) {
    text-align: right !important;
    direction: rtl !important;
}

/* ============================================
   SPECIAL OVERRIDES
   ============================================ */

/* Search form icons */
html[dir="rtl"] .searchsubmit,
html[dir="rtl"] .search-button,
html[dir="rtl"] .wd-search-button,
html[dir="rtl"] [class*="search-button"] {
    left: 0 !important;
    right: auto !important;
}

/* Navigation arrows */
html[dir="rtl"] .wd-nav-opener,
html[dir="rtl"] .menu-item-link-toggle {
    left: 0 !important;
    right: auto !important;
}

/* Mobile menu */
html[dir="rtl"] .mobile-nav-button,
html[dir="rtl"] .whb-mobile-nav-icon {
    left: 0 !important;
    right: auto !important;
}

/* Wishlist icon */
html[dir="rtl"] .wd-wishlist-info-icon,
html[dir="rtl"] .wishlist-icon-wrapper {
    transform: none !important;
}

/* Compare icon */
html[dir="rtl"] .wd-compare-info-icon,
html[dir="rtl"] .compare-icon-wrapper {
    transform: none !important;
}

/* Cart icon */
html[dir="rtl"] .wd-cart-info-icon,
html[dir="rtl"] .cart-icon-wrapper {
    transform: none !important;
}

/* Search icon */
html[dir="rtl"] .search-icon-wrapper {
    transform: none !important;
}

/* Account icon */
html[dir="rtl"] .wd-account-info-icon,
html[dir="rtl"] .account-icon-wrapper {
    transform: none !important;
}

/* Close icons in popups */
html[dir="rtl"] .wd-close-icon,
html[dir="rtl"] .close,
html[dir="rtl"] .mfp-close,
html[dir="rtl"] [class*="close-icon"] {
    left: 20px !important;
    right: auto !important;
}

/* Info icons */
html[dir="rtl"] .info-icon,
html[dir="rtl"] [class*="info-icon"] {
    transform: none !important;
}