/* LovableMart — Arabic / RTL overrides */
html { direction: rtl; }
body,
button, input, select, textarea,
.lm-hero-title, .lm-hero-sub, .lm-section-head h2,
.lm-product-card, .lm-product-title, .lm-price,
.lm-express-buy, .lm-express-buy input, .lm-express-buy textarea, .lm-express-buy select,
h1, h2, h3, h4, h5, h6, p, a, span, li, td, th, label {
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif !important;
}
body { direction: rtl; text-align: right; }

/* Flip common flex/inline directional spacing where needed */
.lm-cart-btn .lm-cart-count,
.lm-icon-btn .lm-cart-count { right: auto; left: -4px; }

/* Keep numeric and price LTR-friendly inside RTL flow */
.lm-price, .woocommerce-Price-amount, .amount, bdi, .lm-eb-qty, input[type="number"], input[type="tel"], input[type="email"] {
  direction: ltr;
  unicode-bidi: isolate;
}
.lm-price, .woocommerce-Price-amount, .amount { display: inline-block; }

/* Mirror simple icon spacing */
.lm-hero-cta { direction: rtl; }

/* v2.52.0 — Restore WooCommerce star font (was being overridden by Arabic font on span) */
.star-rating,
.star-rating *,
.star-rating::before,
.star-rating span::before {
  font-family: "star" !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
}
.woocommerce .star-rating {
  font-size: 16px;
  letter-spacing: 2px;
}

/* v2.53.0 — Prevent horizontal overflow on mobile (sticky ATC + RTL) */
html, body { overflow-x: hidden; max-width: 100%; }
.lm-sticky-atc {
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}
.lm-sticky-atc * { box-sizing: border-box; min-width: 0; }
body.single-product { padding-bottom: 80px; }

/* v2.54.0 — New Saudi Riyal symbol font */
@font-face {
  font-family: "SaudiRiyalSymbol";
  src: url("../fonts/saudiriyalsymbol.woff2") format("woff2"),
       url("../fonts/saudiriyalsymbol.woff") format("woff");
  font-display: swap;
}
.lm-sar {
  font-family: "SaudiRiyalSymbol", sans-serif !important;
  font-weight: bold;
  display: inline-block;
  margin: 0 2px;
  font-size: 0.95em;
  line-height: 1;
  vertical-align: baseline;
}

/* v2.55.0 — Force SaudiRiyalSymbol font on all price elements so the raw
   "ê" glyph renders correctly even when 3rd-party plugins (Quantity Breaks,
   sticky bars, mini-cart, etc.) strip our <span class="lm-sar"> wrapper.
   Digits fall back to IBM Plex Sans Arabic because SaudiRiyalSymbol only
   contains the riyal glyph. */
.woocommerce-Price-currencySymbol,
.lm-sar,
.woocommerce-Price-amount,
.woocommerce-Price-amount bdi,
.amount,
.amount bdi,
.lm-price,
.lm-price *,
.lm-eb-shipping-amount,
.lm-sticky-sub,
.lm-sticky-old,
.lm-qb-price,
.lm-qb-old,
.lm-qb-tier *,
.lm-eb-plugins,
.lm-eb-plugins *,
.wdr_table,
.wdr_table *,
.wdr_bulk_table_discount,
.wdr_bulk_table_discount *,
.awdr-bulk-customizable-table,
.awdr-bulk-customizable-table *,
.qbp-price,
.qbp-price *,
.product-price,
del .amount,
ins .amount {
  font-family: "SaudiRiyalSymbol", "IBM Plex Sans Arabic", system-ui, sans-serif !important;
}
.lm-sar,
.woocommerce-Price-currencySymbol {
  font-family: "SaudiRiyalSymbol", sans-serif !important;
  margin: 0 2px;
  font-weight: bold;
}
