
.zysfx-gallery{margin:24px 0;font-family:inherit}
.zysfx-gallery-title{font-size:20px;font-weight:700;color:#2f3847;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.zysfx-gallery-main-wrap{
position:relative;
width:fit-content;
max-width:100%;
height:520px;
min-height:260px;
max-height:760px;
margin-left:auto;
margin-right:auto;
background:transparent;
border-radius:14px;
overflow:hidden;
transition:width .25s ease,height .25s ease
}
.zysfx-gallery-main-button{
width:100%;
height:100%;
padding:0;
margin:0;
border:0;
background:transparent;
cursor:zoom-in;
display:flex;
align-items:center;
justify-content:center
}
.zysfx-gallery-main{
display:block;
width:100%;
height:100%;
object-fit:contain;
margin:auto;
background:transparent
}
.zysfx-gallery-counter{position:absolute;right:16px;bottom:14px;padding:5px 9px;border-radius:8px;background:rgba(0,0,0,.55);color:#fff;font-size:13px;z-index:5}
.zysfx-gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:64px;border:0;border-radius:10px;background:rgba(0,0,0,.28);color:#fff;font-size:34px;cursor:pointer;z-index:6;opacity:0;transition:.2s}
.zysfx-gallery-main-wrap:hover .zysfx-gallery-arrow{opacity:1}
.zysfx-gallery-prev{left:12px}
.zysfx-gallery-next{right:12px}
.zysfx-gallery-thumbs-wrap{position:relative;margin-top:12px}
.zysfx-gallery-thumbs{display:flex;gap:10px;overflow-x:auto;scroll-behavior:smooth;padding:2px 2px 8px}
.zysfx-gallery-thumb{width:92px;height:56px;flex:0 0 auto;padding:2px;border:2px solid transparent;border-radius:8px;background:#fff;cursor:pointer;overflow:hidden}
.zysfx-gallery-thumb img{width:100%;height:100%;display:block;object-fit:cover;border-radius:5px}
.zysfx-gallery-thumb.is-active{border-color:#3478f6}
.zysfx-gallery-thumb-scroll{position:absolute;top:0;bottom:8px;width:26px;border:0;background:rgba(255,255,255,.88);color:#57606f;font-size:22px;cursor:pointer;z-index:4}
.zysfx-gallery-thumb-left{left:0}
.zysfx-gallery-thumb-right{right:0}
.zysfx-gallery-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:999999;display:none;align-items:center;justify-content:center}
.zysfx-gallery-lightbox.is-open{display:flex}
.zysfx-gallery-lightbox-inner{max-width:92vw;max-height:90vh;display:flex;flex-direction:column;align-items:center;justify-content:center}
.zysfx-gallery-lightbox-img{max-width:92vw;max-height:84vh;object-fit:contain;display:block}
.zysfx-gallery-lightbox-count{color:#fff;margin-top:10px;font-size:14px}
.zysfx-gallery-close{position:absolute;top:18px;right:22px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:30px;cursor:pointer}
.zysfx-gallery-lightbox-prev,.zysfx-gallery-lightbox-next{position:absolute;top:50%;transform:translateY(-50%);width:54px;height:70px;border:0;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;font-size:42px;cursor:pointer}
.zysfx-gallery-lightbox-prev{left:18px}
.zysfx-gallery-lightbox-next{right:18px}

@media(max-width:768px){
.zysfx-gallery-main-wrap{
min-height:220px;
max-height:70vh;
}
}

/* v1.3.6：底部缩略图仅切换主图，不作为弹窗入口 */
.zysfx-gallery-thumb,
.zysfx-gallery-thumb img{
    cursor:pointer !important;
}
.zysfx-gallery-thumb img{
    pointer-events:auto !important;
}

/* v1.3.7：主图窗口自身贴合当前图片比例 */
.zysfx-gallery-main-wrap{
    box-sizing:border-box;
}
@media(max-width:768px){
    .zysfx-gallery-main-wrap{
        max-width:100%;
        min-height:220px;
        max-height:70vh;
    }
}


/* v1.4.7：前端去黑边版 */
.zysfx-gallery-main-wrap{
    background:#f7f9fc !important;
    border:1px solid #e8edf5;
    box-shadow:none;
}

.zysfx-gallery-main-button{
    background:transparent !important;
}

.zysfx-gallery-main{
    background:transparent !important;
}

.zysfx-gallery-arrow{
    background:rgba(20, 24, 35, .16);
}

.zysfx-gallery-thumb-scroll{
    background:rgba(255,255,255,.95);
}

.zysfx-gallery-lightbox{
    background:rgba(0,0,0,.92);
}


/* v1.5.0：彻底去除主图外层背景框 */
.zysfx-gallery-main-wrap{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    border-radius:0 !important;
    overflow:visible !important;
}

.zysfx-gallery-main-button{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

.zysfx-gallery-main{
    background:transparent !important;
    border-radius:10px;
    box-shadow:0 4px 16px rgba(0,0,0,.16);
}

/* 左右箭头独立浮在图片两侧 */
.zysfx-gallery-arrow{
    background:rgba(20,24,35,.10) !important;
    color:#fff;
    backdrop-filter:blur(2px);
}

/* 计数器保留 */
.zysfx-gallery-counter{
    background:rgba(0,0,0,.55) !important;
}




/* v1.5.4：插件独立单层大图，阻止主题灯箱重复 */
html.zysfx-gallery-lightbox-open{
    overflow:hidden !important;
}

.zysfx-gallery-lightbox{
    position:fixed !important;
    inset:0 !important;
    z-index:2147483000 !important;
    display:none !important;
    align-items:center !important;
    justify-content:center !important;
    background:rgba(0,0,0,.92) !important;
}

.zysfx-gallery-lightbox.is-open{
    display:flex !important;
}

.zysfx-gallery-lightbox-inner{
    max-width:92vw !important;
    max-height:90vh !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    background:transparent !important;
}

.zysfx-gallery-lightbox-img{
    display:block !important;
    width:auto !important;
    height:auto !important;
    max-width:88vw !important;
    max-height:82vh !important;
    object-fit:contain !important;
    border-radius:10px !important;
    box-shadow:0 8px 30px rgba(0,0,0,.35) !important;
    background:transparent !important;
}

.zysfx-gallery-lightbox-count{
    margin-top:12px !important;
    padding:4px 10px !important;
    border-radius:8px !important;
    background:rgba(0,0,0,.45) !important;
    color:#fff !important;
    font-size:14px !important;
}

.zysfx-gallery-close{
    position:absolute !important;
    top:18px !important;
    right:22px !important;
    width:44px !important;
    height:44px !important;
    border:0 !important;
    border-radius:50% !important;
    background:rgba(255,255,255,.14) !important;
    color:#fff !important;
    font-size:30px !important;
    line-height:44px !important;
    cursor:pointer !important;
    z-index:3 !important;
}

.zysfx-gallery-lightbox-prev,
.zysfx-gallery-lightbox-next{
    position:absolute !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    width:54px !important;
    height:70px !important;
    border:0 !important;
    border-radius:10px !important;
    background:rgba(255,255,255,.12) !important;
    color:#fff !important;
    font-size:42px !important;
    cursor:pointer !important;
    z-index:3 !important;
}

.zysfx-gallery-lightbox-prev{left:22px !important;}
.zysfx-gallery-lightbox-next{right:22px !important;}

@media(max-width:768px){
    .zysfx-gallery-lightbox-img{
        max-width:94vw !important;
        max-height:80vh !important;
    }

    .zysfx-gallery-lightbox-prev,
    .zysfx-gallery-lightbox-next{
        width:40px !important;
        height:58px !important;
        font-size:32px !important;
    }

    .zysfx-gallery-lightbox-prev{left:8px !important;}
    .zysfx-gallery-lightbox-next{right:8px !important;}
}
