/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    background-color: #075e54;
    color: #fff;
    padding: 20px;
    text-align: center;
    width: 100%;
}
/* Estilo do link no título (h1) */
header h1 a {
    color: #fff; /* Mantém o texto branco */
    text-decoration: none; /* Remove o underline */
}

header h1 a:hover {
    text-decoration: none; /* Remove o underline no hover também */
    color: #ddd; /* (Opcional) Altera a cor ao passar o mouse, se quiser */
}
header h1 {
    font-size: 2rem;
}

header p {
    font-size: 1.2rem;
    margin-top: 5px;
}

main {
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

.search-section {
    text-align: center;
    margin-bottom: 30px;
}

.search-section h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

#search-bar input {
    padding: 10px;
    width: 70%;
    border: 1px solid #ccc;
    border-radius: 20px;
}

#search-bar button {
    padding: 10px 20px;
    background-color: #25d366;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

#search-bar button:hover {
    background-color: #128c7e;
}

#results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.result-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background-color: #fff;
}

.result-item img {
    max-width: 80px;
    border-radius: 4px;
    object-fit: cover;
}

/* Resultados da busca - Ajustes solicitados */
.result-item .product-info h3 {
    font-size: 1.2rem; /* Aumenta um pouco o título */
    color: #075e54; /* Cor verde */
    margin-bottom: 8px;
}

.result-item .product-info p.description {
    font-size: 0.9rem; /* Fonte menor para a descrição */
    color: #000; /* Cor preta */
    line-height: 1.4;
    margin-bottom: 8px;
    overflow: hidden; /* Esconde o texto extra */
    text-overflow: ellipsis; /* Adiciona "..." no fim */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Mostra apenas 2 linhas */
    -webkit-box-orient: vertical;
}

.result-item .product-info p.price {
    font-size: 1.1rem; /* Tamanho maior que o da descrição */
    font-weight: bold;
    color: #25d366; /* Verde mais escuro */
}

.result-item .product-info p {
    font-size: 1rem;
    color: #007b00;
    font-weight: bold;
}
.result {
    display: flex;
    align-items: center; /* Alinha os itens verticalmente */
    gap: 15px; /* Adiciona um espaço uniforme entre os elementos */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    margin-bottom: 10px; /* Espaço entre os resultados */
}

.result img {
    flex-shrink: 0; /* Impede que a imagem seja redimensionada */
    width: 80px;
    height: 80px;
    border-radius: 5px;
    object-fit: cover;
    padding: 5px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

.result-details {
    flex: 1;
}

.result h3 {
    font-size: 1rem;
    color: #25d366;
    margin: 0;
}

.result p {
    font-size: 0.85rem;
    color: #333;
    margin-top: 5px;
}

.featured-products {
    margin-top: 40px;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.product {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    padding: 10px;
}

.product img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.product h3 {
    margin: 10px 0;
    font-size: 1rem;
}

.product p {
    color: #25d366;
    font-weight: bold;
}

.how-it-works {
    margin-top: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.how-it-works h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.how-it-works p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

.products-grid .product img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.products-grid .product h3 {
    color: #25d366;
    font-size: 1rem;
    margin: 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a duas linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products-grid .product p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
}
/* Garantir que os itens populares sejam interativos */
.top-search-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Garantir que os links sejam reconhecidos */
.top-search-item a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

footer {
    background-color: #075e54;
    color: #fff;
    padding: 20px;
    text-align: center;
    width: 100%;
}
