
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* trava arrastar pro lado */
}


/* ========================
   RESET BÁSICO
======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================
   BODY
======================== */
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #333;
}

/* ========================
   BANNER
======================== */
.banner {
    width: 100vw;              /* ocupa toda a largura real da tela */
    min-height: 300px;
    background-image: url("img/banner1.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* ========================
   CATEGORIAS
======================== */
#categorias {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

#categorias button {
    padding: 10px 22px;
    border-radius: 20px;
    border: none;
    background: #ff5c8a;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

#categorias button:hover {
    background: #ff3366;
    transform: scale(1.05);
}

/* ========================
   CONTAINER PRINCIPAL
======================== */
.main-container {
    width: 100%;
    padding: 20px;
}

/* GRID CENTRAL */
.conteudo {
    display: grid;
    grid-template-columns: 240px 1fr 220px;
    gap: 20px;
    align-items: flex-start;
}

/* ========================
   CARRINHO
======================== */
#carrinho-container {
    background: rgba(255,182,193,0.35);
    padding: 15px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

#carrinho-container h2 {
    margin-bottom: 10px;
}

#carrinho-container button {
    width: 100%;
    padding: 10px;
    border: none;
    background: #ff3366;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

#lista-carrinho li {
    font-size: 14px;
    margin: 6px 0;
}
/* ========================
   PRODUTOS
======================== */
#produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, 220px);
    gap: 20px;
    justify-content: center; /* centraliza quando sobrar 1 */
    padding: 20px;
}

.produto {
    width: 220px;            /* trava o tamanho do card */
    max-width: 220px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}


.produto:hover {
    transform: translateY(-5px);
}

.produto img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
}

.produto button {
    margin-top: 10px;
    padding: 8px 14px;
    border: none;
    background: #ff3366;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* ESCONDER PRODUTO */
.produto.escondido {
    display: none;
}

/* ========================
   PESQUISA
======================== */
#pesquisa-container {
    background: rgba(255,182,193,0.35);
    padding: 12px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

#pesquisa {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: none;
}

#btn-pesquisar {
    margin-top: 8px;
    width: 100%;
    padding: 8px;
    border: none;
    background: #ff3366;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* ========================
   MODAL PAGAMENTO
======================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.modal-conteudo {
    background: #fff;
    width: 320px;
    padding: 20px;
    border-radius: 12px;
    margin: 10% auto;
    text-align: center;
    position: relative;
}

.fechar {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}
/* ========================
   SUPORTE
======================== */
#chat-suporte {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff3366;
    color: #fff;
    padding: 14px;
    border-radius: 50%;
    text-decoration: none;
}

/* ========================
   MOBILE
======================== */
@media (max-width: 768px) {

    #produtos {
        display: grid;
        grid-template-columns: 1fr; /* UMA COLUNA */
        gap: 16px;
        padding: 15px;
    }

    .produto {
        width: 100%;
        max-width: 100%;
    }

    .produto img {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }

}

/* =========================
   AJUSTE MOBILE CORRETO
========================= */
@media (max-width: 768px) {

    /* Empilha tudo */
    .conteudo {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Pesquisa sobe */
    #pesquisa-container {
        order: 1;
        width: 100%;
        position: static;
    }

    /* Categorias logo abaixo */
    #categorias {
        order: 2;
        justify-content: center;
    }

    /* Produtos em 2 colunas */
    #produtos {
        order: 3;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .produto img {
        height: 140px;
        object-fit: cover;
    }

    /* Carrinho vai pro final */
    #carrinho-container {
        order: 4;
        width: 100%;
        position: static;
    }
}
@media (max-width: 768px) {

    .banner {
        min-height: 200px;          /* diminui altura no celular */
        background-size: contain;   /* MOSTRA a imagem inteira */
        background-position: center;
        background-repeat: no-repeat;
    }

}
