:where(.coupons-voucher) {
    --coupons-voucher-overlay: rgba(0, 0, 0, 0.4);
    --coupons-voucher-surface: #ffffff;
    --coupons-voucher-media: #f4f4f4;
    --coupons-voucher-line: #d6d6d6;
    --coupons-voucher-line-soft: #e8e8e8;
    --coupons-voucher-text: #1d1d1d;
    --coupons-voucher-muted: #737373;
    --coupons-voucher-faint: #9a9a9a;
    --coupons-voucher-close: #1d1d1d;
    --coupons-voucher-close-background: #f2f2f2;
    --coupons-voucher-close-hover: #e5e5e5;
    --coupons-voucher-accent: #1d1d1d;
    --coupons-voucher-sale: #b42318;
    --coupons-voucher-arrow: #f2f2f2;
    --coupons-voucher-radius: 12px;
    --coupons-voucher-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

body.coupons-voucher-open {
    overflow: hidden;
}

.coupons-voucher {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    &.is-open {
        opacity: 1;
        visibility: visible;

        .coupons-voucher__window {
            transform: none;
        }
    }

    [hidden] {
        display: none !important;
    }
}

.coupons-voucher__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--coupons-voucher-overlay);
}

.coupons-voucher__window {
    --coupons-voucher-image-height: 240px;
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 1000px;
    margin: 48px auto 40px;
    padding: 40px;
    background-color: var(--coupons-voucher-surface);
    border: 1px solid var(--coupons-voucher-line);
    border-radius: var(--coupons-voucher-radius);
    box-shadow: var(--coupons-voucher-shadow);
    transform: translateY(16px);
    transition: transform 0.3s ease;
}

.coupons-voucher__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--coupons-voucher-close);
    fill: var(--coupons-voucher-close);
    background-color: var(--coupons-voucher-close-background);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;

    svg {
        display: block;
        width: 24px;
        height: 24px;
    }

    @media (hover: hover) and (pointer: fine) {
        &:hover {
            background-color: var(--coupons-voucher-close-hover);
        }
    }
}

.coupons-voucher__header {
    display: grid;
    gap: 12px;
    margin-bottom: 32px;
}

.coupons-voucher__code {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 6px;
    padding: 6px 12px;
    color: var(--coupons-voucher-accent);
    border: 1px dashed var(--coupons-voucher-accent);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.coupons-voucher__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.coupons-voucher__title {
    color: var(--coupons-voucher-text);
    font-size: 26px;
    font-weight: 600;
    line-height: 130%;
    letter-spacing: 0.52px;
}

.coupons-voucher__note {
    max-width: 720px;
    color: var(--coupons-voucher-muted);
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0.16px;
}

.coupons-voucher__arrows {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.coupons-voucher__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--coupons-voucher-text);
    background-color: var(--coupons-voucher-arrow);
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.3s ease;

    svg {
        display: block;
    }

    &.is-disabled {
        opacity: 0.4;
        pointer-events: none;
    }
}

.coupons-voucher__arrows--side {
    position: absolute;
    top: calc(var(--coupons-voucher-image-height) / 2);
    left: 0;
    right: 0;
    z-index: 1;
    display: none;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    transform: translateY(-50%);

    .coupons-voucher__arrow {
        position: relative;

        &::before {
            content: "";
            position: absolute;
            inset: -8px;
        }
    }

    .coupons-voucher__arrow:not(.is-disabled) {
        pointer-events: auto;
    }
}

.coupons-voucher__slider {
    position: relative;
}

.coupons-voucher__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;

    &.slick-initialized {
        display: block;
        margin: 0 -12px;

        .slick-track {
            display: flex;
        }

        .slick-slide {
            height: auto;
            padding: 0 12px;

            > div {
                height: 100%;
            }
        }
    }
}

.coupons-voucher__slide {
    height: 100%;
}

.coupons-voucher__item {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;

    &.is-selected {
        .coupons-voucher__image {
            box-shadow: inset 0 0 0 2px var(--coupons-voucher-accent);
        }

        .coupons-voucher__choose {
            color: var(--coupons-voucher-accent);
            background-color: transparent;
            box-shadow: inset 0 0 0 1px var(--coupons-voucher-accent);
        }

        .coupons-voucher__choose-text {
            display: none;
        }

        .coupons-voucher__chosen-text {
            display: inline;
        }
    }
}

.coupons-voucher__image {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: var(--coupons-voucher-image-height);
    padding: 20px;
    background-color: var(--coupons-voucher-media);
    border-radius: var(--coupons-voucher-radius);
    transition: box-shadow 0.3s ease;

    img {
        display: block;
        width: auto;
        max-width: 100%;
        height: 100%;
        object-fit: contain;
        mix-blend-mode: multiply;
    }
}

.coupons-voucher__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    margin: 16px 0;
}

.coupons-voucher__caption {
    color: var(--coupons-voucher-muted);
    font-size: 14px;
    line-height: 140%;
    letter-spacing: 0.14px;
}

.coupons-voucher__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
}

.coupons-voucher__price-new {
    color: var(--coupons-voucher-sale);
    font-size: 24px;
    font-weight: 700;
    line-height: 130%;
}

.coupons-voucher__price-old {
    color: var(--coupons-voucher-faint);
    font-size: 16px;
    line-height: 20px;
    text-decoration: line-through;
}

.coupons-voucher__name {
    color: var(--coupons-voucher-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 150%;
    letter-spacing: 0.16px;
    overflow-wrap: anywhere;
}

.coupons-voucher__choose {
    box-sizing: border-box;
    width: 100%;
}

.coupons-voucher__chosen-text {
    display: none;
}

.coupons-voucher__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--coupons-voucher-line-soft);
}

.coupons-voucher__summary {
    color: var(--coupons-voucher-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
}

.coupons-voucher__confirm {
    min-width: 260px;
    margin-left: auto;
}

@media (max-width: 992px) {
    .coupons-voucher__window {
        margin-top: 30px;
        padding: 40px 24px 24px;
    }

    .coupons-voucher__title {
        font-size: 22px;
    }

    .coupons-voucher__note {
        font-size: 14px;
    }

    .coupons-voucher__items:not(.slick-initialized) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .coupons-voucher__window {
        --coupons-voucher-image-height: 220px;
    }

    .coupons-voucher__header {
        margin-bottom: 24px;
    }

    .coupons-voucher__heading .coupons-voucher__arrows {
        display: none;
    }

    .coupons-voucher__arrows--side {
        display: flex;
    }

    .coupons-voucher__items:not(.slick-initialized) {
        grid-template-columns: minmax(0, 1fr);
    }

    .coupons-voucher__footer {
        flex-direction: column;
        align-items: stretch;
        margin-top: 24px;
        padding-top: 16px;
    }

    .coupons-voucher__summary {
        text-align: center;
    }

    .coupons-voucher__confirm {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }
}
