.grouped-layout {
    display: flex;
    flex-direction: column;
}

.grouped-selected-name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #464744;
}

.grouped-offer,
.grouped-offer .price-availability {
    display: flow-root;
}

@media (min-width: 992px) {
    .grouped-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "media buy"
            "media facts"
            "versions versions";
        column-gap: 24px;
        align-items: start;
    }

    .grouped-media { grid-area: media; }
    .grouped-buy { grid-area: buy; }
    .grouped-facts { grid-area: facts; }
    .grouped-versions { grid-area: versions; }
}

.grouped-offer {
    margin-bottom: 14px;
}

.grouped-versions {
    clear: both;
    margin: 12px 0 24px;
}

.grouped-filter {
    width: 100%;
    max-width: 420px;
    margin: 0 0 10px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.grouped-chooser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 2px;
}

.grouped-choice[hidden] {
    display: none !important;
}

.grouped-choice {
    width: auto;
    padding: 6px;
    border: 1px solid #ddd;
    background: #fff;
    color: #464744;
    text-align: center;
    cursor: pointer;
}

.grouped-choice img {
    width: 100%;
    height: 56px;
    object-fit: contain;
    display: block;
    margin-bottom: 4px;
}

.grouped-choice span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-height: 2.6em;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.grouped-choice.is-selected {
    border-color: #65c178;
    box-shadow: inset 0 0 0 1px #65c178;
}

.grouped-gallery[hidden],
.grouped-detail[hidden],
.grouped-copy[hidden],
.grouped-offer[hidden] {
    display: none !important;
}

.grouped-gallery .picture {
    background: #fff;
    text-align: center;
}

.grouped-gallery .picture img {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
}

.grouped-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.grouped-thumb {
    width: 72px;
    height: 72px;
    padding: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.grouped-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.grouped-thumb.is-selected {
    border-color: #65c178;
}

.grouped-versions-label {
    margin: 4px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #464744;
}

.grouped-scroller {
    position: relative;
}

.grouped-scroll {
    display: none;
}

.grouped-scroll[hidden] {
    display: none !important;
}

@media (max-width: 991px) {
    .grouped-gallery .picture img {
        max-height: 240px;
    }

    .grouped-scroll {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        bottom: 14px;
        width: 28px;
        z-index: 2;
        border: 1px solid #c8c8c8;
        padding: 0;
        color: #222;
        background: rgba(220, 220, 220, 0.96);
        cursor: pointer;
    }

    .grouped-scroll::before {
        content: "";
        width: 16px;
        height: 16px;
        border-top: 3px solid currentColor;
        border-right: 3px solid currentColor;
    }

    .grouped-scroll-prev {
        left: 0;
        border-left: 0;
    }

    .grouped-scroll-prev::before {
        transform: rotate(-135deg);
        margin-left: 6px;
    }

    .grouped-scroll-next {
        right: 0;
        border-right: 0;
    }

    .grouped-scroll-next::before {
        transform: rotate(45deg);
        margin-right: 6px;
    }

    .grouped-chooser {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 96px;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 8px;
    }
}
