/* Базовая обёртка — колонка на flex */
.nd-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    line-height: 1.4;
    padding-bottom: 30px;
}

.nd-wrapper p{
    margin: 10px 0;
    line-height: 1.4;
}

/* Герой-баннер */
.nd-hero {
    display: flex;
    justify-content: center;
    background: #999999;
    border-radius: 12px;
    overflow: hidden;
}

.nd-hero__img,
.nd-hero__placeholder {
    width: 100%;
    max-width: 1400px; /* ограничиваем ширину, чтобы не «поплыло» на 4k */
    /*aspect-ratio: 16 / 9;    /* фиксация высоты */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.nd-hero__placeholder {
    background: #f2f3f5;
}

.product_counter_wrapper{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin: 0 0 30px;
}
.product_counter_title{
    font-size: 24px;
    font-weight: 600;
}
.product_counter_value{
    font-size: 24px;
    font-weight: 600;
    color: var(--color-gray-darker);
}

/* Текст */
.nd-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.nd-text__content,
.nd-text__preview {
    text-align: left;
    margin: 0 auto;
    padding-bottom: 30px;
}

/* Спойлер: изначально 5-6 строк, с плавным расширением */
.nd-text__content--collapsed {
    max-height: 6em; /* ~5–6 строк */
    overflow: hidden;
    position: relative;
}

.nd-text__content--collapsed:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    background: linear-gradient(180deg, #f8f8f809 0%, #f8f8f8 80%);
}

/* Кнопки/действия */
.nd-actions {
    display: flex;
    justify-content: flex-start;
}
#ndOpenRulesBtn{
    margin-top: -60px;
}

.ndOpenRulesBtn,
.DETAIL_BACK_WRAPPER a
{
    color: var(--color-blue-gray);
}
.ndOpenRulesBtn:hover,
.DETAIL_BACK_WRAPPER a:hover{
    color: var(--color-blue-bright);
    text-decoration: underline;

}

.DETAIL_BACK_WRAPPER{
    margin-bottom: 60px;
}

.nd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 0px 2px #00000022;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}

.nd-btn:hover {
    background: #f9fafb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

.nd-btn:active {
    transform: translateY(1px);
}

.nd-btn__caret {
    opacity: .9;
}
.nd-btn__caret {
    margin-top: 2px;
    width: 15px;
    height: 7px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg width='15' height='7' viewBox='0 0 15 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 0.5L7.5 6L14 0.5' stroke='%233E3E3E' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 15px 7px;
    transition: transform 0.2s ease;
}

/* При раскрытии — стрелка вверх */
.nd-btn[aria-expanded="true"] .nd-btn__caret {
    transform: rotate(180deg);
}

.nd-btn--primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.nd-btn--primary:hover {
    background: #0b1220;
}

/* Модалка */
.nd-no-scroll {
    overflow: hidden;
}

.nd-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
}

.nd-modal.is-open {
    display: block;
}

.nd-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .45); /* затемнение фона */
}

.nd-modal__dialog {
    position: relative;
    z-index: 1;
    margin: 48px auto;
    width: min(900px, 94vw);
    max-height: calc(100vh - 96px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.nd-modal__footer {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nd-modal__footer {
    border-top: 1px solid #f0f0f0;
    border-bottom: 0;
}

.nd-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.nd-modal__header {
    position: relative;
    padding: 10px;
}

.nd-modal__header .nd-modal__close {
    position: absolute;
    top: 20px;
    right: 25px;
}

.nd-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 20px;
    top: 16px;
    width: 30px;
    height: 30px;
    background: center/20px url('/images/Icon Close.svg') no-repeat !important;
    z-index: 100;
    opacity: 1;
    border: none;
    cursor: pointer;
}
.nd-modal__close:hover {
    transform: scale(1.1);
    transition: 0.1s;
}





.nd-modal__body {
    padding: 5px 40px 40px;
    overflow: auto;
}

.nd-modal__dialog ul,
.nd-modal__dialog ol {
    margin: 10px 0;
    padding-left: 20px;
    line-height: 1.6;
}

.nd-modal__dialog ul li,
.nd-modal__dialog ol li {
    margin-bottom: 8px;
    color: #333;

}
.nd-modal__dialog ul,
.nd-modal__dialog ul li {
    list-style: disc !important;
}
/* Добавляем чуть более мягкие маркеры для ul */
.nd-modal__dialog ul {
    list-style-type: disc;
}

.nd-modal__dialog ol {
    list-style-type: decimal;
}

/* Улучшаем вид вложенных списков */
.nd-modal__dialog ul ul,
.nd-modal__dialog ol ul {
    list-style-type: circle;
}

.nd-modal__dialog ol ol,
.nd-modal__dialog ul ol {
    list-style-type: lower-alpha;
}

/* Убираем лишние отступы у вложенных списков */
.nd-modal__dialog ul ul,
.nd-modal__dialog ol ol,
.nd-modal__dialog ul ol,
.nd-modal__dialog ol ul {
    margin-top: 5px;
    margin-bottom: 5px;
}


.catalog_section__white_box.in_retail_offers{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px;
}
.catalog_section__white_box.in_retail_offers > div.catalog_section__sorting_line1{
    width: 100%;
}
.catalog_section__white_box.in_retail_offers > div.catalog_section__sorting_line2{
    display: none;
}


@media (min-width: 576px) {
    .hidden_pc {
        display: none;
    }
}

@media (max-width: 575px) {
    #ndOpenRulesBtn{
        margin-top: 0px;
    }

    .hidden_mobile {
        display: none;
    }
    .nd-modal__body {
        padding: 5px 20px 40px;
        overflow: auto;
        font-size: 14px;
        line-height: 1.4;
    }
    .nd-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }
    .nd-wrapper .nd-btn {
        background: transparent;
        box-shadow: none;
        border: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding-left: 0;
        color: var(--color-gray-darker);
    }

    .nd-modal__body h1,
    .nd-modal__body h2,
    .nd-modal__body h3
    {
        padding-right: 40px;
    }

    .product_counter_wrapper{
        margin-bottom: 10px;
    }
    .product_counter_title,
    .product_counter_value{
        font-size: 16px;
    }


}


/* Адаптивы
   ---------------------------------------------------------------------- */
/* Планшеты */
@media (max-width: 1199.98px) {
    .nd-hero__img,
    .nd-hero__placeholder {
        border-radius: 14px;
    }
}

/* Смартфоны */
@media (max-width: 575px) {
    .nd-wrapper {
        gap: 10px;
    }

    .nd-hero__img,
    .nd-hero__placeholder {
        border-radius: 12px;
    }

    .nd-text__content, .nd-text__preview {
        font-size: 15px;
    }

    .nd-modal__dialog {
        margin: 24px auto;
        max-height: calc(100vh - 48px);
    }
}