@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Roboto:wght@400;700&display=swap');

/* --- BARRA SUPERIOR (TOP BAR) --- */
.top-bar {
    background-color: #2a2a2a;
    padding: 8px 30px;
    font-size: 0.85rem;
    position: sticky; /* Torna a barra fixa */
    top: 0;           /* Posiciona no topo da tela */
    z-index: 1001;      /* Garante que fique acima de outros elementos */
}

.top-bar-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ccc;
}

.top-bar .admin-link {
    color: #F78F1E; /* Laranja Hot Wheels */
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.top-bar .admin-link:hover {
    color: #fff;
}

/* Ajuste para telas pequenas */
@media (max-width: 768px) {
    .top-bar {
        padding: 8px 15px;
        font-size: 0.75rem;
    }
    .top-bar-content {
        flex-direction: column; /* Empilha os itens */
        gap: 5px;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* --- CABEÇALHO COM TÍTULO E FILTROS --- */
.site-header {
    padding: 25px 30px; /* Aumenta o padding vertical */
    background: #0D47A1;
    border-bottom: 5px solid #F78F1E;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 30px; /* [ALTERADO] Desloca para baixo, para não ficar atrás da barra preta */
    z-index: 1000;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espaça o título e os filtros */
    gap: 40px;
}

/* [NOVO] Estilos para o container do título */
.title-container {
    flex-shrink: 0; /* Impede que o título seja esmagado */
}

/* [RESTAURADO E AJUSTADO] Estilos para o título principal */
.site-header h1 {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem; /* Levemente reduzido para caber melhor */
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000,
        -3px 3px 0 #F78F1E;
    line-height: 1;
    text-align: left; /* Alinha à esquerda dentro de seu container */
}

/* [RESTAURADO E AJUSTADO] Estilos para o subtítulo */
.site-header h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
    text-align: left; /* Alinha à esquerda dentro de seu container */
}


/* --- ESTILOS PARA A BARRA DE FILTROS --- */
.filter-container {
    flex-grow: 1;
    min-width: 60%; /* Garante que o formulário tenha espaço suficiente */
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-form input[type="text"],
.filter-form select {
    padding: 15px;
    border-radius: 5px;
    border: 2px solid #0b3a82;
    background-color: #fff;
    color: #333;
    font-size: 1.1rem;
    flex-grow: 1;
}

.filter-form input[type="text"] {
    flex-basis: 40%; /* Dá mais espaço para o campo de busca */
}

.filter-form select {
    flex-basis: 20%;
}

.filter-form button,
.filter-form .clear-filter {
    padding: 17px 25px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-form button {
    background-color: #F78F1E;
    color: #fff;
}

.filter-form .clear-filter {
    background-color: #555;
    color: #fff;
}

/* --- CATÁLOGO PRINCIPAL --- */
.catalog-container {
    max-width: 1600px;
    margin: 40px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
}

.car-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-10px);
    border-color: #F78F1E; /* Laranja Hot Wheels */
}

.car-image-container {
    width: 100%;
    height: 350px; /* Altura fixa para a imagem */
    background-color: #fff;
    padding: 10px;
}

.car-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Garante que a imagem inteira apareça */
}

.car-card-info {
    padding: 20px;
    margin-top: auto;
}

.car-model {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: #F78F1E;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.car-details {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.5;
}

.car-details strong {
    color: #fff;
}

.no-results {
    color: #555;
    font-size: 1.2rem;
    text-align: center;
    grid-column: 1 / -1;
}

/* --- ESTILOS PARA O RODAPÉ PÚBLICO --- */
.site-footer-public {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #dee2e6;
}

.site-footer-public a {
    color: #0D47A1; /* Azul do tema */
    text-decoration: none;
    font-weight: bold;
}

.site-footer-public a:hover {
    text-decoration: underline;
}

/* ======================================================= */
/* ESTILOS PARA O MODAL (POP-UP) DA FICHA TÉCNICA            */
/* ======================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex; /* Exibe o modal quando a classe 'active' é adicionada */
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: #333;
}

.modal-body {
    display: flex;
    gap: 30px;
}

.modal-image-container {
    flex-basis: 40%;
    flex-shrink: 0;
}

.modal-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

.modal-info-container {
    flex-basis: 60%;
}

.modal-info-container h2 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: #0D47A1;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.modal-details {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #555;
}

.modal-details strong {
    color: #333;
}

.modal-description h3 {
    font-size: 1.2rem;
    color: #333;
    border-bottom: 2px solid #F78F1E;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.modal-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}