.api-1f8706e5-wrapper {
    display: flex;
    gap: 20px;
    background-color: transparent !important;
}

/* Layout Directions */
.api-1f8706e5-wrapper.api-thumbs-left {
    flex-direction: row;
}
.api-1f8706e5-wrapper.api-thumbs-right {
    flex-direction: row-reverse;
}
.api-1f8706e5-wrapper.api-thumbs-top {
    flex-direction: column;
}
.api-1f8706e5-wrapper.api-thumbs-bottom {
    flex-direction: column-reverse;
}

/* Thumbs Container */
.api-1f8706e5-thumbs {
    --thumb-size: 80px;
    display: flex;
    gap: 10px;
}

/* Vertical Thumbs (Left/Right) */
.api-thumbs-left .api-1f8706e5-thumbs,
.api-thumbs-right .api-1f8706e5-thumbs {
    flex-direction: column;
    width: var(--thumb-size);
    flex-shrink: 0;
}

/* Horizontal Thumbs (Top/Bottom) */
.api-thumbs-top .api-1f8706e5-thumbs,
.api-thumbs-bottom .api-1f8706e5-thumbs {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
}
.api-thumbs-top .api-1f8706e5-thumb,
.api-thumbs-bottom .api-1f8706e5-thumb {
    width: var(--thumb-size);
    flex-shrink: 0;
}

/* Single Thumb */
.api-1f8706e5-thumb {
    cursor: pointer;
    border: 1px solid #eee;
    transition: all 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    opacity: 0.6;
    background-color: #FAFAFA;
}
.api-1f8706e5-thumb.active,
.api-1f8706e5-thumb:hover {
    border-color: #ccc;
    opacity: 1;
}
.api-1f8706e5-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    aspect-ratio: 1/1;
}

/* Main Image Container */
.api-1f8706e5-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FAFAFA;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    min-height: 300px;
    position: relative;
}

/* Main Image */
.api-1f8706e5-main-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
}

/* Zoom Overlay - FIX FOR SHRINKING CONTAINER */
.api-1f8706e5-zoom-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 200%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none; /* Allows mouse events to trigger on main container */
    z-index: 2;
    border-radius: 8px;
}

.api-1f8706e5-main.zoom-active {
    cursor: zoom-in;
}

/* On hover: show overlay, hide image but keep it in DOM so it holds the layout height */
.api-1f8706e5-main.zoom-active:hover .api-1f8706e5-zoom-overlay {
    opacity: 1;
}

.api-1f8706e5-main.zoom-active:hover .api-1f8706e5-main-img {
    opacity: 0;
}