#rd-style-details,
#related-styles {
    scroll-margin-top: 48px;
}

#rd-style-details:has(.rs-style-media-layout) {
    display: block;
    margin-bottom: 0;
}

#rd-style-details h2 {
    margin: 0 0 16px;
}

#rd-style-details.ra-supplier-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
}
.ra-supplier-copy { max-width: 78ch; min-width: 0; }
.ra-supplier-copy p { margin: 0 0 1em; }
.ra-supplier-copy ul { margin: 0 0 1em; padding-inline-start: 1.4em; }
.ra-supplier-copy .ra-supplier-features { font-size: 16px; line-height: 1.55; font-weight: 400; }
.ra-supplier-copy li { padding-inline-start: .2em; margin-block: .45em; }
.ra-supplier-copy li::marker { color: var(--rs-teal, #175b4d); }
.ra-supplier-video { width: 100%; max-width: 400px; min-width: 0; }
.ra-supplier-video h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.ra-supplier-video p { margin: 0 0 12px; }
.ra-supplier-video .wp-video { width: 100%; max-width: 100%; overflow: hidden; border-radius: 9px; }
.ra-supplier-video video { width: 100%; height: auto; aspect-ratio: var(--ra-video-ratio, 4/5); }
.ra-supplier-video .mejs-container { max-width: 100%; }
.ra-supplier-embed { display: block; width: 100%; height: auto; aspect-ratio: 16/9; border: 0; border-radius: 9px; }
.ra-supplier-watch { display: grid; justify-items: start; gap: 8px; font-weight: 700; color: var(--rs-teal); }
.ra-supplier-watch img { width: 100%; max-height: 280px; object-fit: contain; border: 1px solid var(--rs-line); border-radius: 9px; }
@media (min-width: 820px) {
    #rd-style-details.ra-supplier-details.ra-with-video {
        grid-template-columns: minmax(0, 1fr) minmax(0, min(35%, 400px));
        align-items: start;
        gap: clamp(32px, 6vw, 96px);
    }
}
@media (min-width: 640px) and (max-width: 1119px) {
    .rs-related-group:only-child .rs-related-cards { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
}

.rs-style-copy,
.rs-style-video {
    min-width: 0;
}

.rs-style-video {
    margin-top: 28px;
}

@media (min-width: 820px) {
    #rd-style-details:has(.rs-style-media-layout) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, min(35%, 400px));
        grid-template-rows: auto 1fr;
        grid-template-areas: "heading video" "copy video";
        gap: 16px clamp(32px, 6vw, 96px);
        align-items: start;
    }
    #rd-style-details:has(.rs-style-media-layout) > div,
    #rd-style-details .rs-style-media-layout {
        display: contents;
    }
    #rd-style-details h2 {
        grid-area: heading;
        margin: 0;
    }
    .rs-style-copy {
        grid-area: copy;
        max-width: 78ch;
    }
    .rs-style-video {
        grid-area: video;
        margin: 0;
    }
}

.rs-related {
    margin: clamp(32px, 4vw, 60px) 0;
    padding-top: 30px;
    border-top: 1px solid var(--rs-line);
}

.rs-related h2 {
    margin: 0 0 24px;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.045em;
}

.rs-related-groups {
    display: grid;
    gap: 24px;
}

.rs-related-group {
    min-width: 0;
}

.rs-related-group h3 {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.3;
}

.rs-related-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rs-related-cards a {
    display: block;
    height: 100%;
    color: var(--rs-ink);
    text-decoration: none;
}

.rs-related-photo {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid var(--rs-line);
    border-radius: 8px;
}

.rs-related-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rs-related-sku {
    display: block;
    margin: 10px 0 3px;
    color: var(--rs-teal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .055em;
}

.rs-related-name {
    font-size: 16px;
    font-weight: 650;
    line-height: 1.3;
}

.rs-related-cards a:is(:hover, :focus-visible) .rs-related-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rs-related-cards a:is(:hover, :focus-visible) .rs-related-photo {
    border-color: var(--rs-teal);
}

@media (min-width: 640px) {
    .rs-related-cards {
        grid-template-columns: repeat(var(--rs-style-count), minmax(0, 205px));
    }
}

@media (min-width: 1120px) {
    .rs-related-groups {
        display: flex;
        gap: clamp(20px, 2.2vw, 34px);
    }
    .rs-related-group {
        flex: var(--rs-style-count) 1 0;
    }
    .rs-related-cards {
        grid-template-columns: repeat(var(--rs-style-count), minmax(0, 1fr));
    }
}

.rs-related-carousel { --rs-related-visible: 2; --rs-related-gap: 12px; min-width: 0; }
.rs-related-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.rs-related-header h2 { margin: 0; }
.rs-related-navigation { display: flex; align-items: center; gap: 16px; }
.rs-related-status { color: var(--rs-muted, #536660); font-size: 13px; line-height: 1.4; }
.rs-related-arrows { display: flex; gap: 8px; }
.rs-related-arrows[hidden] { display: none !important; }
.rs-related-arrows button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #9eafa7; border-radius: 50%; background: white; color: var(--rs-teal, #175b4d); font: 500 23px/1 Arial, sans-serif; cursor: pointer; }
.rs-related-arrows button:hover:not(:disabled) { background: #edf4ef; border-color: var(--rs-teal, #175b4d); }
.rs-related-arrows button:disabled { opacity: .35; cursor: default; }
.rs-related-carousel :is(button, a, [tabindex]):focus-visible { outline: 3px solid #12636c; outline-offset: -3px; }
.rs-related-carousel .rs-related-track {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--rs-related-visible) - 1) * var(--rs-related-gap)) / var(--rs-related-visible));
    align-items: stretch;
    gap: var(--rs-related-gap);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 4px 0 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #9eafa7 #f0f4ec;
}
.rs-related-track > li { min-width: 0; margin: 0; scroll-snap-align: start; }
.rs-related-carousel .rs-related-kind { display: block; margin-top: 10px; color: var(--rs-muted, #536660); font-size: 12px; line-height: 1.4; }
.rs-related-carousel .rs-related-sku { margin-top: 5px; overflow-wrap: anywhere; }
.rs-related-carousel .rs-related-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: 3.9em; }
@media (min-width: 640px) { .rs-related-carousel { --rs-related-visible: 4; --rs-related-gap: 16px; } }
@media (min-width: 1120px) { .rs-related-carousel { --rs-related-visible: 6; } }
