/*
Theme Name: IBeauty
Description: RTL تنسيقات إضافية
Version: 1.0
*/

body { direction: rtl; unicode-bidi: embed; }

/* Header */
.header-search input[type="search"] {
    padding: 10px 42px 10px 18px;
}

/* Product actions */
.woocommerce ul.products li.product .product-actions {
    padding: 4px 20px 18px;
}

/* Categories hover */
.footer-col ul li a:hover { padding-right: 4px; padding-left: 0; }

/* Mobile menu */
.mobile-menu-panel { right: -320px; left: auto; }
.mobile-menu-panel.active { right: 0; }
.mobile-menu-panel ul li a:hover { padding-right: 8px; padding-left: 0; }

/* Back to top */
.back-to-top { left: 30px; right: auto; }

/* WooCommerce fixes */
.woocommerce .quantity .qty { margin-left: 10px; margin-right: 0; }
.woocommerce .star-rating { float: left; }
.woocommerce .star-rating::before { float: right; right: 0; left: auto; }
.woocommerce .star-rating span { right: 0; left: auto; }
.woocommerce table.shop_table td,
.woocommerce table.shop_table th { text-align: right; }
.woocommerce table.shop_table .product-thumbnail { text-align: center; }

/* Sale badge */
body.rtl .woocommerce span.onsale {
    left: auto !important; right: 14px !important;
}

/* Cart */
.woocommerce-cart .cart_totals {
    text-align: center;
}

/* Checkout RTL */
.rtl .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    direction: rtl;
}
.rtl .woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 8px; right: auto;
}
.rtl .woocommerce-checkout-review-order table.shop_table thead th.product-total {
    text-align: left;
}
.rtl .woocommerce-checkout-review-order table.shop_table .product-total {
    text-align: left;
}
.rtl .woocommerce-checkout-review-order table.shop_table tfoot td {
    text-align: left;
}
.rtl .woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
    margin-left: 10px; margin-right: 0;
}
.rtl .woocommerce-checkout #payment ul.payment_methods li .payment_box {
    margin-right: 24px; margin-left: 0;
}

/* Checkout RTL field floats */
.rtl .woocommerce-checkout .form-row.form-row-first {
    float: right;
}
.rtl .woocommerce-checkout .form-row.form-row-last {
    float: left;
}

/* My account */
.woocommerce-MyAccount-navigation { float: right; margin-left: 30px; margin-right: 0; }
.woocommerce-MyAccount-content { float: left; }
@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation { float: none; margin-left: 0; }
    .woocommerce-MyAccount-content { float: none; }
}

/* Messages */
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button { float: left; margin-right: 10px; margin-left: 0; }

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs { text-align: right; padding: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
    float: right !important; margin: 0 0 0 20px !important;
}

/* Cart count icon */
.header-icon-link .cart-count { left: -2px; right: auto; }

/* Newsletter */
.ibeauty-newsletter input[type="email"] { text-align: right; }

/* Filter sort RTL */
.rtl .filter-sort select {
    background-position: right 12px center;
    padding: 8px 16px 8px 32px;
}

/* Single Product RTL */
.rtl .ibeauty-product-summary-col .price del {
    margin-right: 0;
    margin-left: 8px;
}
.rtl .ibeauty-product-summary-col .single_add_to_cart_button i {
    margin-left: 0;
    margin-right: 8px;
}
.rtl .ibeauty-product-tabs .woocommerce-tabs ul.tabs li {
    margin: 0 0 0 24px;
}
.rtl .ibeauty-related-products h2::after {
    right: auto;
    left: 0;
}
.rtl .ibeauty-share a {
    margin-left: 0;
}
.rtl .woocommerce-product-gallery {
    direction: ltr;
}

.rtl .ibeauty-cart-actions {
    gap: 10px;
}

/* Direct Order RTL */
.rtl .direct-summary-row {
    flex-direction: row;
}
.rtl .direct-order-title i {
    margin-left: 0;
}
