/* Make slide the same height */
.swiper-slide {
     height: auto;
}

/* Prevent slides from going 100% wide during BB editor re-initialization.
   When Swiper destroys and re-initializes, slides briefly lose their computed widths.
   These rules provide fallback constraints until Swiper applies its inline styles. */
.fm-cards-stacked-container .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
}

.fm-cards-stacked-container .swiper-slide {
    flex-shrink: 0;
    /* Fallback: constrain to ~3 per view until Swiper inits */
    max-width: 33.3334%;
    min-width: 0;
}

/* Release constraint once Swiper takes over */
.fm-cards-stacked-container .swiper-container.swiper-initialized .swiper-slide {
    max-width: none;
}

/* Clip overflow during initialization only — post-init, per-instance CSS controls overflow */
.fm-cards-stacked-container .swiper-container:not(.swiper-initialized) {
    overflow: hidden;
}

/* In BB editor, ensure container clips overflow during reinit */
.fl-builder-edit .fm-cards-stacked-container .swiper-container:not(.swiper-initialized) {
    overflow: hidden;
}