/**
 * SEM Images Lightbox Styles
 * 材料表征图片放大查看样式
 * 
 * 用于产品详情页和首页的材料表征图片展示和放大功能
 */

.sem-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.sem-image-item {
    position: relative;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-white, #ffffff);
    border: 2px solid var(--border-light, #e0e0e0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sem-image-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: #1976d2;
}

.sem-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.sem-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sem-image-item:hover .sem-image-wrapper img {
    transform: scale(1.1);
}

.sem-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.85) 0%, rgba(21, 101, 192, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sem-image-item:hover .sem-image-overlay {
    opacity: 1;
}

.sem-image-overlay .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #fff;
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.sem-image-hint {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

/* 图片放大查看模态框 */
.sem-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.sem-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sem-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sem-lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.sem-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 0;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 100000;
}

.sem-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .sem-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sem-image-overlay .dashicons {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }
    
    .sem-image-hint {
        font-size: 14px;
    }
    
    .sem-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .sem-images-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
