* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f4f4;
    color: #171717;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.site-header {
    background: #0b0b0b;
    border-bottom: 4px solid #d50019;
    padding: 18px 20px;
}

.site-header-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-logo {
    display: block;
    width: 280px;
    max-width: 70%;
    height: auto;
}

.site-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 40px auto;
}

.vehicle-page .site-wrap {
    width: min(1600px, calc(100% - 32px));
    margin-top: 28px;
}

.page-title {
    margin-bottom: 28px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.vehicle-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.vehicle-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #e8e8e8;
}

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

.vehicle-card h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.vehicle-card h2 a {
    text-decoration: none;
}

.vehicle-card h2 a:hover {
    color: #d50019;
}

.vehicle-price {
    margin: 12px 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.vehicle-meta {
    margin: 0 0 14px;
    color: #555;
}

.vehicle-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 4px;
    background: #ececec;
    font-size: 0.9rem;
    font-weight: 700;
}

.vehicle-button {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 16px;
    background: #d50019;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
}

.vehicle-button:hover {
    background: #a90014;
}

.vehicle-detail {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.vehicle-page .vehicle-detail {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.vehicle-detail-title {
    margin: 0 0 6px;
    font-size: 2.2rem;
}

.vehicle-detail-subtitle {
    margin: 0 0 8px;
    color: #555;
    font-size: 1.2rem;
    font-weight: 400;
}

.vehicle-detail-price {
    margin: 0 0 18px;
    font-size: 2rem;
    font-weight: 700;
    color: #d50019;
}

.vehicle-enquiry {
    margin: 0 0 24px;
    padding: 22px;
    background: #17191c;
    color: #fff;
    border-left: 5px solid #d50019;
    border-radius: 8px;
}

.vehicle-enquiry h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
}

.vehicle-enquiry p {
    margin: 0 0 16px;
    color: #d8d8d8;
}

.vehicle-enquiry-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.enquiry-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.enquiry-call {
    background: #d50019;
}

.enquiry-whatsapp {
    background: #168a45;
}

.enquiry-email {
    background: #555b63;
}

.enquiry-button:hover,
.enquiry-button:focus-visible {
    filter: brightness(1.15);
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.vehicle-photo-gallery {
    margin: 24px 0;
    padding: 12px;
    background: #2b2e33;
    border-top: 4px solid #d50019;
    border-radius: 8px;
    overflow: hidden;
}

.vehicle-photo-main {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
}

.vehicle-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.vehicle-photo-grid-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
}

.vehicle-photo-grid-image:nth-child(3n) {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px 24px;
    background: rgba(11, 11, 11, 0.96);
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-modal-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.gallery-modal-close {
    position: fixed;
    top: 12px;
    right: 18px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d50019;
    color: #fff;
    font: 400 36px/40px Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.gallery-modal-close:hover,
.gallery-modal-close:focus-visible {
    background: #fff;
    color: #d50019;
    outline: 3px solid #d50019;
}

body.gallery-modal-open {
    overflow: hidden;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    color: #d50019;
}

@media (max-width: 900px) {
    .vehicle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .site-wrap {
        margin-top: 24px;
    }

    .site-logo {
        width: 220px;
    }

    .vehicle-page .site-wrap {
        width: min(1600px, calc(100% - 16px));
        margin-top: 16px;
    }

    .vehicle-photo-grid {
        gap: 8px;
        margin-top: 8px;
    }

    .vehicle-enquiry-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .vehicle-enquiry {
        padding: 18px;
    }

    .vehicle-photo-gallery {
        padding: 8px;
    }

    .vehicle-photo-main,
    .vehicle-photo-grid-image {
        border-radius: 5px;
    }
}
