.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery .woocommerce-product-gallery__image,
.woocommerce div.product div.images,
.product-images,
.woodmart-product-gallery,
.woodmart-product-gallery .wd-carousel-inner,
.wd-gallery-images,
.wd-product-images,
.product-image-summary .woocommerce-product-gallery {
    position: relative !important;
}

.wc3dpv-buttons {
    position: absolute !important;
    right: 18px !important;
    bottom: 18px !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    pointer-events: auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wc3dpv-icon-button {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.18) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 9px !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.wc3dpv-icon-button img {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    display: block !important;
}

.wc3dpv-modal {display: none; position: fixed; inset: 0; z-index: 999999;}
.wc3dpv-modal.is-active {display: block;}
.wc3dpv-overlay {position: absolute; inset: 0; background: rgba(0,0,0,.72);}
.wc3dpv-dialog {position: relative; width: min(92vw, 1100px); height: min(82vh, 760px); margin: 6vh auto 0; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 16px 60px rgba(0,0,0,.35);}
.wc3dpv-close {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 5; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(0,0,0,.78); color: #fff; font-size: 28px; line-height: 40px; cursor: pointer;
}
.wc3dpv-viewer {display: block; width: 100%; height: 100%; min-height: 420px; background: #f8f8f8;}
.wc3dpv-loading {display:flex; align-items:center; justify-content:center; width:100%; height:100%; font-size:18px; color:#333;}
.wc3dpv-error {position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); max-width:80%; text-align:center; color:#333; font-size:16px; background:#fff; padding:16px 20px; border:1px solid #ddd; border-radius:8px;}
body.wc3dpv-lock {overflow: hidden;}
.wc3dpv-ar-help {position:absolute; left:50%; bottom:22px; transform:translateX(-50%); max-width:90%; text-align:center; color:#333; font-size:14px; background:#fff; padding:12px 16px; border:1px solid #ddd; border-radius:8px; box-shadow:0 4px 18px rgba(0,0,0,.12);}

.wc3dpv-shortcode-wrap {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.wc3dpv-shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}
.wc3dpv-shortcode-btn:hover { background: #333; color: #fff; }
.wc3dpv-shortcode-btn img { width: 20px; height: 20px; filter: invert(1); display: block; }
.wc3dpv-shortcode-btn--ar { background: transparent; color: #111; border: 1px solid #111; }
.wc3dpv-shortcode-btn--ar img { filter: none; }
.wc3dpv-shortcode-btn--ar:hover { background: #111; color: #fff; }
.wc3dpv-shortcode-btn--ar:hover img { filter: invert(1); }

.wc3dpv-inline-wrap {
    position: relative;
    max-width: 100%;
}
.wc3dpv-inline-wrap .wc3dpv-viewer {
    border-radius: 12px;
    min-height: 260px;
}
.wc3dpv-inline-wrap--transparent .wc3dpv-viewer {
    background: transparent !important;
    --poster-color: transparent;
}

@media (max-width: 640px) {
    .wc3dpv-buttons {right: 12px !important; bottom: 12px !important; gap: 8px !important;}
    .wc3dpv-icon-button {width: 48px !important; height: 48px !important; min-width:48px !important; min-height:48px !important; max-width:48px !important; max-height:48px !important;}
    .wc3dpv-icon-button img {width:30px !important; height:30px !important;}
    .wc3dpv-dialog {width:94vw; height:78vh; margin-top:10vh;}
    .wc3dpv-shortcode-wrap {width: 100%;}
    .wc3dpv-shortcode-btn {flex: 1 1 auto; justify-content: center;}
}