/* Products Page Styles */

/* Hero Section */
.products-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1552346154-21d32810aba3?q=80&w=1470&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
}

.products-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.products-hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    background-color: #f5f5f5;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    margin: 10px 0;
}

.filter-group label {
    margin-right: 10px;
    font-weight: 500;
}

.filter-group select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
}

/* Products Section */
.products-section {
    padding: 60px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
}

.product-details {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.product-card:hover .product-title {
    color: var(--primary-color);
}

.product-category {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-rating {
    color: #ffc107;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    justify-content: center;
}

/* Removed view-details button as entire card is now clickable */

.add-to-cart-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 2; /* Ensure button is above the card for proper click handling */
    font-weight: 500;
}

.add-to-cart-btn:hover {
    background-color: #ff5252;
}

.no-products {
    text-align: center;
    padding: 50px 0;
}

.no-products h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.no-products p {
    color: var(--gray-color);
}

/* Responsive Styles */
@media screen and (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        margin-bottom: 15px;
    }

    .filter-group select {
        width: 100%;
    }
}
