/* ===== Основные контейнеры ===== */
.container-fluid {
    padding: 0;
}

.row {
    margin: 0;
}

/* ===== Колонки ===== */
.col-80 {
    flex: 0 0 70%;
    max-width: 70%;
    position: relative;
    z-index: 2;
}

.col-20 {
    flex: 0 0 30%;
    max-width: 30%;
    overflow-y: auto;
    height: 100vh;
    padding-right: 30px;
    position: relative;
    z-index: 1;
}

.col-100 {
    width: 100%;
}

/* ===== Заголовки, списки ===== */
.form-label {
    font-size: 18px;
    font-weight: bold;
}

#selectedOptionsList {
    list-style-type: none;
}

#selectedOptionsList > li > span {
    font-size: 13px;
    color: #ccc;
}

/* ===== Слайдер автомобилей ===== */
#carCarousel {
    max-width: 80%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-margin-top: 20px; /* Фиксируем фокус */
}

#carCarousel img {
    max-width: 100%;
    height: auto;
    width: 100%;
}

.swiper-container {
    width: 100%;
    height: 100%;
}

.swiper-button-next,
.swiper-button-prev {
    top: 50%;
    transform: translateY(-50%);
}

.swiper-button-next {
    right: 0;
}

.swiper-button-prev {
    left: 0;
}

/* ===== Карточки модификаций ===== */
.modification-tile {
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 5px;
    cursor: pointer;
}

.modification-tile.selected {
    border-color: #28a745;
}

/* ===== Опции выбора (цвет, диски) ===== */
.color-option,
.wheel-option {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 5px;
    border: 2px solid #ccc;
    cursor: pointer;
}

.wheel-option {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* ===== Чекбоксы (исправленные) ===== */
.form-check-input {
    position: absolute;
    clip: rect(0, 0, 0, 0);
}

.form-check-label {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Стилизация галочек */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    cursor: pointer;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    margin-right: 10px;
    display: inline-block;
}

.custom-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #007bff;
}

/* Стили для чекбоксов опций */
.form-check-label .form-check-input:checked + .color-option,
.form-check-label .form-check-input:checked + .wheel-option {
    border-color: #28a745;
    background-color: #28a745;
}

/* ===== Медиа-запросы для мобильных устройств ===== */
@media only screen and (max-width: 767px) {
    .col-80,
    .col-20 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #carCarousel {
        max-width: 100%;
    }
}

/* ===== Улучшенный стиль выбора цвета и дисков ===== */
.form-check-input:checked + .form-check-label .color-option,
.form-check-input:checked + .form-check-label .wheel-option {
    border-color: #28a745;
    background-color: initial;
}

.form-check-label .color-option::after,
.form-check-label .wheel-option::after {
    display: none;
}

/* ===== Группировка чекбоксов ===== */
.wrap-form-check {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.wrap-form-check .form-check {
    flex: 0 0 auto;
}

.form-check {
    display: flex;
    align-items: center;
    padding-left: 0;
    margin-bottom: 0;
}

/* ===== Опции и контейнеры ===== */
.options-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px;
}

.option-item {
    flex: 0 0 calc(25% - 25px);
}

@media screen and (max-width: 768px) {
    .options-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .option-item {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 25%;
    }

    .form-label {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .price-box {
        font-size: 14px;
        font-weight: bold;
        color: rgba(0,0,0,.4);
    }
}

/* ===== Модальное окно сравнения ===== */
#comparisonModal .modal-dialog {
    max-width: 95%;
    margin: 30px auto;
}

/* ===== Таблицы ===== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 8px;
    text-align: left;
}

/* ===== Дополнительные опции ===== */
.additional-options {
    margin-top: 20px;
}

.form-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

/* ===== Цена и кнопки заказа ===== */
.total-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modification-tile .price {
    float: right;
    font-weight: bold;
}

/* ===== Спецификации ===== */
.specs {
    padding: 5px 0;
}

.specs div {
    font-weight: bold;
    font-size: 15px;
}

.specs span {
    font-size: 14px;
    color: #9f9d9d;
}

.specs-container {
    max-width: 800px;
    margin: auto;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.spec-label {
    color: gray;
}

.spec-value {
    font-weight: bold;
}

/* ===== Галерея изображений ===== */
.gallery-image {
    transition: transform 0.5s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.1);
}

/* ===== Аккордеон ===== */
.accordion-button {
    background-color: transparent;
    border: none;
}

.accordion-button:not(.collapsed) {
    color: inherit;
    background-color: transparent;
}

.accordion-header {
    margin-bottom: 0;
}

.accordion-item {
    border-bottom: 1px solid #e7e7e7;
    border-top: none;
    border-left: none;
    border-right: none;
    background-color: transparent;
}

.accordion-collapse {
    border: none;
    padding: 0;
}
