/* ========================================================================== 
   BARGCHI — SALE PRICE UI FIX v4
   Homepage + single product only.
   - Sale currency position matches every normal homepage price.
   - Old price sits directly under the payable price.
   - Old price has no currency label.
   ========================================================================== */

/* --------------------------------------------------------------------------
   HOMEPAGE — discounted products
   -------------------------------------------------------------------------- */
body.home .bargchi-home-product__price .bargchi-sale-price-ui--home {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 3px !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    direction: ltr !important;
    vertical-align: middle !important;
}

/* Payable / sale price — same visual rules as every normal homepage price. */
body.home .bargchi-home-product__price .bargchi-sale-price-ui__current {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: max-content !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--bh-home-navy, #0b2b50) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    direction: ltr !important;
    line-height: 1 !important;
}

body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-amount.amount {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--bh-home-navy, #0b2b50) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    direction: ltr !important;
}

body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-amount.amount bdi {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    white-space: nowrap !important;
    direction: ltr !important;
}

/* IMPORTANT: exact same currency placement used by ordinary homepage prices. */
body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-currencySymbol {
    display: inline-block !important;
    order: -1 !important;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    color: var(--bh-home-orange, #ED6A20) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    transform: none !important;
}

body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-currencySymbol::before,
body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-currencySymbol::after {
    display: none !important;
    content: none !important;
}

/* Original price — directly beneath the current numeric price. */
body.home .bargchi-home-product__price .bargchi-sale-price-ui__regular {
    display: block !important;
    align-self: flex-end !important;
    width: max-content !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #8f9aa6 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    direction: ltr !important;
    opacity: 1 !important;
    text-decoration-line: line-through !important;
    text-decoration-color: #7f8994 !important;
    text-decoration-thickness: 1.35px !important;
    text-decoration-skip-ink: none !important;
}

body.home .bargchi-home-product__price .bargchi-sale-price-ui__regular .woocommerce-Price-amount.amount,
body.home .bargchi-home-product__price .bargchi-sale-price-ui__regular .woocommerce-Price-amount.amount bdi {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    direction: ltr !important;
    text-decoration-line: line-through !important;
    text-decoration-color: #7f8994 !important;
    text-decoration-thickness: 1.35px !important;
    text-decoration-skip-ink: none !important;
}

/* Never write تومان beside the struck original price. */
body.home .bargchi-home-product__price .bargchi-sale-price-ui__regular .woocommerce-Price-currencySymbol {
    display: none !important;
}

/* --------------------------------------------------------------------------
   SINGLE PRODUCT — keep current-price cleanup from the existing module
   -------------------------------------------------------------------------- */
body.single-product .bargchi-sale-price-ui--single {
    display: inline-flex !important;
    align-items: baseline !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    white-space: nowrap !important;
}

body.single-product .bargchi-sale-price-ui--single .bargchi-sale-price-ui__current,
body.single-product .bargchi-sale-price-ui--single ins {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    background: transparent !important;
    text-decoration: none !important;
}

body.single-product del .woocommerce-Price-currencySymbol {
    display: none !important;
}

body.single-product del {
    text-decoration-line: line-through !important;
    text-decoration-color: #8d99a6 !important;
    text-decoration-thickness: 1.15px !important;
    text-decoration-skip-ink: none !important;
}

/* Tablet — match the native homepage price scale. */
@media (min-width: 768px) and (max-width: 1024px) {
    body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-amount.amount {
        font-size: 13px !important;
    }

    body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-currencySymbol {
        font-size: 9px !important;
    }

    body.home .bargchi-home-product__price .bargchi-sale-price-ui__regular {
        font-size: 11px !important;
    }
}

/* Mobile — preserve the same layout, only scaled down. */
@media (max-width: 767px) {
    body.home .bargchi-home-product__price .bargchi-sale-price-ui--home {
        gap: 2px !important;
    }

    body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-amount.amount {
        font-size: 12px !important;
    }

    body.home .bargchi-home-product__price .bargchi-sale-price-ui__current .woocommerce-Price-currencySymbol {
        margin-right: 4px !important;
        font-size: 8.5px !important;
    }

    body.home .bargchi-home-product__price .bargchi-sale-price-ui__regular {
        font-size: 10.5px !important;
    }
}
