.product-media-preview .modal__content {
    --modal-animation-name: animation-fade-in;
    inset-block: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.95);
}

.product-media-preview__content {
    display: flex;
    flex: 1 0 0;
    flex-direction: row;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-media-preview__content::-webkit-scrollbar {
    display: none;
}

/* 只在用户主动滑动时启用平滑滚动 */
.product-media-preview__content.smooth-scroll {
    scroll-behavior: smooth;
}

.product-media-preview__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s;
    transform-origin: center;
    user-select: none;
    -webkit-user-drag: none;
}

.product-media-preview__media {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 100%;
    height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x pan-y pinch-zoom;
}

.product-media-preview__media::-webkit-scrollbar {
    display: none;
}

.product-media-preview__media::before {
    display: none;
}

.product-media-preview__media.zoom-in {
    overflow: auto;
    touch-action: pan-x pan-y;
}

.product-media-preview__media.zoom-in .product-media-preview__image {
    max-width: none;
    max-height: none;
    transform: scale(var(--zoom-scale, 1.8));
}

/* PC端双指/滚轮缩放 */
.product-media-preview__media.pinch-zoom {
    overflow: auto;
}

.product-media-preview__media.pinch-zoom .product-media-preview__image {
    max-width: none;
    max-height: none;
    transform: scale(var(--zoom-scale, 1));
}

.product-media-preview__arrows {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.product-media-preview__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 1;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.product-media-preview__arrow:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.product-media-preview__arrow .icon {
    width: 12px;
    height: 12px;
}

.product-media-preview__arrow[name="previous"] .icon {
    transform: rotate(90deg);
}

.product-media-preview__arrow[name="next"] .icon {
    transform: rotate(-90deg);
}

.product-media-preview__status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    line-height: 1;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    font-size: 0;
}

.product-media-preview__status .icon {
    width: 14px;
    height: 14px;
}

/* 关闭按钮样式 */
.product-media-preview .modal__close-control {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.product-media-preview .modal__close-control:hover {
    background: #fff;
    transform: scale(1.05);
}

.product-media-preview .modal__close-control .icon {
    width: 16px;
    height: 16px;
}

@media (max-width: 959px) {
    .product-media-preview .modal__close-control {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }

    .product-media-preview .modal__close-control .icon {
        width: 14px;
        height: 14px;
    }

    .product-media-preview__arrows {
        bottom: 30px;
        padding: 10px 20px;
        gap: 16px;
    }

    .product-media-preview__arrow {
        width: 32px;
        height: 32px;
    }

    .product-media-preview__status {
        width: 32px;
        height: 32px;
    }
}