/* ============================================
   DREAMDRIVE - MODERN AUTÓK LISTÁZÓ OLDAL
   Mobiloptimalizált, reszponzív design
   ============================================ */

/* ======================= */
/* === ALAP VÁLTOZÓK ===== */
/* ======================= */

:root {
    --card-radius: 15px;
    --card-main-color: var(--primary-color, #ffa200);
    --card-bg-color: white;
    --card-shadow: 0 8px 30px rgba(0,0,0,0.12);
    --transition-time: 0.3s;
    --dark-bg: #1a1a1a;
}

/* ======================= */
/* === AUTÓK LISTÁZÁSA === */
/* ======================= */

.cars-listing-page {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 80vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.cars-header {
    margin-bottom: 50px;
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cars-header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: #000;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.cars-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.cars-header p {
    font-size: 1.15rem;
    color: #666;
    max-width: 800px;
    margin: 20px auto 0;
    line-height: 1.7;
}

.cars-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Filter Bar */
.cars-filter-bar {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.cars-count p {
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
    margin: 0;
}

.sorting-options {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.sorting-options label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.sorting-options select {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
}

.sorting-options select:hover {
    border-color: var(--primary-color);
}

.sorting-options select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 162, 0, 0.1);
}

/* ========================= */
/* === AUTÓK GRID NÉZET ==== */
/* ========================= */

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 30px;
    animation: fadeIn 0.6s ease-out;
}

/* Főoldal - Fix 3 oszlop */
.cars-listing-page .cars-grid {
    grid-template-columns: repeat(3, 1fr);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ================================ */
/* === MODERN AUTÓ KÁRTYA DESIGN === */
/* ================================ */

.modern-car-card {
    position: relative;
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modern-car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

/* Kép kontener */
.car-image-container {
    position: relative;
    overflow: hidden;
    height: 240px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-car-card:hover .car-image {
    transform: scale(1.1) rotate(1deg);
}

/* Teljesítmény badge */
.performance-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: fadeInRight 0.6s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.performance-badge.extreme {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
}

.performance-badge.high {
    background: linear-gradient(135deg, #ff8c00, #ff6600);
    color: white;
}

.performance-badge i {
    font-size: 0.9rem;
}

/* Autó információk */
.car-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.car-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specifikációk */
.car-specs {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.car-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.car-spec i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.car-spec span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Ár és gomb */
.car-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
}

.price-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.price .price-from {
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0.8;
}

.price-note {
    font-size: 0.7rem;
    color: #999;
    font-weight: 500;
}

.price-unavailable {
    font-size: 1.2rem;
    font-weight: 700;
    color: #666;
}

.book-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 162, 0, 0.3);
}

.book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 162, 0, 0.4);
    color: #000;
}

.book-btn i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.book-btn:hover i {
    transform: translateX(4px);
}

.sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

.original-price {
    font-size: 1rem;
    color: #aaa;
    text-decoration: line-through;
    margin-right: 10px;
}

.sale-price {
    font-size: 1.8rem;
    color: var(--accent-color);
    font-weight: 800;
    text-align: center;
}

/* No Cars Found */
.no-cars-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.no-cars-found h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.no-cars-found p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

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

/* Tablet landscape és kisebb desktop */
@media (max-width: 1200px) {
    .cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    /* Főoldal - 3 oszlop kisebb képernyőn is */
    .cars-listing-page .cars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cars-header h1 {
        font-size: 2.5rem;
    }
}

/* Tablet portrait */
@media (max-width: 992px) {
    .cars-listing-page {
        padding: 40px 0 60px;
    }
    
    .cars-header {
        margin-bottom: 40px;
    }
    
    .cars-header h1 {
        font-size: 2.2rem;
    }
    
    .cars-header p {
        font-size: 1rem;
    }
    
    .cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    /* Főoldal - 2 oszlop tableten */
    .cars-listing-page .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .car-image-container {
        height: 200px;
    }
    
    .sorting-options {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .sorting-options select {
        width: 100%;
    }
}

/* Mobile landscape */
@media (max-width: 768px) {
    .cars-header h1 {
        font-size: 2rem;
    }
    
    .cars-filter-bar {
        padding: 20px;
    }
    
    .cars-filter-bar .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .sorting-options {
        justify-content: flex-start;
    }
    
    .cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    
    /* Főoldal - 2 oszlop kisebb tableten */
    .cars-listing-page .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .car-name {
        font-size: 1.2rem;
    }
    
    .car-spec span {
        font-size: 0.75rem;
    }
    
    .price {
        font-size: 1.4rem;
    }
}

/* Mobile portrait */
@media (max-width: 576px) {
    .cars-listing-page {
        padding: 30px 0 50px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .cars-header h1 {
        font-size: 1.8rem;
    }
    
    .cars-header p {
        font-size: 0.95rem;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Főoldal - 1 oszlop mobilon */
    .cars-listing-page .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .car-image-container {
        height: 220px;
    }
    
    .car-info {
        padding: 20px;
    }
    
    .car-specs {
        gap: 10px;
        padding: 12px 0;
    }
    
    .car-spec i {
        font-size: 1.1rem;
    }
    
    .car-spec span {
        font-size: 0.75rem;
    }
    
    .car-price-box {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .book-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .performance-badge {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .no-cars-found {
        padding: 60px 20px;
    }
    
    .no-cars-found h3 {
        font-size: 1.5rem;
    }
    
    .no-cars-found p {
        font-size: 1rem;
    }
}

/* ======================== */
/* === AUTÓ SLIDER RÉSZ === */
/* ======================== */

.car-slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 30px 0;
}

.car-slider {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    padding: 20px 0;
}

.car-slide {
    min-width: calc(33.333% - 20px);
    margin: 0 10px;
    transition: transform 0.3s;
    position: relative;
}

.car-slide-inner {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.car-slide-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.car-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.car-slide:hover .car-slide-image img {
    transform: scale(1.1);
}

.car-slide-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.car-slide-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #222;
}

.car-slide-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.car-slide-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.car-slide-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--card-main-color);
}

.car-slide-button {
    background-color: var(--card-main-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
}

.car-slide-button:hover {
    background-color: #e63946;
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.slider-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

.slider-control:hover {
    background-color: var(--card-main-color);
    color: white;
}

@media (max-width: 1024px) {
    .car-slide {
        min-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .car-slide {
        min-width: calc(100% - 20px);
    }
}

/* ================================ */
/* === KATEGÓRIA BADGE-EK ========= */
/* ================================ */

.category-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
}

.category-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    text-decoration: none;
}

.category-badge:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
}

.category-badge i {
    font-size: 14px;
}

/* Ha van performance badge is, a kategória badge-ek feljebb kerülnek */
.car-image-container .performance-badge + .category-badges,
.car-image-container .category-badges:has(~ .performance-badge) {
    top: 55px;
}

/* Tooltip a kategória nevével */
.category-badge::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.category-badge:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobil nézet - kisebb badge-ek, KÖR ALAKÚAK */
@media (max-width: 768px) {
    .category-badges {
        top: 8px;
        right: 8px;
        gap: 5px;
    }
    
    .category-badge {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        border-radius: 50%;
        aspect-ratio: 1 / 1;
    }
    
    .category-badge i {
        font-size: 11px;
    }
    
    .category-badge::after {
        display: none;
    }
}

/* ================================ */
/* === KATEGÓRIA BADGE-EK INLINE === */
/* ================================ */

.category-badges-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
}

.category-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge-inline i {
    font-size: 0.8rem;
}

.category-badge-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: white;
    filter: brightness(1.1);
}

/* Mobil nézet */
@media (max-width: 768px) {
    .category-badges-inline {
        gap: 6px;
        margin: 10px 0;
    }
    
    .category-badge-inline {
        padding: 5px 10px;
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .category-badge-inline i {
        font-size: 0.75rem;
    }
}

/* ================================ */
/* === KATEGÓRIA SZŰRŐ SÁV ======== */
/* ================================ */

.category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.category-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-filter-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
}

.category-filter-btn.active {
    background: var(--primary-color, #e63946);
    border-color: var(--primary-color, #e63946);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.category-filter-btn.active i {
    color: white !important;
}

.category-filter-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.category-filter-btn:hover i {
    transform: scale(1.1);
}

/* Mobil nézet */
@media (max-width: 768px) {
    .category-filter-bar {
        gap: 8px;
        padding: 15px;
    }
    
    .category-filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .category-filter-btn i {
        font-size: 1rem;
    }
}
