body { 
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.empty-msg {
    text-align: center;
    color: #777;
    font-style: italic;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.car-card {
    width: 100%;
    max-width: 350px;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.car-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.car-card-link {
    text-decoration: none;
    color: inherit;
}

.car-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.25rem 0;
    color: #222;
    text-align: center;
}

.car-info {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.car-price {
    font-weight: bold;
    font-size: 1.2rem;
    color: #007BFF;
    margin-bottom: 0.5rem;
    text-align: center;
}

.favorite-form {
    margin-top: 10px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

/* responsywność */
@media (min-width: 960px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 959px) and (min-width: 600px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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