/* ── Product carousel ───────────────────────────────────────
   Figma: desktop 1224:4585. Light Grey, running into Tools &
   Guidance; the row starts in line with the heading and runs
   off the right edge of the screen.
   ─────────────────────────────────────────────────────────── */

.product-carousel {
    padding: var(--pad-y) var(--pad-x) 40px;
    overflow-x: clip;
    background: var(--color-grey-light);
}

.product-carousel--white {
    background: var(--color-white);
}

.product-carousel__inner {
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.product-carousel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.product-carousel__arrows {
    display: flex;
    flex-shrink: 0;
    gap: 16px;
}

/* The Swiper slider's window: out to the right edge of the screen, the last
   card stopping at the page's padding. The padding shows the cards' shadows;
   pulled back on the left so the cards stay in line with the heading. */
.product-carousel__viewport {
    margin: 8px calc(50% - 50vw) -12px -12px;
    padding: 12px var(--pad-x) 12px 12px;
    overflow: hidden;
    touch-action: pan-y;
}

/* Swiper moves the row; its gap becomes Swiper's spacing (search-by-category.js). */
.product-carousel__track {
    display: flex;
    gap: 16px;
    transition-property: transform;
}

.product-carousel__track > * {
    flex: 0 0 308px;
}

/* ── Tablet ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .product-carousel {
        padding-bottom: 24px;
    }

    .product-carousel__head {
        align-items: flex-end;
    }
}

/* ── Mobile: no arrows, swipe ───────────────────────────────── */
@media (max-width: 767px) {
    .product-carousel {
        padding-bottom: 20px;
    }

    .product-carousel__arrows {
        display: none;
    }

    .product-carousel__track > * {
        flex-basis: min(308px, 80vw);
    }
}
