:root {
    /* Paleta de Cores */
    --primary-color: #007bff; /* Azul vibrante para botões principais */
    --primary-dark: #0056b3;
    --success-color: #28a745; /* Verde para "Comprar" */
    --success-dark: #1e7e34;
    --background-light: #f8f9fa; /* Fundo leve */
    --text-dark: #343a40;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
}

/* Base e Tipografia */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    margin-top: 60px; /* Espaço para o header fixo */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER --- */
.header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.btn-cart {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color var(--transition-speed);
}
.btn-cart:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.cart-count {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
}

/* --- HERO BANNER --- */
.hero {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: url('hero-background.jpg') center/cover no-repeat; /* Ajuste o caminho da imagem se tiver uma */
    margin-bottom: 30px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Escurece a imagem de fundo */
}

.hero-content {
    position: relative;
    color: white;
    z-index: 10;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.btn-cta {
    display: inline-block;
    background-color: var(--success-color);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 15px;
    font-weight: 600;
    transition: background-color var(--transition-speed);
}

.btn-cta:hover {
    background-color: var(--success-dark);
}

/* --- FILTROS --- */
.filters {
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input, .btn {
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.filters .input:first-child {
    flex-grow: 1; /* Campo de busca ocupa mais espaço */
}

.btn {
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Base: Fundo branco, texto e borda primários */
.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Hover: Inverte as cores para indicar foco */
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-dark);
}

/* Garante que o .btn-secondary também herde as propriedades base */
.btn-secondary, .btn-primary, .btn-success {
    /* Mantém as propriedades de transição, padding etc. do .btn base */
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}
.btn-success:hover {
    background-color: var(--success-dark);
}

.w-100 {
    width: 100%;
}

/* --- GRID DE PRODUTOS --- */
.products-grid {
    display: grid;
    /* Layout Responsivo: 2 colunas no celular, 3 no tablet, 4 no desktop */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 25px;
    padding-bottom: 50px;
}

/* --- CARD DE PRODUTO --- */
.product-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: transform 0.2s;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image-box {
    width: 100%;
    height: 250px; /* Altura fixa para consistência */
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Garante que a imagem inteira seja visível */
    transition: transform 0.3s;
}

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

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #e9ecef;
    font-size: 3rem;
    color: var(--gray);
}

.product-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary-color);
    background-color: #e6f0ff;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 5px;
    font-weight: 500;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 40px; /* Garante altura mínima para nomes curtos */
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a 2 linhas */
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 15px;
    margin-top: auto; /* Empurra o preço e as ações para baixo */
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* --- ESTADO SEM PRODUTOS --- */
.no-products {
    text-align: center;
    padding: 80px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin: 40px 0;
}

.no-products-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.no-products h2 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
    .hero {
        height: 250px;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .filters-row {
        flex-direction: column;
    }
    .filters .input, .filters .btn {
        width: 100%;
    }
    .filters .input:first-child {
        flex-grow: unset;
    }
    .product-actions {
        flex-direction: column;
    }
}