.ns-topper-modal :where(h1, h2, h3, h4, h5, h6, p, img) {
    margin: 0;
    padding: 0;
}

/* MODAL */
.ns-topper-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(58,63,68, .7);
    width: 100%;
    height: 100%;
    position: fixed;
    opacity: 0;
    pointer-events: none;
    inset: 0;
    z-index: 30;
    padding: calc(var(--ns-header-height, 0) + 48px) 0 48px;
    transition-property: opacity;
    transition-duration: 0.5s;
    transition-timing-function: ease;
    box-sizing: border-box;
}

.ns-topper-modal.ns-topper-modal--opened {
    opacity: 1;
    pointer-events: auto;
}

.ns-topper-modal__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
    width: 915px;
    min-height: 320px;
    max-height: calc(100% - 160px);
    background-color: #FFFFFF;
    border-radius: 28px;
    border: 1px solid #EBEDF1;
    color: #1F2023;
    padding: 60px 40px 40px;
    box-shadow: 0 10px 10px -5px rgba(0,0,0, .04);
    position: relative;
    box-sizing: border-box;
    margin-bottom: var(--ns-modal-offset-bottom, 0);
    overflow: hidden;
}

.ns-topper-modal__close {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none'%3E%3Cpath stroke='%236A6F75' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 25 10-10m-10 0 10 10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1;
    cursor: pointer;
}

.ns-topper-modal__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 32px;
    width: 100%;
    overflow: hidden;
}

.ns-topper-modal__title {
    font-weight: 700;
    font-size: 32px;
    line-height: 1.19;
}

.ns-topper-modal__slider {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
}

.ns-topper-modal__slider-swiper {
    display: block;
    width: 100%;
    overflow: visible !important;
}

.ns-topper-modal__card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
    width: 216px;
    border-radius: 18px;
    border: 2px solid #ebedf1;
    padding: 8px 8px 16px;
    box-shadow: 0 4px 16px 0 rgba(0,0,0, 0);
    cursor: pointer;
    user-select: none;
    transition: box-shadow .2s ease, border-color .2s ease;
    box-sizing: border-box;
}

.ns-topper-modal__card:hover {
    border-color: transparent;
    box-shadow: 0 4px 16px 0 rgba(0,0,0, .12);
}

.ns-topper-modal__card-image {
    display: block;
    border-radius: 12px;
    width: 100%;
    height: 226px;
    overflow: hidden;
}

.ns-topper-modal__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ns-topper-modal__card-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
}

.ns-topper-modal__card-info-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #5a616c;
}

.ns-topper-modal__card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}

.ns-topper-modal__card-price {
    font-weight: 600;
    font-size: 20px;
    line-height: 1.4;
    color: #1f2023;
}

.ns-topper-modal__card-price-old {
    font-weight: 500;
    font-size: .666em;
    text-decoration: line-through;
    color: #9299a5;
}

.ns-topper-modal__card-status {
    flex-shrink: 0;
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: #e00e1a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none' viewBox='0 0 40 40'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M20 15v5m0 0v5m0-5h5m-5 0h-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    transition: background-color .2s ease, background-image .2s ease;
}

.ns-topper-modal__card--selected {
    border-color: #e00e1a !important;
}

.ns-topper-modal__card--selected .ns-topper-modal__card-status {
    background-color: #f3f4f6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none' viewBox='0 0 40 40'%3E%3Cpath stroke='%235a616c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m14.167 20.834 3.333 3.333 8.334-8.333'/%3E%3C/svg%3E");
}

/* CONTROLS */
.ns-topper-modal__slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.ns-topper-modal__slider-pagination {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    width: auto;
}

.ns-topper-modal__slider-pagination .swiper-pagination-bullet {
    flex-shrink: 0;
    display: block;
    width: 8px;
    height: 3px;
    border-radius: 8px;
    background-color: #ebedf1;
    transition: background-color .2s ease, width .2s ease;
    margin: 0 !important;
    opacity: 1 !important;
}

.ns-topper-modal__slider-pagination .swiper-pagination-bullet-active {
    width: 20px;
    background-color: #e00e1a;
}

.ns-topper-modal__slider-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-left: auto;
}

.ns-topper-modal__slider-button {
    flex-shrink: 0;
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52' fill='none' viewBox='0 0 52 52'%3E%3Cpath stroke='%231f2023' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m23 20 6 6-6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    transition: background-color .2s ease;
    cursor: pointer;
}

.ns-topper-modal__slider-button.ns-topper-modal__slider-button--prev {
    transform: scaleX(-1);
}

.ns-topper-modal__slider-button:hover {
    background-color: #ebedf1;
}

.ns-topper-modal__slider-button.swiper-button-disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* FOOTER */
.ns-topper-modal__footer {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    background-color: #fff;
    position: sticky;
    bottom: 0;
    z-index: 1;
    box-shadow: 0 -15px 30px 0 #fff, 0 30px 0 30px #fff;
}

.ns-topper-modal__button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    border-radius: 8px;
    background-color: #e00e1a;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    padding: 0 17px;
    transition: background-color .2s ease;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.ns-topper-modal__button:hover {
    background-color: #d70d1d;
}

.ns-topper-modal__button--secondary {
    font-weight: 500;
    background-color: #ffe7e7;
    color: #e00e1a;
}

.ns-topper-modal__button--secondary:hover {
    background-color: #ffd9d9;
    color: #e00e1a;
}

@media (max-width: 991px) {
    /* MODAL */
    .ns-topper-modal {
        align-items: flex-end;
    }

    .ns-topper-modal__inner {
        width: 100%;
        gap: 10px;
        border-radius: 16px 16px 0 0;
        padding: 32px 0 24px;
        transform: translateY(100%);
        transition: transform 0.6s ease;
    }

    .ns-topper-modal--opened .ns-topper-modal__inner {
        transform: translateY(0);
    }

    .ns-topper-modal__close {
        width: 56px;
        height: 4px;
        background-color: #E0E0E0;
        background-image: none;
        left: 50%;
        top: 6px;
        transform: translateX(-50%);
    }

    .ns-topper-modal__close::before {
        content: "";
        display: block;
        width: 150%;
        height: 40px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* CONTENT */
    .ns-topper-modal__content {
        gap: 20px;
        height: auto;
        padding: 0 20px;
        overflow: hidden auto;
        box-sizing: border-box;
    }

    .ns-topper-modal__title {
        font-size: 24px;
        line-height: 1.5;
    }

    .ns-topper-modal__footer {
        display: flex;
    }

    /* SLIDER */
    .ns-topper-modal__slider-swiper {
        display: block;
        width: 100%;
        height: auto;
    }

    .ns-topper-modal__slider-swiper .swiper-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        width: 100%;
        height: auto;
        gap: 20px;
    }

    .ns-topper-modal__slider-controls {
        display: none;
    }

    .ns-topper-modal__card {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        align-items: stretch;
        height: auto;
        gap: 16px;
        border-radius: 20px;
        padding: 8px;
    }

    .ns-topper-modal__card-image {
        flex-shrink: 0;
        width: 108px;
        height: 108px;
        border-radius: 20px;
    }

    .ns-topper-modal__card-info {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .ns-topper-modal__card-info-title {
        font-size: 16px;
        line-height: 1.5;
    }

    .ns-topper-modal__card-info-price {
        font-size: 20px;
    }

    .ns-topper-modal__card-status {

    }
}