/**
 * 2007-2026 PrestaShop
 *
 * @author    Prestaelements <info@prestaelements.com>
 * @copyright 2026 Prestaelements
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *
 * Base look and places of the stickers. Colours, sizes and offsets of each
 * sticker come in a small style block of the page head (.pe-stk-ID).
 */

.pe-stk-host {
    position: relative !important;
}

.pe-stk-layer {
    position: absolute;
    inset: 0;
    z-index: var(--pe-stk-z, 5);
    pointer-events: none;
}

/* Only a layer with a corner band clips what sticks out of the picture. */
.pe-stk-layer--clip {
    overflow: hidden;
}

/* Corners and edges: several stickers in one place stack up. */
.pe-stk-slot {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.pe-stk-slot--top-left { top: 0; left: 0; }
.pe-stk-slot--top-center { top: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.pe-stk-slot--top-right { top: 0; right: 0; align-items: flex-end; }
.pe-stk-slot--middle-left { top: 50%; left: 0; transform: translateY(-50%); }
.pe-stk-slot--center { top: 50%; left: 50%; transform: translate(-50%, -50%); align-items: center; }
.pe-stk-slot--middle-right { top: 50%; right: 0; transform: translateY(-50%); align-items: flex-end; }
.pe-stk-slot--bottom-left { bottom: 0; left: 0; }
.pe-stk-slot--bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.pe-stk-slot--bottom-right { bottom: 0; right: 0; align-items: flex-end; }
.pe-stk-slot--center-full { top: 50%; left: 0; right: 0; transform: translateY(-50%); align-items: stretch; padding: 0; }
.pe-stk-slot--center-full .pe-stk { width: 100%; }

/* Below the picture and next to the price: in the flow of the card. */
.pe-stk-below,
.pe-stk-inline,
.pe-stk-static {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

.pe-stk-inline {
    display: inline-flex;
    margin: 0 0 0 6px;
    vertical-align: middle;
}

/* The sticker ---------------------------------------------------------- */

.pe-stk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0.3em 0.65em;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.15;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: center;
    color: #fff;
    background-color: #e4002b;
    pointer-events: none;
}

.pe-stk__text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.pe-stk--pill {
    border-radius: 999px;
}

.pe-stk--circle {
    width: 3.8em;
    height: 3.8em;
    padding: 0.2em;
    border-radius: 50%;
    white-space: normal;
}

.pe-stk--flag-right {
    padding-right: 1.3em;
    clip-path: polygon(0 0, 100% 0, calc(100% - 0.65em) 50%, 100% 100%, 0 100%);
}

.pe-stk--flag-left {
    padding-left: 1.3em;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0.65em 50%);
}

.pe-stk--image {
    padding: 0;
    background: none !important;
}

.pe-stk--image img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Corner ribbon: a band across a corner of the picture. */
.pe-stk--ribbon {
    position: absolute;
    width: 170px;
    padding: 0.35em 0;
    top: 26px;
    left: -46px;
    transform: rotate(-45deg);
}

.pe-stk--ribbon.pe-stk-ribbon--top-right,
.pe-stk--ribbon.pe-stk-ribbon--middle-right {
    left: auto;
    right: -46px;
    transform: rotate(45deg);
}

.pe-stk--ribbon.pe-stk-ribbon--bottom-left {
    top: auto;
    bottom: 26px;
    transform: rotate(45deg);
}

.pe-stk--ribbon.pe-stk-ribbon--bottom-right {
    top: auto;
    bottom: 26px;
    left: auto;
    right: -46px;
}

/* Inside a full-width or in-flow place a ribbon is just a label. */
.pe-stk-below .pe-stk--ribbon,
.pe-stk-inline .pe-stk--ribbon,
.pe-stk-static .pe-stk--ribbon,
.pe-stk-preview .pe-stk--ribbon.pe-stk--static {
    position: static;
    width: auto;
    transform: none;
}
