.ripg .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ripg {
    width: 100%;
}

.ripg__stage {
    margin: 0 0 12px;
}

.ripg__viewport {
    position: relative;
    width: 100%;
    overflow: visible;
}

.ripg__image-box {
    position: relative;
    display: block;
    width: 100%;
    overflow: visible;
}

.ripg__image-clip {
    box-sizing: border-box;
    width: 100%;
    padding: var(--ripg-main-padding);
    overflow: hidden;
    border: var(--ripg-main-border-width) var(--ripg-main-border-style) var(--ripg-main-border-color);
    border-radius: var(--ripg-main-radius);
    background: var(--ripg-main-background);
    box-shadow: var(--ripg-main-shadow-value, none);
}
.ripg-wrap[style*="--ripg-main-shadow:small"] { --ripg-main-shadow-value: 0 1px 3px rgb(0 0 0 / .18); }
.ripg-wrap[style*="--ripg-main-shadow:medium"] { --ripg-main-shadow-value: 0 4px 14px rgb(0 0 0 / .22); }
.ripg-wrap[style*="--ripg-main-shadow:large"] { --ripg-main-shadow-value: 0 10px 30px rgb(0 0 0 / .28); }

.ripg__product-labels {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: visible;
    pointer-events: none;
}

.ripg__product-labels a,
.ripg__product-labels button {
    pointer-events: auto;
}

.ripg__main {
    display: block;
    width: 100%;
    aspect-ratio: var(--ripg-ratio);
    object-fit: var(--ripg-fit);
    transform: scale(1);
    transform-origin: 50% 50%;
    transition: transform .2s ease, opacity .14s ease;
}

.ripg.is-zooming .ripg__main {
    transform: scale(var(--ripg-zoom));
}

.ripg__main.ripg-is-fading {
    opacity: .35;
}

.ripg__caption,
.ripg__lightbox-caption {
    margin-top: 8px;
    text-align: center;
}

.ripg__caption:empty,
.ripg__lightbox-caption:empty {
    display: none;
}

.ripg__side-rail {
    min-width: 0;
}

.ripg__thumbs {
    display: grid;
    grid-template-columns: repeat(var(--ripg-desktop), minmax(0, 1fr));
    gap: var(--ripg-gap);
    scroll-behavior: smooth;
}

.ripg__thumb {
    box-sizing: border-box;
    min-width: 0;
    padding: var(--ripg-thumb-padding);
    overflow: hidden;
    background: var(--ripg-thumb-background);
    cursor: pointer;
    border: var(--ripg-border-width) var(--ripg-border-style) var(--ripg-border-color);
    border-radius: var(--ripg-thumb-radius);
    scroll-margin: 16px;
}

.ripg__thumb:hover { border-color: var(--ripg-thumb-hover-color); opacity: var(--ripg-thumb-hover-opacity); }
.ripg__thumb[aria-selected="true"] { border-width: var(--ripg-active-border-width); border-color: var(--ripg-active-color); opacity: 1; }

.ripg__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--ripg-ratio);
    object-fit: var(--ripg-fit);
}

.ripg__zoom-button,
.ripg__main-prev,
.ripg__main-next,
.ripg__prev,
.ripg__next,
.ripg__close {
    position: absolute;
    z-index: 4;
    border: 0;
    background: #000a;
    color: #fff;
    cursor: pointer;
}

.ripg__zoom-button {
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    padding: 8px;
    border-radius: 4px;
}

.ripg__expand-icon {
    display: block;
    width: 22px;
    height: 22px;
    color: inherit;
}

.ripg__main-prev,
.ripg__main-next {
    top: 50%;
    padding: 8px 12px;
    font-size: 32px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .18s ease;
}

.ripg__main-prev { left: 8px; }
.ripg__main-next { right: 8px; }

.ripg__viewport:hover .ripg__main-prev,
.ripg__viewport:hover .ripg__main-next,
.ripg__viewport:focus-within .ripg__main-prev,
.ripg__viewport:focus-within .ripg__main-next {
    opacity: 1;
    pointer-events: auto;
}

.ripg__rail-up,
.ripg__rail-down {
    display: none;
}

.ripg__lightbox {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 44px 56px 32px;
    overflow: hidden;
    border: 0;
    background: rgba(0, 0, 0, var(--ripg-lightbox-opacity));
    color: #fff;
    touch-action: none;
    overscroll-behavior: contain;
}

.ripg__lightbox::backdrop {
    background: transparent;
}

.ripg__lightbox figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}

.ripg__lightbox-image-wrap {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    cursor: default;
    touch-action: none;
}

.ripg__lightbox-image-wrap.ripg-can-pan { cursor: grab; }
.ripg__lightbox-image-wrap.ripg-is-panning { cursor: grabbing; }

.ripg__lightbox-image {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    flex: none;
    width: var(--ripg-fitted-width, auto);
    height: var(--ripg-fitted-height, auto);
    max-width: none;
    max-height: none;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    transform: translate(-50%, -50%) translate3d(var(--ripg-pan-x, 0), var(--ripg-pan-y, 0), 0) scale(var(--ripg-lightbox-scale, 1));
    transform-origin: center;
    will-change: transform;
}

.ripg__lightbox-zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.ripg__lightbox-zoom-controls button {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid currentColor;
    background: #000a;
    color: #fff;
    cursor: pointer;
}

.ripg__zoom-reset {
    min-width: 64px !important;
}

.ripg__prev,
.ripg__next {
    top: 50%;
    padding: 8px 12px;
    font-size: 32px;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .18s ease;
}

.ripg__prev { left: 8px; }
.ripg__next { right: 8px; }

.ripg__lightbox:hover .ripg__prev,
.ripg__lightbox:hover .ripg__next,
.ripg__lightbox:focus-within .ripg__prev,
.ripg__lightbox:focus-within .ripg__next {
    opacity: 1;
}

.ripg__close {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 30px;
}

.ripg__close:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.ripg button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.ripg button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Layouts */
.ripg-wrap.ripg-layout-above .ripg {
    display: flex;
    flex-direction: column;
}

.ripg-wrap.ripg-layout-above .ripg__side-rail {
    order: -1;
    margin-bottom: var(--ripg-gap);
}

.ripg-wrap.ripg-layout-none .ripg__side-rail {
    display: none;
}

@media (min-width: 701px) {
    .ripg-wrap.ripg-layout-left .ripg,
    .ripg-wrap.ripg-layout-right .ripg {
        display: grid;
        align-items: start;
        gap: var(--ripg-gap);
    }

    .ripg-wrap.ripg-layout-left .ripg {
        grid-template-columns: var(--ripg-side-width) minmax(0, 1fr);
    }

    .ripg-wrap.ripg-layout-right .ripg {
        grid-template-columns: minmax(0, 1fr) var(--ripg-side-width);
    }

    .ripg-wrap.ripg-layout-left .ripg__stage {
        grid-column: 2;
        grid-row: 1;
    }

    .ripg-wrap.ripg-layout-left .ripg__side-rail {
        grid-column: 1;
        grid-row: 1;
    }

    .ripg-wrap.ripg-layout-right .ripg__stage {
        grid-column: 1;
        grid-row: 1;
    }

    .ripg-wrap.ripg-layout-right .ripg__side-rail {
        grid-column: 2;
        grid-row: 1;
    }

    .ripg-wrap.ripg-layout-left .ripg__side-rail,
    .ripg-wrap.ripg-layout-right .ripg__side-rail {
        position: relative;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        box-sizing: border-box;
        min-height: 0;
        overflow: hidden;
    }

    .ripg-wrap.ripg-layout-left .ripg__thumbs,
    .ripg-wrap.ripg-layout-right .ripg__thumbs {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: var(--ripg-gap);
        min-width: 0;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .ripg-wrap.ripg-layout-left .ripg__thumb,
    .ripg-wrap.ripg-layout-right .ripg__thumb {
        display: block;
        flex: 0 0 auto;
        width: 100%;
    }

    .ripg-wrap.ripg-layout-left .ripg__rail-up,
    .ripg-wrap.ripg-layout-left .ripg__rail-down,
    .ripg-wrap.ripg-layout-right .ripg__rail-up,
    .ripg-wrap.ripg-layout-right .ripg__rail-down {
        display: block;
        min-height: 36px;
        border: 0;
        background: #000a;
        color: #fff;
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
    }
}

/* Editor preview */
.ripg-editor__preview {
    padding: 16px;
    border: 1px solid #dcdcde;
    background: #fff;
}

.ripg-editor__stage {
    position: relative;
    overflow: hidden;
    background: #f0f0f1;
}

.ripg-editor__image {
    display: grid;
    place-items: center;
    min-height: 300px;
    color: #646970;
    font-size: 14px;
}

.ripg-editor__zoom {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 7px 10px;
    border-radius: 4px;
    background: #1e1e1e;
    color: #fff;
}

.ripg-editor__arrow {
    position: absolute;
    top: 50%;
    padding: 5px 9px;
    background: #1e1e1ecc;
    color: #fff;
    font-size: 29px;
    transform: translateY(-50%);
}

.ripg-editor__arrow--prev { left: 8px; }
.ripg-editor__arrow--next { right: 8px; }
.ripg-editor__grid { display: grid; margin-top: 12px; }
.ripg-editor__thumb { min-width: 0; }
.ripg-editor__thumb-inner { display: grid; place-items: center; aspect-ratio: 1; border: 2px solid transparent; background: #e0e0e0; color: #646970; }
.ripg-editor__thumb:first-child .ripg-editor__thumb-inner { border-color: #1e1e1e; }
.ripg-editor__details { margin-top: 10px; color: #646970; font-size: 12px; }
.ripg-editor-layout-above { display: flex; flex-direction: column; }
.ripg-editor-layout-above .ripg-editor__grid { order: -1; margin: 0 0 12px; }
.ripg-editor-layout-left,
.ripg-editor-layout-right { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.ripg-editor-layout-right { grid-template-columns: minmax(0, 1fr) 120px; }
.ripg-editor-layout-left .ripg-editor__stage { grid-column: 2; }
.ripg-editor-layout-left .ripg-editor__grid { grid-column: 1; grid-row: 1; grid-template-columns: 1fr !important; margin: 0; }
.ripg-editor-layout-right .ripg-editor__stage { grid-column: 1; }
.ripg-editor-layout-right .ripg-editor__grid { grid-column: 2; grid-row: 1; grid-template-columns: 1fr !important; margin: 0; }
.ripg-editor-layout-none .ripg-editor__grid { display: none; }

@media (max-width: 900px) {
    .ripg__thumbs { grid-template-columns: repeat(var(--ripg-tablet), minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .ripg-wrap.ripg-layout-left .ripg,
    .ripg-wrap.ripg-layout-right .ripg {
        display: block;
    }

    .ripg-wrap.ripg-layout-left .ripg__side-rail,
    .ripg-wrap.ripg-layout-right .ripg__side-rail {
        display: block;
        height: auto !important;
    }

    .ripg-wrap.ripg-layout-left .ripg__thumbs,
    .ripg-wrap.ripg-layout-right .ripg__thumbs {
        display: grid;
        grid-template-columns: repeat(var(--ripg-mobile), minmax(0, 1fr));
        max-height: none;
        overflow: visible;
    }

    .ripg__rail-up,
    .ripg__rail-down {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .ripg__thumbs {
        grid-template-columns: repeat(var(--ripg-mobile), minmax(0, 1fr));
    }

    .ripg.is-zooming .ripg__main { transform: none; }
    .ripg__main-prev,
    .ripg__main-next,
    .ripg__prev,
    .ripg__next { opacity: 1; pointer-events: auto; }
}

@media (prefers-reduced-motion: no-preference) {
    .ripg__lightbox-image { transition: transform .08s linear; }
    .ripg__lightbox-image-wrap.ripg-is-panning .ripg__lightbox-image { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ripg__main,
    .ripg__main-prev,
    .ripg__main-next,
    .ripg__lightbox-image { transition: none !important; }
    .ripg__thumbs { scroll-behavior: auto; }
}
