* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #355fff 0%, #6d7c87 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover,
.nav a.active {
    opacity: 0.8;
    border-bottom: 2px solid white;
}

/* Search Section */
.search-section {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-bar {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    border-color: #ff6b35;
}

.search-bar button {
    padding: 12px 30px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #e55a2b;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.vehicle-count {
    color: #666;
    font-size: 16px;
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Vehicle Card */
.vehicle-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.vehicle-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #f0f0f0;
}

.vehicle-info {
    padding: 20px;
}

.vehicle-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.vehicle-price {
    font-size: 24px;
    color: #ff6b35;
    font-weight: bold;
    margin-bottom: 15px;
}

.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.spec-label {
    color: #999;
    min-width: 60px;
}

.spec-value {
    color: #333;
    font-weight: 500;
}

.vehicle-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.view-details {
    color: #ff6b35;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}

.view-details:hover {
    color: #e55a2b;
}

.registration-date {
    font-size: 12px;
    color: #999;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    max-width: 1000px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-modal:hover {
    background: rgba(0,0,0,0.8);
}

.modal-image-gallery {
    position: relative;
    width: 100%;
    height: 500px;
    background: #000;
}

.modal-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.3s;
}

.image-nav:hover {
    background: rgba(0,0,0,0.9);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.modal-details {
    padding: 30px;
}

.modal-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.modal-price {
    font-size: 32px;
    color: #ff6b35;
    font-weight: bold;
    margin-bottom: 25px;
}

.modal-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.modal-spec-item {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.modal-spec-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.modal-spec-value {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.contact-btn {
    width: 100%;
    padding: 15px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-btn:hover {
    background: #e55a2b;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin: 5px 0;
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar input {
        width: 100%;
    }

    .search-bar button {
        width: 100%;
    }

    .modal-content {
        margin: 20px;
    }

    .modal-image-gallery {
        height: 300px;
    }

    .modal-specs {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-price {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    .vehicle-card {
        border-radius: 8px;
    }

    .vehicle-info {
        padding: 15px;
    }

    .vehicle-title {
        font-size: 16px;
    }

    .vehicle-price {
        font-size: 22px;
    }
}
