/* Product Listing Styles */
.products-listing {
    padding: 60px 0;
    background: #f8f9fa;
}

/* Page Header */
.products-header {
    margin-bottom: 50px;
    padding: 40px 0;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    border-radius: 12px;
    color: white;
    text-align: center;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-subtitle {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Filters */
.product-categories {
    margin-bottom: 40px;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.filter-btn {
    background: white;
    border: 2px solid #e1e8ed;
    color: #333;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Products Grid */
.products-grid {
    margin-bottom: 50px;
}

.product-item {
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.product-item.hidden {
    display: none;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(76, 175, 80, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-product {
    background: white;
    color: #4CAF50;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.view-product:hover {
    background: #f8f9fa;
    transform: scale(1.05);
    text-decoration: none;
    color: #4CAF50;
}

/* Product Info */
.product-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-category {
    color: #4CAF50;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Product Features */
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature {
    background: #f0f9ff;
    color: #4CAF50;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e8f5e8;
}

/* Call to Action */
.products-cta {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
}

.products-cta h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.products-cta p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4CAF50;
    border-color: #4CAF50;
}

.btn-primary:hover {
    background: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-title {
        font-size: 36px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .products-listing {
        padding: 40px 0;
    }
    
    .products-header {
        margin-bottom: 30px;
        padding: 30px 20px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .category-filters {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        min-width: 200px;
        min-height: 48px;
        padding: 14px 20px;
    }
    
    .view-product {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .products-cta {
        padding: 40px 20px;
    }
    
    .products-cta h3 {
        font-size: 24px;
    }
    
    .products-cta p {
        font-size: 16px;
    }
    
    /* View More Button Mobile Styles */
    .view-more-btn {
        margin: 30px auto 15px;
        padding: 14px 32px;
        font-size: 15px;
        min-width: 180px;
    }
    
    .all-products-loaded {
        margin: 20px auto;
        padding: 15px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .products-header {
        margin: 0 0 20px;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0;
    }
    
    .product-card {
        margin-bottom: 16px;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .product-item {
        margin-bottom: 20px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .products-cta {
        padding: 30px 15px;
    }
    
    .products-cta h3 {
        font-size: 20px;
    }
    
    /* View More Button Small Mobile Styles */
    .view-more-btn {
        margin: 25px auto 10px;
        padding: 12px 28px;
        font-size: 14px;
        min-width: 160px;
        border-radius: 20px;
    }
    
    .all-products-loaded {
        margin: 15px auto;
        padding: 12px;
        font-size: 14px;
    }
}

/* Animation Effects */
.product-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.product-item:nth-child(1) { animation-delay: 0.1s; }
.product-item:nth-child(2) { animation-delay: 0.2s; }
.product-item:nth-child(3) { animation-delay: 0.3s; }
.product-item:nth-child(4) { animation-delay: 0.4s; }
.product-item:nth-child(5) { animation-delay: 0.5s; }
.product-item:nth-child(6) { animation-delay: 0.6s; }
.product-item:nth-child(7) { animation-delay: 0.7s; }
.product-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Animation */
.product-item.filtering {
    transition: all 0.5s ease;
}

.product-item.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.product-item.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Loading State */
.products-grid.loading .product-item {
    opacity: 0.5;
    pointer-events: none;
}

/* Hover Effects */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

/* Focus States for Accessibility */
.filter-btn:focus,
.view-product:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* View More Button */
.view-more-btn {
    display: block;
    margin: 40px auto 20px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.view-more-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
}

.view-more-btn:active {
    transform: translateY(0);
}

.view-more-btn.loading {
    background: linear-gradient(135deg, #888, #666);
    cursor: not-allowed;
    pointer-events: none;
}

.view-more-btn.loading .fa {
    animation: spin 1s linear infinite;
}

.view-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.view-more-btn:hover::before {
    left: 100%;
}

/* All Products Loaded Message */
.all-products-loaded {
    margin: 30px auto;
    padding: 20px;
    text-align: center;
    color: #4CAF50;
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.all-products-loaded i {
    margin-right: 8px;
    font-size: 18px;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .filter-btn {
        border-color: #000;
    }
    
    .filter-btn.active {
        background: #000;
        border-color: #000;
    }
}
