/* 图片点击放大 Lightbox 样式 */
.image-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    -webkit-animation: fadeIn 0.3s;
    animation: fadeIn 0.3s
}

.image-lightbox.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px
}

.image-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: calc(100% - 120px);
    margin: 0 auto;
    margin-top: 20px;
    -webkit-animation: zoomIn 0.3s;
    animation: zoomIn 0.3s
}

.image-lightbox-content img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5)
}

.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s
}

.image-lightbox-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg)
}

.image-lightbox-prev,
.image-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
    user-select: none;
    -webkit-user-select: none
}

.image-lightbox-prev {
    left: 35px
}

.image-lightbox-next {
    right: 35px
}

.image-lightbox-prev:hover,
.image-lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1)
}

.image-lightbox-prev.disabled,
.image-lightbox-next.disabled {
    opacity: 0.3;
    cursor: not-allowed
}

.image-lightbox-prev.disabled:hover,
.image-lightbox-next.disabled:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1)
}

.product-list-n118m-1 .item img,
.product-list-n115m-2 .item img,
.carousel-n93m-5 .item img,
.product-detail-n114m-1 img,
.product-detail-n8m-1 img,
.thumbnail img,
.viewer img,
img[src*="static/picture"] {
    cursor: pointer
}

.product-detail-n114m-1 .img-box .viewer {
    /* 保持主图外框与图片统一为 3:2 比例；用 !important 覆盖页面内联样式 */
    padding-bottom: 66.6667% !important
}

.product-detail-n114m-1 .img-box .thumbnail {
    /* 缩略图区域恢复为更紧凑高度，便于完整显示外框 */
    height: 76px !important
}

.product-detail-n114m-1 .img-box .thumbnail ul li {
    width: 90px !important;
    height: 60px !important;
    padding: 2px !important;
    box-sizing: border-box;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center
}

.product-detail-n114m-1 .img-box .thumbnail ul li span {
    width: 100%;
    height: 100%;
    display: block
}

.product-detail-n114m-1 .img-box .thumbnail ul li span img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.product-detail-n114m-1 .img-box .thumbnail .arrow {
    height: 76px !important;
    line-height: 76px !important
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@-webkit-keyframes zoomIn {
    from {
        transform: scale(0.5)
    }

    to {
        transform: scale(1)
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.5)
    }

    to {
        transform: scale(1)
    }
}

@media(max-width:768px) {
    .image-lightbox.show {
        padding-top: 50px
    }
    
    .image-lightbox-content {
        max-height: calc(100% - 100px);
        margin-top: 10px
    }
    
    .image-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
        line-height: 40px
    }
    
    .image-lightbox-prev,
    .image-lightbox-next {
        font-size: 30px;
        width: 40px;
        height: 40px;
        line-height: 40px
    }
    
    .image-lightbox-prev {
        left: 15px
    }
    
    .image-lightbox-next {
        right: 15px
    }
}