/**
 * LuxaLife Price & DEAL v0.25.11.
 * All product prices remain the original WooCommerce price markup.
 * New badges are HTML/CSS only; the previous SVG has its own legacy design.
 */

/* These overrides must load after product-hero.css and product-deal.css. */
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal .price del,
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal .price del .woocommerce-Price-amount {
    color: var(--luxa-price-original, #7a7a7a);
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal .price ins::before {
    color: var(--luxa-price-before, var(--luxa-deal-price));
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal .price ins,
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal .price ins .woocommerce-Price-amount {
    color: var(--luxa-price-sale, var(--luxa-deal-price));
}

/* Default foreground adapts to the selected per-product red or gold palette.
   Optional Customizer text color takes precedence when explicitly set. */
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal {
    --luxa-deal-contrast: #ffffff;
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-product-price-row--deal.luxalife-deal--gold {
    --luxa-deal-contrast: #20201e;
}

/* Shared styles for three independent badge layouts. */
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge {
    grid-area: badge;
    display: flex;
    align-self: center;
    justify-self: stretch;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
    font-family: var(--luxa-deal-saving-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
    text-align: center;
    overflow-wrap: anywhere;
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge__value {
    display: block;
    min-width: 0;
    font-size: clamp(.72rem, 1.15vw, 1rem);
    font-weight: 800;
    font-family: var(--luxa-deal-saving-font, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
    letter-spacing: -.02em;
    line-height: 1.25;
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge__heading {
    font-size: clamp(.63rem, 1vw, .85rem);
    font-weight: 800;
    font-family: var(--luxa-deal-title-font, "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif);
    letter-spacing: .12em;
    white-space: nowrap;
}

/* 01 — Combined Pill: warm-gold one-piece CTA companion. */
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--combined {
    flex-wrap: wrap;
    gap: .35rem .48rem;
    width: 100%;
    min-height: 52px;
    padding: .64rem .75rem;
    border: 1px solid var(--luxa-badge-border, var(--luxa-deal-main));
    border-radius: 999px;
    background: var(--luxa-badge-bg, var(--luxa-deal-main));
    color: var(--luxa-badge-text, var(--luxa-deal-contrast));
    box-shadow: 0 3px 10px rgb(52 37 13 / .12);
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--combined .luxalife-deal-badge__divider {
    align-self: stretch;
    flex: 0 0 1px;
    min-height: 1.1em;
    background: var(--luxa-badge-accent, var(--luxa-deal-fold));
    opacity: .65;
}

/* 02 — Savings Pill: strong dark panel with restrained gold frame and tag. */
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--savings {
    gap: .55rem;
    min-height: 52px;
    padding: .6rem .72rem;
    border: 2px solid var(--luxa-badge-border, var(--luxa-deal-main));
    border-radius: 999px;
    background: var(--luxa-badge-dark, #242320);
    color: var(--luxa-badge-light-text, #fff);
    box-shadow: 0 4px 13px rgb(27 21 13 / .17);
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--savings .luxalife-deal-badge__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--luxa-badge-accent, var(--luxa-deal-main));
    padding-right: .45rem;
    border-right: 1px solid var(--luxa-badge-border, var(--luxa-deal-main));
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--savings .luxalife-deal-badge__value {
    color: inherit;
}

/* 03 — Classic Deal: gold heading and an elegant white savings panel. */
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--classic {
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--luxa-badge-border, var(--luxa-deal-main));
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgb(46 29 11 / .12);
    overflow: hidden;
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--classic .luxalife-deal-badge__heading {
    display: block;
    width: 100%;
    padding: .38rem .5rem;
    border-top: 4px solid var(--luxa-badge-accent, var(--luxa-deal-fold));
    background: var(--luxa-badge-bg, var(--luxa-deal-main));
    color: var(--luxa-badge-text, var(--luxa-deal-contrast));
    font-size: .82rem;
}
body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--classic .luxalife-deal-badge__value {
    width: 100%;
    padding: .55rem .35rem;
    background: #fff;
    color: #20201e;
}

/* No clipping at the narrowest screen widths: headings wrap rather than shrink below legible size. */
@media (max-width: 850px) {
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge__value {
        font-size: clamp(.67rem, 2vw, .85rem);
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--combined {
        min-height: 44px;
        gap: .22rem .35rem;
        padding: .45rem .4rem;
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--savings {
        min-height: 44px;
        gap: .3rem;
        padding: .4rem .45rem;
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--savings .luxalife-deal-badge__icon {
        padding-right: .3rem;
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--savings .luxalife-deal-badge__icon svg {
        width: 15px;
        height: 15px;
    }
}
@media (max-width: 480px) {
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--combined .luxalife-deal-badge__divider {
        display: none;
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge__value {
        font-size: .67rem;
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge__heading {
        font-size: .62rem;
    }
    body.single-product .site-main .luxalife-product-hero .summary .luxalife-deal-badge--classic .luxalife-deal-badge__heading {
        font-size: .65rem;
    }
}
