/* =========================================
   1. VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
   ========================================= */
:root {
    --primary-blue: #1a73e8;
    --accent-orange: #ff6c2c;
    --dark-gray: #202124;
    --light-bg: #f8f9fa;
    --cp-border: #dce1e5;
}

/* Configuração para o Rodapé Fixo (Sticky Footer) */
html, body {
    height: 100%;
    margin: 0;
}

body { 
    background-color: var(--light-bg); 
    font-family: 'Roboto', sans-serif; 
    -webkit-font-smoothing: antialiased;
    /* Flexbox para empurrar o footer */
    display: flex;
    flex-direction: column;
}

/* Esta classe deve envolver o conteúdo principal da página para empurrar o footer */
main, .main-container {
    flex: 1;
}

/* =========================================
   2. NAVBAR (CABEÇALHO)
   ========================================= */
.navbar-main {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

.nav-logo { 
    max-width: 180px; 
    height: auto;
}

/* =========================================
   3. HERO BANNER (DESTAQUE AZUL)
   ========================================= */
.hero-mini {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* =========================================
   4. BARRA DE CATEGORIAS
   ========================================= */
.category-bar {
    background: #fff;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    /* Garante rolagem horizontal no mobile */
    overflow-x: auto;
    white-space: nowrap;
}

.category-bar::-webkit-scrollbar {
    height: 4px;
}

.category-bar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.cat-link {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-right: 20px;
    display: inline-block;
    padding: 15px 5px;
    transition: all 0.2s ease;
    /* CORREÇÃO: Borda transparente evita o "pulo" visual */
    border-bottom: 3px solid transparent;
}

.cat-link:hover, .cat-link.active { 
    color: var(--primary-blue); 
    border-bottom: 3px solid var(--primary-blue); 
}

/* =========================================
   5. CARDS DE PRODUTOS
   ========================================= */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    height: 100%; /* Garante altura igual para todos na linha */
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Área da Imagem */
.img-wrapper {
    overflow: hidden;
    height: 220px; /* Altura fixa para manter o padrão */
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Respiro interno */
    border-bottom: 1px solid #f0f0f0;
}

.img-wrapper img {
    transition: transform 0.5s ease;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* ESSENCIAL: Não corta a imagem do hardware */
}

.product-card:hover .img-wrapper img { 
    transform: scale(1.08); 
}

/* Corpo do Card */
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Título do Produto (Limita a 2 linhas) */
.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-gray);
    height: 40px; /* Altura fixa para alinhar cards */
    line-height: 1.3;
    margin-bottom: 15px;
    
    /* Lógica para cortar texto grande com ... */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* Preço e Botões */
.price-section {
    margin-top: auto; /* Empurra para o fundo do card */
}

.price-value { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--primary-blue); 
    display: block;
    line-height: 1;
    margin-bottom: 10px;
}

.btn-view {
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 10px;
    width: 100%;
}

/* =========================================
   6. ELEMENTOS VISUAIS (BADGES)
   ========================================= */
.badge-condicao {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
}