.lvbpg {
    width: 100%;
    max-width: 100%;
    display: block;
    position: relative;
    box-sizing: border-box;
}

.lvbpg,
.lvbpg *,
.lvbpg *::before,
.lvbpg *::after {
    box-sizing: border-box;
}

.lvbpg--single-product-gallery {
    --lvbpg-bg: #f6f4f1;
    --lvbpg-border: #ded8d1;
    --lvbpg-dark: #2f261e;
    --lvbpg-white: #ffffff;
    --lvbpg-main-height: 620px;
    --lvbpg-thumb-height: 98px;
    --lvbpg-thumb-gap: 14px;
    --lvbpg-radius: 0px;
}

/* Main image */

.lvbpg__main {
    width: 100%;
    max-width: 100%;
    display: block;
}

.lvbpg__main-inner {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: block;
    overflow: hidden;
    background: var(--lvbpg-bg);
    border-radius: var(--lvbpg-radius);
}

.lvbpg__main-link {
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    color: inherit;
}

.lvbpg__main-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: var(--lvbpg-main-height);
    object-fit: cover;
    object-position: center;
    border: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    transition: opacity 0.22s ease, transform 0.35s ease;
}

.lvbpg.is-changing .lvbpg__main-image {
    opacity: 0.45;
}

/* SVG main arrows */

.lvbpg__main-nav {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(44, 47, 50, 0.55);
    color: #ffffff;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lvbpg__main-nav:hover,
.lvbpg__main-nav:focus {
    background: rgba(44, 47, 50, 0.78);
    color: #ffffff;
    transform: translateY(-50%) scale(1.04);
}

.lvbpg__main-nav--prev {
    left: 24px;
}

.lvbpg__main-nav--next {
    right: 24px;
}

.lvbpg__main-nav-icon {
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

/* Thumbnails */

.lvbpg__thumbs {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: block;
    margin-top: 18px;
    overflow: hidden;
}

.lvbpg__thumbs-track {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: var(--lvbpg-thumb-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 3px 0 5px;
    margin: 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.lvbpg__thumbs-track::-webkit-scrollbar {
    display: none;
}

.lvbpg__thumbs-track.lvbpg__thumbs-track--dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.lvbpg__thumb {
    flex: 0 0 calc((100% - (var(--lvbpg-thumb-gap) * 4)) / 5);
    width: calc((100% - (var(--lvbpg-thumb-gap) * 4)) / 5);
    min-width: calc((100% - (var(--lvbpg-thumb-gap) * 4)) / 5);
    height: var(--lvbpg-thumb-height);
    min-height: var(--lvbpg-thumb-height);
    max-height: var(--lvbpg-thumb-height);
    display: block;
    border: 1px solid var(--lvbpg-border);
    background: var(--lvbpg-bg);
    padding: 0;
    margin: 0;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.72;
    border-radius: var(--lvbpg-radius);
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    scroll-snap-align: start;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lvbpg__thumb:hover,
.lvbpg__thumb:focus,
.lvbpg__thumb--active {
    opacity: 1;
    border-color: var(--lvbpg-dark);
    background: var(--lvbpg-bg);
}

.lvbpg__thumb--active {
    transform: translateY(-2px);
}

.lvbpg__thumb-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Message */

.lvbpg-message {
    padding: 16px;
    border: 1px solid #e5e0da;
    background: #faf8f5;
    color: #2f261e;
    font-size: 14px;
}

/* Responsive */

@media (max-width: 1200px) {
    .lvbpg--single-product-gallery {
        --lvbpg-main-height: 560px;
        --lvbpg-thumb-height: 88px;
    }
}

@media (max-width: 1024px) {
    .lvbpg--single-product-gallery {
        --lvbpg-main-height: 500px;
    }
}

@media (max-width: 767px) {
    .lvbpg--single-product-gallery {
        --lvbpg-main-height: 390px;
        --lvbpg-thumb-height: 72px;
        --lvbpg-thumb-gap: 10px;
    }

    .lvbpg__main-nav {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .lvbpg__main-nav--prev {
        left: 14px;
    }

    .lvbpg__main-nav--next {
        right: 14px;
    }

    .lvbpg__main-nav-icon {
        width: 23px;
        height: 23px;
    }

    .lvbpg__thumbs {
        margin-top: 12px;
    }

    .lvbpg__thumb {
        flex-basis: calc((100% - (var(--lvbpg-thumb-gap) * 3)) / 4);
        width: calc((100% - (var(--lvbpg-thumb-gap) * 3)) / 4);
        min-width: calc((100% - (var(--lvbpg-thumb-gap) * 3)) / 4);
    }
}

@media (max-width: 480px) {
    .lvbpg--single-product-gallery {
        --lvbpg-main-height: 330px;
        --lvbpg-thumb-height: 64px;
    }

    .lvbpg__thumb {
        flex-basis: calc((100% - (var(--lvbpg-thumb-gap) * 2)) / 3);
        width: calc((100% - (var(--lvbpg-thumb-gap) * 2)) / 3);
        min-width: calc((100% - (var(--lvbpg-thumb-gap) * 2)) / 3);
    }
}