* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px;

    font-family: Arial, sans-serif;

    background-color: #f4f4f4;
    color: #333;
}


/* ============================================================
   TÍTULO
   ============================================================ */

h1 {
    text-align: center;

    margin-bottom: 25px;

    color: #333;
}


/* ============================================================
   BOTÃO NOVO RESTAURANTE
   ============================================================ */

#btnNovoRestaurante {
    display: block;

    margin: 0 auto 25px auto;

    padding: 12px 20px;

    border: none;
    border-radius: 6px;

    background-color: #d62828;
    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}

#btnNovoRestaurante:hover {
    background-color: #b71c1c;
}


/* ============================================================
   FORMULÁRIO
   ============================================================ */

#formularioRestaurante {

    width: 100%;
    max-width: 500px;

    margin: 0 auto 30px auto;

    padding: 25px;

    background-color: white;

    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#formularioRestaurante h2 {
    margin-top: 0;
    margin-bottom: 20px;

    text-align: center;
}


#formRestaurante {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


#formRestaurante label {
    margin-top: 8px;

    font-weight: bold;
}


#formRestaurante input {
    padding: 10px;

    border: 1px solid #ccc;

    border-radius: 5px;

    font-size: 15px;
}


#formRestaurante input:focus {
    outline: none;

    border-color: #d62828;
}


/* ============================================================
   BOTÕES DO FORMULÁRIO
   ============================================================ */

#formRestaurante button {
    padding: 10px;

    margin-top: 10px;

    border: none;

    border-radius: 5px;

    cursor: pointer;

    font-weight: bold;
}


#formRestaurante button[type="submit"] {
    background-color: #28a745;

    color: white;
}


#formRestaurante button[type="submit"]:hover {
    background-color: #218838;
}


#btnCancelar {
    background-color: #777;

    color: white;
}


#btnCancelar:hover {
    background-color: #555;
}


/* ============================================================
   LISTA DE RESTAURANTES
   ============================================================ */

#listaRestaurantes {

    display: grid;

    grid-template-columns: repeat(
        auto-fit,
        minmax(280px, 1fr)
    );

    gap: 25px;

    max-width: 1200px;

    margin: 0 auto;
}


/* ============================================================
   CARD DO RESTAURANTE
   ============================================================ */

.restaurante {

    background-color: white;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);

    transition: transform 0.2s;
}


.restaurante:hover {

    transform: translateY(-4px);

}


/* ============================================================
   FOTO
   ============================================================ */

.restaurante img {

    display: block;

    width: 100%;

    height: 220px;

    object-fit: cover;
}


/* ============================================================
   INFORMAÇÕES
   ============================================================ */

.restaurante h2 {

    margin: 18px 18px 10px 18px;

    font-size: 22px;

    color: #222;
}


.restaurante p {

    margin: 8px 18px;

    color: #666;

    font-size: 15px;
}


.restaurante p:last-of-type {

    margin-bottom: 20px;

    font-weight: bold;

    color: #d62828;
}


/* ============================================================
   LINHA
   ============================================================ */

.restaurante hr {

    display: none;
}


/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 600px) {

    body {
        padding: 15px;
    }

    #listaRestaurantes {
        grid-template-columns: 1fr;
    }

    .restaurante img {
        height: 200px;
    }

}