/* Style for ACF Products Shortcode */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Space between items */
    align-items: stretch; /* Ensure items align properly */
}

.product-item {
    flex-basis: calc(33.333% - 20px); /* Set each item to take up 1/3 of the space minus the gap */
    border: 1px solid #ddd;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 20px; /* Ensure consistent space at the bottom of each item */
}

.product-image {
    height: 253px;
    overflow: hidden;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image is cropped to fit the box */
    border-radius: 5px;
}

.product-title {
    margin-top: 10px;
    font-size: 20px;
    font-weight: normal;
    text-align: center;
    color: #333;
    line-height: 29px;
}

.product-item a {
    text-decoration: none;
    color: inherit;
}

.product-item a:hover .product-title {
    color: #0073e6;
}


/* Mobile View: Full-width items */
@media (max-width: 767px) {
    .product-item {
        flex-basis: 100%; /* Make items take full width */
        margin-bottom: 10px; /* Adjust space between items on mobile */
    }

    .product-image {
        height: 250px; /* Allow image to adjust for mobile view */
    }
}