/* ── Product page: the Light Grey top, and the hero ─────────
   Figma: desktop 3033:85487 (gallery 675px, then the buy box
   565px), tablet 3033:88323 (two thumbnails beside the
   photo; the buy box under), mobile 3033:86721 (photo only).
   ─────────────────────────────────────────────────────────── */

/* Hero, tabs and FAQs share one Light Grey section */
.single-product__main {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 40px var(--pad-x) var(--pad-y);
    background: var(--color-grey-light);
}

.single-product__main > * {
    width: 100%;
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.product-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 675fr) minmax(0, 565fr);
    align-items: start;
    gap: 40px;
}

/* The breadcrumb: above the title on desktop, above the photo below that */
.product-hero__crumbs--top {
    display: none;
}

/* ── Gallery ────────────────────────────────────────────────── */
.product-hero__gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-hero__photo {
    position: relative;
    aspect-ratio: 675 / 506;
    overflow: hidden;
    border-radius: 4px;
    background: var(--color-white);
}

/* One photo (no thumbnails): it runs the full height of the row, beside the
   buy box — never shorter than its usual 675:506. Below 1025px the columns
   stack, so the row is only as tall as the photo and nothing changes. */
.product-hero__gallery:not(:has(.product-hero__thumbs)) {
    align-self: stretch;
}

.product-hero__gallery:not(:has(.product-hero__thumbs)) .product-hero__photo {
    flex: 1;
}

.product-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition);
}

.product-hero__image.is-active {
    opacity: 1;
}

.product-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    translate: 0 -50%;
}

.product-hero__arrow--prev {
    left: 32px;
}

.product-hero__arrow--next {
    right: 32px;
}

/* A window four thumbnails wide; the strip inside slides round */
.product-hero__thumbs {
    --thumb-gap: 11px;
    overflow: hidden;
}

.product-hero__strip {
    display: flex;
    gap: var(--thumb-gap);
}

.product-hero__thumb {
    flex: 0 0 calc((100% - 3 * var(--thumb-gap)) / 4);
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 1.5px solid transparent;
    border-radius: 2px;
    background: none;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity var(--transition), border-color var(--transition);
}

.product-hero__thumb:hover,
.product-hero__thumb:focus-visible {
    opacity: 0.8;
}

.product-hero__thumb.is-active {
    border-color: rgb(0 0 0 / 0.6);
    opacity: 1;
}

.product-hero__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sale badge: a Mid Green disc, tilted (Figma 3033:85493) */
.product-hero__sale {
    position: absolute;
    top: 14px;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 131px;
    padding: 18px;
    border-radius: 0 8px 8px 0;
    background: var(--color-accent);
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 800;
    text-align: start;
}

.product-hero__sale[hidden] {
    display: none;
}

.product-hero__sale small {
    font-size: 20px;
    line-height: 25px;
    text-transform: capitalize;
    font-weight: 400;
}

.product-hero__sale strong {
    color: var(--color-text);
    font-size: 32px;
    line-height: 34px;
}

.product-hero__sale span {
    font-size: 22px;
    line-height: 22px;
}

/* ── Title and buy box ──────────────────────────────────────── */
.product-hero__details {
    display: flex;
    flex-direction: column;
    gap: 31px;
}

.product-hero__head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-hero__title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    line-height: 34px;
}

.product-hero__summary p {
    line-height: 20.8px;
}

/* Split load available (i) — its tooltip on hover, focus or a tap
   (Figma 3504:22161, tooltip 3511:6673) */
.product-hero__split {
    position: relative;
    align-self: flex-start;
}

.product-hero__split-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    cursor: help;
}

.product-hero__split-trigger svg {
    flex: none;
}

.product-hero__split-tip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(344px, calc(100vw - 32px));
    padding: 16px;
    border-radius: 8px;
    background: var(--color-secondary);
    box-shadow: 0 0 12px rgb(0 0 0 / 0.12);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 20px;
    opacity: 0;
    visibility: hidden;
    translate: 0 4px;
    transition: opacity 200ms ease, translate 200ms ease, visibility 0s 200ms;
}

.product-hero__split:is(:hover, :focus-within, .is-open) .product-hero__split-tip {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
    transition: opacity 200ms ease, translate 200ms ease;
}

/* ── Tablet: thumbnails beside the photo, buy box under ─────── */
@media (max-width: 1024px) {
    .single-product__main {
        padding-top: 32px;
    }

    .product-hero__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .product-hero__crumbs--top {
        display: block;
        margin-bottom: -4px;
    }

    .product-hero__crumbs--details {
        display: none;
    }

    .product-hero__gallery {
        display: grid;
        grid-template-columns: minmax(0, 468fr) minmax(0, 176fr);
    }

    .product-hero__gallery:not(:has(.product-hero__thumbs)) {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-hero__photo {
        aspect-ratio: auto;
        height: 100%;
        min-height: 351px;
    }

    /* A column two thumbnails tall, beside the photo; the strip slides up */
    .product-hero__thumbs {
        --thumb-gap: 14px;
        position: relative;
    }

    .product-hero__strip {
        position: absolute;
        inset: 0;
        flex-direction: column;
    }

    .product-hero__thumb {
        flex: none;
        width: 100%;
        height: calc((100% - var(--thumb-gap)) / 2);
        aspect-ratio: auto;
        border-radius: 4px;
        opacity: 1;
    }

    .product-hero__details {
        gap: 24px;
    }
}

/* ── Mobile: the photo only ─────────────────────────────────── */
@media (max-width: 767px) {
    .single-product__main {
        gap: 40px;
        padding-top: 24px;
    }

    .product-hero__gallery {
        display: flex;
    }

    .product-hero__photo {
        aspect-ratio: 345 / 259;
        height: auto;
        min-height: 0;
    }

    .product-hero__thumbs {
        display: none;
    }

    .product-hero__arrow--prev {
        left: 13px;
    }

    .product-hero__arrow--next {
        right: 13px;
    }

    .product-hero__sale {
        top: 8px;
        right: 8px;
        width: 92px;
        height: 92px;
    }

    .product-hero__sale strong {
        font-size: 22px;
        line-height: 24px;
    }

    .product-hero__sale span {
        font-size: 16px;
        line-height: 16px;
    }

    .product-hero__title {
        font-size: 24px;
        line-height: 30px;
    }
}
