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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    padding: 20px;
    padding-bottom: 120px; /* Espaço extra para o total fixo */
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

h1 {
    font-size: 28px;
    color: #2d3436;
    margin-bottom: 5px;
}

.subtitle {
    color: #636e72;
    margin-bottom: 30px;
}

/* ============================================
   GRID DE PRODUTOS - RESPONSIVO
   ============================================ */
.produtos-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
    
    /* 4 colunas em desktop */
    grid-template-columns: repeat(4, 1fr);
}

/* Card do produto */
.produto-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.produto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #0984e3;
}

.produto-card.selecionado {
    border-color: #0984e3;
    background: #e3f0ff;
}

.produto-emoji {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.produto-nome {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #2d3436;
}

.produto-preco {
    font-weight: 700;
    color: #0984e3;
    font-size: 16px;
}

.produto-qtd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.produto-qtd button {
    background: #dfe6e9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produto-qtd button:hover {
    background: #b2bec3;
}

.produto-qtd span {
    font-weight: 600;
    font-size: 18px;
    min-width: 30px;
}

/* ============================================
   TOTAL FIXO NA PARTE INFERIOR
   ============================================ */
.total-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2d3436;
    color: white;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
}

/* Versão para centralizar em telas grandes */
@media screen and (min-width: 1200px) {
    .total-box {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 1200px;
        border-radius: 16px 16px 0 0;
    }
}

.total-box .label {
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.total-box .valor {
    font-size: 28px;
    font-weight: 700;
}

/* Espaço para o botão WhatsApp também ficar junto ao total */
.btn-whats-container {
    position: fixed;
    bottom: 80px; /* Altura do total-box + espaçamento */
    left: 0;
    right: 0;
    padding: 0 20px;
    z-index: 999;
    max-width: 1200px;
    margin: 0 auto;
}

@media screen and (min-width: 1200px) {
    .btn-whats-container {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 1200px;
    }
}

.btn-whats {
    width: 100%;
    padding: 16px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whats:hover {
    background: #128C7E;
    transform: scale(1.02);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

/* Tablet (2 colunas) */
@media screen and (max-width: 992px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .total-box .valor {
        font-size: 24px;
    }
}

/* Celular (1 coluna) */
@media screen and (max-width: 576px) {
    body {
        padding: 10px;
        padding-bottom: 140px; /* Mais espaço para os elementos fixos */
    }
    
    .container {
        padding: 15px;
    }
    
    .produtos-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .produto-card {
        padding: 15px;
    }
    
    .produto-emoji {
        font-size: 32px;
    }
    
    .produto-nome {
        font-size: 13px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .total-box {
        padding: 12px 15px;
        flex-direction: column;
        gap: 5px;
        border-radius: 12px 12px 0 0;
    }
    
    .total-box .label {
        font-size: 12px;
    }
    
    .total-box .valor {
        font-size: 22px;
    }
    
    .btn-whats-container {
        bottom: 70px;
        padding: 0 10px;
    }
    
    .btn-whats {
        padding: 14px;
        font-size: 16px;
        border-radius: 10px;
    }
}

/* ============================================
   OUTROS ESTILOS (mantidos)
   ============================================ */

.info-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
}

.info-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3436;
}

.info-section select,
.info-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    background: white;
    transition: border-color 0.2s;
}

.info-section select:focus,
.info-section input:focus {
    outline: none;
    border-color: #0984e3;
}

.frete-info {
    background: #dfe6e9;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    color: #2d3436;
    font-weight: 500;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: #b2bec3;
    font-size: 14px;
    padding-bottom: 100px; /* Espaço extra para não ficar atrás do total */
}