/* =========================================================
   zb-show-02 双完整图片错层对调轮播 V1.1

   原HTML不用修改：
   .zb-show-02-container > .zb-show-02-item > img

   两张1300×700完整图片错位叠放；右上、左下按钮填满错位空隙。
   ========================================================= */

.zb-show-02-container {
    --zb-image-width: 1300px;
    --zb-image-height: 700px;
    --zb-swap-x: 72px;
    --zb-swap-y: 82px;
    width: calc(var(--zb-image-width) + var(--zb-swap-x));
    height: calc(var(--zb-image-height) + var(--zb-swap-y));
    margin: 0 auto;
    position: relative;
    display: block;
    overflow: visible;
    isolation: isolate;
    perspective: 1900px;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    /* FIX-4：容器需要 outline，由 focus-visible 控制 */
    outline: none;
}

.zb-show-02-container *,
.zb-show-02-container *::before,
.zb-show-02-container *::after {
    box-sizing: border-box;
}

/* FIX-4：键盘焦点可见指示 */
.zb-show-02-container:focus-visible {
    outline: 2px solid rgba(242, 135, 24, .7);
    outline-offset: 4px;
}

/* JS载入前只显示第一张，避免图片纵向排开 */
.zb-show-02-container:not([data-zb-swap-ready="1"]) > .zb-show-02-item {
    width: var(--zb-image-width);
    height: var(--zb-image-height);
    display: none;
}

.zb-show-02-container:not([data-zb-swap-ready="1"]) > .zb-show-02-item:first-child {
    display: block;
}

.zb-show-02-container:not([data-zb-swap-ready="1"]) > .zb-show-02-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* 原始图片只作为数据源保留，显示工作交给两个完整图片平面 */
.zb-show-02-source-list {
    display: none !important;
}

.zb-show-02-swap-stage {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    /* 图片在舞台边缘连续输送出去，避免移出后压到页面其他区域 */
    overflow: hidden;
    transform-style: preserve-3d;
}

.zb-show-02-swap-layer {
    width: var(--zb-image-width);
    height: var(--zb-image-height);
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #05080d;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform, filter, box-shadow;
}

.zb-show-02-swap-layer > img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: block;
    object-fit: cover;
    border: 0;
    transform: none !important;
    transition: opacity .18s ease !important;
    filter: none !important;
    box-shadow: none !important;
    -webkit-user-drag: none;
    user-select: none;
}

/* 左上主图 */
.zb-show-02-swap-layer.is-zb-front {
    z-index: 4;
    transform: translate3d(0, 0, 0);
    box-shadow: 0 24px 54px rgba(0, 0, 0, .42);
}

/* 右下副图：它也是完整1300×700图片，只是大部分被主图盖住 */
.zb-show-02-swap-layer.is-zb-back {
    z-index: 2;
    transform: translate3d(var(--zb-swap-x), var(--zb-swap-y), 0);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .34);
}

/* 向前切换：新后图从右下方渐入 */
.zb-show-02-swap-layer.is-zb-buffer-arriving {
    animation: zb-show-02-buffer-arrive .42s cubic-bezier(.20, .72, .24, 1) both;
}

@keyframes zb-show-02-buffer-arrive {
    0% {
        opacity: .10;
        transform: translate3d(calc(var(--zb-swap-x) + 18px), calc(var(--zb-swap-y) + 20px), 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(var(--zb-swap-x), var(--zb-swap-y), 0);
    }
}

.zb-show-02-container.is-zb-switching {
    cursor: wait;
}

/* FIX-3：切换动画进行时屏蔽按钮和分页点的点击，防止视觉无反馈的快速点击堆积 */
.zb-show-02-container.is-zb-switching .zb-show-02-swap-arrow,
.zb-show-02-container.is-zb-switching .zb-show-02-swap-dot {
    pointer-events: none;
    opacity: .52;
}

/* ------------------------- 补角按钮 ------------------------- */
.zb-show-02-swap-arrow {
    position: absolute;
    z-index: 12;
    width: var(--zb-swap-x);
    height: var(--zb-swap-y);
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: #f28718;
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    transition: color .22s ease, background .22s ease, opacity .22s ease;
}

/* 右上角空隙 */
.zb-show-02-swap-next {
    left: var(--zb-image-width);
    top: 0;
}

/* 左下角空隙 */
.zb-show-02-swap-prev {
    left: 0;
    top: var(--zb-image-height);
}

.zb-show-02-swap-arrow::before {
    content: "";
    width: 31px;
    height: 2px;
    position: absolute;
    left: 20px;
    top: 50%;
    margin-top: -1px;
    background: currentColor;
}

.zb-show-02-swap-arrow::after {
    content: "";
    width: 11px;
    height: 11px;
    position: absolute;
    top: 50%;
    margin-top: -6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.zb-show-02-swap-next::after {
    right: 18px;
    transform: rotate(45deg);
}

.zb-show-02-swap-prev::after {
    left: 18px;
    transform: rotate(-135deg);
}

.zb-show-02-swap-arrow:hover {
    color: #fff;
    background: #ff9f24;
}

.zb-show-02-swap-arrow:active {
    color: #fff;
    background: #d96c08;
}

.zb-show-02-swap-arrow:disabled {
    cursor: default;
    opacity: .5;
}

/* ------------------------- 竖排分页 ------------------------- */
.zb-show-02-swap-dots {
    min-width: 46px;
    max-height: 330px;
    position: absolute;
    z-index: 13;
    right: calc(var(--zb-swap-x) + 18px);
    bottom: calc(var(--zb-swap-y) + 18px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 20px 13px;
    background: rgba(0, 0, 0, .88);
}

.zb-show-02-swap-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    display: block;
    margin: 0;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    outline: 0;
    background: transparent;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

.zb-show-02-swap-dot:hover {
    transform: scale(1.25);
}

.zb-show-02-swap-dot.is-zb-active {
    background: #fff;
    transform: scale(1.14);
}

.zb-show-02-container[data-zb-count="1"] .zb-show-02-swap-layer.is-zb-back,
.zb-show-02-container[data-zb-count="1"] .zb-show-02-swap-arrow,
.zb-show-02-container[data-zb-count="1"] .zb-show-02-swap-dots {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .zb-show-02-swap-layer,
    .zb-show-02-swap-layer > img,
    .zb-show-02-swap-arrow,
    .zb-show-02-swap-dot {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
