/* ==================================== */
/* RESET E VARIÁVEIS */
/* ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff2e2e;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light: #f8f9fa;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden; /* Evita scroll horizontal */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
html { scroll-behavior: smooth; }

/* ==================================== */
/* UTILS E BOTÕES */
/* ==================================== */

.btn {
    background: var(--primary);
    display: inline-block;
    padding: 12px 24px;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

/* ==================================== */
/* CABEÇALHO */
/* ==================================== */

header {
    position: fixed;
    inset: 0 0 auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 5%;
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 999;
}

header nav {
    display: flex;
    gap: 30px;
}

header nav a { font-weight: 600; }
header nav a:hover { color: var(--primary); }

/* ==================================== */
/* SEÇÃO HERO */
/* ==================================== */

.hero-wrapper {
    background: linear-gradient(135deg, #fff9f5, white);
    padding-top: 80px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
}

/* ==================================== */
/* SEÇÃO CARDÁPIO E BEBIDAS */
/* ==================================== */

.cardapio {
    padding: 60px 5%;
    text-align: center;
}

.cardapio h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--dark);
}

.cardapio p {
    color: var(--gray);
    margin-bottom: 40px;
}

/* GRID PARA 4 ITENS */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.menu-item {
    background-color: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.3s;
    border: 1px solid #eee;
}

.menu-item:hover {
    transform: translateY(-5px);
}

/* Imagens dos itens */
.menu-item img {
    width: 100%;
    height: 180px; /* Reduzido levemente para caber melhor na grade de 4 */
    object-fit: cover;
}

.item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px 5px;
}

.item-info h3 {
    font-size: 16px;
    color: var(--dark);
    flex: 1;
    margin-right: 10px;
}

.item-price-display {
    font-size: 18px;
    color: var(--primary);
    font-weight: bold;
    white-space: nowrap;
}

/* AÇÕES DO PRODUTO */
.product-actions {
    display: flex;
    flex-direction: column;
    padding: 0 15px 15px;
    gap: 10px;
    margin-top: auto; /* Empurra os controles para o fundo do card */
}

.product-actions label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: var(--gray);
    margin-top: 5px;
}

.product-actions select, 
.item-obs {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background-color: #fff;
}

.qty-and-button {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.item-qty {
    width: 55px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
}

.add-to-cart {
    flex-grow: 1;
    padding: 12px;
    font-size: 14px;
}

/* ==================================== */
/* CARRINHO */
/* ==================================== */

#carrinho-container {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 320px;
    background-color: #fff;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    border-radius: var(--radius);
    padding: 20px;
    z-index: 1000;
    max-height: 85vh;
    overflow-y: auto;
}

.carrinho-content h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--primary);
    text-align: center;
}

#carrinho-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    color: #444;
}

#delivery-address {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    resize: none;
    font-family: inherit;
}

/* PAGAMENTO */
.payment-group {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.payment-group input[type="radio"] { display: none; }

.payment-group label {
    flex: 1;
    cursor: pointer;
    padding: 10px 5px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 11px;
    text-align: center;
    transition: 0.2s;
    font-weight: 600;
}

.payment-group input[type="radio"]:checked + label {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

#carrinho-total {
    font-size: 18px;
    font-weight: 700;
    padding: 15px 0;
    border-top: 2px solid #eee;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

/* ==================================== */
/* FOOTER */
/* ==================================== */

footer {
    padding: 40px 5%;
    background: var(--dark);
    color: #fff;
    text-align: center;
}

/* ==================================== */
/* RESPONSIVIDADE */
/* ==================================== */

@media (max-width: 1200px) {
    .menu-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .hero h1 { font-size: 34px; }
}

@media (max-width: 992px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero img { order: -1; max-width: 50%; margin: 0 auto; }
}

@media (max-width: 768px) {
    header nav { display: none; }
    
    #carrinho-container {
        position: static;
        width: 90%;
        margin: 30px auto;
        max-height: none;
    }

    .menu-grid { grid-template-columns: 1fr; } /* No mobile, 1 item por linha é melhor para a foto aparecer */
    
    .cardapio h2 { font-size: 26px; }
}

@media (max-width: 480px) {
    .payment-group { flex-direction: column; }
    .hero h1 { font-size: 28px; }
}