/**
 * Estilos para a página de produtos
 * DM Refrigeração & Climatização
 */

/* Seção principal de produtos */
.products-main-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.products-header {
    text-align: center;
    margin-bottom: 60px;
}

.products-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
}

.products-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}

.products-header p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Filtros de categoria */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0 20px;
}

.category-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.category-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #2980b9;
    color: #fff;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.category-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Grade de produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-card img::before {
    content: '📦';
    font-size: 3rem;
    color: #6c757d;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 20px 10px;
    line-height: 1.4;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
    margin: 0 20px 20px;
}

.product-card .btn {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    display: none;
}

.loading.show {
    display: block;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #3498db;
}

.loading span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 768px) {
    .products-main-section {
        padding: 100px 0 60px;
    }
    
    .products-header h1 {
        font-size: 2.2rem;
    }
    
    .products-header p {
        font-size: 1.1rem;
    }
    
    .category-filters {
        gap: 10px;
        margin-bottom: 40px;
    }
    
    .category-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .product-card h3 {
        font-size: 1rem;
        height: 50px;
        -webkit-line-clamp: 2;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .products-header h1 {
        font-size: 1.8rem;
    }
    
    .category-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 200px;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
}

.product-card:nth-child(2n) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3n) {
    animation-delay: 0.2s;
}

.product-card:nth-child(4n) {
    animation-delay: 0.3s;
}

