/* Qimia Flash Sale 5.5.15 - darker Tiffany days-to-use pill for clearer text; all other layout/currency logic unchanged.
   Only visual CSS changes: no product-card/button/price/title/currency logic changes. */
.product.qimia-discount-expiry,
.qimia-discount-expiry,
.qimia-discount-expiry .product-wrapper,
.qimia-discount-expiry .product-element-top,
.qimia-discount-expiry .product-image-wrap,
.qimia-discount-expiry .wrap-product-img,
.qimia-discount-expiry .product-image-link,
.qimia-discount-expiry .wd-product-image,
.qimia-discount-expiry .woocommerce-loop-product__link,
.single-product div.product,
.single-product .woocommerce-product-gallery,
.single-product .product-images,
.single-product .images {
    position: relative !important;
}

.product.qimia-discount-expiry,
.qimia-discount-expiry,
.qimia-discount-expiry .product-wrapper,
.qimia-discount-expiry .wd-product,
.qimia-discount-expiry .product-element-top,
.qimia-discount-expiry .product-image-wrap,
.qimia-discount-expiry .wrap-product-img,
.qimia-discount-expiry .product-image-link,
.qimia-discount-expiry .wd-product-image,
.qimia-discount-expiry .woocommerce-loop-product__link,
.single-product .woocommerce-product-gallery,
.single-product .product-images,
.single-product .images {
    overflow: visible !important;
}

/* Hide the theme's default sale label only on real Qimia Flash Sale cards, never on normal sale products. */
body:not(.single-product) .qimia-discount-expiry .onsale:not(.qimia-glass-sale-badge),
body:not(.single-product) .qimia-discount-expiry .product-label.onsale:not(.qimia-glass-sale-badge),
body:not(.single-product) .qimia-discount-expiry .product-labels .onsale:not(.qimia-glass-sale-badge),
body:not(.single-product) .qimia-discount-expiry .labels-rounded .onsale:not(.qimia-glass-sale-badge),
body:not(.single-product) .qimia-discount-expiry .wd-product-labels .onsale:not(.qimia-glass-sale-badge) {
    display: none !important;
}

/* Old red glass Flash Sale label style. */
.qimia-glass-sale-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 140 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    max-width: none !important;
    min-width: max-content !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 7px 14px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.58) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 46%), linear-gradient(135deg, rgba(255,78,94,.92) 0%, rgba(226,22,48,.94) 50%, rgba(166,0,34,.96) 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 15px rgba(172,0,34,.13), inset 0 1px 0 rgba(255,255,255,.56), inset 0 -1px 0 rgba(0,0,0,.10) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    letter-spacing: .01em !important;
    text-align: center !important;
    text-transform: none !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    text-decoration: none !important;
    overflow: visible !important;
}

.qimia-glass-sale-badge::before {
    content: "" !important;
    display: block !important;
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: none !important;
}

.qimia-glass-sale-badge::after,
.qimia-glass-discount-note::after,
.qimia-expiry-details-head em::after,
.qimia-expiry-details-box em::after {
    display: none !important;
    content: none !important;
    animation: none !important;
    background: none !important;
    box-shadow: none !important;
}

.qimia-glass-sale-badge .qimia-badge-text,
.qimia-glass-discount-note,
.qimia-glass-discount-note *,
.qimia-expiry-details-head em,
.qimia-expiry-details-head em * {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    fill: #fff !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.18) !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
}

.qimia-glass-sale-badge .qimia-badge-text {
    display: inline-block !important;
    max-width: none !important;
    min-width: max-content !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

.qimia-glass-sale-badge[data-qimia-badge-text=""],
.qimia-glass-sale-badge:not([data-qimia-badge-text]) {
    display: none !important;
}

/* Keep all discount levels red, not orange/yellow. */
.qimia-glass-sale-badge.qimia-badge-level-soft,
.qimia-glass-sale-badge.qimia-badge-level-standard,
.qimia-glass-sale-badge.qimia-badge-level-mega {
    background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 46%), linear-gradient(135deg, rgba(255,78,94,.92) 0%, rgba(226,22,48,.94) 50%, rgba(166,0,34,.96) 100%) !important;
    border-color: rgba(255,255,255,.58) !important;
    box-shadow: 0 6px 15px rgba(172,0,34,.13), inset 0 1px 0 rgba(255,255,255,.56), inset 0 -1px 0 rgba(0,0,0,.10) !important;
}

.qimia-single-badge-source,
#qimia-single-badge-footer-template {
    display: none !important;
}

.single-product .qimia-single-sale-badge {
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    z-index: 150 !important;
}

/* Loop must stay clean and equal-height. Notes/details are only for selected single-product variations. */
body:not(.single-product) .qimia-glass-discount-note-row,
body:not(.single-product) .qimia-glass-discount-note,
body:not(.single-product) .qimia-expiry-details-box,
body:not(.single-product) .qimia-stock-left-badge {
    display: none !important;
}

/* Same old red glass style that appears under product/variation price. */
.price .qimia-glass-discount-note,
.woocommerce-variation-price .qimia-glass-discount-note,
.qimia-glass-discount-note {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: fit-content !important;
    max-width: 100% !important;
    min-height: 32px !important;
    margin: 7px 0 0 !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.50) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(255,255,255,0) 48%), linear-gradient(135deg, rgba(255,96,108,.74) 0%, rgba(217,32,50,.80) 50%, rgba(125,0,25,.86) 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(186,0,30,.16), inset 0 1px 0 rgba(255,255,255,.46), inset 0 -1px 0 rgba(0,0,0,.08) !important;
    -webkit-backdrop-filter: blur(16px) saturate(175%) !important;
    backdrop-filter: blur(16px) saturate(175%) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    animation: none !important;
}

.qimia-glass-discount-note-row {
    display: block !important;
    width: 100% !important;
    margin: 7px 0 0 !important;
    line-height: 1 !important;
    clear: both !important;
}

.qimia-expiry-details-box {
    display: block !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 12px 0 0 !important;
    padding: 18px 20px !important;
    border-radius: 24px !important;
    border: 1px solid rgba(60,190,205,.28) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.98) 0%, rgba(244,253,255,.96) 56%, rgba(255,247,249,.88) 100%) !important;
    color: #10323d !important;
    box-shadow: 0 14px 34px rgba(10,45,55,.075), inset 0 1px 0 rgba(255,255,255,.92) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.qimia-expiry-details-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(60,190,205,.18) !important;
    color: #0d303b !important;
    font-size: 15px !important;
    font-weight: 900 !important;
}

.qimia-expiry-details-head em {
    font-style: normal !important;
    font-size: 12.5px !important;
    font-weight: 900 !important;
    background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,0) 46%), linear-gradient(135deg, #57d8d0 0%, #18c9c2 50%, #089eb0 100%) !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    border-radius: 999px !important;
    padding: 8px 13px !important;
    box-shadow: 0 10px 24px rgba(8,158,176,.24), inset 0 1px 0 rgba(255,255,255,.60), inset 0 -1px 0 rgba(0,68,78,.14) !important;
    text-shadow: 0 1px 2px rgba(0,58,66,.30) !important;
    white-space: nowrap !important;
}

.qimia-expiry-details-grid {
    display: grid !important;
    grid-template-columns: minmax(118px,.78fr) minmax(0,1fr) !important;
    gap: 9px 14px !important;
}

.qimia-expiry-details-grid span {
    color: rgba(16,50,61,.56) !important;
    font-weight: 800 !important;
}

.qimia-expiry-details-grid strong {
    color: #0d303b !important;
    font-weight: 900 !important;
}

.qimia-expiry-details-box p {
    margin: 14px 0 0 !important;
    padding: 11px 13px !important;
    border-radius: 15px !important;
    background: rgba(60,190,205,.08) !important;
    color: #153946 !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
}


/* Shop/category/brand/search/homepage loop label: inside card top, full text, zero layout height impact. */
body:not(.single-product) .qimia-loop-sale-badge {
    top: -14px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    z-index: 180 !important;
    width: auto !important;
    max-width: calc(100% - 22px) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    gap: 6px !important;
    min-height: 30px !important;
    padding: 6px 10px !important;
    font-size: 10.9px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 46%), linear-gradient(135deg, #ff5261 0%, #e01835 52%, #99001f 100%) !important;
    box-shadow: 0 6px 14px rgba(172,0,34,.12), inset 0 1px 0 rgba(255,255,255,.56), inset 0 -1px 0 rgba(0,0,0,.10) !important;
}

body:not(.single-product) .qimia-loop-sale-badge::before {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
}

body:not(.single-product) .qimia-loop-sale-badge .qimia-badge-text {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

@media (max-width: 767px) {
    .qimia-glass-sale-badge {
        top: 9px !important;
        left: 9px !important;
        max-width: none !important;
        min-width: max-content !important;
        min-height: 28px !important;
        padding: 7px 10px !important;
        gap: 5px !important;
        font-size: 10.5px !important;
        line-height: 1 !important;
    }

    .qimia-glass-sale-badge::before {
        width: 7px !important;
        height: 7px !important;
        min-width: 7px !important;
    }

    body:not(.single-product) .qimia-loop-sale-badge {
        top: -10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        gap: 4px !important;
        min-height: 25px !important;
        padding: 5px 7px !important;
        font-size: 8.8px !important;
        max-width: calc(100% - 14px) !important;
        min-width: 0 !important;
        letter-spacing: 0 !important;
    }

    body:not(.single-product) .qimia-loop-sale-badge::before {
        width: 6px !important;
        height: 6px !important;
        min-width: 6px !important;
    }

    body:not(.single-product) .qimia-loop-sale-badge .qimia-badge-text {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    .single-product .qimia-single-sale-badge {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
    }

    .qimia-expiry-details-box {
        max-width: 100% !important;
        padding: 14px 13px !important;
        border-radius: 20px !important;
        font-size: 12.5px !important;
    }

    .qimia-expiry-details-head {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 9px !important;
        margin-bottom: 12px !important;
        padding-bottom: 11px !important;
    }

    .qimia-expiry-details-head em {
        font-size: 11.5px !important;
        padding: 7px 10px !important;
    }

    .qimia-expiry-details-grid {
        grid-template-columns: minmax(92px,.75fr) minmax(0,1fr) !important;
        gap: 8px 10px !important;
    }

    .qimia-expiry-details-box p {
        padding: 9px 10px !important;
        font-size: 12px !important;
    }
}


/* Red Best Deal mini badge for real Flash Sale variations only. */
.qimia-best-deal-mini {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-inline-start: 6px !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.48) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 48%), linear-gradient(135deg, rgba(255,96,108,.86) 0%, rgba(217,32,50,.90) 48%, rgba(125,0,25,.94) 100%) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 10px !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: .01em !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.18) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.50), inset 0 -1px 0 rgba(0,0,0,.10) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    pointer-events: none !important;
}

.qimia-best-deal-choice {
    position: relative !important;
    box-shadow: 0 0 0 2px rgba(217,32,50,.18) !important;
}

@media (max-width: 767px) {
    .qimia-best-deal-mini {
        margin-inline-start: 4px !important;
        padding: 2px 6px !important;
        font-size: 9px !important;
    }
}
