/* ================================
   CONFIGURACIÓN GENERAL
================================ */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background: #FFFFFF;
    color: #1A1A1A;
}

a {
    text-decoration: none;
}

/* ================================
   HEADER
================================ */

header {
    position: sticky;
    top: 0;
    background: #000000;
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
}

header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* ================================
   NAV
================================ */

nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav a {
    color: #FFFFFF;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

/* ================================
   FOOTER
================================ */

footer {
    background: #000000;
    color: #FFFFFF;
    text-align: center;
    padding: 20px;
    margin-top: 60px;
}

/* ================================
   CONTENIDO GENERAL
================================ */

section {
    padding: 40px;
}

main {
    flex: 1;
    text-align: left;
}

main h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 30px;
}

.heroImagen{
    max-width: 40%;
    img{
        max-width: 100%;
        border-radius: 0.2cm;
    }
}

/* ================================
   BOTONES
================================ */

button {
    background: #000000;
    color: #FFFFFF;
    border: none;
    margin-bottom: 2%;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    margin-top: 1em;
}

button:hover {
    background: #333333;
}

.btnAside {
    width: 100%;
    margin-bottom: 10px;
}

/* ================================
   LAYOUT CATALOGO
================================ */

.catalogoLayout {
    display: flex;
    gap: 32px;
    padding: 40px;
    align-items: flex-start;
}

/* ================================
   SIDEBAR RECOMENDADOR
================================ */

.sidebar {
    width: 280px;
    min-width: 280px;
    background: #F2F2F2;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #DDDDDD;
    height: fit-content;
}

.sidebar h2 {
    margin-top: 0;
    margin-bottom: 16px;
}

.sidebar label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.sidebar input,
.sidebar select {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #CCCCCC;
    background: #FFFFFF;
    font-size: 14px;
}

.panelRecomendador {
    display: block;
}

/* ================================
   GRID DE COCHES
================================ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
}

/* ================================
   TARJETAS DE COCHES
================================ */

.carCard {
    background: #F2F2F2;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #DDDDDD;
    transition: 0.2s;
    width: 100%;
}

.carCard:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.carCard h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.carCard p {
    margin: 6px 0;
    font-size: 14px;
}

.card {
    background: #F2F2F2;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #DDDDDD;
}

.card h3 {
    margin-top: 0;
}

/* ================================
   TABLAS
================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #FFFFFF;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #DDDDDD;
    text-align: center;
}

th {
    background: #F2F2F2;
}

/* ================================
   INPUTS GENERALES
================================ */

input,
select {
    font-size: 14px;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    nav {
        flex-wrap: wrap;
        gap: 15px;
    }

    .catalogoLayout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
    }
}

