/* Paul David shared configurable product banners */

.pd-product-image-with-banner {
    position: relative;
}

.pd-product-banner {
    position: absolute;
    top: 11px;
    left: 0;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    max-width: min(90%, 245px);
    padding: 9px 23px 9px 13px;
    color: #fff;
    background: var(--pd-brand-accent, var(--casca-accent, #e4002b));
    clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%);
    border-radius: 5px 0 0 5px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
    box-shadow: 0 3px 10px rgb(0 0 0 / 10%);
}

.pd-product-banner--charcoal {
    background: #34383c;
}

.pd-product-banner--teal {
    background: #4f827d;
}

.pd-product-banner--gold {
    background: #b99a54;
}

.pd-product-banner--purple {
    background: #725684;
}

@media (max-width: 640px) {
    .pd-product-banner {
        top: 7px;
        padding: 7px 20px 7px 10px;
        font-size: 11px;
    }
}


/* PD CASCA CARD ALIGNMENT V2 START */

/*
 * Anchor banners to the complete product tile.
 * The image link must not become the positioning container.
 */

.catalog-category-view .product-item,
.catalog-category-view .product-item-info {
    position: relative;
}

.catalog-category-view .pd-product-image-with-banner {
    position: static !important;
}

/*
 * Top-left of the full card, not the image.
 * Retain the elegant angled-end banner design.
 */

.catalog-category-view .pd-product-banner {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 20;

    display: inline-flex;
    align-items: center;

    width: auto;
    max-width: min(90%, 250px);
    min-height: 34px;

    margin: 0;
    padding: 9px 25px 9px 15px;

    box-sizing: border-box;
    border-radius: 0 0 5px 0;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;

    color: #fff;
    white-space: normal;
    overflow-wrap: anywhere;

    clip-path: polygon(
        0 0,
        100% 0,
        calc(100% - 13px) 100%,
        0 100%
    );

    pointer-events: none;
}

/* Corporate colour inherits the store's brand colour. */

.catalog-category-view .pd-product-banner--corporate {
    background: var(
        --pd-brand-accent,
        var(--casca-accent, #e4002b)
    );
}

.catalog-category-view .pd-product-banner--charcoal {
    background: #34383c;
}

.catalog-category-view .pd-product-banner--teal {
    background: #4f827d;
}

.catalog-category-view .pd-product-banner--gold {
    background: #b99a54;
}

.catalog-category-view .pd-product-banner--purple {
    background: #725684;
}

/*
 * Consistent left-aligned product names.
 * Override existing Casca / Hyva centre alignment.
 */

.catalog-category-view .casca-card-name,
.catalog-category-view .pd-card-title {
    display: block;
    width: 100%;

    margin-left: 0;
    margin-right: 0;

    align-self: stretch;
    align-items: flex-start !important;
    justify-content: flex-start !important;

    text-align: left !important;
}

.catalog-category-view .casca-card-name .product-item-link,
.catalog-category-view .pd-card-title .product-item-link {
    display: block;
    width: 100%;

    margin: 0;
    padding: 0;

    text-align: left !important;
    justify-content: flex-start !important;

    line-height: 1.4;
}

/* Ensure the information section doesn't centre its children. */

.catalog-category-view .casca-card-info {
    text-align: left;
}

@media (max-width: 640px) {
    .catalog-category-view .pd-product-banner {
        min-height: 30px;
        padding: 7px 22px 7px 11px;
        font-size: 11px;
    }
}

/* PD CASCA CARD ALIGNMENT V2 END */


/* PD RELATED PRODUCT CARD FIX START */

/*
 * Use the same card banner treatment on product pages
 * as on category listings.
 */

.catalog-product-view .product-item,
.catalog-product-view .product-item-info {
    position: relative;
}

/* The banner must align to the whole card, not the image. */

.catalog-product-view .pd-product-image-with-banner {
    position: static !important;
}

.catalog-product-view .pd-product-banner {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 20;

    display: inline-flex;
    align-items: center;

    width: auto;
    max-width: min(90%, 250px);
    min-height: 34px;

    margin: 0;
    padding: 9px 25px 9px 15px;

    box-sizing: border-box;
    border-radius: 0 0 5px 0;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;

    color: #fff;
    white-space: normal;
    overflow-wrap: anywhere;

    clip-path: polygon(
        0 0,
        100% 0,
        calc(100% - 13px) 100%,
        0 100%
    );

    pointer-events: none;
}

.catalog-product-view .pd-product-banner--corporate {
    background: var(
        --pd-brand-accent,
        var(--casca-accent, #e4002b)
    );
}

.catalog-product-view .pd-product-banner--charcoal {
    background: #34383c;
}

.catalog-product-view .pd-product-banner--teal {
    background: #4f827d;
}

.catalog-product-view .pd-product-banner--gold {
    background: #b99a54;
}

.catalog-product-view .pd-product-banner--purple {
    background: #725684;
}

/* Match the approved left-aligned category card titles. */

.catalog-product-view .casca-card-name,
.catalog-product-view .pd-card-title {
    display: block;
    width: 100%;
    align-self: stretch;

    text-align: left !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

.catalog-product-view .casca-card-name .product-item-link,
.catalog-product-view .pd-card-title .product-item-link {
    display: block;
    width: 100%;
    text-align: left !important;
    line-height: 1.4;
}

.catalog-product-view .casca-card-info {
    text-align: left;
}

@media (max-width: 640px) {
    .catalog-product-view .pd-product-banner {
        min-height: 30px;
        padding: 7px 22px 7px 11px;
        font-size: 11px;
    }
}

/* PD RELATED PRODUCT CARD FIX END */


/* PD RELATED BANNER CORNER FIX V3 START */

/*
 * The outer product tile is the positioning container.
 * Inner padded elements must not anchor the banner.
 */

.catalog-product-view .product-item:has(.pd-product-banner) {
    position: relative !important;
}

.catalog-product-view .product-item:has(.pd-product-banner)
.product-item-info {
    position: static !important;
}

.catalog-product-view .product-item:has(.pd-product-banner)
.pd-product-image-with-banner {
    position: static !important;
}

/* Flush to the outer tile's top-left corner. */

.catalog-product-view .product-item:has(.pd-product-banner)
.pd-product-banner {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 30;
    border-radius: 0 0 5px 0;
}

/* PD RELATED BANNER CORNER FIX V3 END */





/* PD CASCA VAT LABEL V2 START */

.catalog-category-view .pd-ex-vat-label,
.catalog-product-view .pd-ex-vat-label {
    display: inline !important;
    margin-left: 6px;
    color: #68717c;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: inherit;
    white-space: nowrap;
    vertical-align: baseline;
}

/* Keep the amount and VAT label together on the same line. */
.catalog-category-view .casca-card-price .price,
.catalog-product-view .casca-card-price .price {
    display: inline !important;
}

.catalog-product-view .product-info-main .pd-ex-vat-label {
    font-size: 13px;
    margin-left: 9px;
}

@media (max-width: 640px) {
    .catalog-category-view .pd-ex-vat-label,
    .catalog-product-view .pd-ex-vat-label {
        font-size: 11px;
        margin-left: 5px;
    }
}

/* PD CASCA VAT LABEL V2 END */
