/* Car Details - Sections */
.car-detail-sections {
    display: grid;
    padding: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    width: 100%;
}

.activeCar {
    border: 5px solid green;
}

.mainImgRow {
    position: relative;
    width: 100%;
    max-width: 1020px;
    margin: auto;
    height: 400px;
}

.mainImgRow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mainImgRow .carButtons {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 15px; /* Adds spacing from the edges */
}

.mainImgRow .carButtons button {

    color: #333; /* Darker text for contrast */
    border: none;
    padding: 14px 18px;
    font-size: 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Soft shadow for depth */
    backdrop-filter: blur(8px); /* Slight blur for a premium effect */
}

.mainImgRow .carButtons button:hover {
    background: rgba(240, 240, 240, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.mainImgRow .carButtons button:active {
    transform: scale(0.95);
}

.mainImgRow .carButtons button i {
    font-size: 22px; /* Slightly larger icon */
}


.carButtons .car-left,
.carButtons .car-right {
    padding: 10px;
    background-color: rgba(255 ,111 ,97, 0.5);
}

.carButtons i {
    color: black;
    font-size: 25px;
}

.carButtons .car-right {
    margin-right: 30px;
    padding: 10px;
}

.secondCarImages {
    padding: 2px;
    margin-left: 10px;
    width: 100%;
    gap: 2px;
    overflow: auto;
}

.secondCarImages img {
    width: 120px;
    height: 60px;
    object-fit: cover;
}

.OtherImages:hover {
    opacity: 0.6;
    transition: 0.5s;
}

.car-detail-sections .section-answer {
    font-weight: bold;
    color: #3a3a3a;
}

.car-detail-sections .section-answer ul {
    list-style: none;
    font-weight: normal !important;
    text-align: left;
}

/* Car Details Solo */
.carDetails {
    overflow: hidden;
}
.carDetails .brand {
    text-decoration: none;
    display: inline-block;
    outline: 1px solid lightgrey;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    line-height: 16px;
    padding: 2px 16px;
    height: 22px;
    min-width: 60px;
    min-height: 22px;
    border: none;
    background-color: #6CB6FF;
    color: black;
    transition: background-color .17s ease, color .17s ease;
}

.carDetails h5 {
    font-weight: bold;
    color: black;
}

.carInfo .card {
    border: 1px solid #bababa;
}

.car-top-info {
    display: grid;
    padding: 5px;
    text-align: center;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.car-top-info span {
    display: block;
    text-align: center;
}
/* Modals  */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 1.2s ease-in;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.lightbox-content {
    width: 1200px;
    max-width: 95%;
    max-height: 95%;
    border-radius: 10px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 55px;
    cursor: pointer;
    z-index: 1100;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    font-size: 50px;
    z-index: 1100;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#lightbox-left {
    left: 20px;
}

#lightbox-right {
    right: 20px;
}
/* Small devices (landscape phones, 576px and up)*/
@media only screen and (max-width: 768px) {
    .car-detail-sections {
        grid-template-columns: 1fr; /* Single column layout */
        text-align: left;
        padding: 30px;
    }
    .carDetails {
        width: 100%;
    }
    .carButtons .car-right {
        margin-right: 0;
    }
    .carButtons .car-left{
        margin-left: 0;
    }
    .secondCarImages {
        margin-left: 0;
    }
    .mainImgRow .carButtons button {
        height: 20px;
    }
    .mainImgRow .carButtons .car-right{
        margin-right: 10px;
    }
    .mainImgRow .carButtons .car-left {
        margin-left: -13px;
    }
    .mainImgRow .carButtons {
        width: 100%;
    }

    .mainImgRow {
        height: 270px !important;
        overflow: hidden;
    }

    .mainImgRow img {
        height: 100%;
        overflow: hidden;
        object-fit: contain !important;
    }
    .mainImgRow {
        height: 500px;
        overflow: hidden;
    }

    .mainImgRow img {
        height: 100%;
        overflow: hidden;
        object-fit: cover;
    }
}

@media only screen and (max-width: 376px) {
    .mainImgRow .carButtons {
        padding: 0;
    }
    .mainImgRow .carButtons button {
        height: 20px;
    }
    .mainImgRow .carButtons .car-right{
        margin-right: 25px;
    }
}