/* Adicione isso no início do seu CSS */
.header-background {
  background-color: #efc8b1;
  width: 100%;
  position: relative;
  padding: 15px 0;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Ajuste o header para ficar dentro da faixa */
header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  position: relative;
  z-index: 1;
}

/* Ajuste o logo se necessário */
.logo {
  display: block;
  margin: 0 auto; /* Centraliza o logo */
  max-width: 180px;
  height: auto;
}


body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: url('imagens/fundo-campo.png') no-repeat center center fixed;
    background-size: cover;
    color: #2e2e2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    box-sizing: border-box;
    position: relative;
    padding-bottom: 0 !important;
}

/* Lista de produtos */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 25px;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
}

/* Card de produto */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #fdfdfc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: all 0.25s ease;
    height: 100%;
    min-height: 420px;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-card .thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card h2 {
    font-size: 1.2rem;
    margin: 0 0 5px;
    color: #3e5731;
    line-height: 1.3;
}

.product-card p {
    font-size: 0.9rem;
    margin: 0 0 8px;
    color: #444;
}

.product-card small {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.product-card button {
    background-color: #6d8c5e;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

.product-card button:hover {
    background-color: #557148;
}

/* Filtros */
.filtros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
}

.filtros a {
    padding: 10px 18px;
    border-radius: 25px;
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.filtros a:hover {
    background-color: #dcdcdc;
}

.filtros a.ativo {
    background-color: #6d8c5e;
    color: white;
}

/* Página de detalhes */
.produto-detalhes {
    display: flex;
    flex-wrap: nowrap;
    gap: 60px;
    align-items: flex-start;
    justify-content: center;
    margin: 60px auto;
    max-width: 1100px;
    padding: 30px; /* Add padding to the main container */
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff; /* Add a background color */
    border-radius: 14px; /* Match description border-radius */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Add a subtle shadow */
}

.produto-imagem-container {
    /* Keep its padding and background */
    background-color: #fafafa; /* Keep its light background */
    padding: 25px; /* Keep its padding */
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: none; /* Remove shadow if parent has it */
}

.produto-imagem {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.produto-info {
    flex: 1;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

.produto-descricao {
    /* background-color: #ffffff;  Consider removing or changing if parent has background */
    padding: 25px; /* Adjust padding as needed */
    /* border-radius: 14px; */
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.07); */
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.75;
    text-align: left;
    color: #2e2e2e;
}

.produto-descricao h2 {
    color: #3b512f;
    font-size: 2.4rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #c9d6bd;
    padding-bottom: 8px;
}

/* Botão Voltar */
.voltar {
    display: inline-block;
    background-color: #5d7b4f;
    color: white;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    border: 1px solid #4a603a;
    box-sizing: border-box;
}

.voltar:hover {
    background-color: #3e5133;
}


/* Rodapé */
footer {
    text-align: center;
    padding: 8px 10px;
    color: #eee;
    background-color: rgba(0, 0, 0, 0.6);
    width: 100%;
    margin-top: auto;
    font-size: 0.8rem;
    box-sizing: border-box;
}

/* Responsivo */
@media (max-width: 1024px) {
    .produto-imagem-container {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .product-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }

    .produto-detalhes {
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
        align-items: center;
    }

    .produto-imagem-container {
    width: 100%;
    max-width: 300px; /* Ou o valor que você preferir para mobile */
    height: auto;
    padding: 10px; /* Reduz o padding interno para mobile */
    /* Garanta que display: flex, align-items: center e justify-content: center estejam ativos aqui também,
       se por algum motivo eles fossem desativados em media queries */
    display: flex;
    align-items: center;
    justify-content: center;
  }
     .produto-info {
        width: 100%;
        max-width: none;
        /* Em mobile, ajuste o padding da descrição se o produto-info não tiver seu próprio background */
        /* Se produto-info for o 'card' principal em mobile, mantenha o padding e fundo aqui */
        padding: 0 15px; /* Ajuste para não ter scroll lateral indesejado */
        margin-bottom: 20px; /* Adiciona espaço abaixo do bloco de info antes do footer */
    }

    .produto-descricao {
        text-align: center;
    }

     .voltar {
        width: 100%; /* Faz o botão ocupar a largura total disponível */
        max-width: 300px; /* Limita a largura máxima do botão para não ficar muito grande */
        padding: 12px 20px;
        margin-top: 20px; /* Adiciona uma margem superior para espaçamento em mobile */
        align-self: center; /* CENTRALIZA O BOTÃO HORIZONTALMENTE NO CELULAR */
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 140px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .filtros a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .produto-descricao {
        padding: 15px;
    }

    .voltar {
        padding: 10px;
    }
}
