.container_cards{
    display: grid;
    grid-template-columns:
        repeat(3, minmax(240px, 320px));
    gap: 24px;
    margin-top: 30px;
    justify-content: center;
}

.link_card_inteiro {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card_produto{
    display: flex;

    flex-direction: column;

    background: white;

    border-radius: 20px;

    overflow: hidden;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    cursor: pointer;
}

.card_produto:hover{
    transform: translateY(-6px);

    box-shadow:
        0 18px 40px rgba(0,0,0,0.12);
}

.link_produto{
    color: inherit;

    text-decoration: none;

    display: block;
}

/* Foto e conteúdo ficam ABAIXO do link, pra deixarem o clique passar */
.box_img_produto,
.conteudo_card{
    position: relative;
    z-index: 0;
}

.box_img_produto{
    height: 300px;
    overflow: hidden;
}

.box_img_produto img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .3s ease;
}

.card_produto:hover .box_img_produto img{
    transform: scale(1.05);
}

.conteudo_card{
    padding: 18px;

    flex: 1;
}

.card_produto h3{
    font-size: 22px;
    color: #401c01;
    margin-bottom: 10px;
}

.card_produto h3:hover {
    color: green;
}

.descricao_produto{
    color: #6F625C;

    line-height: 1.5;

    font-size: 14px;

    margin-bottom: 18px;
}

.preco_produto{
    font-size: 22px;

    font-weight: bold;

    color: #4E9B57;
}

/* =========================
   RODAPÉ DO CARD
========================= */

.footer_card{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid #F1ECE8;
    background: #FFFDFB;

    /* ACIMA do link, pra os botões serem clicáveis */
    position: relative;
    z-index: 2;
}

/* =========================
   CONTADOR
========================= */

.contador_produto{
    display: flex;

    align-items: center;

    overflow: hidden;

    border-radius: 12px;

    border: 1px solid #E5DDD8;

    background: #fff;
}

.contador_produto button{
    width: 38px;
    height: 38px;

    border: none;

    background: #F8F5F2;

    color: #3A2E2A;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    transition: background .2s ease;
}

.contador_produto button:hover{
    background: #EFE7E2;
}

.input_quantidade{
    width: 45px;
    height: 38px;

    border: none;

    outline: none;

    text-align: center;

    font-size: 15px;

    font-weight: bold;

    color: #3A2E2A;

    background: transparent;
}

/* remove setinhas do input number */

.input_quantidade::-webkit-inner-spin-button,
.input_quantidade::-webkit-outer-spin-button{
    -webkit-appearance: none;

    margin: 0;
}

/* =========================
   BOTÃO
========================= */

.btn_adicionar{
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        #4E9B57,
        #3E8448
    );
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform .2s ease,
        opacity .2s ease;
}

.btn_adicionar:hover{
    transform: translateY(-2px);

    opacity: .95;
}

.btn_adicionar:active{
    transform: scale(.98);
}

/* =========================
   ESGOTADO
========================= */

.box_img_produto {
    position: relative;
    overflow: hidden;
}

.badge_esgotado {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #c0392b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 20px;
    z-index: 1;
}

.card_produto.produto_esgotado .box_img_produto img {
    opacity: 0.5;
    filter: grayscale(40%);
}

.aviso_estoque {
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
}

.aviso_esgotado {
    color: #8a7d76;
}

.aviso_poucas {
    color: #c0392b;
}

.footer_desabilitado {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 900px) {
    .container_cards {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }
}
 
@media (max-width: 768px) {
    .container_cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 4px;
    }

    .box_img_produto{
        height: auto;
    }

    .card_produto h3{
        font-size: 18px;
    }

    .descricao_produto{
        display: none;
    }

    .botoes_quantidade{
        display: none;
    }

    .aviso_estoque {
        font-size: 0.7rem;
    }



}