/* TL_PRODUCTS_CARD_PRICE_FINAL_AUTHORITY_V4
   Final authority for /products card pricing.
   Loaded as the last stylesheet in <head>.
*/

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack {
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    text-align: right !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: flex-end !important;

    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;

    margin: 0 !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    padding: 0 !important;

    direction: ltr !important;
    text-align: right !important;
    gap: 4px !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    display: inline !important;
    order: initial !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    display: inline !important;
    order: initial !important;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    direction: rtl !important;
    unicode-bidi: isolate !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.old-price {
    width: 100% !important;
    inline-size: 100% !important;
    justify-self: stretch !important;
    text-align: right !important;
    direction: rtl !important;
}

@media (max-width: 840px) {
    body.storefront-body.products-route
    .mobile-product-cards-grid
    .catalog-main
    .product-card
    .price-row > .product-price-stack,
    body.storefront-body.products-route
    .mobile-product-cards-list
    .catalog-main
    .product-card
    .price-row > .product-price-stack {
        width: 100% !important;
        inline-size: 100% !important;
        justify-items: stretch !important;
        align-items: stretch !important;
        text-align: right !important;
    }

    body.storefront-body.products-route
    .mobile-product-cards-grid
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price,
    body.storefront-body.products-route
    .mobile-product-cards-list
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price {
        width: 100% !important;
        inline-size: 100% !important;
        justify-self: stretch !important;
        justify-content: flex-end !important;
        text-align: right !important;
        direction: ltr !important;
    }

    body.storefront-body.products-route
    .mobile-product-cards-grid
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .old-price,
    body.storefront-body.products-route
    .mobile-product-cards-list
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .old-price {
        width: 100% !important;
        inline-size: 100% !important;
        justify-self: stretch !important;
        text-align: right !important;
    }
}

html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    color: #FFFFFF !important;
}

/* === TL_PRODUCTS_CARD_PRICE_BLOCK_ALIGN_V5_START ===
   Hard alignment fix for /products cards.
   Avoids flex-direction / RTL ambiguity entirely:
   - current price is a full-width BLOCK
   - children are inline
   - text-align:right controls the visual edge
   - amount + currency share the exact same color/weight
   === */

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack {
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    justify-items: stretch !important;
    text-align: right !important;
    direction: rtl !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price {
    box-sizing: border-box !important;
    display: block !important;

    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;

    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;

    padding: 0 !important;

    text-align: right !important;
    direction: rtl !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount,
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    display: inline !important;
    float: none !important;
    position: static !important;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: inherit !important;
    vertical-align: baseline !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    direction: rtl !important;
    unicode-bidi: isolate !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.old-price {
    display: block !important;
    width: 100% !important;
    inline-size: 100% !important;
    margin: 0 !important;
    text-align: right !important;
    direction: rtl !important;
}

@media (max-width: 840px) {
    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack {
        width: 100% !important;
        inline-size: 100% !important;
        justify-items: stretch !important;
        text-align: right !important;
        direction: rtl !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price {
        display: block !important;
        width: 100% !important;
        inline-size: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: right !important;
        direction: rtl !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price
    :is(.price-amount, small) {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        color: #173F69 !important;
        font-weight: 900 !important;
    }
}

html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    color: #FFFFFF !important;
}
/* === TL_PRODUCTS_CARD_PRICE_BLOCK_ALIGN_V5_END === */

/* === TL_PRODUCTS_CARD_PRICE_VISUAL_ORDER_V6_START ===
   /products cards:
   - keep the current price cluster at the visual right edge
   - force the visual order to: [amount][currency]
   - because the HTML source order is <small>currency</small><span class="price-amount">amount</span>,
     we use an LTR inline formatting context on the full-width block, right-aligned.
   Result:
   - amount sits on the right
   - currency sits immediately to the left of the amount
   === */

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack {
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    justify-items: stretch !important;
    text-align: right !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price {
    box-sizing: border-box !important;
    display: block !important;

    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    /* Critical fix:
       LTR makes the DOM order render as small ثم amount from left to right,
       and text-align:right pushes the whole cluster to the right edge. */
    direction: ltr !important;
    text-align: right !important;
    unicode-bidi: isolate !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small,
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    display: inline !important;
    float: none !important;
    position: static !important;

    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: inherit !important;
    vertical-align: baseline !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    direction: rtl !important;
    unicode-bidi: isolate !important;
    margin-left: 4px !important;
    margin-right: 0 !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.old-price {
    display: block !important;
    width: 100% !important;
    inline-size: 100% !important;
    margin: 0 !important;
    text-align: right !important;
    direction: rtl !important;
}

@media (max-width: 840px) {
    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack {
        width: 100% !important;
        inline-size: 100% !important;
        justify-items: stretch !important;
        text-align: right !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price {
        display: block !important;
        width: 100% !important;
        inline-size: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        direction: ltr !important;
        text-align: right !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price
    small,
    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price
    .price-amount {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        color: #173F69 !important;
        font-weight: 900 !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price
    small {
        margin-left: 4px !important;
    }
}

html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    color: #FFFFFF !important;
}
/* === TL_PRODUCTS_CARD_PRICE_VISUAL_ORDER_V6_END === */

/* === TL_PRODUCTS_CARD_PRICE_BOLD_FIX_V8_START ===
   Keep the probe-confirmed v7 positioning.
   Only strengthen BOTH amount and currency typography.
   === */

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount,
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    font-synthesis: weight !important;
}

/* IRANSansX is used by the project; when served as a variable font,
   this also forces the heaviest available weight. */
@supports (font-variation-settings: normal) {
    body.storefront-body.products-route
    .catalog-main
    .product-card
    .product-price-stack
    .current-price
    .price-amount,
    body.storefront-body.products-route
    .catalog-main
    .product-card
    .product-price-stack
    .current-price
    small {
        font-variation-settings: "wght" 900 !important;
    }
}

html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    font-weight: 900 !important;
}
/* === TL_PRODUCTS_CARD_PRICE_BOLD_FIX_V8_END === */

/* === TL_PRODUCTS_CARD_DARK_PRICE_PURE_WHITE_FIX_V9_START ===
   Force pure white for BOTH amount and currency on dark-mode product cards.
   Keeps all existing positioning from v7/v8.
   === */

html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.price-row
.product-price-stack
.current-price,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.price-row
.product-price-stack
.current-price
.price-amount,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.price-row
.product-price-stack
.current-price
small {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    opacity: 1 !important;
}

/* If any nested element or utility span is injected later, keep it white too. */
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
* {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    opacity: 1 !important;
}
/* === TL_PRODUCTS_CARD_DARK_PRICE_PURE_WHITE_FIX_V9_END === */

/* === TL_PRODUCTS_CARD_PRICE_GRIDTRACK_FIX_V7_START ===
   Probe-confirmed fix:
   product-price-stack is full width, but its implicit grid column collapses to content width.
   Force the grid track itself to 1fr, then stretch current/old price across it.
   === */

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack {
    display: grid !important;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;

    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch !important;
    justify-items: stretch !important;

    text-align: right !important;
    direction: rtl !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price {
    display: block !important;
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;

    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    direction: ltr !important;
    text-align: right !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small,
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    display: inline !important;
    float: none !important;
    position: static !important;

    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;

    color: #173F69 !important;
    font-family: var(--tehranlight-font-family) !important;
    font-weight: 900 !important;
    line-height: inherit !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small {
    direction: rtl !important;
    unicode-bidi: isolate !important;
    margin-left: 4px !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.old-price {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;

    width: 100% !important;
    inline-size: 100% !important;

    margin: 0 !important;
    text-align: right !important;
    direction: rtl !important;
}

@media (max-width: 840px) {
    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack {
        display: grid !important;
        width: 100% !important;
        inline-size: 100% !important;

        grid-template-columns: minmax(0, 1fr) !important;

        justify-content: stretch !important;
        justify-items: stretch !important;
        place-self: end stretch !important;

        text-align: right !important;
        direction: rtl !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .current-price {
        grid-column: 1 / -1 !important;
        justify-self: stretch !important;

        display: block !important;
        width: 100% !important;
        inline-size: 100% !important;

        direction: ltr !important;
        text-align: right !important;
    }

    body.storefront-body.products-route
    :is(.mobile-product-cards-grid, .mobile-product-cards-list)
    .catalog-main
    .product-card
    .price-row > .product-price-stack
    .old-price {
        grid-column: 1 / -1 !important;
        justify-self: stretch !important;
        width: 100% !important;
        inline-size: 100% !important;
        text-align: right !important;
    }
}

html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
small,
html[data-theme="dark"]
body.storefront-body.products-route
.catalog-main
.product-card
.product-price-stack
.current-price
.price-amount {
    color: #FFFFFF !important;
}
/* === TL_PRODUCTS_CARD_PRICE_GRIDTRACK_FIX_V7_END === */
