
.recomendados {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px; /* Espaço entre os itens Abuuu*/
    min-width: 0; 
}


.recomendados h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: #0f172a;
    
    width: 100%;       /* Ocupa toda a largura, forçando a quebra de linha */
    flex-basis: 100%;  /* Garante que o flexbox respeite essa largura */
}

.recomendado-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent;
    padding: 10px;
    cursor: pointer;
    
    /* 🔥 OBRIGATÓRIO: Faz o padding caber dentro da largura definida */
    box-sizing: border-box; 
    
    /* Desktop: 5 por linha */
    width: calc(20% - 12px); 
    
    transition: background 0.2s, transform 0.1s;
}

/* Adicione isto para garantir que a imagem não estoure o card */
.recomendado-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    aspect-ratio: 1 / 1;
}



/* Resto do seu CSS (hover, info, etc) */
.recomendado-card:hover {
    background: #e0e7ff;
    transform: translateY(-1px);
}

.recomendado-info {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    gap: 6px;
    width: 100%;
}

.recomendado-info .nome {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.recomendado-info .preco {
    font-size: 1.0rem;
    color: #121212;
    font-weight: 600;
    line-height: 1;
}

.faixa-esgotado {
    position: absolute;
    top: 50%;           /* Centraliza verticalmente */
    left: 0;
    width: 100%;
    transform: translateY(-50%); /* Ajuste fino da centralização */
    background-color: rgba(0, 0, 0, 0.8); /* Preto com leve transparência */
    color: white;
    text-align: center;
    padding: 8px 0;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    z-index: 10;        /* Garante que fique acima da imagem */
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}


/* Contêiner para manter a etiqueta presa à imagem */
.img-wrapper {
    position: relative;
    display: block; /* Alterado para evitar que estique verticalmente */
    width: fit-content; 
    margin: 0 auto;
}

/* O estilo da etiqueta azul (frente) */
.badge-unidades {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgb(40, 48, 167);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 2px;
    z-index: 10;
    pointer-events: none;
    
    /* SOLUÇÃO AQUI: Cria um contexto 3D simples para o z-index -1 funcionar */
    transform-style: preserve-3d; 
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2); 
}

/* O quadrado branco (fundo deslocado) */
.badge-unidades::before {
    content: "";
    position: absolute;
    top: 3px;    /* Desloca para baixo */
    left: -3px;  /* Desloca para a esquerda */
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 2px;
    
    /* Joga para trás do plano do pai (azul) */
    transform: translateZ(-1px); 
    z-index: -1; 
    
    box-shadow: 2px 2px 5px rgba(0,0,0,0.15);
}


#floatbutton {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 40%;
    background: #285ae3;

    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}



/* Modal de carrinho */
#overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
display: none;
z-index: 10000;
}

#modal {
background: white;
width: 90%;
max-width: 500px;
margin: auto;
margin-top: 5px;
padding: 15px;
border-radius: 16px;
}



@media (max-width: 768px) {
    .recomendado-card {
        flex: 0 0 calc(50% - 10px);
    }

    .recomendados {
        padding: 10px;
        gap: 10px;
        justify-content: flex-start; /* importante */
    }
}
