/**
 * Vehicle Catalog Styles
 * Matching archive-filter.png and vehicle-detail.png designs
 */

/* ============================================================================
   ARCHIVE PAGE
   ========================================================================== */

.vehicle-archive {
    background: #f8f8f8;
}

.results-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin: 0 0 1rem;
}

.results-count {
    display: flex;
    margin: 0;
    color: #aaa;
    font-size: 0.9rem;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.results-sort label {
    color: #aaa;
    font-size: 0.9rem;
    white-space: nowrap;
    /* Globálne `label` má `margin-bottom: 10px` a `padding: 0 20px` (forms.css:170-180).
       Vo flexe s `align-items: center` sa centruje margin box, takže ten spodný margin
       posunie text popisky o 5 px hore oproti selectu. */
    margin: 0;
    padding: 0;
}

.results-sort select {
    max-width: 100%;
    padding: 0.65rem 2rem 0.65rem 0.75rem;
    font-size: 0.9rem;
    /* globálne select { line-height: 1 } orezáva diakritiku a robí pole nízke */
    line-height: 1.4;
}

@media (max-width: 600px) {
    .results-bar {
        justify-content: flex-start;
    }

    .results-sort {
        width: 100%;
        margin-left: 0;
    }

    .results-sort select {
        flex: 1;
    }
}

.vehicle-archive-content {
    padding: 4rem 0;
}

.vehicle-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ============================================================================
   FILTER SIDEBAR
   ========================================================================== */

.vehicle-sidebar {
    position: sticky;
    top: 2rem;
}

.vehicle-filters {
    background: #fff;
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e5e5;
}

.filter-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Reset je posledná položka medzi pilulkami, odtlačená doprava. Sivá, nie zelená:
   zelená je na webe akčná farba (Hľadať, CTA) a reset nie je to, čo má
   používateľ kliknúť ako prvé. Zobrazuje sa len keď nejaké pilulky sú —
   prázdny kontajner skrýva `.filter-pills:empty`. */
.reset-link {
    margin-left: auto;
    align-self: center;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.reset-link:hover,
.reset-link:focus-visible {
    color: #374151;
    text-decoration: underline;
}

.filter-advanced-link-row {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e5e5e5;
}

.filter-advanced-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #3dcb98;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.filter-advanced-link:hover {
    text-decoration: underline;
}

.filter-body {
    padding: 1.25rem;
}

/* ---- Filter pills ---- */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e5e5e5;
}

.filter-pills:empty {
    display: none;
    padding: 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 2px;
    padding: 0.25rem 0.5rem 0.25rem 0.75rem;
    background: #fff4f4;
    border: 1px solid #f5c0c0;
    border-radius: 999px;
    font-size: 0.8125rem;
    color: #333;
    line-height: 1.4;
}

.pill-label {
    white-space: nowrap;
}

.pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    background: #e74c3c;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.pill-remove:hover {
    background: #c0392b;
}

.filter-group:last-child {
    margin-bottom: 0;
}

/* Skupiny zaškrtávacích polí sú <fieldset>/<legend> kvôli prístupnosti. Vizuálne
   sa nemajú líšiť od ostatných filter skupín, takže rámik a padding z normalize
   idú preč a legend dostáva rovnaký vzhľad ako label. */
.vehicle-filters fieldset {
    border: 0;
    padding: 0;
    margin-inline: 0;
    min-inline-size: 0;
}

.filter-group label:not(.checkbox-item),
.vehicle-filters legend:not(.sr-only) {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.875rem;
    padding: 0;
}

.choices[data-type*="select-one"] .choices__inner {
    border-radius: 10px;
    border: 4px solid #e9ebf0;
    background: white;
    font-weight: 600;
}

.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 4px solid #e9ebf0;
    border-radius: 10px;
    font-size: 0.875rem;
    background: #fff;
    transition: border-color 0.2s;
    box-shadow: none;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #34d69c;
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;

    @media(max-width: 798px){
        grid-template-columns: 1fr 1fr;
    }
}

.range-inputs input {
    min-width: 0;
}

.range-inputs span {
    color: #999;
    font-size: 0.875rem;
}

/* Checkboxes */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
    color: #A5ACBF;
    margin-bottom: 5px;
    padding: 0;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #34d69c;
}

.checkbox-item:hover {
    color: #34d69c;
}

/* Collapsible Filters */
.filter-collapsible {
    border-bottom: 1px solid #f0f0f0;
}

.filter-collapsible:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-collapsible summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #333;
}

.filter-collapsible summary::-webkit-details-marker {
    display: none;
}

.filter-collapsible summary:hover {
    color: #34d69c;
}

.filter-collapsible summary::after {
    content: '+';
    font-size: 1.25rem;
    line-height: 1;
    color: #999;
    transition: transform 0.2s;
}

.filter-collapsible[open] summary::after {
    content: '−';
}

.filter-collapsible .checkbox-list,
.filter-collapsible .filter-input {
    padding: 0.5rem 0 0;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e5e5;
}

.filter-actions .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
}

/* ============================================================================
   VEHICLE GRID
   ========================================================================== */

.vehicle-main {
    min-height: 600px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.vehicle-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 35px;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.vehicle-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
}

/* Vehicle Images */
.vehicle-card-images {
    position: relative;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    flex: 1;
}

.vehicle-main-image {
    width: 100%;
    height: 100%;
}

.vehicle-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-thumbnails {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.vehicle-thumb {
    width: 60px;
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vehicle Content */
.vehicle-card-content {
    padding: 1rem;
    flex: 2;
}

.vehicle-title {
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.vehicle-title-main {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}

.vehicle-title-trim {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #595959;
    margin-top: 0.2rem;
}

.vehicle-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 0.875rem;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-content: center;
    align-items: center;
    gap: 10px;

    li {
        font-size: 16px;
        color: #666;
        display: flex;
        align-items: center;
        gap: 0.375rem;

        span {
            color: #A5ACBF;
            display: none;
        }

        strong {
            color: #A5ACBF
        }

        i {
            color: #34d69c;
            font-size: 0.875rem;
            width: 16px;
        }
    }

}


.vehicle-seller {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.vehicle-seller-name {
    font-size: 0.8125rem;
    color: #A5ACBF;
}

.vehicle-seller-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
}

.vehicle-seller-rating .fa-star {
    color: #f5a623;
    font-size: 0.75rem;
}

.vehicle-seller-rating .rating-score {
    font-weight: 600;
    color: #1a1a2e;
}

.vehicle-seller-rating .rating-votes {
    color: #A5ACBF;
}

.vehicle-actions {
    padding-top: 0.875rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-content: center;
    align-items: center;
}

.vehicle-price {
    margin: 0.875rem 0;
}

.price-amount {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.price-vat {
    display: block;
    font-size: 0.8125rem;
    color: #999;
}

.vehicle-cta .btn {
    width: 100%;
    text-align: center;
    font-size: 16px;
    padding: 10px 40px;
}

/* Pagination */
.vehicle-pagination {
    margin-top: 3rem;
}

.vehicle-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.vehicle-pagination li {
    margin: 0;
}

.vehicle-pagination a,
.vehicle-pagination span {
    padding: 8px 16px;
    background: #fff;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    display: flex;
    width: 38px;
    height: 38px;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.vehicle-pagination .prev.page-numbers,
.vehicle-pagination .next.page-numbers {
    background: transparent;
    border: none;
    font-size: 0;
}

/* font-size:0 skrýva text "Predchádzajúca"/"Ďalšia", ale zmenšoval na nulu
   aj ikonu vnútri odkazu — tej vraciame veľkosť. */
.vehicle-pagination .prev.page-numbers i,
.vehicle-pagination .next.page-numbers i {
    font-size: 14px;
}

.vehicle-pagination .current,
.vehicle-pagination a:hover {
    background: rgba(61, 203, 152, 0.3);
    color: #2EB484;
}


/* No Results */
.no-vehicles {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 8px;
}

.no-vehicles i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-vehicles h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: #333;
}

.no-vehicles p {
    color: #666;
    margin: 0;
}

/* ============================================================================
   SINGLE VEHICLE PAGE
   ========================================================================== */

.vehicle-single-header {
    background-image: url('/wp-content/themes/autonakluc/assets/images/breadcrumbs.png');
    background-size: cover;
    color: white;

    .breadcrumbs {
        a {
            color: white;
            font-size: 14px;
        }

        .separator {
            margin: 0 0.5rem;
            color: white;
        }
    }
}

.vehicle-single-header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.vehicle-single-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.vehicle-subtitle {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: #666;
}

.vehicle-single-content {
    padding: 2rem 0;
    background: #f8f8f8;
}

.vehicle-single-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Info Card (Left Sidebar) */


.info-card-inner {
    background: linear-gradient(90deg, #1FEFA5 0%, #3DCB98 100%);
    border-radius: 30px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.info-price {
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 0;

    div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.25rem;

        span {
            color: white;
        }
    }
}

.info-price .price-label {
    display: block;
    font-size: 26px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    /*text-transform: uppercase;*/
    /*letter-spacing: 1px;*/
    font-weight: 600;
}

.info-price .price-amount {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.375rem;
    line-height: 1.1;
}

.info-price .price-vat {
    display: block;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.25rem;
}

.info-price .price-without-vat {
    display: block;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
}

.info-specs {
    padding: 1.5rem;
    background: white;
    border-radius: 30px;
    box-shadow: 18px 100px 29px 0 rgba(0, 0, 0, 0.00), 11px 64px 26px 0 rgba(0, 0, 0, 0.00), 6px 36px 22px 0 rgba(0, 0, 0, 0.02), 3px 16px 16px 0 rgba(0, 0, 0, 0.03), 1px 4px 9px 0 rgba(0, 0, 0, 0.03);
    margin-bottom: 35px;
}

.info-specs h3 {
    font-size: 0.875rem;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.specs-list {
    margin: 0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #EDEFF4;
}

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

.spec-item dt {
    font-weight: 400;
    color: #A5ACBF;
    font-size: 0.875rem;
}

.spec-item dt i {
    color: #A5ACBF;
    width: 18px;
    margin-right: 0.25rem;
}

.spec-item dd {
    margin: 0;
    font-weight: 600;
    color: #000;
    text-align: right;
    font-size: 0.875rem;
}

.info-cta {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-block {
    width: 100%;
    text-align: center;
    background: #fff;
    color: #34d69c;
    font-weight: 700;
}

.btn-block:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

/* Main Column */
.vehicle-main-column {

    padding: 0;
    overflow: hidden;
}

/* Gallery */
.vehicle-gallery {
    margin-bottom: 0;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.gallery-item {
    display: none;
    width: 100%;
    height: 100%;
}

.gallery-item.active {
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    object-fit: cover;
    max-height: 660px;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid #e5e5e5;
}

.gallery-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    border: none;
    border-right: 1px solid #e5e5e5;
    background: #f0f0f0;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0;
    position: relative;
}

.gallery-thumb:last-child {
    border-right: none;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.gallery-thumb.active {
    opacity: 1;
    box-shadow: inset 0 0 0 3px #34d69c;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Description */
.vehicle-description {
    margin-bottom: 0;
    padding: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.vehicle-description h2 {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.description-content {
    color: #666;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* Details Table */
.vehicle-details {
    padding: 2rem 0;
}

.vehicle-details h2 {
    font-size: 1.25rem;
    margin: 0 0 1.25rem;
    color: #1a1a1a;
    font-weight: 700;
}

.vehicle-details table {
    max-width: 100%;
    box-shadow: 47px 265px 75px 0 rgba(0, 0, 0, 0.00), 30px 169px 69px 0 rgba(0, 0, 0, 0.00), 17px 95px 58px 0 rgba(0, 0, 0, 0.02), 7px 42px 43px 0 rgba(0, 0, 0, 0.03), 2px 11px 24px 0 rgba(0, 0, 0, 0.03);

    tr:last-child td,
    tr:first-child td {
        border: none !important;
    }

    th {
        color: black;
        border: none;
    }

    td {
        color: #A5ACBF;
        border: none;
        padding: 25px;
    }

    tr {
        background: white;
        height: 70px;
    }


    tr:nth-child(even) {
        background: #F3F4F7;
        border: none;
    }
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}


.specs-table th,
.specs-table td {
    padding: 0.875rem 1rem;
    text-align: left;
}

.specs-table th {
    font-weight: 600;
    color: #666;
    width: 45%;
    font-size: 0.875rem;
}

.specs-table td {
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
}

.vehicle-back {
    margin-top: 0;
    padding: 2rem;
    color: white;

    a {

        span {
            margin-left: 5px;
            color: white;
            font-size: 16px;

            &:hover {
                text-decoration: underline;
                text-underline-offset: 10px;
                color: white;
            }
        }
    }
}

/* ============================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 2em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: linear-gradient(130deg, #1fefa5 0, #3dcb98 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(130deg, #1fefa5 0, #3dcb98 100%);
}

.btn-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.center {
    text-align: center;
}

.max-width {
    width: 100%;
}

/* ============================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .vehicle-layout {
        grid-template-columns: 1fr;
    }

    .vehicle-sidebar {
        position: relative;
        top: auto;
        order: -1;
    }

    .vehicle-single-layout {
        grid-template-columns: 1fr;
    }

    .vehicle-info-card {
        order: -1;
    }

    .filter-header {
        cursor: pointer;
        user-select: none;
    }

    .filter-header::after {
        content: '\f078';
        font-family: 'Font Awesome 7 Pro';
        font-weight: 900;
        font-size: 0.75rem;
        color: #888;
        transition: transform 0.25s ease;
    }

    .vehicle-sidebar.is-open .filter-header::after {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .vehicle-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-single-title {
        font-size: 2rem;
    }

    .vehicle-specs {
        grid-template-columns: 1fr;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .specs-table th,
    .specs-table td {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* Vehicle card — column layout on mobile */
    .vehicle-card-link {
        flex-direction: column;
    }

    .vehicle-card-images {
        aspect-ratio: 16 / 9;
        width: 100%;
        flex: none;
    }

    .vehicle-card-images::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 45%;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.32) 0%, transparent 100%);
        pointer-events: none;
    }

    .vehicle-card-content {
        flex: none;
        padding: 0.875rem;
    }

    .vehicle-title {
        font-size: 1.0625rem;
        margin-bottom: 0.375rem;
    }

    .vehicle-specs {
        flex-wrap: wrap;
        column-gap: 1.25rem;
        row-gap: 0.375rem;

        li {
            font-size: 14px;
        }
    }

    .vehicle-actions {
        flex-direction: row;
        align-items: center;
        padding-top: 0.625rem;
        gap: 0.625rem;
    }

    .vehicle-price {
        margin: 0;
    }

    .price-amount {
        font-size: 1.25rem;
    }

    .vehicle-cta .btn {
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .filter-actions {
        flex-direction: column;
    }

    .range-inputs {
        flex-direction: column;
    }

    .range-inputs span {
        display: none;
    }
}

/* ============================================================================
   SINGLE VEHICLE V2  (.vd2-*)
   Dizajn podľa figma-auto-detail.png / Screenshot 2026-06-04
   ============================================================================ */

/* -------- Gallery Hero -------- */
.vd2-gallery {
    background: #f3f4f7;
    padding: 1em;
}

.vd2-gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4px;
    height: 100%;
    overflow: hidden;
}

.vd2-gallery-main {
    overflow: hidden;
    cursor: pointer;
    border-radius: 30px;
}

.vd2-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vd2-gallery-main:hover img {
    transform: scale(1.02);
}

.vd2-gallery-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.vd2-gallery-thumb {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 30px;
}

.vd2-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;

}

.vd2-gallery-thumb:hover img {
    transform: scale(1.04);
}

.vd2-gallery-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    pointer-events: none;
}

/* -------- Info Bar -------- */
.vd2-infobar {
    background: #f3f4f7;
    padding: 1.5rem 0;
}

.vd2-infobar-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    position: relative;
}

.vd2-title-block {
    flex: 1;
    max-width: 720px;
    display: flex;
    justify-content: space-between;
}

.vd2-title {
    margin: 0 0 0.625rem;
    line-height: 1.2;
}

.vd2-title-main {
    display: block;
    font-size: 1.625rem;
    font-weight: 700;
    color: #262626;
    text-transform: uppercase;
}

.vd2-title-trim {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #595959;
    text-transform: none;
    margin-top: 0.25rem;
}

.vd2-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vd2-badge {
    display: inline-block;
    padding: 0.2rem 0.875rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.vd2-badge--fuel {
    border-radius: 8px;
    display: flex;
    height: 28px;
    padding: 3px 14px;
    color: white;
    font-size: 16px;
    justify-content: center;
    align-items: center;

    background: rgba(254, 193, 7, 1);
}

/* -------- Price Block -------- */
.vd2-price-block {
    min-width: 350px;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 999;


}

.vd2-price-block-inner {
    border-radius: 30px;
    padding: 25px;
    background: #FFF;
    box-shadow: 0 163px 46px 0 rgba(0, 0, 0, 0.00), 0 105px 42px 0 rgba(0, 0, 0, 0.00), 0 59px 35px 0 rgba(0, 0, 0, 0.02), 0 26px 26px 0 rgba(0, 0, 0, 0.03), 0 7px 14px 0 rgba(0, 0, 0, 0.03);

}

.vd2-price-label {
    font-size: 20px;
    color: black;
    margin-bottom: 0.25rem;
    font-weight: 600;
}


.vd2-price-sub {
    display: flex;
    flex-direction: row;
    gap: 0.125rem;
    margin-bottom: .5rem;

    justify-content: space-between;
    color: black;

    span {
        font-size: 16px;

    }
}

.vd2-price-note {
    font-size: 13px;
    color: black;
    margin: 0.625rem 0 0;
    font-weight: 300;
}

/* -------- Tabs Nav -------- */
.vd2-tabs-nav {
    background: #f3f4f7;
    /*position: sticky;*/
    /*top: 0;*/
    /*z-index: 200;*/
}

.vd2-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.vd2-tabs::-webkit-scrollbar {
    display: none;
}

.vd2-tab {
    padding: 1rem 1.25rem;
    font-size: 16px;
    font-weight: 300;
    color: #A5ACBF;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;

}

.vd2-tab:hover,
.vd2-tab.active {
    font-weight: 900;
    color: black;
    border-bottom-color: black;
}

/* -------- Main Content -------- */
.vd2-main {
    background: white;

    section.calculation .container {
        flex-direction: column;
        gap: 1em;
    }

}

.vd2-section {
    background: #fff;
    padding-top: 2rem;
    margin-bottom: 1.5rem;
    width: calc(100% - 350px);
}

.vd2-section-title {
    font-size: 26px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

/* -------- Quick Stats -------- */
.vd2-quickstats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: #fff;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.vd2-qs-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.125rem 1.25rem;
}

.vd2-qs-item:last-child {
    border-right: none;
}

.vd2-qs-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vd2-qs-icon i {
    color: #3dcb98;
    font-size: 1.5rem;
}

.vd2-qs-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.vd2-qs-value {
    font-size: 20px;
    font-weight: 700;
    color: #262626;
    line-height: 1.2;
}

.vd2-qs-label {
    font-size: 16px;
    color: #a5acbf;
}

/* -------- Details Table -------- */
.vd2-details-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

.vd2-details-table tr:nth-child(even) {
    background: #f8f9fc;
}

.vd2-details-table th {
    text-align: left;
    font-weight: 400;
    color: #a5acbf;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
    width: 42%;
}

.vd2-details-table td {
    color: #262626;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
    text-align: right;
}

/* -------- Equipment Grid -------- */
.vd2-equipment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem 1.5rem;
    max-height: 288px;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.vd2-equipment-grid.expanded {
    max-height: 9999px;
}

.vd2-eq-item {
    display: flex;
    /* Pri položke zalomenej do dvoch riadkov (na mobile 17 z 59) `center` posunie fajku
       o 13 px pod prvý riadok. `flex-start` + zhodná výška riadku na ikone aj texte ju
       posadí presne na stred prvého riadku. Line-height musí byť dĺžka, nie číslo —
       unitless by sa na ikone prepočítal z jej vlastných 12 px. */
    align-items: flex-start;
    line-height: 1.666rem;
    gap: 0.625rem;
    font-size: 16px;
    color: #000;
    padding: 10px 0;
}

.vd2-eq-item i {
    color: #3dcb98;
    font-size: 0.75rem;
    flex-shrink: 0;
    line-height: inherit;
}

/* -------- Show More Button -------- */
.vd2-show-more {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    background: none;
    border: none;
    color: #3dcb98;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.vd2-show-more:hover {
    opacity: 0.8;
}

/* -------- Description -------- */
.vd2-description-section {
    border-radius: 8px;
    background: rgba(233, 235, 240, 0.50);
    padding: 30px;
}

.vd2-description-content {
    color: #555;
    line-height: 1.75;
    font-size: 0.9375rem;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.vd2-description-content.expanded {
    max-height: 9999px;
}

/* -------- Seller Card -------- */
.vd2-seller-card {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.vd2-seller-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0rem;
}

.vd2-seller-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e8f9f4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3dcb98;
}

.vd2-seller-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vd2-seller-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #262626;
}

.vd2-seller-type {
    font-size: 0.875rem;
    color: #a5acbf;
}

.vd2-seller-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;

    span {
        margin-left: 4px;
        font-size: 0.875rem;
        color: #555;
    }
}

.vd2-seller-stats {
    display: grid;
    gap: 0 3rem;
    grid-template-columns: 1fr 1fr;
    @media (max-width: 798px) {
        grid-template-columns: 1fr;
    }
}

.vd2-seller-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.875rem 0;

    &:nth-child(even) {
        border-right: none;
    }

    &:nth-last-child(-n+2) {
        border-bottom: none;
    }

    strong {
        font-size: 0.9375rem;
        font-weight: 600;
        color: #262626;
        white-space: nowrap;
    }
}

.vd2-seller-stat-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #555;

    span{
        color: #A5ACBF;
        font-size: 16px;
        font-weight: 800;
    }
    strong{
        font-size: 16px;
    }
}

.vd2-seller-address {
    font-size: 0.9375rem;
    color: #555;
    margin-bottom: 1rem;
    span {
        margin-left: 15px;
        @media (max-width: 768px) {
            margin-left: 5px;
        }
    }
}

.vd2-seller-address i {
    color: #3dcb98;
    margin-right: 0.375rem;
}

.vd2-seller-phones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vd2-seller-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    color: #262626;
    text-decoration: none;
    font-weight: 500;
}

.vd2-seller-phone i {
    color: #3dcb98;
}

.vd2-seller-phone:hover {
    color: #3dcb98;
}

.vd2-desc-text {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.75;
    margin-top: 1rem;
}

/* -------- Finance Section -------- */
.vd2-finance-section .vd2-section-title {
    margin-bottom: 1.5rem;
}

.vd2-finance-row {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.vd2-finance-label {
    font-size: 0.875rem;
    color: #a5acbf;
    font-weight: 500;
}

.vd2-finance-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #edeff4;
    border-radius: 10px;
    font-size: 1rem;
    color: #262626;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.vd2-finance-input:focus {
    outline: none;
    border-color: #3dcb98;
}

.vd2-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vd2-btn-option {
    padding: 0.5rem 1.125rem;
    border: 2px solid #edeff4;
    border-radius: 100px;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #262626;
    font-family: inherit;
}

.vd2-btn-option.active,
.vd2-btn-option:hover {
    background: linear-gradient(130deg, #1fefa5 0%, #3dcb98 100%);
    border-color: transparent;
    color: #fff;
}

.vd2-finance-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #edeff4;
}

.vd2-finance-result-label {
    font-size: 0.875rem;
    color: #a5acbf;
}

.vd2-finance-result-value {
    font-size: 1.625rem;
    font-weight: 700;
    color: #262626;
}

/* -------- Inquiry -------- */
.vd2-inquiry-lead {
    color: #a5acbf;
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
}


/* -------- Full-page nav loading overlay (redirect-based filter submits) -------- */
.hf-nav-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(255, 255, 255, 0.7);
}

.hf-nav-loading-overlay.is-active {
    display: block;
}

.hf-nav-loading-overlay::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' stroke='%23e63946' stroke-width='4' fill='none' stroke-dasharray='80 20' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat;
}

/* -------- AJAX Filter Loading State (skeleton cards) -------- */
#main-content {
    position: relative;
}

.vehicle-card.is-skeleton .vehicle-card-link {
    pointer-events: none;
    cursor: default;
}

.vehicle-card.is-skeleton .vehicle-card-images,
.skeleton-line {
    background: #eee;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    background-size: 600px;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-title {
    height: 22px;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-spec {
    width: 55%;
}

.skeleton-spec.short {
    width: 35%;
}

.skeleton-price {
    height: 24px;
    width: 30%;
    margin-top: 1rem;
    margin-bottom: 0;
}

@keyframes skeleton-shimmer {
    0%   { background-position: -300px 0; }
    100% { background-position: 300px 0; }
}

/* ============================================================================
   EQUIPMENT POPUP (Výbava)
   ========================================================================== */

.eq-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.eq-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.eq-popup {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    transform: translateY(-16px);
    transition: transform 0.25s;
    min-height: 200px;
}

.eq-popup-overlay.is-open .eq-popup {
    transform: translateY(0);
}

.eq-popup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 16px 16px 0 0;
}

.eq-popup__title {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
}

.eq-popup__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #dee1ea;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.eq-popup__close:hover {
    background: #f3f4f6;
    color: #262626;
}

.eq-popup__body {
    padding: 16px 24px;
    overflow-y: auto;
    /* `vh` na iOS počíta výšku so skrytým adresným riadkom a ignoruje vysunutú klávesnicu —
       spodná lišta s CTA „Zobraziť" potom skončí pod okrajom obrazovky. `dvh` reaguje na oboje,
       `vh` ostáva ako záloha pre staršie prehliadače, preto to poradie. */
    max-height: calc(100vh - 220px);
    max-height: calc(100dvh - 220px);
    flex: 1;
}

.eq-popup-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.eq-popup-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.eq-popup-section__title {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
    margin: 0 0 14px;
}

.eq-popup-group {
    margin-bottom: 20px;
}

.eq-popup-group:last-child {
    margin-bottom: 0;
}

.eq-popup-group__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    margin: 0 0 10px;
}

.eq-popup-group__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 0;
}

.eq-popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #262626;
    padding: 6px 8px 6px 0;
    line-height: 1.3;
    transition: color 0.15s;
}

.eq-popup-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: #34d69c;
    cursor: pointer;
}

.eq-popup-item:hover span {
    color: #34d69c;
}

.eq-popup-item input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #34d69c;
}

.eq-popup__foot {
    padding: 14px 24px;
    border-top: 1px solid #e5e5e5;
    border-radius: 0 0 16px 16px;
}

.eq-popup__apply {
    width: 100%;
    text-align: center;
    font-size: 15px;
    padding: 12px 24px;
}

/* Sidebar preview */
.eq-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0 4px;
}

.eq-preview__item {
    font-size: 0.8125rem;
    color: #a5acbf;
    padding: 2px 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eq-preview__item.is-checked {
    color: #262626;
    font-weight: 500;
}

.eq-preview__item.is-checked::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d69c;
    flex-shrink: 0;
}

.eq-more-btn {
    display: inline-block;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #34d69c;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.2s;
}

.eq-more-btn:hover {
    opacity: 0.75;
}

@media (max-width: 767px) {
    .eq-popup-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .eq-popup {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        max-height: 92dvh;
        transform: translateY(40px);
    }

    .eq-popup-overlay.is-open .eq-popup {
        transform: translateY(0);
    }

    .eq-popup__body {
        max-height: calc(92vh - 130px);
        max-height: calc(92dvh - 130px);
    }

    /* Veľkosť písma polí (16px kvôli iOS zoomu) rieši globálne pravidlo v `forms.css`. */

    .eq-popup-group__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .eq-popup-group__list {
        grid-template-columns: 1fr;
    }
}

.vd2-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .vd2-price-block {
        position: static;
        min-width: 0;
        width: 100%;
    }

    .vd2-infobar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .vd2-section {
        width: 100%;
    }

    .vd2-tabs {
        width: 100%;
    }

    .vd2-tabs-nav {
        overflow: hidden;
    }

    .vd2-tab {
        padding: 1rem;
        font-size: 12px;
    }

    .vd2-price-note {
        font-size: 12px;
        text-align: center;
    }

    .vd2-sticky-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        padding: 12px 16px;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.10);
        border-top: 1px solid #edeff4;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .vd2-sticky-cta.is-visible {
        transform: translateY(0);
    }

    .vd2-sticky-price {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .vd2-sticky-label {
        font-size: 11px;
        color: #a5acbf;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .vd2-sticky-value {
        font-size: 22px;
        font-weight: 700;
        color: #262626;
        line-height: 1.2;
    }

    .vd2-sticky-btn {
        flex-shrink: 0;
        padding: 12px 24px;
        font-size: 15px;
        white-space: nowrap;
    }

    .vd2-main {
        padding-bottom: 80px;
    }

    .vd2-quickstats {
        grid-template-columns: repeat(2, 1fr);
    }

    .vd2-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .vd2-details-table {
        table-layout: fixed;
        min-width: 0;
    }

    .vd2-details-table th {
        width: 50%;
        word-break: break-word;
    }

    .vd2-details-table td {
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .vd2-quickstats {
        grid-template-columns: 1fr 1fr;
    }

    .vd2-qs-item {
        padding: 0.875rem 0.75rem;
        gap: 0.625rem;
    }

    .vd2-qs-value {
        font-size: 16px;
    }

    .vd2-qs-label {
        font-size: 13px;
    }

    .vd2-gallery-grid {
        grid-template-columns: 1fr;
    }

    .vd2-gallery-side {
        display: none;
    }
}

