:root {
    --branco: #ffffff;
    --verde: #19c463;
    --preto: #2a2a2a;
    --cinza-claro: #d3d3d3;
    --cinza-escuro: #b3b3b3;
    --azul: #007bff;
    --amarelo: #ffeb3b;
    --vermelho: #f44336;
    --roxo: #9c27b0;
    --background-color: #f9f9f9;
    --borda-input: #e0e0e0;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--background-color);
    color: var(--preto);
}

.page-content {
    padding: 20px;
}

.top-nav {
    width: 100%;
    height: 60px;
    background: var(--branco);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--cinza-claro);
}

.title-logo {
    font-weight: 800;
    margin-left: 5%;
}

.title-logo span {
    color: var(--verde);
}

.btn-cart {
    width: 40px;
    height: 40px;
    background: var(--branco);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5%;
    border-radius: 50%;
    border: 1px solid var(--gelo);
    font-size: 24px;
    color: var(--preto);
    position: relative;
}

.btn-cart::before {
    content: attr(data-count);
    background: var(--verde);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--branco);
    position: absolute;
    top: 5px;
    right: 0px;
    margin-right: 5%;
}

.btn-cart[data-count="0"]::before {
    display: none;
}

.block {
    margin-left: 2%;
    margin-right: 2%;
    padding: 5px 10px;
    background: var(--branco);
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    margin-top: 8px;
}

.search-icon {
    position: absolute;
    right: 5px;
    font-size: 25px;
    color: var(--cinza-escuro);
}

.search-field {
    width: 100%;
    padding: 10px 10px 10px 45px; /* Espaço para o ícone */
    border: 2px solid var(--borda-input);
    border-radius: 25px; /* Cantos arredondados */
    font-size: 20px;
    transition: border-color 0.3s;
}

.search-field:focus {
    border-color: var(--azul);
    outline: none;
}

.category-card {
    width: 37%;
    margin: 2.5%;
    height: 30px;
    align-items: center;
    padding: 30px 10px;
    text-align: center;
    border-radius: 15px;
    font-size: 15px;
    font-weight: bold;
    display: flex; /* Alterado para flex */
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center; /* Centraliza verticalmente */    
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
    color: var(--branco); /* Texto branco para contraste */
    word-wrap: break-word; /* Quebra palavras longas */
    overflow-wrap: break-word; /* Quebra palavras longas */
    white-space: normal; /* Permite quebra de linhas */    
}

.category-color-1 {
    background: var(--verde);
}

.category-color-2 {
    background: var(--amarelo);
    color: var(--preto); /* Texto preto para contraste */
}

.category-color-3 {
    background: var(--vermelho);
}

.category-color-4 {
    background: var(--roxo);
}

#product-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.product-card {
    width: 39%;
    margin: 2%;
    padding: 10px;
    text-align: center;
    border-radius: 15px;
    background: var(--branco);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;        
}

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

.product-card:hover {
    transform: scale(1.05);
}

.nome-pesq{    
    overflow: hidden;
    text-overflow: ellipsis;   
    color: var(--preto);
    max-width: 50ch;  
}

.price-pesq{
    font-size: 20px;
    font-weight: 600;
    color: var(--preto);
}
