/**
 * 图片缩放与拖拽功能样式
 * 用于产品详情页的图片查看模态框
 */

/* 使用高优先级选择器确保样式被应用 */
html body .image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

html body .modal-content-container {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

html body .modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

html body .modal-content {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.1s ease;
    cursor: grab;
}

html body .modal-content.dragging {
    cursor: grabbing;
    transition: none;
}

html body .modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

html body .modal-close:hover {
    color: #ff6b6b;
}

html body .modal-prev, 
html body .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1001;
}

html body .modal-prev {
    left: 20px;
}

html body .modal-next {
    right: 20px;
}

html body .modal-prev:hover, 
html body .modal-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

html body .modal-caption {
    margin-top: 15px;
    color: white;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    max-width: 80%;
}

/* 缩放控制样式 */
html body .modal-zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    padding: 5px;
    z-index: 1002;
}

html body .modal-zoom-btn {
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    transition: background-color 0.3s;
}

html body .modal-zoom-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

html body .zoom-level-indicator {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1002;
}

html body .zoom-level-indicator.visible {
    opacity: 1;
}

/* 响应式布局 */
@media (max-width: 768px) {
    html body .modal-prev, 
    html body .modal-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    html body .modal-prev {
        left: 10px;
    }
    
    html body .modal-next {
        right: 10px;
    }
    
    html body .modal-zoom-controls {
        bottom: 15px;
    }
    
    html body .modal-zoom-btn {
        width: 36px;
        height: 36px;
        margin: 0 3px;
    }
    
    html body .zoom-level-indicator {
        bottom: 60px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    html body .modal-prev, 
    html body .modal-next {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    html body .modal-zoom-controls {
        bottom: 10px;
    }
    
    html body .modal-zoom-btn {
        width: 32px;
        height: 32px;
        margin: 0 2px;
    }
} 