/* Products Page Styles */

/* Products Hero Section */
.products-hero {
    background: linear-gradient(135deg, var(--green-medium), var(--green-dark));
    color: var(--white);
    padding-top: 120px !important;
    padding-bottom: 60px !important;
    margin-top: 70px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.products-hero .title-underline {
    background: linear-gradient(90deg, var(--gold-light), var(--gold-medium));
    width: 150px;
    height: 4px;
    margin: 0 auto;
    border-radius: 2px;
}

/* Products Section */
.products-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 60vh;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--green-medium);
    color: var(--green-medium);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-btn:hover {
    background: var(--green-medium);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--green-medium), var(--green-dark));
    color: var(--white);
    border-color: var(--green-dark);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 300px;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    background: var(--white) !important;
    color: var(--green-dark) !important;
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255,255,255,0.3);
    background: var(--gold-light) !important;
    color: var(--white) !important;
}

.product-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    color: var(--green-dark);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.product-category {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(82, 190, 128, 0.1), rgba(39, 174, 96, 0.1));
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

/* Product Item Hidden State */
.product-item.hidden {
    display: none !important;
}

.product-item.show {
    display: block !important;
    animation: fadeInUp 0.5s ease;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    overflow: hidden;
}

.modal-header {
    border-bottom: none;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--green-medium), var(--green-dark));
}

.btn-close {
    background: var(--white);
    opacity: 1;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
}

.modal-body {
    padding: 20px;
    background: #f8f9fa;
}

.modal-body img {
    border-radius: 10px;
    max-height: 70vh;
    width: auto;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .filter-buttons {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .product-image-wrapper {
        height: 250px;
    }
    
    .products-hero {
        padding-top: 100px !important;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State - Only apply animation on initial load */
.product-item {
    opacity: 1;
    display: block;
}

/* Apply animation only when page loads */
.products-section .product-item {
    animation: fadeInUp 0.6s ease forwards;
}

.products-section .product-item:nth-child(1) { animation-delay: 0.1s; }
.products-section .product-item:nth-child(2) { animation-delay: 0.2s; }
.products-section .product-item:nth-child(3) { animation-delay: 0.3s; }
.products-section .product-item:nth-child(4) { animation-delay: 0.4s; }
.products-section .product-item:nth-child(5) { animation-delay: 0.5s; }
.products-section .product-item:nth-child(6) { animation-delay: 0.6s; }
.products-section .product-item:nth-child(7) { animation-delay: 0.7s; }
.products-section .product-item:nth-child(8) { animation-delay: 0.8s; }
.products-section .product-item:nth-child(9) { animation-delay: 0.9s; }
.products-section .product-item:nth-child(10) { animation-delay: 1s; }
.products-section .product-item:nth-child(11) { animation-delay: 1.1s; }
.products-section .product-item:nth-child(12) { animation-delay: 1.2s; }

/* Prevent animation on filtered items */
.product-item.hidden,
.product-item.show {
    animation: none !important;
}

