/* ==========================================================================
   CABAIA product cards: discount look (badge, "Offre spéciale", prices)
   Loaded after storefront.css. Scoped to cards so the product page price block keeps its own rules.
   ========================================================================== */

.cb-card__media {
    --cb-promo-inset: 8px;
    --cb-promo-h: 20px;
    --cb-promo-gap: 4px;
}

@media (min-width: 992px) {
    .cb-card__media {
        --cb-promo-inset: 12px;
        --cb-promo-h: 24px;
        --cb-promo-gap: 6px;
    }
}

/* "-X%" badge: brand-blue pill, top-left of the image */
.cb-card__media .cb-tag--promo {
    display: inline-flex;
    align-items: center;
    height: var(--cb-promo-h);
    padding: 0 8px;
    border-radius: 999px;
    background: var(--cb-blue);
    color: #fff;
    font-family: var(--cb-font);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: .02em;
    line-height: 1;
    white-space: nowrap;
}

.cb-card__media .cb-tag--promo[hidden] {
    display: none;
}

@media (min-width: 992px) {
    .cb-card__media .cb-tag--promo {
        padding: 0 10px;
        font-size: 12px;
    }
}

/* "Offre spéciale" (discount of 50 % or more): white pill under the badge */
.cb-card__media .cb-tag--special {
    position: absolute;
    top: calc(var(--cb-promo-inset) + var(--cb-promo-h) + var(--cb-promo-gap));
    left: var(--cb-promo-inset);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 200, .16);
    color: var(--cb-blue);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
    white-space: nowrap;
}

.cb-card__media .cb-tag--special[hidden],
.cb-card__media .cb-tag--promo[hidden] ~ .cb-tag--special,
.cb-card__media:has(.cb-card__soldout:not([hidden])) .cb-tag--special {
    display: none;
}

@media (min-width: 992px) {
    .cb-card__media .cb-tag--special {
        height: 20px;
        padding: 0 10px;
        font-size: 10px;
    }
}

/* Prices: sale price first in brand blue, original price smaller, grey, struck */
.cb-card .cb-price,
.cb-mini-card .cb-price {
    column-gap: 8px;
    row-gap: 0;
}

.cb-card .cb-price__sale,
.cb-mini-card .cb-price__sale {
    color: var(--cb-blue);
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: lining-nums;
    letter-spacing: 0;
}

.cb-card .cb-price__compare,
.cb-mini-card .cb-price__compare {
    color: var(--ui-700);
    font-size: 13px;
    font-weight: 400;
    font-variant-numeric: lining-nums;
    line-height: 16px;
    text-decoration: line-through;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}

.cb-card--overlay .cb-price__sale,
.cb-mini-card .cb-price__sale {
    font-size: inherit;
}

.cb-card--overlay .cb-price__compare,
.cb-mini-card .cb-price__compare {
    font-size: 12px;
}

.cb-card:has(.cb-card__soldout:not([hidden])) .cb-price__sale {
    color: var(--ui-800);
}
