/* ================================================= */
/* ESTILOS DA PÁGINA DA LOJA (loja.html) */
/* ================================================= */

.store-layout {
    display: flex;
    gap: 30px;
}

/* --- COLUNA DE FILTROS --- */
.filter-sidebar {
    width: 250px;
    flex-shrink: 0;
    padding: 20px;
    height: fit-content;
    position: sticky; /* Fica fixo ao rolar */
    top: 100px; /* Abaixo do header fixo */
}

.filter-sidebar h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid rgba(var(--text-color), 0.1);
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-btn {
    background-color: var(--card-hover-bg);
    color: var(--text-muted);
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: rgba(var(--primary-color), 0.1);
    color: var(--text-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(var(--primary-color), 0.3);
}

/* --- COLUNA DE PRODUTOS --- */
.products-grid-container {
    flex-grow: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.product-card {
    padding: 0; /* O card é a estrutura externa */
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(var(--text-color), 0.1);
}

.product-card img {
    width: var(--product-thumb-size);
    height: var(--product-thumb-size);
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px 20px;
    text-align: left;
}

.product-info h5 {
    font-size: 1.3em;
    color: var(--text-color);
    margin-bottom: 5px;
}

.product-info .category-tag {
    display: inline-block;
    font-size: 0.8em;
    color: var(--primary-color);
    background-color: rgba(var(--primary-color), 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-info .price-tag {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--highlight-red);
    margin: 10px 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.product-actions .btn {
    width: 50%;
    margin: 0;
    font-size: 0.9em;
}

/* --- RESPONSIVIDADE LOJA --- */
@media (max-width: 768px) {
    .store-layout {
        flex-direction: column;
    }

    .filter-sidebar {
        width: 100%;
        position: static; /* Não fica sticky no mobile */
        margin-bottom: 20px;
    }
    
    .filter-btn-group {
        flex-direction: row; /* Filtros na horizontal (scrolável) */
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }

    .product-grid {
        /* Ajusta o minmax para garantir pelo menos 1 item por linha */
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)); 
    }
}

@media (min-width: 500px) and (max-width: 768px) {
    .product-grid {
        /* Se a tela permitir, mostra 2 colunas */
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    }
}
