model-viewer {
    width: 100%;
    height: 557px;
    display: block;
    background: #0002;
}

.product-3d-section {
    width: 100%;
    margin: 0;
    /*padding: 40px 0 10px 0;*/
    padding: 0 0 40px 0;
    box-sizing: border-box;
    background: #fff;
}

.product-3d-panel {
    width: 1260px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 37px;
    align-items: flex-start;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
}

.product-3d-main {
    flex: 0 0 900px;
    width: 900px;
    max-width: 900px;
    min-width: 0;
}

.product-3d-title {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 6;
    margin: 0;
    font-size: 35px;
    line-height: 1;
    font-weight: normal;
    color: #0f38a8;
    font-family: "Anton-Regular";
    pointer-events: none;
}

.product-3d-stage {
    position: relative;
    width: 100%;
    height: 557px;
    min-height: 557px;
    background: #eff0f2;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
}

.product-3d-stage.is-image-mode {
    cursor: default;
}

.product-3d-poster {
    /*position: absolute;*/
    /*inset: 0;*/
    /*width: 100%;*/
    /*height: 100%;*/
    /*object-fit: contain;*/
    /*background: #eff0f2;*/
    /*z-index: 1;*/
    /*pointer-events: none;*/

    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #eff0f2;
    z-index: 1;
    pointer-events: none;
}

.product-3d-stage.is-loaded .product-3d-poster,
.product-3d-stage.is-loaded .product-3d-load-btn,
.product-3d-stage.is-loading .product-3d-load-btn {
    display: none;
}

.product-3d-stage.is-awaiting-load .product-3d-canvas {
    visibility: hidden;
}

.product-3d-stage.is-loading .product-3d-status {
    display: flex;
}

.product-3d-stage.is-image-mode .product-3d-poster {
    display: block !important;
}

.product-3d-stage.is-image-mode .product-3d-load-btn,
.product-3d-stage.is-image-mode .product-3d-canvas,
.product-3d-stage.is-image-mode .product-3d-status,
.product-3d-stage.is-image-mode .product-3d-title {
    display: none !important;
}

.product-3d-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}

model-viewer.product-3d-canvas {
    width: 100%;
    height: 100%;
}

.product-3d-canvas canvas {
    width: 90% !important;
    height: 90% !important;
    display: block;
    touch-action: none;
    cursor: pointer;
}

.product-3d-status {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(247, 248, 251, .78);
    color: #444;
    font-size: 14px;
    z-index: 4;
    pointer-events: none;
}

.product-3d-status.is-error {
    color: #c0392b;
}

.product-3d-load-btn {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 45px;
    width: 150px;
    font-family: "Anton-Regular";
    border: 1px solid #0e38a8;
    border-radius: 6px;
    background-color: #0e38a8;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    /*font-weight: bold;*/
}

.product-3d-load-btn:hover {
    border-color: #717171;
    background-color: transparent;
    color: #717171;
}

/*.product-3d-load-btn svg {*/
/*    width: 20px;*/
/*    height: 20px;*/
/*    display: block;*/
/*}*/

.product-3d-load-btn img {
    width: 23px;
    /*height: 23px;*/
    display: block;
}

.product-3d-thumbs-wrap {
    position: relative;
    flex: 0 0 327px;
    width: 327px;
    max-height: 557px;
    min-width: 0;
}

.product-3d-thumbs {
    height: 100%;
    max-height: 557px;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    gap: 19px;
    padding: 6px 12px 6px 12px;
    margin-left: -12px;
    width: calc(100% + 12px);
    box-sizing: border-box;
    min-height: 0;
    /* 重点：删除 scrollbar-width、scrollbar-color！否则webkit‑button隐藏箭头失效 */
}

/* ========== Chrome / Edge / Safari ========== */
.product-3d-thumbs::-webkit-scrollbar {
    width: 8px;
}
/* 彻底隐藏上下箭头按钮 */
.product-3d-thumbs::-webkit-scrollbar-button:vertical {
    display: none !important;
}
.product-3d-thumbs::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 4px;
}
.product-3d-thumbs::-webkit-scrollbar-thumb {
    background: #b7bee4;
    border-radius: 4px;
}
.product-3d-thumbs::-webkit-scrollbar-thumb:hover {
    background: #8c99d8;
}
.product-3d-thumbs::-webkit-scrollbar-thumb:active {
    background: #6b7bc9;
}

.product-3d-thumb {
    position: relative;
    display: block;
    flex: 0 0 173px;
    width: 276px;
    height: 173px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.product-3d-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.product-3d-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1a4f9c 0%, #0d2f66 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
}


.product-3d-thumb.is-image {
    background: #fff;
}

.product-3d-thumb.is-image img {
    background: transparent;
}

.product-3d-thumb.is-active {
    border-color: #1f5bb8;
}

.product-3d-thumb.is-image.is-active {
    border-color: #1f5bb8;
}

.product-3d-thumb-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 40px;
    height: 40px;
}

.product-3d-thumb-badge svg {
    width: 40px;
    height: 40px;
    display: block;
}




@media (max-width: 1360px) and (min-width: 901px) {
    .product-3d-panel {
        width: 92.64vw;
        max-width: none;
        padding: 0;
    }

    .product-3d-main {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
    }
    .product-3d-load-btn img {
        width: 23px;
        /*height: 23px;*/
        display: block;
    }
}

@media (max-width: 900px) {
    .product-3d-section {
        padding: 25px 0 15px 0;
    }

    .product-3d-panel {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 15px;
        width: 86.91vw;
        margin-left: auto;
        margin-right: auto;
    }

    .product-3d-main {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .product-3d-title {
        top: 10px;
        left: 10px;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
        color: #0f38a8;
        font-family: "Anton-Regular";
    }

    .product-3d-stage {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: 320 / 198.55;
    }

    .product-3d-load-btn {
        right: 5px;
        bottom: 5px;
        width: 100px;
        height: 28px;
        gap: 4px;
        border-radius: 4px;
        font-family: "Anton-Regular";
        color: #ffffff;
        font-size: 12px;
        /*font-weight: 700;*/
        line-height: 1;
    }

    .product-3d-load-btn svg {
        width: 14px;
        height: 14px;
    }
    .product-3d-load-btn img {
        width: 23px;
        /*height: 23px;*/
        display: block;
    }

    .product-3d-thumbs-wrap {
        flex: none;
        width: 100%;
        max-height: none;
        margin-left: 0;
    }

    .product-3d-thumbs {
        flex: none;
        width: 100%;
        height: auto;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding:10px 0;
        margin-left: 0;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        padding-right:0;
        /*移动端横向，原生滚动条，无自定义样式*/
    }

    /* 移动端：横向滚动条 */
    .product-3d-thumbs::-webkit-scrollbar:horizontal {
        height: 6px;
    }
    .product-3d-thumbs::-webkit-scrollbar-track:horizontal {
        background: #f0f2f5;
    }
    .product-3d-thumbs::-webkit-scrollbar-thumb:horizontal {
        background: #b7bee4;
        border-radius: 3px;
    }
    .product-3d-thumbs::-webkit-scrollbar-thumb:horizontal:hover {
        background: #8c99d8;
    }

    /* 隐藏原有JS模拟滚动条DOM元素，避免冲突 */
    .product-3d-thumbs-bar,
    .product-3d-thumbs-knob {
        display: none !important;
    }

    .product-3d-thumb {
        flex: 0 0 155px;
        width: 155px;
        height: 96px;
        border: 2px solid transparent;
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .product-3d-thumb img,
    .product-3d-thumb-fallback {
        border-radius: 6px;
    }

    .product-3d-thumb.is-active {
        border-color: #0f38a8;
    }

    .product-3d-thumb-fallback {
        font-size: 12px;
    }

    .product-3d-thumb-badge {
        top: 6px;
        left: 6px;
        width: 28px;
        height: 28px;
    }

    .product-3d-thumb-badge svg {
        width: 28px;
        height: 28px;
    }


}


/* ========== Loading样式 ========== */
.product-3d-loading-overlay {
    position:absolute;
    left:0;top:0;right:0;bottom:0;
    background:rgba(0,0,0,0.4);
    z-index:10;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:#fff;
}
.product-3d-loading-overlay.hide{
    display:none;
}
.product-3d-spinner-circle{
    width:42px;
    height:42px;
    border:3px solid rgba(255,255,255,0.25);
    border-top:#fff solid 3px;
    border-radius:50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0%{transform:rotate(0deg)}
    100%{transform:rotate(360deg)}
}
.product-3d-loading-txt{
    margin-top:12px;
    font-size:14px;
    font-family: "Anton-Regular";
}