.product-gallery {
    display: flex;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 3;
}

.product-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 70px;
    flex-shrink: 0;
}

.product-gallery-thumb {
    width: 70px;
    height: 70px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    cursor: pointer;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.product-gallery-thumb:hover {
    border-color: #707793;
}

.product-gallery-thumb.active {
    border-color: #707793;
    border-width: 2px;
    box-shadow: 0 0 0 1px #707793;
}

.product-gallery-main-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
}

.product-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 520px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.product-gallery-pane {
    position: absolute;
    top: -40px;
    left: calc(100% + 20px);
    width: 110%;
    aspect-ratio: 1 / 1;
    max-height: 560px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    z-index: 100;
    pointer-events: none;
    display: none;
    overflow: hidden;
}

.drift-bounding-box {
    z-index: 9999 !important;
    background-color: rgba(112, 119, 147, .08) !important;
    border: 1px solid rgba(112, 119, 147, .7) !important;
    cursor: crosshair;
    background-image:
        linear-gradient(to right, rgba(112, 119, 147, .35) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(112, 119, 147, .35) 1px, transparent 1px) !important;
    background-size: 5px 5px !important;
    background-position: center center !important;
}

.drift-zoom-pane {
    position: absolute;
    overflow: hidden;
    background-color: #fff;
}

.drift-zoom-pane img {
    position: absolute;
    transform-origin: 0 0;
    max-width: none;
    max-height: none;
}

.drift-zoom-pane.drift-open {
    display: block;
}

.drift-zoom-pane.drift-inline {
    position: absolute;
}

@media (max-width: 991px) {
    .product-gallery {
        flex-direction: column-reverse;
    }
    .product-gallery-thumbs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .product-gallery-pane {
        display: none !important;
    }
}
