/* ================================
   Product Gallery
================================ */

.vdb-rc-product-gallery {
    width: 100%;
}

.vdb-rc-product-gallery__grid {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    max-width: 728px;
}

.vdb-rc-product-gallery__cell {
    position: relative;
    aspect-ratio: 1;
    max-width: 356px;
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-surface-muted);
    cursor: zoom-in;
    transition: max-width 450ms ease, grid-column 450ms ease;
}

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--large {
    grid-column: span 2;
    max-width: 728px;
    width: 100%;
    cursor: zoom-out;
}

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--large.vdb-rc-product-gallery__cell--3d,
.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--large.vdb-rc-product-gallery__cell--360 {
    cursor: grab;
}

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--3d,
.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--360 {
    cursor: grab;
}

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--3d.is-dragging,
.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--360.is-dragging {
    cursor: grabbing;
}

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--3d:not(.vdb-rc-product-gallery__cell--large),
.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__cell--360:not(.vdb-rc-product-gallery__cell--large) {
    cursor: grab;
}

.vdb-rc-product-gallery__cell::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.02);
    pointer-events: none;
}

.vdb-rc-product-gallery__cell-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vdb-rc-product-gallery__expand {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
}

.vdb-rc-product-gallery__expand-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 4px;
    transition: opacity var(--rc-transition-fast);
}

.vdb-rc-product-gallery__expand-icon[data-expand-icon="collapse"] {
    opacity: 0;
}

.vdb-rc-product-gallery__cell--large .vdb-rc-product-gallery__expand-icon[data-expand-icon="expand"] {
    opacity: 0;
}

.vdb-rc-product-gallery__cell--large .vdb-rc-product-gallery__expand-icon[data-expand-icon="collapse"] {
    opacity: 1;
}

.vdb-rc-product-gallery__playback {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.vdb-rc-product-gallery__cell--clip:hover .vdb-rc-product-gallery__playback,
.vdb-rc-product-gallery__cell--clip.is-playback-paused .vdb-rc-product-gallery__playback {
    opacity: 1;
    pointer-events: auto;
}

.vdb-rc-product-gallery__playback-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* .vdb-rc-product-gallery__hand-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23555' d='M9 11V5.5A1.5 1.5 0 0 1 10.5 4h0A1.5 1.5 0 0 1 12 5.5V11h1V7.5A1.5 1.5 0 0 1 14.5 6h0A1.5 1.5 0 0 1 16 7.5V11h1V8.5A1.5 1.5 0 0 1 18.5 7h0A1.5 1.5 0 0 1 20 8.5V14a5 5 0 0 1-5 5H9a4 4 0 0 1-4-4v-4h1Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.vdb-rc-product-gallery__hand-hint.is-visible {
    opacity: 1;
    transform: scale(1);
} */

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__badge {
    pointer-events: none;
    cursor: default;
}

@media (prefers-reduced-motion: reduce) {

    .vdb-rc-product-gallery__cell,
    .vdb-rc-product-gallery__expand-icon,
    .vdb-rc-product-gallery__hand-hint {
        transition: none;
    }
}

.vdb-rc-product-gallery__badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 32px;
    cursor: pointer;
}

.vdb-rc-product-gallery__badge img {
    display: block;
    height: 32px;
    width: auto;
}

/* The badge whose media is already showing must not be clickable again. */
.vdb-rc-product-gallery__badge.vdb-rb-3d-active,
.vdb-rc-product-gallery__badge.vdb-rb-360-active {
    pointer-events: none;
    cursor: default;
}

.vdb-rc-product-gallery__badge--3d {
    padding: 6px;
    border-radius: 50%;
}

.vdb-rc-product-gallery__badge--3d img {
    height: 32px;
    width: 32px;
}

.vdb-rc-product-gallery__badge--right {
    left: auto;
    right: 15px;
}

#vdbrb_ring_main_slider .vdb-rc-product-gallery__badge.is-badge-hidden {
    display: none !important;
}

.vdb-rc-product-gallery__cell video,
.vdb-rc-product-gallery__cell iframe,
.vdb-rc-product-gallery__cell canvas {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.vdb-rc-product-gallery__rich-media {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.vdb-rc-product-gallery__rich-media.is-ready {
    opacity: 1;
}

.vdb-rc-product-gallery__cell:has(.vdb-rc-product-gallery__rich-media.is-ready) .vdb-rc-product-gallery__cell-image,
.vdb-rc-product-gallery__main-wrap:has(.vdb-rc-product-gallery__rich-media.is-ready) [data-gallery-main] {
    opacity: 0;
}

.vdb-rc-product-gallery__main-wrap .vdb-rc-product-gallery__rich-media {
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .vdb-rc-product-gallery__rich-media {
        transition: none;
    }
}

@media (min-width: 768px) {
    .vdb-rc-product-gallery__cell video {
        min-height: 354px;
    }
}

.vdb-rc-product-gallery__video {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
}

.vdb-rc-product-gallery__video video,
.vdb-rc-product-gallery__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.vdb-rc-product-gallery__main-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vdb-rc-product-gallery__desktop {
    display: none;
}

.vdb-rc-stone-pdp__gallery .vdb-rc-product-gallery__desktop.vdb-sticky-web {
    position: sticky;
    top: var(--header-height);
    z-index: 1;
}

.vdb-rc-product-gallery__mobile {
    display: none;
}

.vdb-rc-product-gallery__viewer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.vdb-rc-product-gallery__main-wrap {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-surface-muted);
}

.vdb-rc-product-gallery__main-wrap[data-media-viewer-open] {
    cursor: pointer;
}

.vdb-rc-product-gallery__main-wrap canvas#webgl_vdb_canvas {
    width: 100%;
    height: 100%;
}

.vdb-rc-product-gallery__main {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vdb-rc-product-gallery__thumbs {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    overflow-x: auto;
    background-color: var(--color-white);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    transition: all ease-in-out 0.3s;
}

.vdb-rc-product-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.vdb-rc-product-gallery__thumb {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: none;
    cursor: pointer;
}

.vdb-rc-product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vdb-rc-product-gallery__thumb--active {
    border-color: var(--color-primary);
}

.vdb-rc-product-gallery__thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.16);
    pointer-events: none;
}

.vdb-rc-product-gallery__thumb-overlay img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.vdb-rc-product-gallery__thumb--certificate {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
}

.vdb-rc-product-gallery__thumb--certificate img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}


/* ================================
   Grid Modifier (Setting PDP)
================================ */

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__grid {
    display: grid;
}

.vdb-rc-product-gallery--grid .vdb-rc-product-gallery__grid:has(> figure:only-child) {
    grid-template-columns: 1fr;
}

@media (min-width: 991px) {
    .vdb-rc-product-gallery--grid .vdb-rc-product-gallery__grid:has(> figure:only-child) .vdb-rc-product-gallery__cell {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* ================================
   Thumbnail Modifier (Stone PDP)
================================ */

.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__desktop {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
}

.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__thumb-rail {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    flex-shrink: 0;
}

.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__thumb-rail .vdb-rc-product-gallery__thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
}

.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__desktop .vdb-rc-product-gallery__viewer {
    width: calc(100% - 80px - var(--space-lg));
    max-width: 100%;
    flex: 1;
    min-width: 0;
}

.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__desktop .vdb-rc-product-gallery__main-wrap {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__desktop .vdb-rc-product-gallery__main-wrap .vdb-rb-slider-banner-image,
.vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__desktop .vdb-rc-product-gallery__main-wrap .vdb-rb-slider-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vdb-rc-product-gallery__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: var(--space-lg);
    display: none;
}

.vdb-rc-product-gallery__nav.is-hidden {
    display: none;
}

.vdb-rc-product-gallery__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f6f6f6;
    color: #555555;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vdb-rc-product-gallery__nav-btn:hover {
    background: #eeeeee;
}


/* ================================
   Responsive
================================ */

@media (min-width: 991px) {

    .vdb-rc-product-gallery--grid .vdb-rc-product-gallery__mobile,
    .vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__mobile {
        display: none;
    }

}


@media screen and (min-width: 1199px) {
    .vdb-rc-product-gallery__main-wrap {
        max-width: 100%;
    }
}


@media (max-width: 991px) {

    .vdb-rc-product-gallery--grid .vdb-rc-product-gallery__grid {
        display: none;
    }

    .vdb-rc-product-gallery__mobile {
        display: block;
        background-color: var(--color-white);
    }

    .vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__desktop {
        display: none;
    }

    #vdbrb_ring_thumbnail_slider .vdb-rc-product-gallery__thumb.is-mobile-thumb-hidden {
        display: none;
    }
    
    .mobile-sticky #vdbrb_ring_thumbnail_slider {
        opacity: 0;
        visibility: hidden;
        height: auto;
    }

    .vdb-rc-product-gallery__main-wrap {
        border-radius: 0;
        width: 100%;
        max-width: 360px;
        max-height: 360px;
        margin: 0 auto;
    }

    .vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__viewer {
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
    }

    .vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__main-wrap {
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .vdb-rc-product-gallery--thumbnail .vdb-rc-product-gallery__nav {
        margin-top: var(--space-md);
        margin-bottom: var(--space-sm);
    }

}

@media screen and (max-width: 767px) {
    .vdb-rc-product-gallery__main-wrap {
        max-width: 100%;
    }
}

.vdb-rc-product-gallery__main-wrap iframe {
    width: 100% !important;
    height: 100% !important;
}

.vdb-rc-product-gallery__main-wrap .vdb-rb-slider-banner-image {
    width: 100%;
    height: 100%;
}