/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #66308C;
    --secondary-color: #EF8E23;
    --accent-color: #ff6b6b;
    --light-color: #f4f9f4;
    --dark-color: #2b2b2b;
    --gray-color: #e0e0e0;
    --text-color: #333;
    --text-light: #777;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Garante que o body ocupe pelo menos toda a altura da viewport */
}

main {
    flex: 1; /* Faz com que o main ocupe todo o espaço disponível */
    padding-bottom: 60px; /* Adiciona espaço para o rodapé */
}


.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

a:visited {
  color: #fff;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Formulário de busca */
.search-form {
    margin-top: 20px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 12px 40px 12px 15px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

.clear-btn {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    padding: 5px;
    text-decoration: none;
    transition: color 0.3s;
}

.clear-btn:hover {
    color: var(--accent-color);
}

.search-btn:hover {
    color: var(--secondary-color);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Grid de produtos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 180px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    background-color: #f5f5f5;
    font-size: 0; /* Esconde texto alternativo */
}

.product-image img[src*='produto-sem-imagem.png'] {
    object-fit: contain;
    padding: 20px;
    background-color: #e0e0e0;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.flavor {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.summary {
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-details {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-details:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Página de detalhes do produto */
.product-detail {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.product-header {
    display: flex;
    flex-direction: column;
}

.product-image {
    height: 300px;
}

.product-main-info {
    padding: 25px;
}

.product-main-info h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-main-info .function {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 500;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.product-meta span {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.product-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.product-content {
    padding: 0 25px 25px;
}

.product-section {
    margin-bottom: 30px;
}

.product-section h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.product-section h2 i {
    margin-right: 10px;
}

.benefits-list, 
.systems-list, 
.diseases-list, 
.ingredients-list, 
.certifications-list {
    list-style-type: none;
}

.benefits-list li, 
.systems-list li, 
.diseases-list li, 
.ingredients-list li, 
.certifications-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.benefits-list li:before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

.systems-list li:before {
    content: "\f085";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.diseases-list li:before {
    content: "\f0fa";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

.ingredients-list li:before {
    content: "\f06c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

.certifications-list li:before {
    content: "\f559";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.product-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.product-columns .column {
    flex: 1;
    min-width: 250px;
}

.usage-section {
    background-color: var(--gray-color);
    padding: 20px;
    border-radius: 8px;
}

.usage-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.usage-box {
    flex: 1;
    min-width: 250px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.usage-box h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.usage-box h3 i {
    margin-right: 10px;
}

/* Mensagens de resultado */
.search-results-info {
    margin-bottom: 30px;
}

.search-results-info h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.search-results-info p {
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 15px;
    text-align: center;
    margin-top: auto; /* Muda de 50px para auto para funcionar com flexbox */
    width: 100%;
}

footer p {
    margin-bottom: 0px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Rodapé responsivo */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.footer-separator {
    display: inline-block;
}

.footer-line {
    display: inline-block;
    text-align: center;
}

/* Mobile - quebra em duas linhas */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 4px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-line {
        display: block;
        width: 100%;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .product-header {
        flex-direction: column;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-main-info {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .search-box input {
        padding: 10px 12px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-content {
        padding: 0 15px 15px;
    }
}

/* Seções técnicas */
.tech-section {
    margin-bottom: 40px;
}

.tech-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-color);
}

.tech-section h3 {
    margin: 25px 0 15px;
    color: var(--secondary-color);
}

/* Navegação entre seções */
.section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
}

.section-nav a {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.section-nav a:hover {
    background-color: var(--secondary-color);
    color: white;
}

.section-nav a i {
    margin-right: 8px;
}

/* Cards de nutrientes */
.nutrient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.nutrient-card {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--secondary-color);
}

.nutrient-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Lista de certificações */
.certification-list {
    column-count: 2;
    column-gap: 30px;
    margin-top: 15px;
}

.certification-list li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.certification-list li:before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    .certification-list {
        column-count: 1;
    }
    
    .section-nav {
        flex-direction: column;
    }
}


.search-tips {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

/* Adicione ao seu style.css */
.nutrient-card.highlighted {
    background-color: #e6f7ff !important;
    border-left: 4px solid var(--primary-color) !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(44, 120, 115, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(44, 120, 115, 0); }
    100% { box-shadow: 0 0 0 0 rgba(44, 120, 115, 0); }
}



/* ==============================================
   MENU MOBILE
   ============================================== */

.mobile-menu-btn {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin: 10px auto;
    width: 100%;
    text-align: center;
}

.mobile-menu-btn i {
    margin-right: 8px;
}

.section-nav {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.section-nav a {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.section-nav a i {
    margin-right: 8px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .section-nav {
        display: none;
        flex-direction: column;
        gap: 5px;
        margin: 10px 0;
    }

    .section-nav.active {
        display: flex;
    }

    .section-nav a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ==============================================
   DESTAQUE DE TERMOS DE PESQUISA
   ============================================== */

.highlight {
    background-color: #fffde7;
    padding: 0 2px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px #ffd600;
}

/* ==============================================
   SEÇÃO DE NUTRIENTES
   ============================================== */

.nutrient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.nutrient-card {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
}

.search-results-info {
    margin-bottom: 20px;
    font-style: italic;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}