.categories-section-modern.gallery-section {
    padding: 40px 0 0 0;
}

.categories-section-modern .gallery-section-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
}

.categories-section-modern .section-title {
    font-size: 26px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 80px;
    text-align: center;
    color: #111;
}

.categories-section-modern .gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10%;
    align-items: start;
}

.categories-section-modern .category-group {
    display: flex;
    flex-direction: column;
    color: #111;
    position: relative;
}

.categories-section-modern .group-right {
    margin-top: 80px;
}

.categories-section-modern .images-container {
    position: relative;
    width: 100%;
    height: 600px;
    margin-bottom: 40px;
}

.categories-section-modern .floating-card {
    position: absolute;
    background: #FFFFFF;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03), 0 5px 15px rgba(0, 0, 0, 0.01);
    transition: box-shadow 0.4s ease;
    -webkit-tap-highlight-color: transparent;
}

.categories-section-modern .is-flipping .floating-card {
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.04);
}

.categories-section-modern .is-animating .floating-card {
    pointer-events: none;
}

.categories-section-modern .category-info {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
    padding: 0 5%;
}

.categories-section-modern .is-flipping .floating-card img {
    transition: transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
    transform: scale(1.03);
}

.categories-section-modern .floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 统一 900×1200 (3:4) 比例，大/小图仅宽度不同 */
.categories-section-modern .card-main {
    width: 72%;
    aspect-ratio: 3 / 4;
    height: auto;
    z-index: 2;
}

.categories-section-modern .card-small {
    width: 55%;
    aspect-ratio: 3 / 4;
    height: auto;
    z-index: 1;
}

.categories-section-modern .is-swapped .card-main {
    z-index: 1;
    width: 55%;
}

.categories-section-modern .is-swapped .card-small {
    z-index: 2;
    width: 72%;
}

/* 左侧组：小图左上 + 大图右下 */
.categories-section-modern .card-left-bg {
    top: 0;
    left: 0;
}

.categories-section-modern .card-left-fg {
    bottom: 0;
    right: 0;
}

/* 右侧组：大图右上 + 小图左下 */
.categories-section-modern .card-right-bg {
    top: 0;
    right: 0;
}

.categories-section-modern .card-right-fg {
    bottom: 20px;
    left: 0;
}

/* 点击后与大图互换位置 */
.categories-section-modern .group-left.is-swapped .card-left-bg {
    top: auto;
    left: auto;
    bottom: 0;
    right: 0;
}

.categories-section-modern .group-left.is-swapped .card-left-fg {
    top: 0;
    left: 0;
    bottom: auto;
    right: auto;
}

.categories-section-modern .group-right.is-swapped .card-right-bg {
    top: auto;
    right: auto;
    bottom: 20px;
    left: 0;
}

.categories-section-modern .group-right.is-swapped .card-right-fg {
    top: 0;
    left: auto;
    bottom: auto;
    right: 0;
}

.categories-section-modern .is-swapped .floating-card {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.05), 0 8px 18px rgba(0, 0, 0, 0.02);
}

.categories-section-modern .category-name {
    font-size: 20px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 8px;
    color: #111;
}

.categories-section-modern .category-link {
    font-size: 11px;
    letter-spacing: 2px;
    color: #666;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.categories-section-modern .category-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: #111;
    transform: scaleX(0);
    transform-origin: bottom right;
}

@media (max-width: 992px) {
    .categories-section-modern .gallery-section-inner {
        padding: 0 32px;
    }

    .categories-section-modern .images-container {
        height: 520px;
    }

    .categories-section-modern .section-title {
        font-size: 22px;
        letter-spacing: 4px;
        margin-bottom: 60px;
    }
}

@media (max-width: 768px) {
    .categories-section-modern.gallery-section {
        padding: 2rem 0 0 0;
    }

    .categories-section-modern .gallery-section-inner {
        padding: 0 24px;
    }

    .categories-section-modern .section-title {
        font-size: 18px;
        letter-spacing: 3px;
        margin-bottom: 48px;
    }

    .categories-section-modern .gallery-grid {
        grid-template-columns: 1fr;
        row-gap: 72px;
    }

    .categories-section-modern .group-right {
        margin-top: 0;
    }

    .categories-section-modern .images-container {
        height: 420px;
        margin-bottom: 28px;
    }

    .categories-section-modern .card-main {
        width: 68%;
    }

    .categories-section-modern .card-small {
        width: 52%;
    }

    .categories-section-modern .is-swapped .card-main {
        width: 52%;
    }

    .categories-section-modern .is-swapped .card-small {
        width: 68%;
    }

    .categories-section-modern .card-right-fg {
        bottom: 12px;
    }

    .categories-section-modern .group-right.is-swapped .card-right-bg {
        bottom: 12px;
    }

    .categories-section-modern .category-name {
        font-size: 16px;
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .categories-section-modern .images-container {
        height: 360px;
    }

    .categories-section-modern .section-title {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .categories-section-modern .category-name {
        font-size: 14px;
        letter-spacing: 2px;
    }
}
