.products-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    width: 100%;
}

.product-card {
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px; /* Set a minimum height to prevent squishing */
}

.product-card:hover {
    transform: scale(1.05);
}

.product-card img {
    width: 100%;
    height: 100%; /* Ensure the image fills the available space */
    object-fit: cover; /* Ensure the image is not distorted */
    border-radius: 15px;
    display: block;
}

.product-card h2 {
    margin-top: 15px;
    cursor: pointer;
}

.product-card p {
    margin-top: 0;
    color: #333;
}

@media screen and (max-width: 1200px) {
    .products-grid {
        width: 90%;
    }
}

@media screen and (max-width: 1000px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 500px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-card {
        min-height: 250px; /* Reduce height on smaller screens */
    }

    .product-card img {
        height: 100%; /* Keep the image's height proportional */
    }
}
