/**
 * Pre-initialization fallback for the server-rendered recommendation row.
 * Until slick enhances the list (stale static cache, slow or failed JS),
 * keep the cards in one horizontally scrollable row instead of letting the
 * plain list items stack into a full-width single column.
 */
[data-athos-placement] ol.product-items:not(.slick-initialized) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    list-style: none;
    margin: 0;
    padding: 0;
}

[data-athos-placement] ol.product-items:not(.slick-initialized) > .product-item {
    flex: 0 0 25%;
    max-width: 25%;
    scroll-snap-align: start;
}

@media (max-width: 767px) {
    [data-athos-placement] ol.product-items:not(.slick-initialized) > .product-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/**
 * Match the production Style With presentation: square images and centered
 * copy. The theme scopes its centering to other hosts and .block.related
 * aligns details left, so pin both explicitly for this placement.
 */
[data-athos-placement] .product-item-photo {
    display: block;
}

.block.related[data-athos-placement] .product-item .o-imagewrap {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    padding-bottom: 100%;
    overflow: hidden;
    white-space: unset;
}

.block.related[data-athos-placement] .product-item .o-imagewrap .o-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.block.related[data-athos-placement] .product-item .o-imagewrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: none;
}

.block.related[data-athos-placement] .product-item .product-item-details {
    text-align: center;
    padding-left: 0;
}

.block.related[data-athos-placement] .product-item .product-rewards-price {
    display: flex;
    justify-content: center;
}

.block.related[data-athos-placement] .block-title {
    padding-left: 0;
    text-align: center;
}
