* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #fcfcfc;
}

/* Header e Navegação */
header {
    text-align: center;
    padding: 10px;
}

/* Estilo do Contador */
.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 14px;
    z-index: 1; /* Garante que o contador fique na frente do ícone */
}

header img {
    max-width: 200px;
}
.menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 10px;
    background-color: #ffe6f2;
    border-radius: 8px;
    flex-wrap: wrap;
}

.menu ul li a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
    transition: color 0.3s;
}

.menu ul li a:hover {
    color: #ff69b4;
}

nav {
    background-color: #f8e6f3;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 5px 15px;
}

nav ul li a {
    text-decoration: none;
    color: #444;
    font-weight: bold;
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
}
/* Estilos do Carrossel */
.banner {
    width: 50%; /* Ocupa 100% da largura em telas pequenas */
    overflow: hidden;
    position: relative;
    margin: 0 auto; /* Continua centralizado */
}

.carousel-container {
    display: flex; /* Alinha as imagens lado a lado */
    width: 100%;
    transition: transform 0.5s ease-in-out; /* Adiciona uma transição suave ao deslizar */
}

.carousel-slide {
    min-width: 100%; /* Cada slide ocupa a largura total do contêiner */
}

.carousel-slide img {
    width: 100%; /* Garante que a imagem preencha o slide */
    display: block;
}

/* Estilos dos botões de navegação */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    z-index: 100; /* Garante que os botões fiquem acima das imagens */
}

.prev-btn {
    left: 10px;
    border-radius: 0 5px 5px 0;
}

.next-btn {
    right: 10px;
    border-radius: 5px 0 0 5px;
}

.busca {
    text-align: center;
    margin: 15px 0;
}

.busca input {
    padding: 10px;
    width: 80%;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* --- Layout de Produtos (PRINCIPAIS ALTERAÇÕES) --- */

.produtos {
    display: flex;
    flex-wrap: wrap;
    /* Ajusta o espaçamento entre os produtos */
    gap: 15px; 
    justify-content: center;
    padding: 15px;
}

.produto {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* Define a largura para 2 produtos por linha no celular */
    width: 45%; 
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    background-color: #fff;
    cursor: pointer;
}

.produto:hover {
    transform: scale(1.03);
}

.produto img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: #fff;
    padding: 5px;
}

.produto h3, .produto h2 {
    padding: 10px 0 0;
    font-size: 16px;
    text-align: center;
}

.preco-produto {
    font-size: 14px;
    color: #e91e63;
    font-weight: bold;
}

.desconto {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #00c8ff;
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    border-radius: 5px;
}

/* --- Carrinho e Modal --- */

.cart-icon {
    position: fixed;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    z-index: 100;
    color: black;
}

.cart-count {
    position: absolute;
    top: 5px;
    right: 10px;
    background: red;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-content {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
}

.cart-items {
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cart-total {
    font-weight: bold;
    text-align: right;
    margin-top: 15px;
}

.remove-btn {
    background: red;
    color: white;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.checkout-btn {
    background-color: #25d366; /* Cor do WhatsApp */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-top: 20px;
}

.cart-image {
    width: 40px;
}

/* --- Media Queries (Para telas maiores) --- */

@media (min-width: 600px) {
    .produto {
        /* 3 produtos por linha em tablets */
        width: 30%;
    }
    .banner {
        width: 60%; /* Ajusta a largura para 60% em tablets e desktops */
    }
}

@media (min-width: 900px) {
    .produto {
        /* 4 produtos por linha em desktops */
        width: 22%;
    }
    .banner {
        width: 30%; /* Ajusta para uma largura menor em telas grandes */
    }
}