/* ==========================================================================
   RentOS — Product
   --------------------------------------------------------------------------
   Desktop 123:6760 · mobile 123:9957.

   Section background is a full-bleed #edefec band, not a container-width box:
   desktop 123:6219 is 1920x1080 starting 122px ABOVE the section, mobile
   123:7565 is 390x920 starting 89px above it. Reproduced as padding on the
   section itself rather than an absolutely-positioned rectangle, so it grows
   with the content instead of being a fixed 1080px slab.
   ========================================================================== */

.product {
    background-color: #edefec;
    /* Figma: bg starts 89px above the section content on mobile */
    padding: 89px 0 0;
}

.product__inner {
    width: 100%;
    padding: 0 15px;                    /* content at left 15 @ 123:7627 */
    margin: 0 auto;
}

/* ------------------------------------------------------------------ Mobile */
.product__title {
    max-width: 352px;                   /* @ 123:7627 */
    font-size: 38px;
    line-height: 44px;
    font-weight: var(--fw-semibold);
    color: var(--brand-dark-green);
}

.product__lead {
    max-width: 349px;                   /* @ 123:7635 */
    margin-top: 11px;                   /* title box 138, lead top 149 */
    font-size: 18px;
    line-height: 28px;
    color: #787878;
}

/* Desktop-only CTA — the mobile frame has no Schedule a Demo here */
.product__cta {
    display: none;
}

.product__cards {
    margin-top: 60px;                   /* lead bottom ~280 -> track 340 */
    padding-bottom: 89px;
}

.product-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 353.738 / 314.434;    /* @ 123:8059 */
    object-fit: cover;
    border-radius: 15.722px;
}

.product-card__title {
    margin-top: 25px;                   /* image bottom 314 -> title 353.74 */
    font-family: var(--font-screen-title);
    font-weight: var(--fw-medium);
    font-size: 20.438px;                /* @ 123:8053 */
    line-height: 1.2;
    color: var(--brand-dark-green);
}

.product-card__body {
    margin-top: 5px;                    /* title 353.74 -> body 382.82 */
    font-size: 15.722px;                /* @ 123:8054 */
    line-height: 23.583px;
    color: #787878;
}

/* Swiper — only active below 992. Slides sit at x 15 / 409.11 / 804.23 and
   are ~354 wide, i.e. a 40px gap with the next one peeking past the right
   edge (123:8052 / 123:8048; Figma sets overflow-x:auto on the track).

   The track is pulled full-bleed and clipped: leaving it overflow:visible let
   the off-screen slides scroll the whole PAGE sideways. The 15px start inset
   is restored by Swiper's slidesOffsetBefore instead of padding, which would
   shift the slide origin. */
.product__cards {
    margin-right: -15px;
    margin-left: -15px;
    overflow: hidden;
}

.product__cards .swiper-slide {
    /* 390 - 36 = 354, so this is exact at the Figma width and only shrinks on
       narrower phones rather than overflowing them. */
    width: min(354px, calc(100vw - 36px));
    height: auto;
}

/* ----------------------------------------------------------------- Desktop */
@media screen and (min-width: 992px) {
    .product {
        padding-top: 122px;             /* bg starts 122 above @ 123:6219 */
    }

    .product__inner {
        width: min(var(--content-width), calc(100% - 80px));
        padding: 0;
    }

    .product__head {
        position: relative;
        min-height: 247px;              /* Content box @ 123:9946 */
    }

    .product__title {
        max-width: 900px;               /* @ 123:6761 */
        font-size: 68px;
        line-height: 76px;
    }

    .product__lead {
        max-width: 787px;               /* @ 123:6762 */
        margin-top: 30px;               /* title 149 -> lead 179 */
        font-size: 24px;
        line-height: 34px;
    }

    /* Right-aligned, top-aligned with the heading @ 123:9946 DemoCta */
    .product__cta {
        display: inline-flex;
        position: absolute;
        right: 0;
        top: 0;
    }

    /* Static 3-up. Swiper is not initialised at this width, so the wrapper is
       just a grid; swiper-wrapper's own flex rules are overridden here. */
    .product__cards {
        margin: 42px 0 0;               /* head 247 -> cards 289 */
        padding-bottom: 122px;
        overflow: visible;
    }

    .product__track {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 45px;                      /* 495 - 450 @ 123:6763 */
        transform: none !important;     /* neutralise any Swiper transform */
    }

    .product__cards .swiper-slide {
        width: auto;
        max-width: none;
    }

    .product-card__image {
        aspect-ratio: 450 / 400;        /* @ 123:6775 */
        border-radius: 20px;
    }

    .product-card__title {
        margin-top: 50px;               /* image 400 -> title 450 */
        font-size: 26px;                /* @ 123:6773 */
        line-height: 1;
    }

    .product-card__body {
        margin-top: 11px;               /* title 450 (+26) -> body 487 */
        font-size: 20px;                /* @ 123:6774 */
        line-height: 30px;
    }
}
