/**
 * RTL (Right-to-Left) Specific Styles
 * For Hebrew language support
 *
 * @package HelloElementorChild
 */

/* ==========================================================================
   Base RTL Overrides
   ========================================================================== */

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

body.rtl {
  text-align: right;
}

/* ==========================================================================
   Typography RTL
   ========================================================================== */

.rtl h1,
.rtl h2,
.rtl h3,
.rtl h4,
.rtl h5,
.rtl h6,
.rtl p,
.rtl li,
.rtl label,
.rtl span {
  direction: rtl;
  text-align: right;
}

/* Keep numbers and prices LTR */
.rtl .price,
.rtl .woocommerce-Price-amount,
.rtl .amount,
.rtl [class*="price"] .amount,
.rtl .product-price,
.rtl .cart-subtotal .amount,
.rtl .order-total .amount,
.rtl input[type="number"],
.rtl input[type="tel"],
.rtl .quantity input {
  direction: ltr;
  unicode-bidi: embed;
  text-align: right;
}

/* Phone numbers */
.rtl .phone-number,
.rtl a[href^="tel:"] {
  direction: ltr;
  unicode-bidi: embed;
}

/* ==========================================================================
   Layout RTL
   ========================================================================== */

/* Flexbox RTL adjustments */
.rtl .flex-row-rtl,
.rtl .header-inner,
.rtl .nav-menu,
.rtl .product-meta,
.rtl .breadcrumb-list {
  flex-direction: row-reverse;
}

/* Grid RTL - reverse order */
.rtl .grid-rtl {
  direction: rtl;
}

/* Container margins RTL */
.rtl .container {
  margin-right: auto;
  margin-left: auto;
}

/* Float RTL */
.rtl .float-start {
  float: right !important;
}

.rtl .float-end {
  float: left !important;
}

/* ==========================================================================
   Lists RTL
   ========================================================================== */

.rtl ul,
.rtl ol {
  padding-right: var(--space-6);
  padding-left: 0;
  margin-right: 0;
  margin-left: 0;
}

.rtl ul ul,
.rtl ol ol,
.rtl ul ol,
.rtl ol ul {
  padding-right: var(--space-4);
  padding-left: 0;
}

/* Inline lists */
.rtl .list-inline {
  padding-right: 0;
}

.rtl .list-inline > li {
  margin-left: var(--space-4);
  margin-right: 0;
}

/* ==========================================================================
   Forms RTL
   ========================================================================== */

.rtl input,
.rtl textarea,
.rtl select {
  text-align: right;
  direction: rtl;
}

/* Email inputs - keep LTR */
.rtl input[type="email"],
.rtl input[type="url"] {
  direction: ltr;
  text-align: right;
}

/* Select dropdown arrow position */
.rtl select {
  background-position: left var(--space-4) center;
  padding-left: var(--space-10);
  padding-right: var(--space-4);
}

/* Checkbox & Radio */
.rtl input[type="checkbox"],
.rtl input[type="radio"] {
  margin-right: 0;
  margin-left: var(--space-2);
}

.rtl .checkbox-label,
.rtl .radio-label {
  padding-right: var(--space-8);
  padding-left: 0;
}

/* Form labels */
.rtl label {
  text-align: right;
}

/* Form rows with icons */
.rtl .form-icon-start {
  right: var(--space-3);
  left: auto;
}

.rtl .form-icon-end {
  left: var(--space-3);
  right: auto;
}

.rtl .has-icon-start input {
  padding-right: var(--space-10);
  padding-left: var(--space-4);
}

.rtl .has-icon-end input {
  padding-left: var(--space-10);
  padding-right: var(--space-4);
}

/* Search form */
.rtl .search-form {
  flex-direction: row-reverse;
}

.rtl .search-field {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.rtl .search-submit {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* ==========================================================================
   Buttons RTL
   ========================================================================== */

/* Button icon positions */
.rtl .btn .icon-start,
.rtl .button .icon-start {
  margin-left: var(--space-2);
  margin-right: 0;
  order: 1;
}

.rtl .btn .icon-end,
.rtl .button .icon-end {
  margin-right: var(--space-2);
  margin-left: 0;
  order: -1;
}

/* Arrow icons - flip horizontally */
.rtl .icon-arrow,
.rtl .icon-chevron,
.rtl .rtl-flip,
.rtl .next-arrow,
.rtl .prev-arrow,
.rtl [class*="arrow-right"],
.rtl [class*="arrow-left"],
.rtl [class*="chevron-right"],
.rtl [class*="chevron-left"] {
  transform: scaleX(-1);
}

/* Button groups */
.rtl .btn-group {
  flex-direction: row-reverse;
}

.rtl .btn-group .btn:first-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.rtl .btn-group .btn:last-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* ==========================================================================
   Navigation RTL
   ========================================================================== */

/* Main navigation */
.rtl .main-nav,
.rtl .primary-menu,
.rtl .nav-menu > ul {
  flex-direction: row-reverse;
}

.rtl .nav-menu li {
  margin-left: var(--space-6);
  margin-right: 0;
}

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

/* Dropdown menus */
.rtl .dropdown-menu,
.rtl .sub-menu {
  right: 0;
  left: auto;
  text-align: right;
}

.rtl .dropdown-menu .sub-menu {
  right: 100%;
  left: auto;
}

/* Dropdown arrows */
.rtl .has-dropdown > a::after {
  margin-right: var(--space-2);
  margin-left: 0;
}

/* Mobile menu */
.rtl .mobile-menu {
  right: 0;
  left: auto;
  transform: translateX(100%);
}

.rtl .mobile-menu.is-open {
  transform: translateX(0);
}

/* Hamburger menu position */
.rtl .menu-toggle {
  order: -1;
}

/* Breadcrumbs */
.rtl .breadcrumb,
.rtl .woocommerce-breadcrumb {
  flex-direction: row-reverse;
}

.rtl .breadcrumb-separator {
  transform: scaleX(-1);
  margin: 0 var(--space-2);
}

/* ==========================================================================
   Cards & Products RTL
   ========================================================================== */

/* Product card badge position */
.rtl .product-badge,
.rtl .badge-sale,
.rtl .badge-new,
.rtl .onsale {
  right: var(--space-3);
  left: auto;
}

/* Product quick actions */
.rtl .product-actions {
  right: var(--space-3);
  left: auto;
}

/* Product card content */
.rtl .product-card__content,
.rtl .woocommerce-loop-product__title,
.rtl .product-title {
  text-align: right;
}

/* Star ratings - keep LTR */
.rtl .star-rating,
.rtl .woocommerce .star-rating {
  direction: ltr;
  float: right;
}

/* Price display */
.rtl .price-wrapper {
  flex-direction: row-reverse;
}

.rtl .price del {
  margin-right: var(--space-2);
  margin-left: 0;
}

/* ==========================================================================
   WooCommerce RTL
   ========================================================================== */

/* Shop page sidebar */
.rtl .shop-layout {
  flex-direction: row-reverse;
}

.rtl .shop-sidebar {
  order: 1;
}

.rtl .shop-products {
  order: -1;
}

/* Product filters */
.rtl .widget-title {
  text-align: right;
}

.rtl .widget ul {
  padding-right: 0;
}

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

/* Price filter slider */
.rtl .price_slider_wrapper {
  direction: ltr;
}

/* Product gallery */
.rtl .woocommerce-product-gallery {
  float: right;
}

.rtl .woocommerce-product-gallery__trigger {
  right: var(--space-3);
  left: auto;
}

.rtl .woocommerce-product-gallery .flex-control-thumbs {
  flex-direction: row-reverse;
}

/* Product summary */
.rtl .summary.entry-summary {
  float: left;
  text-align: right;
}

/* Variations */
.rtl .variations {
  text-align: right;
}

.rtl .variations td.label {
  text-align: right;
  padding-left: var(--space-4);
  padding-right: 0;
}

/* Quantity input */
.rtl .quantity {
  flex-direction: row-reverse;
}

.rtl .quantity .minus {
  order: 1;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.rtl .quantity .plus {
  order: -1;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* Add to cart form */
.rtl form.cart {
  flex-direction: row-reverse;
}

.rtl form.cart .quantity {
  margin-left: var(--space-4);
  margin-right: 0;
}

/* Product tabs */
.rtl .woocommerce-tabs ul.tabs {
  flex-direction: row-reverse;
  padding-right: 0;
}

.rtl .woocommerce-tabs ul.tabs li {
  margin-left: var(--space-2);
  margin-right: 0;
}

/* Related products */
.rtl .related.products ul.products,
.rtl .upsells.products ul.products,
.rtl .cross-sells ul.products {
  flex-direction: row-reverse;
}

/* Cart table */
.rtl .woocommerce-cart-form table {
  direction: rtl;
}

.rtl .woocommerce-cart-form th,
.rtl .woocommerce-cart-form td {
  text-align: right;
}

.rtl .woocommerce-cart-form .product-remove {
  text-align: center;
}

.rtl .woocommerce-cart-form .product-thumbnail {
  padding-left: var(--space-4);
  padding-right: 0;
}

/* Cart totals */
.rtl .cart_totals {
  float: left;
  text-align: right;
}

.rtl .cart_totals th {
  text-align: right;
}

.rtl .cart_totals td {
  text-align: left;
}

/* Checkout form */
.rtl .woocommerce-checkout {
  direction: rtl;
}

.rtl .woocommerce-checkout .col2-set {
  flex-direction: row-reverse;
}

.rtl .woocommerce-checkout #customer_details {
  flex-direction: row-reverse;
}

.rtl #order_review_heading,
.rtl #order_review {
  float: left;
}

/* Payment methods */
.rtl .wc_payment_methods {
  padding-right: 0;
}

.rtl .wc_payment_method label {
  padding-right: var(--space-8);
  padding-left: 0;
}

.rtl .wc_payment_method input[type="radio"] {
  right: 0;
  left: auto;
}

/* Order details */
.rtl .woocommerce-order-details table {
  direction: rtl;
}

.rtl .woocommerce-order-details th,
.rtl .woocommerce-order-details td {
  text-align: right;
}

/* My Account */
.rtl .woocommerce-MyAccount-navigation {
  float: right;
}

.rtl .woocommerce-MyAccount-content {
  float: left;
}

.rtl .woocommerce-MyAccount-navigation ul {
  padding-right: 0;
}

/* Messages & Notices */
.rtl .woocommerce-message,
.rtl .woocommerce-error,
.rtl .woocommerce-info {
  text-align: right;
  padding-right: var(--space-12);
  padding-left: var(--space-4);
}

.rtl .woocommerce-message::before,
.rtl .woocommerce-error::before,
.rtl .woocommerce-info::before {
  right: var(--space-4);
  left: auto;
}

.rtl .woocommerce-message .button,
.rtl .woocommerce-error .button,
.rtl .woocommerce-info .button {
  float: left;
}

/* ==========================================================================
   Tables RTL
   ========================================================================== */

.rtl table {
  direction: rtl;
}

.rtl th,
.rtl td {
  text-align: right;
}

.rtl th:last-child,
.rtl td:last-child {
  text-align: left;
}

/* ==========================================================================
   Pagination RTL
   ========================================================================== */

.rtl .pagination,
.rtl .woocommerce-pagination {
  flex-direction: row-reverse;
}

.rtl .page-numbers li {
  margin-left: var(--space-2);
  margin-right: 0;
}

.rtl .page-numbers .prev,
.rtl .page-numbers .next {
  transform: scaleX(-1);
}

/* ==========================================================================
   Modals & Popups RTL
   ========================================================================== */

.rtl .modal-close {
  right: auto;
  left: var(--space-4);
}

.rtl .modal-content {
  text-align: right;
}

/* ==========================================================================
   Tooltips RTL
   ========================================================================== */

.rtl .tooltip {
  text-align: right;
}

.rtl .tooltip-right {
  left: 100%;
  right: auto;
}

.rtl .tooltip-left {
  right: 100%;
  left: auto;
}

/* ==========================================================================
   Elementor RTL Fixes
   ========================================================================== */

/* Elementor containers */
.rtl .elementor-widget-container {
  text-align: right;
}

/* Elementor icon list */
.rtl .elementor-icon-list-items {
  padding-right: 0;
}

.rtl .elementor-icon-list-icon {
  margin-left: var(--space-2);
  margin-right: 0;
}

/* Elementor image box */
.rtl .elementor-image-box-wrapper {
  text-align: right;
}

.rtl .elementor-image-box-img {
  margin-left: var(--space-4);
  margin-right: 0;
}

/* Elementor testimonials */
.rtl .elementor-testimonial-content {
  text-align: right;
}

/* Elementor tabs */
.rtl .elementor-tabs .elementor-tabs-wrapper {
  flex-direction: row-reverse;
}

/* Elementor accordion */
.rtl .elementor-accordion .elementor-accordion-icon {
  order: 1;
  margin-left: 0;
  margin-right: var(--space-3);
}

.rtl .elementor-accordion .elementor-accordion-title {
  text-align: right;
}

/* Elementor progress bar */
.rtl .elementor-progress-bar {
  right: 0;
  left: auto;
}

/* Elementor counter */
.rtl .elementor-counter-number-wrapper {
  direction: ltr;
}

/* Elementor price list */
.rtl .elementor-price-list {
  text-align: right;
}

/* Elementor nav menu */
.rtl .elementor-nav-menu--main .elementor-nav-menu {
  flex-direction: row-reverse;
}

.rtl .elementor-nav-menu--dropdown {
  right: 0;
  left: auto;
}

/* Elementor product widgets */
.rtl .elementor-products-grid .product {
  text-align: right;
}

/* Elementor cart widget */
.rtl .elementor-menu-cart__container {
  right: auto;
  left: 0;
}

/* Elementor search form */
.rtl .elementor-search-form {
  flex-direction: row-reverse;
}

/* ==========================================================================
   Sliders & Carousels RTL
   ========================================================================== */

/* Swiper RTL */
.rtl .swiper-container {
  direction: rtl;
}

.rtl .swiper-button-prev {
  right: var(--space-4);
  left: auto;
}

.rtl .swiper-button-next {
  left: var(--space-4);
  right: auto;
}

.rtl .swiper-button-prev::after,
.rtl .swiper-button-next::after {
  transform: scaleX(-1);
}

/* Slick slider RTL */
.rtl .slick-slider {
  direction: rtl;
}

.rtl .slick-prev {
  right: var(--space-4);
  left: auto;
}

.rtl .slick-next {
  left: var(--space-4);
  right: auto;
}

/* ==========================================================================
   Trust Badges RTL
   ========================================================================== */

.rtl .trust-badges {
  flex-direction: row-reverse;
}

.rtl .trust-badge {
  flex-direction: row-reverse;
}

.rtl .trust-badge svg,
.rtl .trust-badge .icon {
  margin-left: var(--space-2);
  margin-right: 0;
}

/* ==========================================================================
   Footer RTL
   ========================================================================== */

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

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

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

.rtl .social-links {
  flex-direction: row-reverse;
}

.rtl .social-links a {
  margin-left: var(--space-3);
  margin-right: 0;
}

.rtl .social-links a:last-child {
  margin-left: 0;
}

/* Payment icons */
.rtl .payment-icons {
  flex-direction: row-reverse;
}

/* ==========================================================================
   Miscellaneous RTL
   ========================================================================== */

/* Back to top button */
.rtl .back-to-top {
  right: auto;
  left: var(--space-6);
}

/* Cookie notice */
.rtl .cookie-notice {
  text-align: right;
}

/* Loading spinner position */
.rtl .loading-overlay .spinner {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}

/* Alerts with icons */
.rtl .alert {
  padding-right: var(--space-12);
  padding-left: var(--space-4);
}

.rtl .alert-icon {
  right: var(--space-4);
  left: auto;
}

.rtl .alert-close {
  right: auto;
  left: var(--space-4);
}

/* Tags */
.rtl .tags,
.rtl .product-tags {
  flex-direction: row-reverse;
}

.rtl .tag {
  margin-left: var(--space-2);
  margin-right: 0;
}

/* Review rating */
.rtl .comment-form-rating {
  text-align: right;
}

.rtl .comment-form-rating .stars {
  direction: ltr;
  display: inline-flex;
}

/* Product meta */
.rtl .product_meta {
  text-align: right;
}

.rtl .product_meta > span {
  display: block;
}

/* Share buttons */
.rtl .share-buttons {
  flex-direction: row-reverse;
}

/* Quantity notification */
.rtl .qty-notification {
  right: auto;
  left: 0;
}
