#modal-wrapper {
    display: none;
    color: #0D324D;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: block;
    justify-content: center;
    z-index: 1040; /* Z-index выше Bootstrap's modal */
}
.modal-content-wrapper {
    position: fixed;
    top:0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 100vh;
    background-color: #F7F7F7;
    overflow-y: auto;
    z-index: 1050;
    margin: 0 auto;
    display: block;
}
.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: yellow;
    overflow: hidden;
}
.link-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 15px;
    background-color: transparent;
    border: 1px solid #299CDB;
    border-radius: 4px;
    color: #299CDB;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    display: block; /* <--- Изменено, чтобы можно было задавать ширину */
    white-space: nowrap; /* <--- Запрещает перенос строки */
    overflow: hidden; /* <--- Скрывает текст, который выходит за границы */
    text-overflow: ellipsis; /* <--- Добавляет многоточие в конце */
}
.links-container-flex {
    display: flex; /* <-- Включаем Flexbox */
    flex-wrap: wrap; /* <-- Разрешаем элементам переноситься на новую строку */
    gap: 10px; /* <-- Отступ между элементами */
    padding: 0; /* <-- Убираем стандартные отступы, если они есть */
}
.rounded-block {
    background-color: #FFFFFF;
    display: inline-block;
    vertical-align: top;
    border-radius: 12px;
    border: 1px #ECECEC solid;
    padding: 17px 20px 20px 20px;
    box-sizing: border-box;
    width: 100%;
}

.h3-modal {
    font-size: 21px;
    color: #172E3E;
    font-weight: bold;
}

#content-column-1 {
    width: 61%;
}

#content-column-2 {
    width: 33%;
}

/* Кнопка закрытия окна */

    .close-btn {
        position: fixed;
        top: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
        z-index: 1051;
        background-color: #fff;
        border: none;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        display: flex; /* центрируем содержимое */
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .close-btn::after {
        content: '×';
        font-size: 30px;
        color: #000;
        line-height: 1; /* убираем лишний отступ */
    }

/* ------------ TABLE ---------------- */

    .custom-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        border: 1px solid #ECECEC;
        border-radius: 12px;
        overflow: hidden;
        background-color: #ffffff;
        table-layout: fixed;
    }

    /* Убираем границы у ячеек */
    .custom-table td {
        font-size: 14px;
        padding: 10px;
        height: 50px;
        box-sizing: border-box;
        /* Имитируем внутренние границы с помощью box-shadow */
        box-shadow: 0 1px 0 0 #ECECEC, 1px 0 0 0 #ECECEC;
        vertical-align: middle;
        white-space: nowrap;      /* <-- Запрещаем перенос строки */
        overflow: hidden;         /* <-- Обрезаем лишний текст */
        text-overflow: ellipsis;  /* <-- Добавляем многоточие */
    }

    /* Для ячеек в последнем ряду убираем нижнюю тень */
    .custom-table tr:last-child td {
        box-shadow: 1px 0 0 0 #ECECEC;
    }

    /* Для ячеек в последней колонке убираем правую тень */
    .custom-table tr td:last-child {
        box-shadow: 0 1px 0 0 #ECECEC;
    }

    /* Для последней ячейки в последнем ряду убираем обе тени */
    .custom-table tr:last-child td:last-child {
        box-shadow: none;
    }

    /* Стили для угловых ячеек */
    .custom-table tr:first-child td:first-child {
        border-top-left-radius: 12px;
    }

    .custom-table tr:first-child td:last-child {
        border-top-right-radius: 12px;
    }

    .custom-table tr:last-child td:first-child {
        border-bottom-left-radius: 12px;
    }

    .custom-table tr:last-child td:last-child {
        border-bottom-right-radius: 12px;
    }
    .icon-of-table-cell {
        vertical-align: middle; margin: 0 10px 0 7px; width: 22px; height: 22px
    }

/* Swiper carousel in 'View details' popup */

    .swiper {
        width: 100%;
        height: 100%;
    }
    .swiper-slide {
        height: 400px;
        width: auto !important;
        flex-shrink: 0;
    }
    .swiper-slide img {
        height: 400px;
        width: auto;
        object-fit: cover;
        display: block;
    }
    .swiper-button-next,
    .swiper-button-prev {
        color: #000000 !important;
        background: rgba(255, 255, 255, 0.8) !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        margin-top: -22px !important;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 32px !important;
        color: rgba(0, 0, 0, 0.5) !important;
    }

    .swiper-button-disabled {
        display: none !important;
    }

    .swiper-wrapper, .swiper-slide {
        user-select: none;
        -webkit-user-select: none; /* Для старых версий Safari и Chrome */
        -moz-user-select: none; /* Для Firefox */
        -ms-user-select: none; /* Для Internet Explorer/Edge */
    }

/* Для моб.устройств */

    @media screen and (max-width: 768px) {

        .modal-content-wrapper {
            width: 100%;
        }

        #content-column-1 {
            width: 94%;
        }

        #content-column-2 {
            width: 100%;
            margin-top: 17px;
        }

    }

/* Элементы вне модального окна, но связанные с ним */

    .view-details-button {
        position:absolute;
        top:15px; right:15px;
        height: 32px;
        line-height: 32px;
        padding: 0 15px;
        background-color: transparent;
        border: 1px solid #299CDB;
        border-radius: 4px; color: #299CDB;
        text-align: center;
        text-decoration: none;
        font-size: 13px;
    }

    .gridjs-td {
        position: relative !important;
    }

    .price-header {
        margin-top: 16px;
    }
    /* Для моб. устройств (ширина экрана 768px и меньше) */
    @media (max-width: 768px) {
        .price-header {
            margin-top: 48px;
        }
    }