/*
    Corner promo ribbon, rendered by Views/Shared/Partials/_PromoRibbon.cshtml.

    The ribbon container clips ITSELF (overflow:hidden on .promo-ribbon) rather
    than relying on the parent tile. That matters: .tpproduct deliberately lets
    its hover panel overflow to bottom:-130px (main.css), so putting
    overflow:hidden on the tile would break the hover interaction.

    pointer-events:none keeps the ribbon from swallowing clicks - the product
    tiles are wrapped in anchors.
*/

.promo-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 145px;
    height: 145px;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
    border-top-right-radius: 10px;
}

.promo-ribbon__text {
    position: absolute;
    display: block;
    top: 34px;
    right: -55px;
    width: 215px;
    padding: 6px 0;
    transform: rotate(45deg);
    background-color: #c8102e;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* The list-view row is not positioned in the theme CSS, so anchor it here */
.tplist__product {
    position: relative;
}

/* Product detail page - anchor the ribbon to the image panel */
.tpproduct-details__nab {
    position: relative;
}

@media (max-width: 575px) {
    .promo-ribbon {
        width: 115px;
        height: 115px;
    }

    .promo-ribbon__text {
        top: 26px;
        right: -48px;
        width: 175px;
        padding: 4px 0;
        font-size: 11px;
    }
}
