.pdp-carousel-block {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

/* Layout Modifications */
.pdp-carousel-layout-thumb-right {
    flex-direction: row-reverse;
}

.pdp-carousel-block.pdp-carousel-layout-thumb-bottom {
    flex-direction: column-reverse;
}

.main-swiper {
    width: 100%;
    aspect-ratio: 1/1;
    margin: 0;
    overflow: hidden;
}

/* Small Viewport */
@media screen and (max-width: 768px) {
    .pdp-carousel-layout-thumb-left,
    .pdp-carousel-layout-thumb-right {
        flex-direction: column-reverse;
    }
}

/* Slides */
/* Slider Thumbnails */
.swiper-thumbs {
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    overflow: hidden;
}

.swiper-thumbs .swiper-slide {
    border: 2px solid rgba(0, 0, 0, 0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--thumbRadii);
    aspect-ratio: 1/1;
    overflow: hidden;
    width: 95.5px;
    height: 96px;
}

.swiper-thumbs .swiper-slide:last-child {
    margin-right: 0;
}

.pdp-carousel-block .main-swiper .swiper-slide img {
    width: 100%;
}

/* Layout */
.pdp-carousel-layout-thumb-left .swiper-thumbs,
.pdp-carousel-layout-thumb-right .swiper-thumbs {
    width: 100%;
    max-width: 100px;
    overflow: hidden;
}

.pdp-carousel-layout-thumb-left .swiper-thumbs .swiper-slide,
.pdp-carousel-layout-thumb-right .swiper-thumbs .swiper-slide {
    margin-bottom: 10px;
    margin-right: 0;
}

.pdp-carousel-layout-thumb-left .swiper-thumbs .swiper-slide:last-child,
.pdp-carousel-layout-thumb-right .swiper-thumbs .swiper-slide:last-child {
    margin-bottom: 0;
}

.pdp-carousel-layout-thumb-bottom .swiper-thumbs {
    margin: 0;
}

.pdp-carousel-layout-thumb-bottom .swiper-thumbs .swiper-slide {
    margin-right: 10px;
    margin-bottom: 0;
}

.pdp-carousel-layout-thumb-bottom .swiper-thumbs .swiper-slide:last-child {
    margin-right: 0;
}

.swiper-thumbs .swiper-slide:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

.swiper-thumbs .swiper-slide.swiper-slide-thumb-active {
    border-color: var(--thumbnailHighlightColor);
}

.swiper-thumbs .swiper-slide img {
    border-radius: inherit;
}

/* Thumbnails | Roomvo Lite */
.swiper-slide-thumb-roomvo-lite {
    display: flex;;
}

.roomvo-lite-container {
    width: 100%;
    height: 100%;
}

.swiper-slide-thumb-roomvo-lite__icon {
    width: 32px;
}

.swiper-slide-thumb-roomvo-lite__text {
    margin-top: 0.25rem;
}

.swiper-slide-thumb-roomvo-lite__content {
    position: absolute;
    aspect-ratio: 1/1;
    font-size: 12px;
    color: #fff;
    line-height: 1.125;
    text-transform: uppercase;
    padding: 0.5rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--thumbRadii);
    text-align: center;
}

/* Thumbnails buttons */
.swiper-thumb-button {
    background-color: #fff;
    width: 100%;
    min-height: 30px;
    border: 1px solid rgb(154, 166, 178);
    cursor: pointer;
    font-family: swiper-icons;
    font-size: 1rem;
    position: absolute;
    z-index: 10;
    display: none;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
}

/* Thumbs arrow buttons | Layout */
.pdp-carousel-block.pdp-carousel-layout-thumb-bottom .swiper-thumb-button {
    display: none;
    height: 100%;
    width: 30px;
}

@media screen and (max-width: 768px) {
    .pdp-carousel-block .swiper-thumb-button {
        height: 100%;
        width: 30px;
    }
    .pdp-carousel-block .swiper-thumb-button-next {
        right: 0;
        border-radius: 0 0.375rem 0.375rem 0;
    }
    .pdp-carousel-block .swiper-thumb-button-next::after {
        rotate: 0deg;
    }
    .pdp-carousel-block .swiper-thumb-button-prev::after {
        rotate: 0deg;
    }
}

.swiper-thumb-button-prev {
    border-radius: 0.375rem 0.375rem 0 0;
}

.swiper-thumb-button-next {
    bottom: 0;
    border-radius: 0 0 0.375rem 0.375rem;
}

.pdp-carousel-block.pdp-carousel-layout-thumb-bottom .swiper-thumb-button-next {
    right: 0;
    border-radius: 0 0.375rem 0.375rem 0;
}

.pdp-carousel-block.pdp-carousel-layout-thumb-bottom .swiper-thumb-button-prev {
    border-radius: 0.375rem 0 0 0.375rem;
}

/* Thumbs arrow buttons | Disabled */
.swiper-thumb-button[aria-disabled="true"] {
    display: none;
}

.swiper-thumb-button[aria-disabled="false"] {
    display: flex!important;
}

/* Main Arrows */
.swiper-thumb-button::after {
    position: absolute;
    transform-origin: center center;
    rotate: 90deg;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
}

.swiper-thumb-button-prev::after {
    content: 'prev';
}

.swiper-thumb-button-next::after {
    content: 'next';
}

/* Main Arrows | Layout */
.pdp-carousel-block.pdp-carousel-layout-thumb-bottom .swiper-thumb-button::after {
    rotate: 0deg;
}

/* Slide Gallery */
.pdp-carousel-block .swiper-slide {
    aspect-ratio: 1/1;
}

.swiper-slide-wrapper {    
    height: 100%;
    width: 100%;
    display: flex;
    aspect-ratio: 1/1;
}

.swiper-slide-wrapper img {
    object-fit: cover;
    aspect-ratio: 1/1;
}

/* STIMR Button */
.swiper-slide__stimr-button {
    box-sizing: border-box;
    align-items: center;
    background-color: var(--stimrButtonBackgroundColor, #FFF);
    color: var(--stimrButtonTextColor, #000);
    display: flex;
    gap: 0.5rem;
    width: max-content;
    max-width: 90%;
    position: absolute;
    z-index: 12;
    border-radius: var(--buttonRadii);
    bottom: 0.5rem;
    left: 50%;
    border: 1px solid var(--stimrButtonBorderColor, #000);
    font-size: 1rem;
    line-height: 1;
    min-height: 3rem;
    padding: 0.125rem 1rem;
    transform: translateX(-50%);
}

.stimr-button__icon-stroke {
    stroke: var(--stimrButtonIconColor, #FFF);
}

.swiper-slide__stimr-button__text {
    white-space: nowrap;
}

.swiper-slide__stimr-button:hover {
    box-shadow: none;
}

.swiper-slide__stimr-button:hover,
.swiper-slide__stimr-button:focus,
.swiper-slide__stimr-button:focus-visible,
.swiper-slide__stimr-button:active {
    background-color: var(--stimrButtonBackgroundColorHover, #000);
    color: var(--stimrButtonTextColorHover, #FFF);
    border-color: var(--stimrButtonBorderColorHover, #000);
    outline: none;
}

.swiper-slide__stimr-button:focus,
.swiper-slide__stimr-button:focus-visible {
    outline: 2px solid var(--global-palette-highlight);
}

/* Editor styles */
.pdp-carousel-block-editor .swiper-thumbs .swiper-wrapper {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.pdp-carousel-block-editor.pdp-carousel-layout-thumb-bottom .swiper-thumbs .swiper-wrapper {
    flex-direction: row;
}

.pdp-carousel-block-editor.pdp-carousel-layout-thumb-right .swiper-thumbs .swiper-wrapper,
.pdp-carousel-block-editor.pdp-carousel-layout-thumb-left .swiper-thumbs .swiper-wrapper {
    flex-direction: column;
}

.pdp-carousel-block-editor .main-swiper .swiper-slide:nth-child(2) {
    display: none;
}

.component-block-editor {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.component-block-editor__media {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

/* Hover State */
.swiper-slide__stimr-button:hover {
    background-color: var(--stimrButtonBackgroundColorHover, #000);
    color: var(--stimrButtonTextColorHover, #FFF);
    border-color: var(--stimrButtonBorderColorHover, #000);
}

.swiper-slide__stimr-button:hover .stimr-button__icon-stroke,
.swiper-slide__stimr-button:focus .stimr-button__icon-stroke,
.swiper-slide__stimr-button:focus-visible .stimr-button__icon-stroke,
.swiper-slide__stimr-button:active .stimr-button__icon-stroke {
    stroke: var(--stimrButtonIconColorHover, #000);
}

/* Roomvo Lite */
.roomvo-lite-container-loader {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-swiper {
    border-radius: var(--galleryRadii);
    outline: 1px solid rgba(0, 0, 0, 0.1);
    aspect-ratio: 1/1;
}

.roomvo-lite-container-loader .roomvo-loader-cube {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
  }

.swiper-slide-roomvo-lite--loaded .roomvo-lite-container-loader,
.swiper-slide-roomvo-lite--error .roomvo-lite-container-loader {
    display: none;
}

.swiper-slide-roomvo-lite--error .roomvo-lite-error {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0;
}

/* Cube Loader */
@keyframes cube {
    0% {
        -webkit-transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
        transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
    }
    50% {
        -webkit-transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
        transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
    }
    100% {
        -webkit-transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
        transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
    }
}

:root {
    --roomvo-loader-cube-border-color: var(--global-palette3);
    --roomvo-loader-cube-face-color: hsla(0, 0%, 100%, 0.2);
    --roomvo-loader-cube-size: 1.5rem;
    --roomvo-loader-cube-border-size: 1.5px;
    --translate-faces: calc(var(--roomvo-loader-cube-size) / 2); /* half of size */
    --translate-faces-negative: calc(-1 * (var(--roomvo-loader-cube-size) / 2)) ; /* half of size (negative value) */
    --animation-time: 5s;
}

.roomvo-loader-cube {
    -webkit-animation: cube var(--animation-time) infinite ease;
    animation: cube var(--animation-time) infinite ease;
    height: var(--roomvo-loader-cube-size);
    width: var(--roomvo-loader-cube-size);
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.roomvo-loader-cube div {
    background-color: var(--roomvo-loader-cube-face-color);
    height: 100%;
    position: absolute;
    width: 100%;
    border: var(--roomvo-loader-cube-border-size) solid var(--roomvo-loader-cube-border-color);
}

.roomvo-loader-cube div:nth-of-type(1) {
    -webkit-transform: translateZ(var(--translate-faces-negative)) rotateY(180deg);
    transform: translateZ(var(--translate-faces-negative)) rotateY(180deg);
}

.roomvo-loader-cube div:nth-of-type(2) {
    -webkit-transform: rotateY(-270deg) translateX(50%);
    transform: rotateY(-270deg) translateX(50%);
    -webkit-transform-origin: top right;
    transform-origin: top right;
}

.roomvo-loader-cube div:nth-of-type(3) {
    -webkit-transform: rotateY(270deg) translateX(-50%);
    transform: rotateY(270deg) translateX(-50%);
    -webkit-transform-origin: center left;
    transform-origin: center left;
}

.roomvo-loader-cube div:nth-of-type(4) {
    -webkit-transform: rotateX(90deg) translateY(-50%);
    transform: rotateX(90deg) translateY(-50%);
    -webkit-transform-origin: top center;
    transform-origin: top center;
}

.roomvo-loader-cube div:nth-of-type(5) {
    -webkit-transform: rotateX(-90deg) translateY(50%);
    transform: rotateX(-90deg) translateY(50%);
    -webkit-transform-origin: bottom center;
    transform-origin: bottom center;
}

.roomvo-loader-cube div:nth-of-type(6) {
    -webkit-transform: translateZ(var(--translate-faces));
    transform: translateZ(var(--translate-faces));
}

/* Roomvo Lite | Error Message */
.roomvo-lite-error {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.roomvo-lite-error__message {
    font-size: 1rem;
    color: #7F7F7F;
    padding: 0;
    margin: 0;
    max-width: 18.75rem;
    line-height: 1.125;
}

.roomvo-lite-error__message-title {
    font-size: 1.25rem;
    padding: 0;
    margin: 0.5rem 0;
    color: #6E6E6E;
    font-weight: 600;
}

/* Mobile */
@media screen and (max-width: 768px) {
    .pdp-carousel-layout-thumb-left .swiper-thumbs,
    .pdp-carousel-layout-thumb-right .swiper-thumbs {
        height: 100px;
        width: 100%;
        max-width: 100%;
    }
}
