.car-detail-page {
    padding: 120px 0 80px; 
    min-height: 80vh;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 25px;
    font-weight: 700;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
}

/* ============================================================
   HORNÍ BLOK: Galerie vlevo, Přehled a cena vpravo
   ============================================================ */
.car-detail-top-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.car-gallery-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

/* Hlavní obrázek má pevný poměr stran - NIKDY se neroztáhne vertikálně */
.car-detail-image-main {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 480px;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: zoom-in;
    transition: background-image 0.3s ease;
}

.car-status-text {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 10px;
    padding: 16px;
    background: rgba(10, 11, 14, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--primary-color);
    transform: scale(1.04);
}

/* Pravý panel s cenou a parametry */
.car-detail-summary-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.car-detail-summary-card h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 900;
}

.specs-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 25px;
    align-self: flex-start;
}

.car-price-wrapper {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.car-detail-summary-card .price {
    font-size: 2.4rem;
    color: var(--primary-color);
    font-weight: 900;
    margin-bottom: 4px;
}

.car-price-dph {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.car-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.car-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.25);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.car-cta-btn {
    width: 100%;
    margin-bottom: 25px;
    text-align: center;
}

.car-guarantees {
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    padding: 18px;
    border-left: 3px solid var(--primary-color);
}

.car-guarantees p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.car-guarantees p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   SPODNÍ BLOK: Podrobný popis vozu a Hlavní výbava
   ============================================================ */
.car-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.car-section-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.car-section-card h2 {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--primary-color);
    padding-left: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ql-editor-output {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.8;
}

.ql-editor-output p {
    margin-bottom: 15px;
}
.ql-editor-output p:last-child {
    margin-bottom: 0;
}

.ql-editor-output strong {
    font-weight: 700;
    color: #fff;
}

.ql-editor-output em {
    font-style: italic;
}

.ql-editor-output ul, .ql-editor-output ol {
    margin: 15px 0 15px 30px;
}

.ql-editor-output li {
    margin-bottom: 8px;
}

.ql-editor-output h1, .ql-editor-output h2, .ql-editor-output h3 {
    color: #fff;
    margin: 25px 0 15px;
    font-weight: 700;
    line-height: 1.3;
}
.ql-editor-output h1:first-child, .ql-editor-output h2:first-child, .ql-editor-output h3:first-child {
    margin-top: 0;
}

.ql-editor-output h2 { font-size: 1.4rem; }
.ql-editor-output h3 { font-size: 1.2rem; }

.equipment-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.equipment-list li {
    color: var(--text-main);
    position: relative;
    padding-left: 28px;
    line-height: 1.4;
    font-size: 0.95rem;
}

.equipment-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* ============================================================
   RESPONSIVITA
   ============================================================ */
@media (max-width: 992px) {
    .car-detail-top-grid {
        grid-template-columns: 1fr;
    }
    
    .car-detail-summary-card {
        padding: 25px;
    }
    
    .car-section-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .equipment-list {
        grid-template-columns: 1fr;
    }
    
    .car-detail-summary-card h1 {
        font-size: 1.8rem;
    }
    
    .car-detail-summary-card .price {
        font-size: 2rem;
    }
}
