@charset "utf-8";
.gallery-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}
.gallery {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.gallery-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.gallery-item {
    overflow: hidden;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: block;
    color: inherit;
    text-decoration: none;
}
.gallery-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.gallery-item .img-wrap.loaded img {
    opacity: 1;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-item .img-wrap {
    position: relative;
    width: 100%;
    background: #f0f0f0;
    overflow: hidden;
}
.gallery-item .img-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f0f0f0 0%, #e8e8e8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    transition: opacity 0.4s ease;
}
.gallery-item .img-wrap.loaded .img-skeleton {
    opacity: 0;
    pointer-events: none;
}
.gallery-item .img-skeleton.error {
    background: #fce4e4;
    color: #c00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    animation: none;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.gallery-item .title {
    padding: 12px 15px;
    font-size: 16px;
    color: #333;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 平板：≤991px 改为 2 列 */
@media (max-width: 991px) {
    .gallery-wrap {
        padding: 15px;
    }
    .gallery,
    .gallery-col {
        gap: 15px;
    }
    .gallery-item .title {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* 手机：≤767px 改为 1 列 */
@media (max-width: 767px) {
    .gallery-wrap {
        padding: 10px;
    }
    .gallery,
    .gallery-col {
        gap: 10px;
    }
    .gallery-item .title {
        padding: 8px 10px;
        font-size: 13px;
    }
}