:root {
    --laranja: #FF6600;
    --preto: #121212;
    --branco: #F5F5F5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--branco);
    margin: 0; padding: 0;
}

header {
    background: var(--preto);
    padding: 2rem;
    text-align: center;
    border-bottom: 5px solid var(--laranja);
}

.logo { width: 220px; }

.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

input, select {
    padding: 12px;
    border: 2px solid var(--laranja);
    border-radius: 4px;
    outline: none;
    width: 230px;
}

.grid-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 40px;
}


.card:hover { transform: translateY(-5px); }

.card img { width: 100%; height: 200px; object-fit: cover; }

.card-info h3 { margin: 10px 0; color: var(--preto); }

.price { color: var(--laranja); font-weight: bold; font-size: 1.2rem; }


#carrinho-flutuante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--preto);
    color: var(--laranja);
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    border: 2px solid var(--laranja);
}

.modal {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
    border-top: 5px solid var(--laranja);
}

.modal-content input {
    width: 60px;
    text-align: center;
    margin: 15px 0;
}

.modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-confirmar { background: var(--laranja); color: white; border: none; padding: 10px; cursor: pointer; border-radius: 4px; font-weight: bold; flex: 1; }
.btn-cancelar { background: #ccc; color: #333; border: none; padding: 10px; cursor: pointer; border-radius: 4px; flex: 1; }


#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--preto);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1001;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    border-left: 5px solid var(--laranja);
}

#toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }

@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* Estilos para os itens dentro do modal do carrinho */
.item-cart {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.item-cart img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.item-cart-info { flex: 1; }
.item-cart-info h4 { margin: 0; font-size: 0.9rem; }
.item-cart-info p { margin: 2px 0; font-size: 0.8rem; color: var(--laranja); font-weight: bold; }

.item-cart-acoes {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-cart-acoes input {
    width: 45px !important;
    margin: 0 !important;
    padding: 5px !important;
}

.btn-remover {
    background: #ff4444;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    
    
    display: flex;
    flex-direction: column;
}


.card-info {
    padding: 15px;
    text-align: center;
    
    
    flex-grow: 1;
}

.btn-add {
    background: var(--laranja);
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    
    
    margin-top: auto; 
}

/* Ajuste para modais maiores (como o de Endereço) */
.modal-content.largo {
    width: 95%;
    max-width: 500px; /* Aumentamos de 300px para 500px */
    padding: 25px;
}

/* Organização dos inputs dentro do formulário de endereço */
.form-endereco {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.form-endereco input {
    width: 100% !important; /* Força os inputs a ocuparem a largura total */
    box-sizing: border-box;
}

/* Opcional: Colocar CEP e Número lado a lado se quiser economizar espaço vertical */
.row {
    display: flex;
    gap: 10px;
}