/* pages/products.css */

.products {
    padding: 20px;
}

/* ---------- Hero ---------- */
.hero--products {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 82px);
    background: linear-gradient(135deg, #a8e6cf 60%, #56ab2f 30%, #2e7d32 10%);
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero__title {
    font-size: 3rem;
    font-weight: bold;
}

.hero__subtitle {
    font-size: 1.5rem;
}

.products__leaves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Leaves won’t block clicks */
    overflow: hidden;
}

.products__leaf {
    position: absolute;
    width: 40px;
    opacity: 0.7;
    animation: floatLeaf linear infinite;
}

.leaf1 {
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.leaf2 {
    left: 50%;
    animation-duration: 15s;
    animation-delay: 3s;
}

.leaf3 {
    left: 80%;
    animation-duration: 10s;
    animation-delay: 5s;
}

@keyframes floatLeaf {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-800px) rotate(360deg);
        opacity: 0;
    }
}


/* ---------- Filter ---------- */
.products__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    text-align: center;
}

.products__select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid #c8e6c9;
    font-size: 1rem;
}

/* ---------- Products Grid ---------- */
.products__container {
    max-width: 1200px;
    margin: 0 auto;
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #e8f5e9;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
}

.product-card.filtered {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(46, 125, 50, 0.25);
    border: 2px solid #4caf50;
}

/* Fade out hidden cards smoothly */
.product-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

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

.product-card__img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.product-card__title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2e7d32;
}

.product-card__price {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-card__rating {
    font-size: 1.2rem;
    color: #4caf50;
    margin-bottom: 1rem;
}

/* Optional: add hover effect on stars */
.product-card__rating:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Add to cart button */
.product-card__btn {
    background: linear-gradient(135deg, #81c784, #4caf50);
    color: #fff;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-card__btn:hover {
    transform: translateY(-2px);
}

.products__order-now {
    text-align: center;
    margin: 40px 0;
}

.order-now-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-now-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(72, 163, 84, 0.4);
}


/* Responsive */
@media screen and (max-width: 768px) {
    .products__grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1.2rem;
    }
}