.woocommerce ul.products li.product,
.woocommerce div.product div.images,
.woocommerce div.product div.images .woocommerce-product-gallery {
    position: relative;
}

.mpb-product-badge {
    position: absolute;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    max-width: calc(100% - 24px);
    padding: var(--mpb-padding-y, 6px) var(--mpb-padding-x, 10px);
    border-width: var(--mpb-border-width, 0);
    border-style: var(--mpb-border-style, solid);
    border-color: currentColor;
    border-radius: var(--mpb-radius, 999px);
    box-shadow:
        0 0 0 var(--mpb-outline-width, 0) var(--mpb-outline-color, transparent),
        0 8px 18px rgba(17, 24, 39, var(--mpb-shadow-alpha, 0.18));
    font-size: var(--mpb-font-size, 12px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    transform: scale(var(--mpb-badge-size, 1)) rotate(var(--mpb-rotation, 0deg));
    transform-origin: top left;
    overflow: hidden;
    pointer-events: none;
}

.mpb-badge-layers {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.mpb-product-badge__label {
    position: relative;
    z-index: 1;
}

.mpb-product-badge.mpb-has-layers {
    width: clamp(88px, calc((var(--mpb-font-size, 12px) * 8) + (var(--mpb-padding-x, 10px) * 2)), 168px);
    aspect-ratio: 220 / 80;
    min-height: 0;
    justify-content: center;
    padding: 0;
    border-width: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    clip-path: none !important;
    outline: 0 !important;
    overflow: visible;
}

.mpb-product-badge.mpb-has-layers::before,
.mpb-product-badge.mpb-has-layers::after {
    display: none !important;
}

.mpb-product-badge.mpb-has-layers .mpb-product-badge__label {
    display: inline-flex;
    max-width: 86%;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mpb-product-badge.mpb-has-preset {
    width: clamp(48px, 20%, 96px);
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

.mpb-product-badge.mpb-has-preset .mpb-product-badge__label {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    max-width: none;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.05;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.mpb-product-badge__preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mpb-product-badge__preset img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mpb-product-badge.mpb-has-layers.mpb-product-badge--stamp {
    transform: scale(var(--mpb-badge-size, 1)) rotate(var(--mpb-rotation, 0deg));
}

.mpb-product-badge.mpb-position-top-right {
    transform-origin: top right;
}

.mpb-product-badge.mpb-position-bottom-left {
    transform-origin: bottom left;
}

.mpb-product-badge.mpb-position-bottom-right {
    transform-origin: bottom right;
}

.mpb-product-badge.mpb-has-preset.mpb-position-top-left {
    top: 14px;
    left: 14px;
}

.mpb-product-badge.mpb-has-preset.mpb-position-top-right {
    top: 14px;
    right: 14px;
}

.mpb-product-badge.mpb-has-preset.mpb-position-bottom-left {
    bottom: 14px;
    left: 14px;
}

.mpb-product-badge.mpb-has-preset.mpb-position-bottom-right {
    right: 14px;
    bottom: 14px;
}

.mpb-product-badge--ribbon {
    border-radius: 4px 4px 0 0;
}

.mpb-product-badge--ribbon::after {
    content: "";
    position: absolute;
    right: -9px;
    bottom: 0;
    border-width: 14px 0 14px 10px;
    border-style: solid;
    border-color: transparent transparent transparent currentColor;
    opacity: 0.28;
}

.mpb-product-badge--tag {
    border-radius: 4px 999px 999px 4px;
    padding-left: 14px;
}

.mpb-product-badge--tag::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.mpb-product-badge--burst {
    width: 62px;
    min-height: 62px;
    padding: 8px;
    border-radius: 50%;
    clip-path: polygon(50% 0%, 59% 18%, 78% 10%, 75% 31%, 96% 35%, 80% 50%, 96% 65%, 75% 69%, 78% 90%, 59% 82%, 50% 100%, 41% 82%, 22% 90%, 25% 69%, 4% 65%, 20% 50%, 4% 35%, 25% 31%, 22% 10%, 41% 18%);
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
}

.mpb-product-badge--ticket {
    border-radius: 8px;
    clip-path: polygon(0 0, 100% 0, 100% 36%, 92% 50%, 100% 64%, 100% 100%, 0 100%, 0 64%, 8% 50%, 0 36%);
}

.mpb-product-badge--slash {
    border-radius: 4px;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    padding-right: calc(var(--mpb-padding-x, 10px) + 4px);
    padding-left: calc(var(--mpb-padding-x, 10px) + 4px);
}

.mpb-product-badge--shield {
    min-height: 52px;
    padding-top: calc(var(--mpb-padding-y, 6px) + 3px);
    padding-bottom: calc(var(--mpb-padding-y, 6px) + 10px);
    border-radius: 10px 10px 14px 14px;
    clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
}

.mpb-product-badge--stamp {
    border-radius: 8px;
    outline: 2px dashed currentColor;
    outline-offset: -6px;
    transform: scale(var(--mpb-badge-size, 1)) rotate(calc(var(--mpb-rotation, 0deg) - 4deg));
}

.mpb-product-badge-theme--cyber {
    background: linear-gradient(135deg, #16c784, #087d72);
    color: #fff;
    border: 2px dashed rgba(255, 255, 255, 0.58);
    border-radius: 5px;
    box-shadow: 0 7px 0 rgba(4, 120, 87, 0.22), 0 14px 24px rgba(8, 126, 115, 0.26);
}

.mpb-product-badge-theme--cyber::before,
.mpb-product-badge-theme--cyber::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16c784;
    transform: translateY(-50%);
}

.mpb-product-badge-theme--cyber::before {
    left: -5px;
}

.mpb-product-badge-theme--cyber::after {
    right: -5px;
}

.mpb-product-badge-theme--black-friday {
    background: #101010;
    color: #facc15;
    border: 2px solid #facc15;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px #101010, 0 12px 22px rgba(0, 0, 0, 0.24);
}

.mpb-product-badge-theme--mega-sale {
    background: linear-gradient(135deg, #ff1f1f, #b91c1c);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 2px #ff1f1f, 0 12px 24px rgba(185, 28, 28, 0.3);
}

.mpb-product-badge-theme--best-seller {
    width: 66px;
    min-height: 66px;
    padding: 9px;
    background: radial-gradient(circle at 35% 35%, #fff3a3, #f59e0b 58%, #b45309);
    color: #fff;
    clip-path: polygon(50% 0%, 59% 18%, 78% 10%, 75% 31%, 96% 35%, 80% 50%, 96% 65%, 75% 69%, 78% 90%, 59% 82%, 50% 100%, 41% 82%, 22% 90%, 25% 69%, 4% 65%, 20% 50%, 4% 35%, 25% 31%, 22% 10%, 41% 18%);
    font-size: 9px;
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 1px 1px rgba(120, 53, 15, 0.55);
}

.mpb-product-badge-theme--xmas {
    background: linear-gradient(135deg, #ef4444, #991b1b);
    color: #fff;
    border: 2px solid #16a34a;
    border-radius: 6px;
    box-shadow: 0 0 0 2px #fff, 0 12px 24px rgba(153, 27, 27, 0.25);
}
