/* 系统字体由操作系统提供，阿语页面不请求第三方字体。 */
html[lang="ar"] body,
html[lang="ar"] :is(button, input, select, textarea) {
    font-family: Tahoma, Arial, "Geeza Pro", system-ui, sans-serif;
    letter-spacing: normal;
}

html[dir="rtl"] :is(.price, [data-price-amount], .sv-buy-sku .select-all,
    input[type="email"], input[type="tel"], input[type="url"], input[type="number"],
    input[name="postcode"], input[name="vat_id"], input[name="taxvat"], input[name="telephone"],
    input[name="fax"], input[inputmode="numeric"], input[inputmode="decimal"], a[href^="tel:"], a[href^="mailto:"]) {
    direction: ltr;
    unicode-bidi: isolate;
}

html[dir="rtl"] :is(.sv-tool-card-arrow, .sv-direction-icon) {
    display: inline-block;
    scale: -1 1;
}

html[dir="rtl"] :is([data-prev], [data-next]) svg {
    scale: -1 1;
}

html[dir="rtl"] :is(.page-title .base, .product-item-name, .sv-description-body p) {
    unicode-bidi: plaintext;
}

html[dir="rtl"] .sv-viewer-stage {
    direction: ltr;
}

/* Luma 结账的物理浮动和列间距只在阿语下覆盖。 */
html[dir="rtl"] .checkout-index-index .logo {
    float: inline-start;
    margin-left: 0;
    margin-right: 0;
}

html[dir="rtl"] .checkout-index-index .authentication-wrapper {
    float: inline-end;
    text-align: end;
}

html[dir="rtl"] .checkout-index-index .authentication-dropdown {
    text-align: start;
}

html[dir="rtl"] .checkout-index-index select {
    background-position: 10px 45%;
    padding-inline: 9px 25px;
}

html[dir="rtl"] .checkout-index-index :is(th, td, .field, .product-item-name, .product-item-name-block, .subtotal, .action-toggle) {
    text-align: start;
}

html[dir="rtl"] .checkout-index-index .table-totals .amount {
    text-align: end;
}

html[dir="rtl"] .checkout-index-index :is(.product-image-container, .product-item-photo) {
    float: inline-start;
}

html[dir="rtl"] .checkout-index-index .minicart-items .product-item-details {
    padding-left: 0;
    padding-inline-start: 88px;
}

html[dir="rtl"] .checkout-index-index .field-tooltip {
    right: auto;
    inset-inline-end: 0;
}

html[dir="rtl"] .checkout-index-index .field-tooltip .field-tooltip-content {
    right: auto;
    inset-inline-end: -10px;
    top: 40px;
}

html[dir="rtl"] .checkout-index-index .field-tooltip .field-tooltip-content::before,
html[dir="rtl"] .checkout-index-index .field-tooltip .field-tooltip-content::after {
    right: auto;
    inset-inline-end: 10px;
    top: 0;
    margin-top: -21px;
    width: 0;
    border: 10px solid transparent;
    border-bottom-color: #999;
}

html[dir="rtl"] .checkout-index-index .field-tooltip .field-tooltip-content::after {
    top: 1px;
    border-bottom-color: #f4f4f4;
}

html[dir="rtl"] .checkout-index-index .field .control._with-tooltip :is(input, select) {
    margin-right: 0;
    margin-inline-end: 10px;
}

html[dir="rtl"] .checkout-index-index .payment-method-title :is(input[type="radio"], input[type="checkbox"]) {
    margin-right: 0;
    margin-inline-end: 5px;
}

html[dir="rtl"] .checkout-index-index .opc-block-shipping-information .shipping-information-title .action-edit {
    right: auto;
    inset-inline-end: 0;
}

@media (min-width: 768px) {
    html[dir="rtl"] .checkout-index-index .logo {
        margin-inline-end: 40px;
    }

    html[dir="rtl"] .checkout-index-index .opc-wrapper {
        float: inline-start;
        padding-right: 0;
        padding-inline-end: 30px;
    }

    html[dir="rtl"] .checkout-index-index .opc-sidebar {
        float: inline-end;
        margin-left: 0;
        margin-right: 0;
    }

    html[dir="rtl"] .checkout-index-index .actions-toolbar > .primary {
        float: inline-end;
    }
}

@media (max-width: 767px) {
    html[dir="rtl"] .checkout-index-index .opc-sidebar {
        left: auto;
        right: 0;
    }
}
html[dir="rtl"] bdi[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

html[dir="rtl"] :is(.checkout-cart-index, .sv-page-cart, .checkout-index-index, #cart-drawer)
    :is(.product-item-name, .sv-mobile-summary__name, .sv-mobile-summary__item-name) bdi[dir="ltr"] {
    white-space: nowrap;
}
