:root {
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --accent-color: #457b9d;
    --background-color: #f1faee;
    --text-color: #1d3557;
    --white: #ffffff;
    --gray: #e0e0e0;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header */
header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
}

.logo i {
    color: var(--primary-color);
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(29, 53, 87, 0.85), rgba(29, 53, 87, 0.85)),
        url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1400&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 70px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 40px 0 60px;
}

/* Search */
.filters {
    margin-bottom: 30px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

#search {
    width: 100%;
    padding: 15px 20px 15px 48px;
    border: 1px solid var(--gray);
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: var(--shadow);
    outline: none;
    transition: border-color 0.2s;
}

#search:focus {
    border-color: var(--primary-color);
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-img {
    height: 200px;
    background-color: #eee;
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.card:hover .card-img img {
    transform: scale(1.04);
}

.card-price {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.05rem;
}

.card-content {
    padding: 18px 20px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.88rem;
    color: #666;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-item i {
    color: var(--accent-color);
}

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #666;
}

.plate i {
    margin-right: 4px;
    color: var(--accent-color);
}

.btn-details {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-details:hover {
    background-color: var(--accent-color);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 60px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.08);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 0;
    color: #999;
}

.no-results i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

/* Error State */
.error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 60px 20px;
    color: #888;
    text-align: center;
}

.error-state i {
    font-size: 3rem;
    color: var(--primary-color);
}

.error-state p {
    font-size: 1.1rem;
}

.error-state button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.error-state button:hover {
    background-color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 28px 0;
    text-align: center;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }

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

    nav ul {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }
}
