/* Ribbon styles for promotion badges */
.ribbon {
    position: absolute;
    overflow: hidden;
    width: 100px;
    height: 100px;
    z-index: 10;
}

.ribbon-top-right {
    top: -6px;
    left: -6px;
}

.ribbon-top-right::before,
.ribbon-top-right::after {
    border-top-color: transparent;
    border-left-color: transparent;
}

.ribbon-top-right::before {
    top: 0;
    right: 0;
}

.ribbon-top-right::after {
    bottom: 0;
    left: 0;
}

.ribbon-top-right span {
    left: -25px;
    top: 20px;
    transform: rotate(-45deg);
}

.ribbon span {
    position: absolute;
    display: block;
    width: 120px;
    padding: 8px 0;
    background-color: var(--ribbon-bg, #ff6b6b);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Забезпечення того, що product-img має position: relative */
.product-img {
    position: relative !important;
}

/* Адаптивність для малих екранів */
@media (max-width: 767px) {
    .ribbon {
        width: 80px;
        height: 80px;
    }

    .ribbon span {
        width: 100px;
        padding: 6px 0;
        font-size: 10px;
    }

    .ribbon-top-right span {
        left: -20px;
        top: 16px;
    }
}
