/*
 * STC Because You Deserve — frontend
 * Built to the STC DLS: sharp 90° corners (never rounded),
 * purple #4F008C brand, coral #FF375E for all interactions,
 * lowercase headlines, mobile-first.
 */

.stc-byd {
    --stc-purple:        #4F008C;
    --stc-purple-dark:   #290348;
    --stc-purple-light:  #7500DD;
    --stc-coral:         #FF375E;
    --stc-coral-dark:    #E1002C;
    --stc-coral-light:   #FF7896;
    --stc-air:           #FFFFFF;
    --stc-off-white:     #F5F5F5;
    --stc-grey-1:        #4C4C4C;
    --stc-grey-2:        #6E6E6E;
    --stc-grey-3:        #989696;
    --stc-grey-4:        #C4C5C3;
    --stc-grey-5:        #DEDDDD;
    --stc-success:       #308008;
    --stc-error:         #ED0C00;
    --stc-radius:        0;

    box-sizing: border-box;
    color: #000;
    font-family: "STC Forward", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 1326px;
    padding: 24px 16px;
    width: 100%;
}
.stc-byd *,
.stc-byd *::before,
.stc-byd *::after { box-sizing: inherit; min-width: 0; }

/* Defensive overflow guards — keeps any long content / image / grid item
   from poking past its container and creating page-level horizontal scroll. */
.stc-byd,
.stc-byd-modal,
.stc-byd-cart,
.stc-byd-banner {
    max-width: 100%;
    overflow-wrap: anywhere;
}
.stc-byd img,
.stc-byd-banner img,
.stc-byd-modal img { height: auto; max-width: 100%; }

/* ---------- Gate / OTP card ---------- */

.stc-byd--gate,
.stc-byd--otp {
    /* No section background — the body owns the solid purple canvas. */
    align-items: center;
    color: var(--stc-air);
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 70vh;
    padding: 40px 16px;
    width: 100%;
}

/* On BYD gate/OTP pages, paint <body> purple so any gap around the section
   blends with it. We deliberately do NOT touch theme wrappers, scroll, or
   widths — fighting Elementor/WPML's RTL layout caused horizontal clipping
   on the header/footer. The section's own gradient sits inside the wrapper
   at natural width; the body's solid purple covers everything behind. */
body.stc-byd-page:not(.stc-byd-verified) {
    background-color: #4F008C;
}
body.stc-byd-page:not(.stc-byd-verified) .site-main,
body.stc-byd-page:not(.stc-byd-verified) main,
body.stc-byd-page:not(.stc-byd-verified) .entry-content,
body.stc-byd-page:not(.stc-byd-verified) .page-content {
    background: transparent;
}
.stc-byd--gate .stc-byd__card,
.stc-byd--otp  .stc-byd__card {
    background: var(--stc-air);
    color: #000;
    max-width: 480px;
    padding: 32px 28px;
    width: 100%;
}
.stc-byd__eyebrow {
    color: var(--stc-coral);
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    margin-bottom: 8px;
    text-transform: lowercase;
}
.stc-byd__title {
    color: var(--stc-purple);
    font-size: 32px;
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 12px;
    text-transform: lowercase;
}
.stc-byd__lede {
    color: var(--stc-grey-1);
    font-size: 16px;
    margin: 0 0 24px;
}
.stc-byd__hint {
    color: var(--stc-grey-2);
    font-size: 13px;
    margin: 12px 0 0;
}

/* ---------- Form fields ---------- */

.stc-byd__form { display: flex; flex-direction: column; gap: 16px; }
.stc-byd__field { display: flex; flex-direction: column; gap: 6px; }
.stc-byd__field-label {
    color: var(--stc-grey-1);
    font-size: 13px;
    font-weight: 500;
}
.stc-byd__field-input {
    background: var(--stc-air);
    border: 1px solid var(--stc-grey-5);
    border-radius: 0;
    color: #000;
    font: inherit;
    font-size: 16px;
    min-height: 44px;
    padding: 10px 14px;
    width: 100%;
    transition: border-color .15s ease;
}
.stc-byd__field-input:focus {
    border-color: var(--stc-coral);
    outline: none;
}
.stc-byd__otp-input {
    border: 1px solid var(--stc-grey-4);
    font-family: "Courier New", monospace;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 12px;
    padding: 14px 18px;
    text-align: center;
}
.stc-byd__otp-input:focus { border-color: var(--stc-coral); }

/* ---------- Buttons ---------- */

.stc-byd__btn {
    align-items: center;
    background: var(--stc-coral);
    border: 2px solid var(--stc-coral);
    border-radius: 0;
    color: var(--stc-air);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    gap: 8px;
    justify-content: center;
    line-height: 1;
    min-height: 44px;
    padding: 12px 20px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.stc-byd__btn:hover {
    background: var(--stc-coral-dark);
    border-color: var(--stc-coral-dark);
    color: var(--stc-air);
}
.stc-byd__btn:focus     { outline: none; }
.stc-byd__btn:focus-visible {
    background: var(--stc-coral-dark);
    border-color: var(--stc-coral-dark);
    color: var(--stc-air);
    outline: 2px solid var(--stc-coral);
    outline-offset: 2px;
}
.stc-byd__btn:active { background: var(--stc-coral-dark); }
.stc-byd__btn--secondary {
    background: transparent;
    color: var(--stc-coral);
}
.stc-byd__btn--secondary:hover,
.stc-byd__btn--secondary:focus-visible {
    background: transparent;
    color: var(--stc-coral-dark);
}
.stc-byd__btn--compact { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.stc-byd__btn--block   { width: 100%; }
.stc-byd__btn[disabled] {
    background: var(--stc-grey-4);
    border-color: var(--stc-grey-4);
    color: var(--stc-grey-2);
    cursor: not-allowed;
}
.stc-byd__btn-arrow { font-size: 18px; line-height: 1; }
.stc-byd__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Alerts ---------- */

.stc-byd__alert {
    border-left: 4px solid var(--stc-coral);
    font-size: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
}
.stc-byd__alert--error   { background: #FFF1F1; border-left-color: var(--stc-error); color: var(--stc-error); }
.stc-byd__alert--success { background: #F1F8EC; border-left-color: var(--stc-success); color: var(--stc-success); }

/* ---------- Shop hero ---------- */

.stc-byd--shop { padding: 32px 16px 64px; }
.stc-byd__hero {
    background: var(--stc-purple);
    color: var(--stc-air);
    margin: 0 0 24px;
    padding: 40px 28px;
}
.stc-byd__hero-title {
    color: var(--stc-air);
    font-size: 40px;
    font-weight: 500;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 8px 0 12px;
    text-transform: lowercase;
}
.stc-byd__hero-lede { color: var(--stc-air); font-size: 16px; margin: 0; max-width: 560px; opacity: .92; }

/* ---------- Filters ----------
 * Mobile-first: stack vertically, full-width fields + full-width Apply button.
 * Tablet/desktop (≥ 720px): single row, fields share width equally,
 * Apply pinned compact at the end, baseline-aligned to fields.
 */

.stc-byd__filters {
    background: var(--stc-off-white);
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
}

.stc-byd__filters .stc-byd__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    width: 100%;
}
.stc-byd__filters .stc-byd__field-label { font-size: 12px; letter-spacing: .02em; }
.stc-byd__filters .stc-byd__field-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--stc-air);
    border: 1px solid var(--stc-grey-5);
    border-radius: 0;
    box-sizing: border-box;
    color: #000;
    font: inherit;
    font-size: 14px;
    height: 44px;
    line-height: 1;
    margin: 0;
    min-height: 0;
    min-width: 0;
    padding: 0 14px;
    width: 100%;
}
/* Force lowercase in English (and any dynamic category names) without
   altering the source content — RTL is unaffected since Arabic has no case. */
:lang(en) .stc-byd__filters select.stc-byd__field-input,
:lang(en) .stc-byd__filters select.stc-byd__field-input option,
:lang(en) .stc-byd__filters input[type="search"] {
    text-transform: lowercase;
}
:lang(en) .stc-byd__filters input[type="search"]::placeholder { text-transform: lowercase; }
.stc-byd__filters .stc-byd__field-input:hover { border-color: var(--stc-grey-3); }
.stc-byd__filters .stc-byd__field-input:focus { border-color: var(--stc-coral); outline: none; }

/* WebKit: kill the built-in search-field chrome that adds inner padding,
   rounded edges, and the cancel "x" button. */
.stc-byd__filters input[type="search"]::-webkit-search-decoration,
.stc-byd__filters input[type="search"]::-webkit-search-cancel-button,
.stc-byd__filters input[type="search"]::-webkit-search-results-button,
.stc-byd__filters input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

/* Native select → custom-styled (coral chevron, consistent padding) */
.stc-byd__filters select.stc-byd__field-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23FF375E' d='M6 8 0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 7px;
    cursor: pointer;
    padding-right: 36px;
}
[dir="rtl"] .stc-byd__filters select.stc-byd__field-input,
body.stc-byd-rtl .stc-byd__filters select.stc-byd__field-input {
    background-position: left 14px center;
    padding-left: 36px;
    padding-right: 14px;
}

/* Apply button — mobile full-width; desktop compact at end */
.stc-byd__filters .stc-byd__btn {
    height: 44px;
    justify-content: center;
    min-height: 0;
    padding: 0 24px;
    width: 100%;
}

@media (min-width: 720px) {
    .stc-byd__filters {
        align-items: end;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
        padding: 16px 20px;
    }
    .stc-byd__filters .stc-byd__field { flex: 1 1 0; width: auto; }
    .stc-byd__filters .stc-byd__btn   { flex: 0 0 auto; width: auto; }
}

/* ---------- Product grid ---------- */

.stc-byd__grid {
    display: grid;
    gap: 21px;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (min-width: 540px)  { .stc-byd__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .stc-byd__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stc-byd__grid { gap: 30px; grid-template-columns: repeat(4, 1fr); } }

.stc-byd-product {
    background: var(--stc-air);
    border: 1px solid var(--stc-grey-5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    position: relative;
    transition: border-color .15s ease, transform .15s ease;
}
.stc-byd-product:hover { border-color: var(--stc-coral); }
.stc-byd-product__badge {
    background: var(--stc-coral);
    color: var(--stc-air);
    font-size: 13px;
    font-weight: 600;
    left: 16px;
    padding: 4px 8px;
    position: absolute;
    top: 16px;
    z-index: 2;
}
.stc-byd-product__link { color: inherit; text-decoration: none; }
.stc-byd-product__media { margin: -16px -16px 0; padding: 16px; }
.stc-byd-product__media img { display: block; height: auto; margin: 0 auto; max-width: 100%; }
.stc-byd-product__title { font-size: 16px; font-weight: 500; margin: 0; min-height: 2.8em; }
.stc-byd-product__price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 8px; font-size: 16px; }
.stc-byd-product__price del { color: var(--stc-grey-3); text-decoration: line-through; }
.stc-byd-product__price ins { color: var(--stc-coral); font-weight: 600; text-decoration: none; }

/* ---------- Pagination ---------- */

.stc-byd__pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.stc-byd__pagination a,
.stc-byd__pagination span {
    background: var(--stc-air);
    border: 1px solid var(--stc-grey-5);
    color: var(--stc-grey-1);
    display: inline-flex;
    min-width: 40px;
    padding: 8px 12px;
    text-decoration: none;
    justify-content: center;
}
.stc-byd__pagination .current {
    background: var(--stc-coral);
    border-color: var(--stc-coral);
    color: var(--stc-air);
}
.stc-byd__pagination a:hover { border-color: var(--stc-coral); color: var(--stc-coral); }

/* ---------- Empty state ---------- */
.stc-byd__empty { color: var(--stc-grey-2); padding: 40px 0; text-align: center; }

/* ---------- Site-wide price tag (set by Pricing filter) ---------- */
/* Inherit the same STC DLS tokens used by the .stc-byd container.
   These selectors fire OUTSIDE of .stc-byd (e.g. on the single product
   summary, shop loop, cart, checkout) so we re-declare the tokens here. */
.stc-byd-price,
.stc-byd-tag {
    --stc-purple:      #4F008C;
    --stc-purple-dark: #290348;
    --stc-coral:       #FF375E;
    --stc-coral-dark:  #E1002C;
    --stc-air:         #FFFFFF;
    --stc-grey-3:      #989696;
}

.stc-byd-price {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
}
.stc-byd-price del { color: var(--stc-grey-3); text-decoration: line-through; }
.stc-byd-price ins { color: var(--stc-coral); font-weight: 600; text-decoration: none; }

/* Cart / checkout subtotal layout: prices on one line, pill on the next. */
.stc-byd-cart {
    align-items: flex-end;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
}
.stc-byd-cart .stc-byd-price { justify-content: flex-end; }
[dir="rtl"] .stc-byd-cart,
body.stc-byd-rtl .stc-byd-cart { align-items: flex-start; }
[dir="rtl"] .stc-byd-cart .stc-byd-price,
body.stc-byd-rtl .stc-byd-cart .stc-byd-price { justify-content: flex-start; }

.stc-byd-tag {
    align-items: center;
    background: var(--stc-purple);
    border-radius: 0; /* DLS hard rule: sharp 90° corners */
    box-shadow: inset 3px 0 0 var(--stc-coral);
    color: var(--stc-air);
    display: inline-flex;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1;
    padding: 6px 10px 6px 12px;
    text-transform: lowercase;
    vertical-align: middle;
    white-space: nowrap;
}
[dir="rtl"] .stc-byd-tag,
body.stc-byd-rtl .stc-byd-tag { box-shadow: inset -3px 0 0 var(--stc-coral); padding: 6px 12px 6px 10px; }

/* ---------- Single product banner ---------- */

.stc-byd-banner {
    background: var(--stc-purple);
    color: var(--stc-air);
    margin: 0 0 20px;
    padding: 16px 20px;
}
.stc-byd-banner__inner {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: space-between;
}
@media (min-width: 720px) { .stc-byd-banner__inner { flex-direction: row; } }
.stc-byd-banner__eyebrow {
    color: var(--stc-coral-light);
    display: block;
    font-size: 12px;
    letter-spacing: .04em;
    margin-bottom: 4px;
    text-transform: lowercase;
}
.stc-byd-banner__headline { font-size: 16px; font-weight: 500; }
.stc-byd-banner__price del { color: rgba(255,255,255,.6); margin-right: 8px; text-decoration: line-through; }
.stc-byd-banner__price ins { background: var(--stc-coral); color: var(--stc-air); font-weight: 600; padding: 4px 10px; text-decoration: none; }

/* ---------- Auth modal ----------
 * STC DLS: purple-dark @ 80% overlay; sharp-corner white card; coral tabs;
 * coral primary CTA; sentence-case labels but all text is lowercase per
 * the BYD voice. Mobile-first: fills the screen on narrow viewports.
 */

.stc-byd-modal {
    --stc-purple:      #4F008C;
    --stc-purple-dark: #290348;
    --stc-coral:       #FF375E;
    --stc-coral-dark:  #E1002C;
    --stc-air:         #FFFFFF;
    --stc-off-white:   #F5F5F5;
    --stc-grey-1:      #4C4C4C;
    --stc-grey-2:      #6E6E6E;
    --stc-grey-3:      #989696;
    --stc-grey-5:      #DEDDDD;
    --stc-error:       #ED0C00;

    box-sizing: border-box;
    color: #000;
    font-family: "STC Forward", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    inset: 0;
    position: fixed;
    z-index: 99999;
}
.stc-byd-modal[hidden] { display: none; }
body.stc-byd-modal-open { overflow: hidden; }
.stc-byd-modal *,
.stc-byd-modal *::before,
.stc-byd-modal *::after { box-sizing: inherit; }

.stc-byd-modal__overlay {
    background: rgba(41, 3, 72, .8); /* purple-dark 80% per DLS overlays */
    inset: 0;
    position: absolute;
}

.stc-byd-modal__dialog {
    background: var(--stc-air);
    border-radius: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    gap: 16px;
    inset: 50% auto auto 50%;
    max-height: calc(100dvh - 48px);
    max-width: 460px;
    overflow: auto;
    padding: 28px 28px 24px;
    position: absolute;
    transform: translate(-50%, -50%);
    /* Use % of the .stc-byd-modal fixed-positioned parent (which IS the
       viewport), minus 32px gutter. Avoids 100vw which includes scrollbar
       width and triggers a 1–2px horizontal scroll. */
    width: calc(100% - 32px);
    animation: stc-byd-modal-in .18s ease-out;
}
@keyframes stc-byd-modal-in {
    from { transform: translate(-50%, -46%); opacity: 0; }
    to   { transform: translate(-50%, -50%); opacity: 1; }
}

.stc-byd-modal__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--stc-grey-2);
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 14px;
    top: 14px;
    transition: color .12s ease;
    width: 32px;
    -webkit-tap-highlight-color: transparent;
}
.stc-byd-modal__close:hover { background: transparent; color: var(--stc-coral); }
.stc-byd-modal__close:focus { outline: none; }
.stc-byd-modal__close:focus-visible { color: var(--stc-coral); outline: none; }
[dir="rtl"] .stc-byd-modal__close,
body.stc-byd-rtl .stc-byd-modal__close { left: 14px; right: auto; }

.stc-byd-modal__header { display: flex; flex-direction: column; gap: 4px; }
.stc-byd-modal__title {
    color: var(--stc-purple);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.15;
    margin: 0;
    text-transform: lowercase;
}

.stc-byd-modal__tabs {
    border-bottom: 1px solid var(--stc-grey-5);
    display: flex;
    gap: 4px;
}
.stc-byd-modal__tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--stc-grey-2);
    cursor: pointer;
    flex: 1 1 0;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: -1px;
    padding: 12px 8px;
    text-transform: lowercase;
    transition: color .12s ease, border-color .12s ease;
    -webkit-tap-highlight-color: transparent;
}
.stc-byd-modal__tab:hover { background: transparent; color: var(--stc-coral); }
.stc-byd-modal__tab:focus { outline: none; }
.stc-byd-modal__tab:focus-visible { color: var(--stc-coral); outline: none; box-shadow: inset 0 -2px 0 var(--stc-coral); }
.stc-byd-modal__tab.is-active {
    background: transparent;
    border-bottom-color: var(--stc-coral);
    color: var(--stc-coral);
}

.stc-byd-modal__alert {
    background: #FFF1F1;
    border-left: 4px solid var(--stc-error);
    color: var(--stc-error);
    font-size: 14px;
    padding: 10px 12px;
}

.stc-byd-modal__panel {
    display: none;
    flex-direction: column;
    gap: 14px;
}
.stc-byd-modal__panel.is-active { display: flex; }

.stc-byd-modal__note {
    background: var(--stc-off-white);
    border-left: 3px solid var(--stc-coral);
    color: var(--stc-grey-1);
    font-size: 13px;
    margin: 0;
    padding: 10px 12px;
}
.stc-byd-modal__hint { color: var(--stc-grey-2); font-size: 12px; }

.stc-byd-modal .stc-byd__field-input {
    background: var(--stc-air);
    border: 1px solid var(--stc-grey-5);
    border-radius: 0;
    box-sizing: border-box;
    color: #000;
    font: inherit;
    font-size: 15px;
    height: 44px;
    line-height: 1;
    margin: 0;
    min-height: 0;
    min-width: 0;
    padding: 0 14px;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.stc-byd-modal .stc-byd__field-input:hover { border-color: var(--stc-grey-3); }
.stc-byd-modal .stc-byd__field-input:focus { border-color: var(--stc-coral); outline: none; }

.stc-byd-modal__checkbox {
    align-items: center;
    color: var(--stc-grey-1);
    display: inline-flex;
    font-size: 13px;
    gap: 8px;
}
.stc-byd-modal__checkbox input { accent-color: var(--stc-coral); }

.stc-byd-modal__foot {
    color: var(--stc-grey-2);
    font-size: 13px;
    margin: 0;
    text-align: center;
}
.stc-byd-modal__foot a { color: var(--stc-coral); text-decoration: none; }
.stc-byd-modal__foot a:hover { color: var(--stc-coral-dark); text-decoration: underline; }

.stc-byd-modal .stc-byd__btn--block { width: 100%; }
.stc-byd-modal .stc-byd__btn[aria-busy="true"] { opacity: .8; cursor: progress; }

/* On the gate, give the secondary "create account" CTA enough contrast on
   the purple gradient. (overrides the default secondary which is coral border.) */
.stc-byd__btn--ghost-on-purple {
    background: transparent;
    border-color: var(--stc-air);
    color: var(--stc-air);
}
.stc-byd__btn--ghost-on-purple:hover,
.stc-byd__btn--ghost-on-purple:focus-visible {
    background: var(--stc-air);
    border-color: var(--stc-air);
    color: var(--stc-purple);
}

/* ---------- RTL ---------- */
[dir="rtl"] .stc-byd__btn-arrow,
body.stc-byd-rtl .stc-byd__btn-arrow { transform: scaleX(-1); }
[dir="rtl"] .stc-byd-product__badge,
body.stc-byd-rtl .stc-byd-product__badge { left: auto; right: 16px; }
[dir="rtl"] .stc-byd-modal__note,
body.stc-byd-rtl .stc-byd-modal__note { border-left: 0; border-right: 3px solid var(--stc-coral); }
[dir="rtl"] .stc-byd-modal__alert,
body.stc-byd-rtl .stc-byd-modal__alert { border-left: 0; border-right: 4px solid var(--stc-error); }

/* ---------- RTL text-alignment overrides ----------
 * Even with dir="rtl" on our wrappers, many themes inject a global
 * `text-align: left` on body / .entry-content that wins. Force right
 * alignment on every BYD text surface (except OTP code + pagination).
 */
[dir="rtl"] .stc-byd,
body.stc-byd-rtl .stc-byd,
[dir="rtl"] .stc-byd-modal,
body.stc-byd-rtl .stc-byd-modal,
[dir="rtl"] .stc-byd-cart,
body.stc-byd-rtl .stc-byd-cart,
[dir="rtl"] .stc-byd-banner,
body.stc-byd-rtl .stc-byd-banner {
    text-align: right;
}
[dir="rtl"] .stc-byd__title,
body.stc-byd-rtl .stc-byd__title,
[dir="rtl"] .stc-byd__lede,
body.stc-byd-rtl .stc-byd__lede,
[dir="rtl"] .stc-byd__eyebrow,
body.stc-byd-rtl .stc-byd__eyebrow,
[dir="rtl"] .stc-byd__hero-title,
body.stc-byd-rtl .stc-byd__hero-title,
[dir="rtl"] .stc-byd__hero-lede,
body.stc-byd-rtl .stc-byd__hero-lede,
[dir="rtl"] .stc-byd__hint,
body.stc-byd-rtl .stc-byd__hint,
[dir="rtl"] .stc-byd__field-label,
body.stc-byd-rtl .stc-byd__field-label,
[dir="rtl"] .stc-byd__alert,
body.stc-byd-rtl .stc-byd__alert,
[dir="rtl"] .stc-byd__empty,
body.stc-byd-rtl .stc-byd__empty,
[dir="rtl"] .stc-byd-modal__title,
body.stc-byd-rtl .stc-byd-modal__title,
[dir="rtl"] .stc-byd-modal__note,
body.stc-byd-rtl .stc-byd-modal__note,
[dir="rtl"] .stc-byd-modal__hint,
body.stc-byd-rtl .stc-byd-modal__hint,
[dir="rtl"] .stc-byd-modal__alert,
body.stc-byd-rtl .stc-byd-modal__alert,
[dir="rtl"] .stc-byd-product__title,
body.stc-byd-rtl .stc-byd-product__title {
    text-align: right;
}

/* Keep centered: OTP code input + pagination + the empty-state CTA */
[dir="rtl"] .stc-byd__otp-input,
body.stc-byd-rtl .stc-byd__otp-input,
[dir="rtl"] .stc-byd__pagination,
body.stc-byd-rtl .stc-byd__pagination,
[dir="rtl"] .stc-byd__empty,
body.stc-byd-rtl .stc-byd__empty,
[dir="rtl"] .stc-byd-modal__foot,
body.stc-byd-rtl .stc-byd-modal__foot {
    text-align: center;
}

/* Cart subtotal pill: prices align right (where the column lives anyway) */
[dir="rtl"] .stc-byd-cart .stc-byd-price,
body.stc-byd-rtl .stc-byd-cart .stc-byd-price { justify-content: flex-end; }
[dir="rtl"] .stc-byd-cart,
body.stc-byd-rtl .stc-byd-cart { align-items: flex-end; }

