/* === 湃德产品图库: 排列美化 + 点击放大灯箱 (仅作用于产品详情页 .p5_prod_gallery) === */
.p5_prod_mainimg {
    width: 420px;
    height: 350px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    box-sizing: border-box;
}
.p5_prod_mainimg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .35s ease;
}
.p5_prod_mainimg:hover img { transform: scale(1.04); }

.p5_prod_thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    width: 420px;
}
.p5_prod_thumbs .thumb-item {
    display: block;
    width: 94px;
    height: 94px;
    margin: 0;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    cursor: zoom-in;
    line-height: 0;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.p5_prod_thumbs .thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.p5_prod_thumbs .thumb-item:hover {
    border-color: #94a0dc;
    box-shadow: 0 3px 10px rgba(7, 51, 138, .18);
    transform: translateY(-2px);
}
.p5_prod_thumbs .thumb-item.active { border-color: #07338a; }

/* === 灯箱 === */
.glb-mask {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .88);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.glb-mask.show { opacity: 1; }
.glb-stage { position: relative; max-width: 94vw; max-height: 90vh; text-align: center; }
.glb-stage img {
    max-width: 94vw;
    max-height: 82vh;
    display: block;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    transition: opacity .15s;
}
.glb-btn {
    position: absolute;
    top: 50%;
    margin-top: -24px;
    width: 48px; height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 28px;
    line-height: 46px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background .2s;
}
.glb-btn:hover { background: rgba(255, 255, 255, .34); }
.glb-prev { left: -64px; }
.glb-next { right: -64px; }
.glb-close {
    position: absolute;
    right: 0;
    top: -44px;
    width: 34px; height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 20px;
    line-height: 32px;
    cursor: pointer;
}
.glb-close:hover { background: rgba(255, 255, 255, .34); }
.glb-count {
    position: absolute;
    left: 50%;
    bottom: -36px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    opacity: .85;
}
@media (max-width: 900px) {
    .p5_prod_gallery, .p5_prod_mainimg, .p5_prod_thumbs { width: 100% !important; float: none; }
    .p5_prod_mainimg { height: auto; aspect-ratio: 4 / 3; }
    .p5_prod_thumbs { justify-content: space-between; gap: 8px; }
    .p5_prod_thumbs .thumb-item { width: calc((100% - 24px) / 4); height: auto; aspect-ratio: 1 / 1; }
    .glb-prev { left: 6px; }
    .glb-next { right: 6px; }
    .glb-close { right: 8px; top: -40px; }
}

.p5_prod_zoomhint {
    clear: both;
    margin-top: 10px;
    font-size: 12px;
    color: #898989;
    line-height: 1.6;
}
.glb-tip {
    position: absolute;
    left: 50%;
    bottom: -58px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12px;
    opacity: .65;
    white-space: nowrap;
}
