.jh-gallery-wrapper {
    width: 100%;
    max-width: 100%;
}

.jh-main-image-wrap {
    position: relative;
    margin-bottom: 24px;
}

.jh-gallery-single-image .jh-main-image-wrap {
    margin-bottom: 0;
}

.jh-main-image {
    width: 100%;
    line-height: 0;
    border-radius: 0;
    overflow: hidden;
}

.jh-main-image-link,
.jh-main-video-wrap {
    display: flex;
    width: 100%;
    min-height: 420px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 84px;
}

.jh-main-image-link {
    cursor: zoom-in;
}

.jh-main-image-link.is-hidden,
.jh-main-video-wrap,
.jh-lightbox-video-wrap {
    display: none;
}

.jh-gallery-single-image .jh-main-image-link,
.jh-gallery-single-image .jh-main-video-wrap {
    padding: 0;
}

.jh-main-image.is-video-active .jh-main-video-wrap,
.jh-main-video-wrap.is-active,
.jh-lightbox-video-wrap.is-active {
    display: flex;
}

.jh-main-image img,
.jh-main-image-element {
    display: block;
    max-width: 100%;
    max-height: 620px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.jh-main-video-frame,
.jh-lightbox-video-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
}

.jh-main-video-wrap {
    width: 100%;
}

.jh-gallery-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    background: transparent;
    color: #393939;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    touch-action: manipulation;
}

.jh-gallery-arrow:hover,
.jh-gallery-arrow:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.jh-gallery-arrow span {
    pointer-events: none;
}

.jh-gallery-prev {
    left: 0;
}

.jh-gallery-next {
    right: 0;
}

.jh-thumbnails-carousel {
    position: relative;
    margin-top: 8px;
}

.jh-thumbnails-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    padding: 10px 0 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.jh-thumbnails-viewport::-webkit-scrollbar {
    display: none;
}

.jh-thumbnails-track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
    width: max-content;
    min-width: 100%;
    box-sizing: border-box;
}

.jh-thumb {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 120px;
    padding: 0;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    background: #f7f7f7;
    cursor: pointer;
    overflow: hidden;
    flex: 0 0 auto;
    opacity: 0.75;
    transition: opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.jh-thumb:hover,
.jh-thumb:focus-visible {
    opacity: 0.95;
    transform: translateY(-1px);
    outline: none;
}

.jh-thumb-media {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.jh-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.jh-thumb-video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.08));
}

.jh-thumb-video-icon {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 0, 0, 0.92);
}

.jh-thumb-video-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 12px solid #fff;
}

.jh-thumb.is-active {
    opacity: 1;
    border-color: #008b7c;
    box-shadow: 0 0 0 1px #008b7c inset;
}

.jh-gallery-builder-note {
    padding: 16px;
    border: 1px solid #d9d9d9;
    background: #f7f7f7;
    font-size: 14px;
    line-height: 1.5;
}

.jh-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    padding: 40px;
    box-sizing: border-box;
}

.jh-lightbox.is-open {
    display: flex;
}

.jh-lightbox-stage {
    max-width: min(92vw, 1400px);
    max-height: 88vh;
    width: 100%;
}

.jh-lightbox-image {
    display: none;
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
}

.jh-lightbox-image.is-active {
    display: block;
}

.jh-lightbox-video-wrap {
    width: min(92vw, 1400px);
    max-width: 100%;
}

.jh-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    color: #fff;
    font-size: 40px;
    border: none;
    cursor: pointer;
    padding: 0;
}

.jh-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: transparent;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 0;
}

.jh-lightbox-prev {
    left: 24px;
}

.jh-lightbox-next {
    right: 24px;
}

body.jh-lightbox-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .jh-main-image-link,
    .jh-main-video-wrap {
        padding: 0 72px;
    }

    .jh-gallery-single-image .jh-main-image-link,
    .jh-gallery-single-image .jh-main-video-wrap {
        padding: 0;
    }

    .jh-gallery-arrow {
        width: 82px;
    }

    .jh-thumb {
        width: 104px;
        min-width: 104px;
        max-width: 104px;
        height: 104px;
    }
}

@media (max-width: 767px) {
    .jh-main-image-link,
    .jh-main-video-wrap {
        min-height: 280px;
        padding: 0 56px;
    }

    .jh-gallery-single-image .jh-main-image-link,
    .jh-gallery-single-image .jh-main-video-wrap {
        padding: 0;
    }

    .jh-main-image img,
    .jh-main-image-element {
        max-height: 420px;
    }

    .jh-gallery-arrow {
        width: 64px;
        font-size: 22px;
    }

    .jh-thumbnails-viewport {
        padding: 8px 0 10px;
    }

    .jh-thumbnails-track {
        gap: 12px;
    }

    .jh-thumb {
        width: 84px;
        min-width: 84px;
        max-width: 84px;
        height: 84px;
        border-radius: 10px;
    }

    .jh-thumb-video-icon {
        width: 36px;
        height: 26px;
    }

    .jh-thumb-video-icon::before {
        border-top-width: 6px;
        border-bottom-width: 6px;
        border-left-width: 10px;
    }

    .jh-lightbox {
        padding: 20px;
    }

    .jh-lightbox-arrow {
        font-size: 24px;
    }

    .jh-lightbox-prev {
        left: 10px;
    }

    .jh-lightbox-next {
        right: 10px;
    }

    .jh-lightbox-close {
        top: 8px;
        right: 12px;
    }
}
