/* 3D slide inside the native WooCommerce single-product gallery. */
.woocommerce-product-gallery .wc-glb-gallery-slide {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.woocommerce-product-gallery .wc-glb-gallery-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 420px;
    overflow: hidden;
    background: #f6f7f8;
}

.woocommerce-product-gallery .wc-glb-gallery-viewer model-viewer {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    background: transparent;
}

.wc-glb-viewer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 420px;
    padding: 24px;
    box-sizing: border-box;
    font-size: 14px;
    text-align: center;
    opacity: 0.7;
}

.wc-glb-viewer-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 2;
    transform: translateX(-50%);
    max-width: calc(100% - 28px);
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}

/* Make the 3D thumbnail easy to recognize in the WooCommerce thumbnail strip. */
.woocommerce-product-gallery .flex-control-thumbs img[src*="3d-thumb.svg"] {
    object-fit: cover;
    background: #f6f7f8;
}

/* Optional manual shortcode viewer. */
.wc-glb-standalone-viewer {
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    background: #f6f7f8;
}

.wc-glb-standalone-viewer model-viewer {
    display: block;
    width: 100%;
    height: 500px;
}

@media (max-width: 767px) {
    .woocommerce-product-gallery .wc-glb-gallery-viewer,
    .woocommerce-product-gallery .wc-glb-gallery-viewer model-viewer,
    .wc-glb-viewer-loading {
        min-height: 340px;
    }

    .wc-glb-viewer-hint {
        bottom: 10px;
        font-size: 11px;
    }

    .wc-glb-standalone-viewer,
    .wc-glb-standalone-viewer model-viewer {
        min-height: 360px;
        height: 360px;
    }
}
