/* Vehicle Detail Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    position: relative;
    background: var(--color-bg, #fff);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: rgba(0,0,0,0.7); }

.modal-gallery {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 4px;
}

.modal-gallery-nav.prev { left: 0.5rem; }
.modal-gallery-nav.next { right: 0.5rem; }
.modal-gallery-nav:hover { background: rgba(0,0,0,0.7); }

.modal-gallery-counter {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.modal-details {
    padding: 2rem;
}

.modal-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary, #2563eb);
    margin-bottom: 1rem;
}

.modal-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.modal-spec {
    display: flex;
    flex-direction: column;
}

.modal-spec-label {
    font-size: 0.75rem;
    color: var(--color-text-light, #64748b);
    text-transform: uppercase;
}

.modal-spec-value {
    font-weight: 600;
}

.modal-description {
    margin-top: 1.5rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

.modal-dealer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.modal-dealer h3 { margin-bottom: 0.5rem; }
.modal-dealer a { color: var(--color-primary, #2563eb); text-decoration: none; }

@media (max-width: 600px) {
    .modal-content { max-height: 95vh; border-radius: 8px; }
    .modal-details { padding: 1rem; }
    .modal-specs { grid-template-columns: 1fr 1fr; }
}
