/* =========================
   VEHICLES SECTION
========================= */

.vehicles-section {
    padding: 100px 0;
}

.vehicles-page-section {
    padding-top: 70px;
}


/* =========================
   FILTERS
========================= */

.vehicle-filters {
    display: grid;
    grid-template-columns:
        1.5fr
        repeat(4, 1fr)
        auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.filter-field {
    min-width: 0;
}

.filter-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.filter-field input,
.filter-field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    background: #fafafa;
    color: var(--text);
    font-size: 13px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px
        rgba(215, 25, 32, 0.1);
}

.reset-filter-button {
    height: 48px;
    padding: 0 18px;
    border-radius: 4px;
    background: var(--dark);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.reset-filter-button:hover {
    background: var(--primary);
    transform: translateY(-2px);
}


/* =========================
   VEHICLES TOOLBAR
========================= */

.vehicles-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.filter-result {
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
}

.sort-field {
    width: 230px;
}


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

.vehicle-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 26px;

    /* Kartları aynı yüksekliğe getirir */
    align-items: stretch;
}


/* =========================
   VEHICLE CARD
========================= */

.vehicle-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.vehicle-card:hover {
    border-color:
        rgba(215, 25, 32, 0.25);
    box-shadow: var(--shadow-medium);
    transform: translateY(-8px);
}


/* =========================
   VEHICLE IMAGE
========================= */

.vehicle-image-wrapper {
    position: relative;
    height: 245px;
    flex-shrink: 0;
    overflow: hidden;
    background: #dddddd;
    cursor: zoom-in;
}

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

.vehicle-card:hover .vehicle-image {
    transform: scale(1.06);
}


/* =========================
   VEHICLE BADGES
========================= */

.vehicle-badges {
    position: absolute;
    z-index: 6;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    max-width: calc(100% - 32px);
}

.vehicle-badges .vehicle-badge,
.vehicle-badges .vehicle-secondary-badge {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 5px 10px;
    border-radius: 3px;
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-available {
    background: #16834f;
}

.status-reserved {
    background: #df9700;
}

.status-sold {
    background: #626262;
}

.new-badge {
    background: var(--primary);
}


/* =========================
   PHOTO COUNT
========================= */

.image-count {
    position: absolute;
    z-index: 7;
    right: 15px;
    bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 4px;
    background:
        rgba(0, 0, 0, 0.72);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(5px);
}


/* =========================
   VEHICLE CONTENT
========================= */

.vehicle-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.vehicle-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.vehicle-brand {
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.vehicle-top h3 {
    margin-top: 3px;
    font-size: 19px;
    line-height: 1.35;
}

.vehicle-price {
    flex-shrink: 0;
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}


/* =========================
   VEHICLE SPECIFICATIONS
========================= */

.vehicle-specifications {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 21px 0;
    padding: 17px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.vehicle-specifications span {
    position: relative;
    min-width: 0;
    padding-left: 14px;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.vehicle-specifications span::before {
    position: absolute;
    top: 6px;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    content: "";
}


/* Eski ikon sınıflarını tamamen devre dışı bırakır. */

.spec-icon {
    display: none !important;
}

.premium-specifications {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}


/* =========================
   VEHICLE ACTIONS
========================= */

.vehicle-actions {
    display: grid;
    grid-template-columns:
        1fr 1fr;
    gap: 10px;

    /* Butonları kartın en altına iter */
    margin-top: auto;
}

.details-button,
.card-whatsapp-button,
.sold-action-button {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.details-button,
.card-whatsapp-button {
    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.details-button {
    background: var(--dark);
    color: var(--white);
}

.details-button:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.card-whatsapp-button {
    border: 1px solid var(--success);
    color: var(--success-dark);
}

.card-whatsapp-button:hover {
    background: var(--success);
    color: var(--white);
    transform: translateY(-2px);
}


/* =========================
   SOLD VEHICLE
========================= */

.sold-overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        rgba(0, 0, 0, 0.42);
    pointer-events: none;
}

.sold-overlay span {
    padding: 10px 24px;
    border: 2px solid var(--white);
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: rotate(-8deg);
}

.sold-action-button {
    background: #e8e8e8;
    color: #707070;
    cursor: not-allowed;
}


/* =========================
   EMPTY STATE
========================= */

.empty-state {
    grid-column: 1 / -1;
    padding: 50px;
    text-align: center;
    color: var(--text-light);
}


/* =========================
   ANIMATION DELAYS
========================= */

.vehicle-card:nth-child(2) {
    animation-delay: 0.08s;
}

.vehicle-card:nth-child(3) {
    animation-delay: 0.16s;
}

.vehicle-card:nth-child(4) {
    animation-delay: 0.24s;
}

.vehicle-card:nth-child(5) {
    animation-delay: 0.32s;
}

.vehicle-card:nth-child(6) {
    animation-delay: 0.4s;
}


/* =========================
   LARGE TABLET
========================= */

@media (max-width: 1100px) {

    .vehicle-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .filter-search {
        grid-column: span 2;
    }

    .reset-filter-button {
        width: 100%;
    }
}


/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {

    .vehicle-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 820px) {

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

@media (max-width: 700px) {

    .vehicle-filters {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .filter-search {
        grid-column: auto;
    }

    .vehicles-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .sort-field {
        width: 100%;
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .vehicle-image-wrapper {
        height: 220px;
    }

    .vehicle-content {
        padding: 18px;
    }

    .vehicle-top {
        flex-direction: column;
        gap: 8px;
    }

    .vehicle-price {
        font-size: 20px;
    }

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

    .vehicle-badges {
        top: 12px;
        left: 12px;
        gap: 5px;
        max-width: calc(100% - 24px);
    }

    .vehicle-badges .vehicle-badge,
    .vehicle-badges .vehicle-secondary-badge {
        min-height: 24px;
        padding: 4px 7px;
        font-size: 8px;
    }

    .vehicle-specifications,
    .premium-specifications {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .vehicle-specifications span {
        font-size: 13px;
    }
}