/* Variáveis de cor */
:root {
    --primary: #d34444;
    --secondary: #4CAF50;
    --accent: #ff4d4d;
    --bg-light: #fff;
    --bg-dark: #1e1e1e;
    --bg-gray: #f2f2f2;
    --shadow: rgba(0, 0, 0, 0.25);
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #8B0000, #FFD700);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: large;
    gap: 20px;
    padding: 20px;
    padding-bottom: 100px;
}

/* Títulos */
h1 {
    text-align: center;
    margin-bottom: 15px;
}

/* Banner */
.banner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    overflow: hidden;
    border-radius: 20px;
}

.banner img {
    width: 100%;
    display: block;
}

.banner .cta {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    font-size: 1.8rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner .cta:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 15px var(--accent);
}

/* Cardápio */
#cardapio {
    width: 100%;
    max-width: 1200px;
    background: var(--bg-light);
    border-radius: 20px;
    padding: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-weight: bold;
}

.table th,
.table td {
    padding: 12px;
}

.table tr {
    background: #f9f3f3;
    margin-bottom: 5px;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow);
}

.table button {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: var(--secondary);
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.table button:hover {
    transform: scale(1.1);
    background: #45a049;
}

.categorias {
    background: #e78e46a9;
    text-align: left;
    padding-left: 15px;
    font-size: 1.1rem;
}

.preco {
    width: 25%;
    color: green;
    font-weight: bold;
}

/* Formulário */
#sec {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: #fff8f0;
    border-radius: 15px;
    padding: 20px;
    gap: 10px;
}

#form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
}

#form input,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--secondary);
    border-radius: 10px;
    outline: none;
    font-size: 1rem;
}

textarea {
    resize: none;
    height: 60px;
}

.btn {
    width: 150px;
    height: 45px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
}

.btn:hover {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transform: scale(1.1);
}

/* ===== Carrinho ===== */
#carrinho {
    position: fixed;
    bottom: 10px;
    left: 5px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#btn-carrinho {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 30px;
    cursor: pointer;
    background: linear-gradient(135deg, #f3eef3, #e2dbee);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    padding: 15px;
}

#btn-carrinho:hover {
    transform: scale(1.1);
}

#numItems {
    position: absolute;
    top: -5px;
    left: 50px;
    background: red;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 1001;
}

#lastItem {
    position: absolute;
    text-align: center;
    align-content: center;
    left: 65px;
    width: 150px;
    height: 70px;
    align-items: end;
    background: #fef3e0;
    color: #333;
    border-collapse: collapse;
    border-radius: 0 50px 50px 0;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
    display: none;
    z-index: -1001;
    transform-origin: left;
    transform: scale(0);
    transition: transform 0.3s ease, display 0.3s ease;
}

/* ===== Resumo do pedido ===== */
.resumo {
    margin-top: 10px;
    width: 400px;
    max-height: 600px;
    background: var(--bg-light);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 25px var(--shadow);
    overflow-y: auto;
    transform: scale(0);
    transform-origin: bottom left;
    display: none;
    transition: transform 0.3s ease;
}

.carrinho-aberto {
    max-height: 600px;
}

.resumo table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.resumo td,
.resumo th {
    padding: 10px;
}

.total-row {
    font-weight: bold;
    color: blueviolet;
}

.excluir {
    border: none;
    color: red;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s ease;
}

.excluir:hover {
    transform: scale(1.2);
}

/* Responsividade */
@media (max-width: 768px) {
    button {
        font-size: 14px;
    }

    .banner .cta {
        font-size: 1.2rem;
        padding: 10px 20px;
    }

    .table {
        font-size: 0.9rem;
    }

    #sec {
        width: 90%;
    }

    #carrinho {
        transform: scale(0.9);

    }
}

@media (max-width: 480px) {
    button {
        font-size: 12px;
    }

    .banner .cta {
        font-size: 1rem;
        padding: 8px 16px;
    }

    .table {
        font-size: 0.8rem;
    }

    #sec {
        padding: 15px;
    }

    #carrinho {
        transform: scale(0.8);
    }

}