/* List.ImageSliderItemsProductPromo - text-left/photo-right promo carousel
   on a white background (vs. image-slider-carousel.css's full-bleed
   background-image hero). Carousel wrapper/container/controls/indicators
   reuse the same CJCarousel JS as image-slider-carousel.css; only the
   slide content layout differs.

   DOM order is text block (date/title/details/button) then image. Desktop
   is a simple two-cell grid: text block left, image right. Mobile flattens
   the text block with display:contents so `order` can interleave the image:
   date → title → image → details → button. */

.product-promo-carousel-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.product-promo-carousel-container {
    display: flex;
    width: 100%;
    transition: transform 0.6s ease-in-out;
}

.product-promo-carousel-item {
    flex: 0 0 100%;
    width: 100%;
}

.product-promo-slide-content {
    display: grid;
    grid-template-columns: 40% 1fr;
    align-items: center;
    column-gap: 60px;
    row-gap: 0;
    max-width: var(--max-width-container);
    margin: 0 auto;
    padding: 60px 40px;
}

.product-promo-date {
    color: var(--color-near-black);
    font-family: var(--font-family-medium);
    font-size: 15px;
    margin: 0 0 12px;
}

.product-promo-title {
    color: var(--color-near-black);
    font-family: var(--font-family-bold);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
}

.product-promo-details {
    color: var(--color-near-black);
    font-family: var(--font-family-medium);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px;
}

/* Colour, typography and hover come from .btn-primary (common.css). This class
   carries grid placement only - the markup is `class="btn-primary product-promo-button"`. */
.product-promo-button {
    justify-self: start;
}

.product-promo-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-promo-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Indicators centered under the carousel, matching the reference design */
.product-promo-carousel-section .carousel-indicators {
    display: flex;
    /* 14px keeps dot centres >=24px apart so the 24x24 hit areas in common.css
       do not overlap - see .carousel-indicator there (WCAG 2.5.8). */
    gap: 14px;
    justify-content: center;
    list-style: none;
    margin: 0 auto;
    padding: 0 0 40px;
    max-width: var(--max-width-container);
}

.product-promo-carousel-section .carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background-color: var(--color-border-gray);
    padding: 0;
    cursor: pointer;
}

.product-promo-carousel-section .carousel-indicator.active {
    background-color: var(--color-dark-blue);
}

@media (max-width: 877px) {
    .product-promo-slide-content {
        grid-template-columns: 1fr;
        max-width: min(332px, calc(100% - 40px));
        margin: 0 auto;
        padding: 30px 0;
        row-gap: 20px;
        column-gap: 0;
    }

    /* Flatten the text block so its children and the image wrapper are all
       grid items of the single-column grid, then use `order` to stack
       date → title → image → details → button */
    .product-promo-text {
        display: contents;
    }

    .product-promo-date {
        order: 1;
    }

    .product-promo-title {
        order: 2;
    }

    .product-promo-image-wrapper {
        order: 3;
    }

    .product-promo-details {
        order: 4;
    }

    .product-promo-button {
        order: 5;
    }

    .product-promo-date,
    .product-promo-title,
    .product-promo-details {
        margin-bottom: 0;
    }

    .product-promo-title {
        font-size: 24px;
    }

    .product-promo-button {
        justify-self: center;
    }
}
