/* Product Grid */
.product-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

/* Product Card */
.product-card {
    padding: 15px;
    border-radius: 10px;
    background: rgba(34, 34, 34, 0.7);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    text-align: center;
    flex: 1;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Ensure card takes full height */
}

/* Product Card Hover Effect */
.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

/* Product Image */
.product-card img {
    width: 150px;
    height: auto;
    border-radius: 10px;
    border: 2px solid #ddd;
    margin-bottom: 10px;
}

/* Product Name */
.product-card h3 {
    font-size: 1.2em; /* Adjust font size for product name */
    margin-bottom: 10px; /* Space below product name */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis for long text */
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Show max 5 lines */
    -webkit-box-orient: vertical;
    min-height: 6em; /* Ensure minimum height for 5 lines */
    max-height: 6em; /* Limit to 5 lines */
    line-height: 1.2em; /* Line height for better readability */
}

/* Product Description */
.product-card p {
    font-size: 0.9em; /* Adjust font size for description */
    color: #ccc; /* Light gray color for description */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis for long text */
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Show max 5 lines */
    -webkit-box-orient: vertical;
    line-height: 1.2em; /* Line height for better readability */
    max-height: 6em; /* Limit description to 5 lines */
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #e6ffe6;
    margin: 20px 0;
}

/* Button Styles */
button {
    background: linear-gradient(90deg, #3b6b3b, #1e401e);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: auto;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Price Styles */
.product-card .product-price {
    font-size: 1em;
    color: #fff;
    margin-top: auto;
    margin-bottom: 10px;
}

/* Spinner container to cover the screen */
.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Keyframes for vertical bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Keyframes for horizontal sway/dance */
@keyframes sway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

/* Apply the animations to the image */
.animated-icon {
    animation: bounce 1s infinite, sway 1s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-grid {
        flex-direction: column;
        align-items: center;
    }

    .product-card {
        max-width: 100%;
    }

    .section-title {
        font-size: 1.2em;
    }

    button {
        padding: 8px 16px;
    }
}
