:root {
    --primary-color: #E30613; 
    --text-dark: #111111;
    --text-gray: #666666;
    --bg-light: #f4f4f4;
    --card-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

/* --- GRID VOZIDIEL (Výpis) --- */
.kaf2-cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 40px;
}

.kaf2-car-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kaf2-car-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-color);
}

.kaf2-car-card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: #eee;
}

.kaf2-car-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.kaf2-car-card:hover .kaf2-car-card-image img {
    transform: scale(1.05);
}

.kaf2-car-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kaf2-car-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
    color: var(--text-dark);
}

.kaf2-car-card-title a {
    text-decoration: none;
    color: inherit;
}

.kaf2-tech-preview {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.kaf2-car-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kaf2-car-card-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
}

.kaf2-car-card-link {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--primary-color);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.kaf2-car-card-link:hover {
    background: #b9050f;
}


/* --- DETAIL VOZIDLA (Single Page) --- */
.kaf2-single-wrapper {
    max-width: 1280px;
    margin: 20px auto 60px;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    box-sizing: border-box; /* Dôležité pre layout */
}

.kaf2-single-wrapper * {
    box-sizing: border-box;
}

/* Horná časť - FIXNUTÉ ROZLOŽENIE */
.kaf2-single-top {
    display: flex; /* Zmena z grid na flex pre lepšiu kontrolu */
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
    align-items: flex-start;
}

/* Galéria - FIXNUTÁ VÝŠKA A ŠÍRKA */
.kaf2-gallery-box {
    flex: 1 1 55%; /* Zaberie cca 55% šírky */
    min-width: 300px; /* Aby sa na mobile nezmenšilo moc */
    max-width: 800px; /* Maximálna šírka obrázku */
}

.kaf2-gallery-main {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 12px;
    background: #000;
    width: 100%;
    /* Tu je oprava - fixná výška max 500px, inak pomer strán */
    height: auto;
    max-height: 500px; 
    aspect-ratio: 16/9; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.kaf2-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Celé auto vo vnútri boxu */
    max-height: 500px; /* Poistka */
    display: block;
}

.kaf2-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    user-select: none;
    z-index: 10;
    transition: all 0.2s;
}

.kaf2-arrow:hover { background: var(--primary-color); }
.kaf2-arrow-prev { left: 10px; }
.kaf2-arrow-next { right: 10px; }

.kaf2-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: thin;
}

.kaf2-gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.kaf2-gallery-thumbs img.active-thumb, .kaf2-gallery-thumbs img:hover {
    opacity: 1;
    border-color: var(--primary-color);
}

/* Info Box - FIXNUTÁ ŠÍRKA */
.kaf2-info-box {
    flex: 1 1 35%; /* Zaberie zvyšok miesta */
    background: #fff;
    padding: 10px;
    min-width: 300px;
}

/* NADPIS - ZMENŠENÝ */
.kaf2-single-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.kaf2-single-subtitle {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kaf2-single-subtitle span {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.kaf2-price-box {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.kaf2-main-price {
    display: block;
    font-size: 34px;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.kaf2-dph-note {
    font-size: 14px;
    color: #888;
}

/* TLAČIDLO CTA */
.kaf2-btn-cta {
    display: block;
    width: 100%;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.25);
    transition: all 0.2s ease;
}

.kaf2-btn-cta:hover {
    background-color: #c4040f !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(227, 6, 19, 0.35);
}

/* Spodná časť (Grid) */
.kaf2-content-grid {
    display: flex; /* Zmena na flex pre lepšiu kontrolu */
    flex-wrap: wrap;
    gap: 40px;
}

.kaf2-content-left {
    flex: 2; /* Ľavá časť je širšia */
    min-width: 300px;
}

.kaf2-content-right {
    flex: 1; /* Pravá časť (mapa) je užšia */
    min-width: 300px;
}

.kaf2-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 30px 0 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.kaf2-tech-list-simple {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.kaf2-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    padding: 0;
    list-style: none;
}

.kaf2-features-grid li {
    font-size: 14px;
    position: relative;
    padding-left: 24px;
}

.kaf2-features-grid li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Kontakt & Mapa */
.kaf2-contact-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 24px;
    position: sticky;
    top: 20px;
}

.kaf2-map-frame {
    width: 100%;
    height: 250px;
    border: 0;
    border-radius: 8px;
    margin-top: 15px;
}

/* --- MOBILNÁ OPTIMALIZÁCIA --- */
@media (max-width: 900px) {
    .kaf2-single-top {
        flex-direction: column; /* Všetko pod seba */
    }
    
    .kaf2-gallery-box, .kaf2-info-box {
        flex: 1 1 100%; /* Plná šírka */
        width: 100%;
        max-width: 100%;
    }

    .kaf2-gallery-main {
        max-height: 350px; /* Na mobile menšia výška */
    }

    .kaf2-content-grid {
        flex-direction: column;
    }

    .kaf2-content-left, .kaf2-content-right {
        flex: 1 1 100%;
        width: 100%;
    }

    .kaf2-single-title {
        font-size: 20px;
    }

    .kaf2-features-grid {
        grid-template-columns: 1fr;
    }

    .kaf2-single-wrapper {
        padding: 0 15px;
        margin-top: 20px;
    }
    
    .kaf2-contact-card {
        position: static;
    }
}