/**
 * Mixed Arabic/English text — preserve typed word order (first word → last word).
 * Uses unicode-bidi: plaintext so the browser BiDi algorithm does not reorder segments.
 */

.bb-bidi-text {
  unicode-bidi: plaintext;
}

/* POS — product cards & cart line names */
#product_list_body .product_box .text_div > small:first-child,
.pos-product-name-wrap,
.pos-product-name-wrap .text-link,
.bb-sn-line-product__name,

/* Purchase / sales / stock line tables */
.purchase-entry-table-wrapper tbody td:nth-child(2),
.bb-sn-purchase-show-lines tbody td:nth-child(2),
.bb-sn-purchase-form tbody .bb-sn-line-product__name,

/* Catalog & labels */
.bb-sn-labels-product-name,
.bb-sn-product-list-table-wrap #product_table tbody td:nth-child(2),
.bb-sn-product-ac__name,
.bb-labels-print-line:not(.bb-labels-print-line--business),

/* Receipt print — product name column (first cell in line-items tables) */
.bb-sn-receipt-print table.receipt-items-bordered tbody td:first-child,
.bb-sn-receipt-print table.table-bordered tbody tr td:first-child,
.bb-sn-receipt-print table.table tbody tr td.align-middle:first-child,
.bb-sn-receipt-print--thermal .ticket table tbody td:first-child,

/* Invoice builder fallback table (print_simple) */
.bb-invoice-fallback-lines tbody td:first-child {
  unicode-bidi: plaintext;
}

@media print {
  .bb-bidi-text,
  #product_list_body .product_box .text_div > small:first-child,
  .pos-product-name-wrap,
  .bb-sn-line-product__name,
  .bb-sn-receipt-print table.receipt-items-bordered tbody td:first-child,
  .bb-sn-receipt-print table.table-bordered tbody tr td:first-child,
  .bb-labels-print-line:not(.bb-labels-print-line--business) {
    unicode-bidi: plaintext;
  }
}
