/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header & Navigation --- */
header {
    background: #1a252f;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.2s;
}

nav a:hover {
    color: #3498db;
}

/* --- Hero Banner & Search --- */
.hero {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 45px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.search-box {
    margin-top: 15px;
    display: inline-flex;
    gap: 8px;
}

.search-box input {
    padding: 10px 15px;
    width: 320px;
    border-radius: 4px;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.search-box button {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.search-box button:hover {
    background: #c0392b;
}

/* --- Main Layout & Grid --- */
.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.car-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.car-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #eee;
}

.car-details {
    padding: 15px 20px;
}

.car-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.price {
    color: #27ae60;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 12px;
}

/* --- Buttons & Forms --- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #3498db;
    color: white !important;
    border-radius: 4px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover {
    background: #2980b9;
}

.btn-success { background: #27ae60; }
.btn-success:hover { background: #219150; }

.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }

.form-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    max-width: 450px;
    margin: 40px auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}