/* 首页「走进好凯德」实拍画廊（设计稿接线 2026-11-14）
   类名统一 ab3- 前缀、规则统一 body 前缀：避开 inpage.css 同名规则与首页二次加载 common.css。
   图片为 3:2 实拍，scroll-snap 横滑 + 左右圆形箭头，不依赖 Swiper/jQuery。 */

body .ab3-section {
    background: #f5f7fa;
    padding: 0 0.625rem 4.375rem;
    overflow: hidden;
}

body .ab3-section .ab3-head {
    margin-bottom: 2rem;
}

body .ab3-section .ab3-head h2 {
    /* 参考稿该块标题比其它区块小一档：clamp(20px, 2.6vw, 26px) */
    font-size: clamp(20px, 2.6vw, 26px);
    color: #0a2f6b;
    letter-spacing: .02em;
}

body .ab3-section .ab3-head p {
    color: #5b6472;
    letter-spacing: .04em;
}

body .ab3-roll {
    position: relative;
    padding: 0 56px;
    margin-top: 0;
}

body .ab3-gallery {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body .ab3-gallery::-webkit-scrollbar {
    display: none;
}

body .ab3-card {
    flex: 0 0 calc((100% - 40px) / 3);
    scroll-snap-align: start;
    display: block;
    padding: 14px;
    background: #fff;
    border: 1px solid #e9edf4;
    border-radius: 14px;
    overflow: hidden;
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

body .ab3-img {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: 8px;
    overflow: hidden;
    background: #e8eef7;
}

body .ab3-img img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
    transform: scale(1);
    transition: transform .6s cubic-bezier(.2, .7, .3, 1), filter .4s ease;
}

body .ab3-cap {
    display: block;
    margin-top: 16px;
    padding: 0 4px 4px;
    text-align: center;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .3s ease;
}

body .ab3-card:hover {
    background: #0d3f8f;
    border-color: #0d3f8f;
    box-shadow: 0 10px 28px rgba(13, 63, 143, .18);
}

body .ab3-card:hover .ab3-img img {
    transform: scale(1.07);
    filter: brightness(1.05) saturate(1.05);
}

body .ab3-card:hover .ab3-cap {
    color: #fff;
}

body .ab3-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #dfe6f0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 14px rgba(13, 63, 143, .10);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

body .ab3-arrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-left: 2px solid #6b7a90;
    border-bottom: 2px solid #6b7a90;
    transform: rotate(45deg);
    margin-left: 4px;
    transition: border-color .25s ease;
}

body .ab3-next::before {
    transform: rotate(-135deg);
    margin-left: -4px;
}

body .ab3-prev {
    left: 0;
}

body .ab3-next {
    right: 0;
}

body .ab3-arrow:hover {
    background: #0d3f8f;
    border-color: #0d3f8f;
    box-shadow: 0 6px 18px rgba(13, 63, 143, .25);
}

body .ab3-arrow:hover::before {
    border-color: #fff;
}

@media screen and (max-width: 1200px) {
    body .ab3-section {
        padding: 0 0.625rem 2rem;
    }

    body .ab3-card {
        padding: 12px;
    }
}

@media screen and (max-width: 992px) {
    body .ab3-card {
        flex-basis: calc((100% - 20px) / 2);
    }

    body .ab3-section .ab3-head {
        margin-bottom: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    body .ab3-roll {
        padding: 0;
    }

    body .ab3-arrow {
        display: none;
    }

    body .ab3-card {
        flex-basis: 72%;
    }

    body .ab3-cap {
        font-size: 15px;
        margin-top: 12px;
    }
}

@media screen and (max-width: 479px) {
    body .ab3-card {
        flex-basis: 86%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .ab3-card,
    body .ab3-img img,
    body .ab3-cap,
    body .ab3-arrow,
    body .ab3-arrow::before {
        transition: none;
    }

    body .ab3-card:hover .ab3-img img {
        transform: none;
    }
}
