.aft-product-product-info {
    display: flex;
    flex-wrap: wrap; /* Allows blocks to wrap onto new lines if necessary */
    gap: 20px; /* Space between blocks */
    justify-content: space-between; /* Ensures blocks are evenly distributed */
}

.aft-product-block {
    display: flex;
    align-items: stretch;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    box-sizing: border-box; /* Includes padding and border in the block's width */
}

/* If the aft-product-block has a .small class, we want the blocks side by side and shorter */
.aft-product-product-info.small .aft-product-block {
    flex: 1 1 calc(50% - 20px); /* Two blocks per row with a 20px gap */
    max-width: calc(50% - 20px); /* Ensures blocks don't exceed 50% width */
}

.aft-product-product-info.small .aft-product-content {
    padding: 1rem; /* Reduce padding for smaller height */
}

.aft-product-product-info.small .aft-product-title {
    font-size: 1.5em; /* Reduce font size for smaller blocks */
    margin-bottom: 5px; /* Reduce margin to save space */
}

.aft-product-product-info.small .aft-product-description {
    font-size: 0.9em; /* Reduce font size for smaller blocks */
    margin-bottom: 10px; /* Reduce margin to save space */
}

.aft-product-product-info.small .aft-product-buttons {
    margin-top: 1rem; /* Reduce margin to save space */
}

.aft-product-product-info.small .aft-product-image-wrapper {
    flex: 0 0 150px; /* Reduce the width of the image container */
    min-width: 150px; /* Reduce minimum width for smaller blocks */
}

.aft-product-product-info.small .aft-product-image-strip {
    top: -5px; /* Adjust strip position */
    right: 2rem; /* Adjust position to fit smaller block */
    bottom: 0;
    height: 130%; /* Full height */
}

.aft-product-product-info.small .aft-product-image img {
    max-width: 100%;
    height: auto;
    padding: 0.5rem;
}

.aft-product-product-info.small .aft-product-info-wrapper {
    padding: 1rem;
}

.aft-product-info-wrapper {
    flex: 1 1 auto; /* Automatically adjust the width based on the content */
    display: flex;
    align-items: center; /* Center the content vertically */
}

.aft-product-content {
    padding: 2rem;
}

.aft-product-image-wrapper {
    flex: 0 0 250px; /* Set a fixed width to prevent wrapping */
    min-width: 300px; /* Minimum width to prevent wrapping */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: right;
    align-items: center;
}

.aft-product-image-strip {
    position: absolute;
    top: -10px;
    right: 4rem;
    bottom: 0;
    width: 4rem;
    z-index: 1;
    height: 130%; /* Full height */
    transform: rotate(5deg);
}

.aft-product-image {
    position: relative;
    z-index: 2;
    text-align: center;
}

.aft-product-image img {
    max-width: 100%;
    height: auto;
    padding: 2rem;
    margin-left: auto;
}

.aft-product-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--wp--preset--color--primary-dark);
}

.aft-product-category {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

.aft-product-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
}

.aft-product-buttons {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aft-product-country-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Container for our product if we want it to overlap the container */
.aft-product-top-overlap {
    position: absolute;
    top: -4rem;
    left: 0;
    right: 0;
    z-index: 1;
    max-width: calc(100% - 4.5rem);
}

/* Responsive design */
@media (max-width: 1024px) { /* Tablet screens */
    .aft-product-block {
        flex: 1 1 calc(100% - 20px); /* Full width on smaller screens */
        max-width: 100%; /* Ensures blocks take up full width */
    }
}

@media (max-width: 768px) { /* Mobile screens */
    .aft-product-block {
        flex-direction: column;
        align-items: center;
    }

    .aft-product-image-wrapper {
        order: -1;
        width: 100%;
        min-width: auto;
        margin-bottom: 20px;
        justify-content: center;
    }

    .aft-product-image-strip {
        top: 50px;
        right: auto;
        left: -30px;
        bottom: auto;
        width: 150%;
        height: 4rem;
        transform: rotate(-5deg);
    }

    .aft-product-content {
        text-align: center;
        padding: 1rem;
    }

    .aft-product-title {
        font-size: 1.8em; /* Adjust font size for small screens */
    }

    .aft-product-buttons .aft-button-subtle {
        flex: 1 1 calc(33.333% - 20px); /* Each button takes up 1/3 of the space with a gap */
        min-width: 100px;
        text-align: center;
    }
}

@media (max-width: 480px) { /* Very small screens */
    .aft-product-title {
        font-size: 1.5em; /* Further adjust font size for very small screens */
    }

    .aft-product-description {
        font-size: 0.9em; /* Adjust description font size for very small screens */
    }

    .aft-product-buttons .aft-button-subtle,
    .aft-product-country-links .aft-button-subtle {
        flex: 1 1 100%; /* Each button takes up the full width */
        font-size: 0.9em; /* Adjust button font size for very small screens */
        padding: 8px 16px; /* Adjust button padding for very small screens */
    }

    .aft-product-country-links .aft-button-subtle {
        text-align: center;
    }

}

@media (min-width: 1025px) {
    .aft-product-image-xl .aft-product-image-wrapper {
        min-width: 550px; /* Minimum width to prevent wrapping */
    }
    .aft-product-image-xl .aft-product-image img {
        padding-left: 0rem;
        padding-right: 1rem;
    }
}