/* --- 1. CONFIGURAÇÕES BÁSICAS --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f0f0;
    padding: 15px;
    margin: 0;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-top: 10px solid #5d2a61;
}

header { 
    text-align: center; 
    margin-bottom: 20px; 
}

.logo-topo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #5d2a61;
    object-fit: cover;
}

/* Container da imagem do nome */
.img {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 15px 0;
}

/* Ajuste da Imagem (O Nome "Madê") */
.img img {
    width: 280px;
    height: auto;
    max-width: 90%;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    transition: width 0.3s ease;
}

/* --- AJUSTE EXCLUSIVO PARA CELULAR --- */
@media (max-width: 480px) {
    .img img {
        width: 200px;
    }
    
    .logo-topo {
        width: 80px;
        height: 80px;
    }

    .instrucao-topo {
        font-size: 12px;
        padding: 10px;
    }
}

/* --- 2. INSTRUÇÃO --- */
.instrucao-topo, .instrucao-dinheiro {
    font-size: 13px;
    color: #666;
    background: #fdf5ff;
    padding: 12px;
    border-radius: 12px;
    margin-top: 10px;
    border-left: 4px solid #5d2a61;
    text-align: left;
}

/* --- 3. FORMULÁRIO E INPUTS --- */
label { 
    display: block; 
    margin-top: 15px; 
    font-weight: bold; 
    color: #333; 
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
}

.inline-fields { 
    display: flex; 
    gap: 10px; 
}

.product-box {
    background: #fdfbff;
    border: 1px solid #e0d0e3;
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
}

/* --- 4. SUBTOTAL EM TEMPO REAL --- */
.item-subtotal-box {
    background: #f3eaff;
    border: 1px solid #c9a8d9;
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #5d2a61;
    text-align: center;
}

/* --- 5. TOAST DE CONFIRMAÇÃO --- */
.add-toast {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    animation: fadeInOut 0.3s ease;
}

@keyframes fadeInOut {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- 6. ADICIONAIS --- */
.topping-section {
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin: 10px 0;
}

/* Indicador visual de scroll nos adicionais */
.topping-section::after {
    content: '▼ role para ver mais';
    display: block;
    text-align: center;
    font-size: 11px;
    color: #aaa;
    padding-top: 6px;
    border-top: 1px dashed #eee;
    margin-top: 4px;
}

.price-header {
    color: #5d2a61;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    margin: 10px 0 5px 0;
    font-size: 14px;
}

.topping-section label { 
    font-weight: normal; 
    margin-top: 8px; 
    display: flex; 
    align-items: center; 
}

.topping-section input { 
    width: 18px; 
    height: 18px; 
    margin-right: 10px;
}

/* --- 7. ENTREGA E PAGAMENTO --- */
.delivery-type-box, .radio-group {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.delivery-type-box label, .radio-group label { 
    font-weight: normal; 
    margin-top: 0; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
}

.delivery-type-box input, .radio-group input { 
    width: auto; 
    margin-right: 8px; 
}

.info-box { 
    background-color: #e7f3ff; 
    border: 1px solid #2196f3; 
    padding: 12px; 
    border-radius: 10px; 
    margin-top: 10px; 
    font-size: 13px;
    color: #0d47a1; 
}

.pix-box { 
    background-color: #e6fcf5; 
    border: 1px solid #20c997; 
    padding: 20px; 
    border-radius: 12px; 
    text-align: center; 
    margin-top: 25px; 
}

.copy-pix { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff; 
    padding: 8px; 
    border-radius: 8px; 
    border: 1px solid #ccc; 
    margin-top: 15px; 
    margin-bottom: 15px;
}

.btn-copy { 
    background: #5d2a61; 
    color: white; 
    border: none; 
    padding: 5px 10px; 
    border-radius: 5px; 
    font-size: 12px; 
    cursor: pointer; 
}

/* --- 8. CARRINHO E BOTÕES --- */
.cart-container { 
    background: #fafafa; 
    padding: 15px; 
    border-radius: 12px; 
    margin-top: 20px; 
    border: 1px dashed #ccc; 
}

.cart-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
    font-size: 14px; 
}

.btn-remove { 
    background: #ff4d4d; 
    color: white; 
    border: none; 
    padding: 5px 10px; 
    border-radius: 5px; 
    font-size: 12px; 
    cursor: pointer; 
}

.total-display { 
    background: #5d2a61; 
    color: white; 
    padding: 15px; 
    text-align: center; 
    border-radius: 10px; 
    font-size: 20px; 
    font-weight: bold; 
    margin-top: 25px; 
}

.btn-add { 
    background: #5d2a61; 
    color: white; 
    border: none; 
    padding: 12px; 
    width: 100%; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 10px; 
}

.btn-send { 
    width: 100%; 
    background: #25d366; 
    color: white; 
    border: none; 
    padding: 18px; 
    border-radius: 10px; 
    font-size: 18px; 
    font-weight: bold; 
    margin-top: 15px; 
    cursor: pointer;
}

/* --- 9. ESTADOS ESPECIAIS --- */
.check-container.unavailable { 
    opacity: 0.5; 
    cursor: not-allowed; 
    color: #888; 
}
.check-container.unavailable input { 
    pointer-events: none; 
}

.sold-out-badge { 
    background-color: #d9534f; 
    color: white; 
    font-size: 10px; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: bold; 
    text-transform: uppercase; 
    margin-left: 10px; 
}

/* --- 10. MAPA --- */
.map-container {
    width: 100%;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 200px;
    border: none;
    display: block;
    filter: grayscale(0.2);
}

/* --- 11. LOADER --- */
#loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#logo-jump {
    width: 200px;
    border-radius: 50%;
    border: 5px solid #FFFFFF;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    animation: jump 0.6s ease-in-out;
    animation-iteration-count: 3;
}

@keyframes jump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-70px); }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}
