/* Structured vehicle detail layout (gallery + price box, accordion details) */
.cd-page {
    padding-top: 150px;
    padding-bottom: 60px;
}

.cd-breadcrumb {
    font-size: 20px;
    padding-bottom: 20px;
}

.cd-breadcrumb a {
    color: #981008;
}

.cd-page .ref-gallery {
    margin-bottom: 10px;
}

/* Right column: title, price, key facts, CTA */
.cd-aside {
    position: sticky;
    top: 130px;
}

.cd-brand {
    font: bold 20px 'Spezia Extended';
    letter-spacing: 1px;
    color: #981008;
    text-transform: uppercase;
}

.cd-title {
    font: bold 40px/1.1 'Spezia Extended';
    color: #000D35;
    margin: 6px 0 24px;
}

.cd-price-box {
    background: #EBEBE6;
    padding: 28px 30px;
    margin-bottom: 30px;
}

.cd-price {
    font: bold 44px/1 'Spezia Extended';
    color: #000D35;
}

.cd-price-note {
    font-size: 20px;
    margin-top: 8px;
}

.cd-keyfacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 20px;
    padding: 0 0 30px;
    margin: 0 0 30px;
    border-bottom: 1px solid #AAAAA0;
}

.cd-keyfacts dt {
    font-size: 18px;
    font-weight: normal;
    color: #000D35;
    opacity: 0.65;
}

.cd-keyfacts dd {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
}

.cd-cta .gbutton {
    display: block;
    text-align: center;
    margin: 0 0 12px;
}

.cd-cta .gbutton.is-outline {
    background: none;
    color: #981008;
    border: 1px solid #981008;
    line-height: 54px;
}

.cd-cta .gbutton.is-outline:after {
    background: #981008;
    opacity: 0.08;
}

.cd-cta .gbutton.is-outline:hover {
    color: #981008;
}

/* Accordion sections */
.cd-details {
    padding-top: 70px;
}

.cd-acc {
    border-top: 1px solid #AAAAA0;
}

.cd-acc:last-child {
    border-bottom: 1px solid #AAAAA0;
}

.cd-acc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 28px 0;
    background: none;
    border: 0;
    font: bold 30px 'Spezia Extended';
    color: #000D35;
    text-align: left;
    cursor: pointer;
}

.cd-acc-toggle:focus {
    outline: none;
}

.cd-acc-toggle:hover {
    opacity: 0.8;
}

.cd-acc-toggle .cd-chevron {
    flex: 0 0 auto;
    margin-left: 30px;
    width: 14px;
    height: 14px;
    border-right: 2px solid #981008;
    border-bottom: 2px solid #981008;
    transform: rotate(-135deg);
    transition: transform 0.2s ease;
}

.cd-acc-toggle.collapsed .cd-chevron {
    transform: rotate(45deg);
}

.cd-acc .collapse,
.cd-acc .collapsing {
    padding-left: 0;
}

.cd-acc-body {
    padding: 0 0 50px;
    font-size: 24px;
    line-height: 1.35;
}

/* Spec table: two columns of label/value rows */
.cd-specs {
    columns: 2;
    column-gap: 70px;
}

.cd-specs .cd-spec {
    display: flex;
    justify-content: space-between;
    break-inside: avoid;
    padding: 12px 0;
    border-bottom: 1px solid #DCDCD4;
}

.cd-specs .cd-spec span:first-child {
    opacity: 0.65;
    padding-right: 20px;
}

.cd-specs .cd-spec span:last-child {
    text-align: right;
}

.cd-equipment {
    columns: 2;
    column-gap: 70px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cd-equipment li {
    break-inside: avoid;
    padding: 6px 0 6px 34px;
    position: relative;
}

.cd-equipment li:before {
    content: '»';
    position: absolute;
    left: 0;
    color: #981008;
}

.cd-equipment small {
    color: #981008;
    font-size: 17px;
    margin-right: 8px;
}

/* Energy block nested in accordion needs no own frame */
.cd-acc .energy-body {
    padding-top: 10px;
}

@media only screen and (max-width: 991px) {
    .cd-page {
        padding-top: 110px;
    }

    .cd-aside {
        position: static;
        margin-top: 30px;
    }

    .cd-title {
        font-size: 32px;
    }

    .cd-acc-toggle {
        font-size: 22px;
    }

    .cd-acc-body {
        font-size: 20px;
    }

    .cd-specs,
    .cd-equipment {
        columns: 1;
    }
}

@media only screen and (max-width: 500px) {
    .cd-price {
        font-size: 36px;
    }

    .cd-acc-toggle {
        font-size: 18px;
        padding: 22px 0;
    }

    .cd-acc-body {
        font-size: 17px;
    }
}

/* Gallery: main image and thumbnails share the column width, thumbs get a fixed ratio */
.cd-page .ref-gallery .swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
}

.cd-page .gallery-thumbs {
    height: auto;
    padding: 0;
    margin-bottom: 10px;
}

.cd-page .gallery-thumbs .swiper-slide {
    height: auto;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    cursor: pointer;
}

.cd-page .gallery-thumbs .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* main.css sets .swiper-container to height:100%, which stretches the gallery to the row height */
.cd-page .swiper-container {
    height: auto;
}

.cd-page .swiper-wrapper {
    height: auto;
}

.cd-page .ref-gallery .swiper-slide {
    height: auto;
}

.cd-page .row > [class*="col-"] {
    align-self: flex-start;
}
