/* --- Vehicle Detail Page Layout --- */
.vehicle-detail {
    max-width: 1440px; /* ~20% wider */
    margin: 40px auto;
    padding: 0 20px;
}

.detail-header {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

@media (min-width: 992px) {
    .detail-header {
        grid-template-columns: 5fr 2fr; /* more space to gallery (~20% larger area) */
    }
}

.gallery .main-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* keep ratio but container is larger due to wider grid */
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

/* LQIP blur-up helper for details page */
.main-image img.lqip {
    filter: blur(14px);
    transform: scale(1.02);
    opacity: 0.7;
}

.intro-details {
    padding: 25px;
    background-color: var(--background-card);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.intro-details h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.intro-details .detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

/* --- Main Content Grid --- */
.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 30px;
    align-items: start;
}

@media (min-width: 992px) {
    .detail-content-grid {
        grid-template-columns: 1fr 1fr; /* Two equal columns on desktop */
    }
}

.detail-section {
    background-color: var(--background-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.detail-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-list span {
    font-weight: 700;
    color: var(--text-dark);
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.thumbnail {
    width: 110px; /* larger to match bigger main image */
    height: 78px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}
.thumbnail:hover {
    border-color: var(--oxford-blue);
}
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- TCO form styles --- */
.tco-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.tco-form-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}
.tco-form-grid input {
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}
.tco-actions {
    margin-top: 12px;
}
@media (max-width: 600px) {
    .tco-form-grid { grid-template-columns: 1fr; }
}

/* --- Digital Battery Health Certificate --- */
.battery-certificate {
    background: var(--background-card);
    border-radius: 12px;
}
.soh-display {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}
.soh-label {
    color: #555;
    font-weight: 600;
}
.soh-percentage {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0B8F4A; /* dark green */
}
.soh-bar-container {
    width: 100%;
    height: 14px;
    background: #e9f5ee; /* pale green background */
    border: 1px solid #c5e5d2;
    border-radius: 999px;
    overflow: hidden;
}
.soh-bar {
    height: 100%;
    background: linear-gradient(90deg, #20c25e, #0BDA51);
    border-radius: 999px 0 0 999px; /* rounded leading edge */
    transition: width 1s ease-in-out;
}
.soh-red { background: #d9534f !important; }
.soh-yellow { background: #f0ad4e !important; }
/* Stepwise darker greens starting at 81% */
.soh-green-81 { background: #25b35a !important; }
.soh-green-86 { background: #1ea652 !important; }
.soh-green-91 { background: #178a44 !important; }
.soh-green-96 { background: #0f6d35 !important; }
.certificate-note {
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
}