/* New products carousel (Flickity) */
.sukkah-new-products-carousel-section {
    margin: 2em 0;
}

.sukkah-new-products-carousel__heading {
    text-align: center;
    margin: 0 0 0.8em;
}

/*
 * Flex row before Flickity initializes, so cells already sit side by side
 * instead of stacking full-width for a moment first (FOUC). Scoped to
 * :not(.flickity-enabled) because once Flickity takes over it moves the
 * cells into an absolutely-positioned .flickity-slider inside a single
 * .flickity-viewport child; under a flex parent that child has no
 * normal-flow content to size itself against and collapses to zero width,
 * which combined with overflow:hidden hides the whole carousel.
 */
.sukkah-new-products-carousel:not(.flickity-enabled) {
    display: flex;
    overflow: hidden;
}

.sukkah-new-products-carousel .flickity-viewport {
    transition: height 0.2s;
}

.sukkah-new-products-carousel__cell {
    width: 15%;
    flex: 0 0 15%;
    padding: 0 12px;
    box-sizing: border-box;
}

.sukkah-new-products-carousel__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.sukkah-new-products-carousel__link:hover,
.sukkah-new-products-carousel__link:focus {
    color: inherit;
    text-decoration: none;
}

.sukkah-new-products-carousel__image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f2f2f2;
}

.sukkah-new-products-carousel__image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sukkah-new-products-carousel__title {
    margin: 0.6em 0 0.2em;
    font-size: 1em;
    line-height: 1.3;
}

.sukkah-new-products-carousel .flickity-prev-next-button {
    width: 36px;
    height: 36px;
}

@media (max-width: 991px) {
    .sukkah-new-products-carousel__cell {
        width: 25%;
        flex-basis: 25%;
    }
}

@media (max-width: 767px) {
    .sukkah-new-products-carousel__cell {
        width: 50%;
        flex-basis: 50%;
    }
}

@media (max-width: 479px) {
    .sukkah-new-products-carousel__cell {
        width: 43%;
        flex-basis: 43%;
    }
}
