/* ─────────── SEÇÃO LOJAS POPULARES ─────────── */
.lojas-populares-section {
    width: 100%;
    margin: 2rem 0;
}

.lojas-populares-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.lojas-populares-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A2B4C;
    margin: 0;
}

.lojas-populares-header .ver-todas-link {
    font-size: 1rem;
    font-weight: 600;
    color: #1A2B4C;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px; 
    
}
.lojas-populares-header .ver-todas-link i {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.lojas-populares-header .ver-todas-link:hover {
    color: #eab308;
}

.lojas-populares-header .ver-todas-link:hover i {
    transform: translateX(4px);
}

/* ─────────── GRELHA DE CARDS ─────────── */
.lojas-populares-grid {
    display: grid;
    gap: 1.5rem;
    /* Desktop: 3 colunas */
    grid-template-columns: repeat(6, 1fr);
}

.mini-card-loja {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #1A2B4C
}

.mini-card-loja:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

.mini-card-loja .logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    flex-grow: 1; 
    aspect-ratio: 16 / 9; 
}

.mini-card-loja .logo-wrapper img {
    max-width: 80%;
    max-height: 80px;
    height: auto;
    border-radius: 10px !important;
    object-fit: contain;
}

.mini-card-loja footer {
    background-color: #1A2B4C;
    color: #ffffff;
    padding: 0.75rem 1rem;
    text-align: center;
}

.mini-card-loja footer span {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
}


/* O novo código inteligente */
.lojas-populares-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 160px));
    justify-content: start; 
}

@media only screen and (max-width: 767px) {
  .lojas-populares-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 2fr));
    justify-content: center; 
  }  
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .lojas-populares-grid {
    justify-content: center; 
  }
}

/* --- ESTILOS PARA OS FILTROS DA GRELHA DE LOJAS --- */
.store-grid-filters {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem; /* Espaço vertical e horizontal */
}

.filter-group .filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: #f9f9f9 !important;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #333 !important;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.filter-group .filter-btn:hover {
    background-color: #e9e9e9 !important;
    border-color: #ccc !important;
}

.filter-group .filter-btn.active {
    background-color: #1A2B4C !important;
    color: #ffffff !important;
    border-color: #1A2B4C !important;
}

/* Mensagem quando não há resultados */
.no-results {
    grid-column: 1 / -1; /* Ocupa a largura total da grelha */
    text-align: center;
    padding: 2rem;
    font-weight: 600;
    color: #555;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* Mensagem de "A carregar..." */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-weight: 600;
    color: #555;
}

.lojas-populares-grid .mini-card-loja footer span {
    color: #ffffff !important;
}

.lojas-populares-grid .mini-card-loja a {
    color: #1A2B4C !important; 
}
