/**
 * Página de Detalhes do Veículo - HC Centro Automotivo
 * Conteúdo em tema claro (cabeçalho/rodapé escuros vêm do style.css)
 */

.vehicle-details-page {
    padding: 2rem 0 3rem;
    min-height: calc(100vh - 400px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--red);
}

.vehicle-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 1.5rem;
}

/* Galeria */
.vehicle-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #eceef2;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image .badge {
    top: 1.25rem;
    right: 1.25rem;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.thumb-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.7;
    background: #eceef2;
}

.thumb-item:hover,
.thumb-item.active {
    opacity: 1;
    border-color: var(--red);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Informações */
.vehicle-info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.vehicle-header {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.vehicle-header .vehicle-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.vehicle-year-km {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--muted);
}

.vehicle-header .vehicle-year,
.vehicle-header .vehicle-km {
    font-size: 1rem;
    color: var(--muted);
}

.vehicle-price-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vehicle-price-section .price-label {
    font-size: 0.875rem;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
}

.vehicle-price-section .price-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--red);
}

.trade-price {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 600;
}

/* Informações-chave */
.vehicle-key-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* Formulário de contato (CRM) */
.contact-section {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff, #fff6f6);
    border: 1px solid rgba(217, 0, 0, 0.18);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: var(--shadow-md);
}

.contact-section h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.contact-section p {
    margin-bottom: 1.5rem;
    color: var(--muted);
}

.crm-contact-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crm-contact-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.crm-contact-form .form-control::placeholder {
    color: #aab1bb;
}

.crm-contact-form .form-control:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(217, 0, 0, 0.1);
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, .3);
    color: #fff;
}

.btn-whatsapp.btn-large,
.btn-primary.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Especificações / Opcionais / Observações */
.specs-section,
.optionals-section,
.observations-section {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.specs-section h2,
.optionals-section h2,
.observations-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.spec-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.optionals-category {
    margin-bottom: 2rem;
}

.optionals-category:last-child {
    margin-bottom: 0;
}

.optionals-category-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
    text-transform: capitalize;
}

.optionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.optional-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.optional-item svg {
    color: var(--red);
    flex-shrink: 0;
}

.optional-item > span:first-of-type {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.optional-description {
    font-size: 0.875rem;
    color: var(--muted);
    margin-left: 1.75rem;
    line-height: 1.5;
}

.observations-section p {
    line-height: 1.8;
    color: var(--muted);
    white-space: pre-line;
}

/* Responsivo */
@media (max-width: 968px) {
    .vehicle-details-content {
        grid-template-columns: 1fr;
    }

    .vehicle-gallery {
        position: static;
    }

    .main-image {
        height: 400px;
    }

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

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

    .contact-buttons {
        flex-direction: column;
    }

    .contact-buttons .btn-primary,
    .contact-buttons .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .vehicle-header .vehicle-title {
        font-size: 1.5rem;
    }

    .vehicle-price-section .price-value {
        font-size: 2rem;
    }

    .main-image {
        height: 300px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
}
