/* style.css */

/* --- Importações e Variáveis Globais --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

:root {
    --primary-color: #1a202c; /* Cor escura do cabeçalho */
    --accent-color: #4299e1; /* Cor de destaque (azul) */
    --background-color: #f0f4f8; /* Fundo cinza claro */
    --text-color: #333;
    --card-background: #fff;
    --button-primary: #4299e1;
    --button-secondary: #2d3748;
}

/* --- Estilos de Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Header e Navegação --- */
.header-bg {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 40;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}

.logo-container img {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.desktop-nav {
    display: none;
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.desktop-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.125rem;
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: var(--accent-color);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 50;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger-active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-active span:nth-child(2) {
    opacity: 0;
}

.hamburger-active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 66.666%; /* 2/3 da largura */
    background-color: var(--primary-color);
    box-shadow: -4px 0 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 40;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu a {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--accent-color);
}

/* --- Espaçamento para o cabeçalho fixo --- */
.header-space {
    padding-top: 5rem;
}

/* --- Estilos de Seções --- */
main {
    padding: 1rem 0;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* --- Slider de Promoções --- */
.slider-container {
    position: relative;
    max-width: 100%;
    margin-top: 5rem; /* Ajuste para o cabeçalho fixo */
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.slide-content p {
    font-size: 1.2rem;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 2rem;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.slider-btn:hover {
    opacity: 1;
}

.slider-btn.left-btn {
    left: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.slider-btn.right-btn {
    right: 1rem;
    border-radius: 0.5rem 0 0 0.5rem;
}

.dots-container {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--accent-color);
}


/* --- Cards de Produtos --- */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.produto-card {
    background-color: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.produto-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.produto-card-body {
    padding: 1rem;
    text-align: center;
}

.produto-card-body h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
}

.produto-card-body .preco {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: 0.5rem;
}

.add-to-cart-btn {
    width: 100%;
    margin-top: 1rem;
    background-color: var(--button-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    background-color: #2c5282;
}

/* --- Página de Produtos --- */
.filtro-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filtro-container label {
    font-weight: 600;
}

.filtro-container input,
.filtro-container select {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 9999px;
    width: 100%;
}

.filtro-container input:focus,
.filtro-container select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

/* --- Página do Carrinho --- */
.carrinho-container {
    background-color: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.carrinho-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.carrinho-item:last-child {
    border-bottom: none;
}

.carrinho-item img {
    height: 4rem;
    width: 4rem;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-right: 1rem;
}

.item-info {
    flex-grow: 1;
}

.item-info h3 {
    font-size: 1rem;
    margin: 0;
}

.item-info p {
    color: #666;
    margin: 0;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.remover-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
}

.carrinho-total {
    background-color: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-pedido {
    background-color: var(--card-background);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.form-pedido label {
    display: block;
    font-weight: 500;
    margin-top: 1rem;
}

.form-pedido input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    margin-top: 0.25rem;
}

.whatsapp-btn {
    width: 100%;
    margin-top: 1.5rem;
    background-color: #25d366; /* Cor do WhatsApp */
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
}

/* --- Footer --- */
.footer-bg {
    background-color: #2d3748;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.footer-text {
    text-align: center;
    color: #a0aec0;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #a0aec0;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #fff;
}

/* --- Responsividade (Media Queries) --- */
@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }

    .hamburger-icon {
        display: none;
    }
    
    .filtro-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .filtro-container input,
    .filtro-container select {
        width: auto;
    }
}

/* Container de produtos */
.produtos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Card do produto */
.produto-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.produto-card:hover {
    transform: scale(1.03);
}
.produto-img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Botão adicionar ao carrinho */
.btn-add {
    display: inline-block;
    padding: 10px 16px;
    background: #0077ff;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-add:hover {
    background: #005fcc;
}

/* Barra de busca */
.search-form {
    display: flex;
    justify-content: center;
    margin: 20px;
}
.search-bar {
    padding: 10px;
    width: 300px;
    border: 2px solid #0077ff;
    border-radius: 8px 0 0 8px;
    outline: none;
}
.search-btn {
    padding: 10px 15px;
    border: none;
    background: #0077ff;
    color: #fff;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s;
}
.search-btn:hover {
    background: #005fcc;
}

/* Botão ver carrinho */
.btn-carrinho {
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 12px 20px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}
.btn-carrinho:hover {
    background: #218838;
}

/* Centraliza todo o conteúdo dentro do card */
.produto-card {
    text-align: center;
}

/* Novo estilo para o nome do produto */
.produto-nome {
    text-align: center; /* Garante que o texto do nome está centralizado */
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin-top: 1rem;
}

/* Novo estilo para o preço */
.produto-preco {
    font-size: 1.5rem; /* Aumenta o tamanho da fonte */
    font-weight: 700;
    color: #28a745; /* Cor verde para destaque */
    margin: 0.5rem 0; /* Espaçamento vertical */
    display: block; /* Garante que o preço ocupe uma linha inteira */
}

/* Estilo do botão "Adicionar" centralizado */
.add-carrinho {
    display: block; /* Ocupa a largura total para ser centralizado via margin */
    width: fit-content; /* Se ajusta ao conteúdo */
    margin: 10px auto; /* Centraliza horizontalmente */
    padding: 10px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.add-carrinho:hover {
    background: #218838;
}

/* Estilo do botão "Esgotado" centralizado */
.esgotado-btn {
    display: block;
    width: fit-content;
    margin: 10px auto;
    padding: 10px 15px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: not-allowed;
    opacity: 0.7;
}
