/* --- 1. AJUSTE DE FLUXO PARA O SEU LAYOUT FIXO --- */
.loja-page {
    flex: 1;
    overflow-y: auto; /* Força o scroll a acontecer APENAS dentro do conteúdo, travando o footer */
    padding: 15px;
}

.loja-page p.subtitle { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-top: 5px; 
    margin-bottom: 20px;
    padding: 0 10px;
}

/* --- 2. CONFIGURAÇÃO DA VITRINE (GRID) --- */
.loja-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 10px 10px 30px 10px; /* Margem inferior interna para os cards não colarem no footer */
}

/* --- 3. CARD DO PRODUTO --- */
.card-produto {
    background: var(--bg-container);
    border-radius: var(--radius-large);
    overflow: hidden;
    border: 1px solid var(--border-main);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-produto:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Container para a Imagem do Produto */
.produto-img-wrap {
    width: 100%;
    height: 180px;
    background: #FFFFFF; /* Fundo branco fixo para destacar fotos do Mercado Livre */
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-main2);
}

.produto-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Bloco de informações abaixo da foto */
.card-info-loja {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.produto-titulo {
    font-size: 0.95rem;
    color: var(--text-white);
    margin: 0 0 10px 0;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7rem;
}

.produto-preco {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Botão de redirecionamento */
.btn-afiliado {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: var(--bg-input);
    color: var(--text-white);
    text-decoration: none;
    border-radius: var(--radius-main);
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid var(--border-main);
    transition: var(--transition-fast, 0.2s);
    margin-top: auto;
}

.btn-afiliado:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-dark);
}

/* Permite que o título mostre todo o texto quando expandido */
.produto-titulo.expandido {
    display: block;
    overflow: visible;
    height: auto;
    -webkit-line-clamp: unset;
}


