/* Tabs */
.sb-tabs-wrapper {
    position: relative;
    width: 100%;
    font-family: var(--thm-font);
    margin-bottom: 2rem;
}


.sb-tab-arrow {
    position: absolute;
    top: 5%;
    transform: translateY(-50%);
    z-index: 20;
    line-height: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    border-radius: 50%;
    background-color: white;
    color: var(--thm-base);
    box-shadow: 0 1px 2px #0000001a, 0 2px 22px #0003;
}

.sb-tab-arrow.left { left: 0; }
.sb-tab-arrow.right { right: 0; }

.sb-tabs-container {
    overflow: hidden;
    margin: 0 2.5rem;
    position: relative;
    z-index: 10;
}

.sb-tabs {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.3s ease;
}

.sb-tabs label {

    color: var(--thm-body);
    font-size: 18px;
    font-weight: 500;
    flex: 0 0 auto;
    padding: 1rem 2rem;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s;
}

.sb-tabs label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--thm-secondary);;
    transition: width 0.3s;
}

.sb-tabs label.active::after {
    width: 100%;
}

.sb-tabs label h3{
    color: var(--thm-body);
    font-size: 18px;
    font-weight: 500;
    flex: 0 0 auto;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s;
}


.sb-tab-contents {
    width: 100%;
    padding: 2rem;
    box-sizing: border-box;
    background: #f4f4f4;
}

.sb-tab-content {
    display: none;
}

.sb-tab-content.active {
    display: block;
}

.sb-tab-content img{
    width: 100%;
}
.sb-tab-content .sb-tab-text{
    display: flex;
    /*justify-content: center; !* 水平居中 *!*/
    align-items: center;     /* 垂直居中 */
}
.sb-tab-content b{
    color: var(--thm-secondary);
}
.sb-tab-content a{
    color: var(--thm-base);
}

@media (max-width: 1199px) {
    .sb-tab-content p, .sb-tab-content ul{
        padding: 18px;
    }
}

/* Gallery */
/* 消除 row 负 margin 对轮播偏差的影响 */
[data-scb-gallery].row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--thm-gray);
    background: #fff;
}

.sb-gallery-left,
.sb-gallery-right {
    width: 100%;
    box-sizing: border-box;
}

.sb-gallery-left {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.sb-gallery-right {
    padding: 38px !important;
    background: #fff;
}

.sb-gallery-right h4 {
    color: var(--thm-black);
}

.sb-gallery-left .sb-gallery-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s ease;
    cursor: default;
}

.sb-gallery-left .sb-gallery-slide {
    /*flex: 0 0 100%;*/
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sb-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.3);
    color: #fff;
    outline: none !important;
    border: none !important;
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
    transition: background 0.3s, color 0.3s;
}
.sb-gallery-arrow:focus,
.sb-gallery-arrow:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.sb-gallery-arrow.left { left: 10px; }
.sb-gallery-arrow.right { right: 10px; }

.sb-gallery-arrow:hover {
    background: rgba(0,0,0,0.6);
    color: var(--thm-base);
}

/*@media (max-width: 767px) {*/
/*    .sb-gallery-arrow { display: none; }*/
/*}*/

.sb-gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.sb-gallery-dots .dot {
    width: 10px;
    height: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.sb-gallery-dots .dot.active {
    background: rgba(0,0,0,0.8);
}

.sb-gallery-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.sb-gallery-info { display: none; }
.sb-gallery-info.active { display: block; }

a.sb-gallery-read-more {
    margin-top: 1rem;
    color: var(--thm-base);
    /*font-size: 0.8rem;*/
}

.sb-gallery-counter {
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--thm-primary);
    font-size: 0.8rem;
}

/* --- Gallery Wall --- */
.sb-gallery-wall {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.sb-gallery-wall-grid {
    width: 100%;
    position: relative;
    will-change: height;
}

.sb-gallery-wall-grid img {
    position: absolute;
    object-fit: cover;
    cursor: pointer;
    box-sizing: border-box;
    background-clip: padding-box;
    border: 6px solid #fff;                /* 白色“内边”视觉 */
    outline: 1px solid var(--thm-gray);   /* 外部浅灰色线 (用 outline 避免影响尺寸) */
    display: block;
    /* 过渡控制用于“漂移归位”入场动效；默认没有运行动画，动画由 JS 触发 */
    transition: transform 0.45s cubic-bezier(.22,.9,.3,1), opacity 0.45s ease;
    /* 初始隐藏：在布局前设置为透明和平移（JS 会控制具体值） */
    opacity: 0;
    transform: translateY(12px) scale(1.01);
}

/* hover 效果（在入场完成后仍可 hover 放大）*/
.sb-gallery-wall-grid img:hover {
    transform: scale(1.03);
}

/* --- Modal 基础 --- */
.sb-gallery-wall-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.sb-modal-overlay { position:absolute; inset:0; }
.sb-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: auto;
    display:flex; align-items:center; justify-content:center;
}
.sb-modal-image-wrapper { width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.sb-modal-image { max-width:100%; max-height:100%; object-fit:contain; display:block; }

/* Modal 按钮风格与 Gallery 一致 */
.sb-modal-prev,.sb-modal-next,.sb-modal-close{
    position:absolute; z-index:10; background: rgba(0,0,0,0.3); color:#fff; border:none; border-radius:50%; cursor:pointer;
    transition: background .3s, color .3s;
}
.sb-modal-prev{ left:15px; top:50%; transform:translateY(-50%); padding:.5rem 1rem; font-size:2rem; }
.sb-modal-next{ right:15px; top:50%; transform:translateY(-50%); padding:.5rem 1rem; font-size:2rem; }
.sb-modal-close{ top:15px; right:15px; padding:.3rem .7rem; font-size:1.5rem; }
.sb-modal-prev:hover,.sb-modal-next:hover,.sb-modal-close:hover{ background: rgba(255,255,255,0.12); color:var(--thm-base); }

/* 在非常窄的容器下，适度降低内边(border)带来的遮挡（可视需要删改） */
@media (max-width: 400px) {
    .sb-gallery-wall-grid img { border-width: 4px; outline-width: 1px; }
}

/* Loading */
/* =========================
   Loading Modal
========================= */

.sb-loading-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sb-loading-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* 背景遮罩 */
.sb-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
}

/* 中央卡片 */
.sb-loading-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(12px);
    opacity: 0;

    background: #fff;
    border: 1px solid var(--thm-gray);
    border-radius: 12px;
    padding: 28px 36px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transition:
            opacity 0.3s ease,
            transform 0.3s ease;
}

.sb-loading-modal.active .sb-loading-panel {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

/* Spinner */
.sb-loading-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid var(--thm-gray);
    border-top-color: var(--thm-base);
    animation: sb-spin 0.9s linear infinite;
}

@keyframes sb-spin {
    to { transform: rotate(360deg); }
}

/* 文案 */
.sb-loading-text {
    font-size: 14px;
    color: var(--thm-body);
    letter-spacing: 0.04em;
}

body.sb-modal-lock {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* ================================
* ScenicBend.Table Core
* ================================ */
.sb-table-wrapper {
    position: relative;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    cursor: grab; /* 默认抓手 */
}

.sb-table-wrapper.active {
    cursor: grabbing; /* 拖动时抓手变紧 */
}

.sb-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    font-weight: normal;
}

.sb-table strong {
    color: var(--thm-secondary);
}

.sb-table th,
.sb-table td {
    background: #fff;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

/* Sticky Header */
.sb-table.sb-sticky-header thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8f9fa;
}

/* Sticky First Column */
.sb-table .sb-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

.sb-table thead .sb-sticky-col {
    z-index: 4;
}

.sb-table.sb-sticky-header thead .sb-sticky-col {
    z-index: 4;
}

/* Header Wrapping Control */
.sb-table.wrap-header thead th {
    white-space: normal;
    word-break: break-word;
}

.sb-table thead th {
    font-weight: 500 !important;
}

.sb-table thead th.sb-wrap {
    white-space: normal;
    word-break: break-word;
}

.sb-table thead th.sb-nowrap {
    white-space: nowrap;
}

/* Scroll Hint (Optional) */
.sb-table-wrapper.is-scrolled .sb-sticky-col {
    box-shadow: 2px 0 6px rgba(0,0,0,.08);
}

/* ================================
 * sb-table light style (no vertical lines)
 * ================================ */
.sb-table.sb-light th,
.sb-table.sb-light td {
    border-left: none;
    border-right: none;
}

/* ---------- THEAD ---------- */
.sb-table.sb-light thead th {
    background: #fff;
    border-top: none;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

/* sticky header needs solid bg */
.sb-table.sb-light.sb-sticky-header thead th {
    background: #fff;
}

/* ---------- TBODY ---------- */
.sb-table.sb-light tbody td {
    border-top: none;
    border-bottom: 1px solid #f0f0f0;
}

/* optional: row hover still works */
.sb-table.sb-light tbody tr:hover td {
    background: #fafafa;
}

/* ---------- STICKY COLUMN ---------- */
.sb-table.sb-light . {
    background: #fff;
}

/* sticky header + sticky col overlap */
.sb-table.sb-light.sb-sticky-header thead .sb-sticky-col {
    background: #fff;
}

/* ---------- TABLE EDGE ---------- */
/* optional: remove outer border entirely */
.sb-table.sb-light {
    border-left: none;
    border-right: none;
}

/* ================================
 * 单元格内部容器
 * ================================ */
.sb-table .sb-cell {
    position: relative;
    display: block;
    padding-right: 28px;
}

/* ================================
 * 推荐图标
 * ================================ */
.sb-table .sb-cell.sb-best-seller::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 0;
    width: 28px;
    height: 28px;
    background: url('/assets/images/gui/ad-icon.png') center / contain no-repeat;
    pointer-events: none;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .sb-table th,
    .sb-table td {
        font-size: 14px;
        padding: 0.5rem;
    }
}

.sb-table-scroll-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 6;
}

/* 中央提示块 */
.sb-hint-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);

    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

/* 文案 */
.sb-hint-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

/* 左右图标 */
.sb-hint-icon {
    font-size: 18px;
    line-height: 1;
    color: #555;
}

/* 轻微左右动（整体动，不吵） */
.sb-hint-inner {
    animation: sb-hint-swipe 1.6s ease-in-out infinite;
}

@keyframes sb-hint-swipe {
    0%   { transform: translateX(0); }
    40%  { transform: translateX(-12px); }
    100% { transform: translateX(0); }
}

/* 一旦滚动，消失 */
.sb-table-wrapper.is-scrolled .sb-table-scroll-hint {
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* 只在移动端显示 */
@media (min-width: 769px) {
    .sb-table-scroll-hint {
        display: none !important;
    }
}

/* 尊重系统减少动画 */
@media (prefers-reduced-motion: reduce) {
    .sb-hint-inner {
        animation: none;
    }
}

/* =====================================================
 * SB Image Viewer Modal
 * ===================================================== */

.sb-image-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: rgba(0,0,0,0.88);
    touch-action: none;
}

.sb-image-viewer-modal.active {
    display: block;
}

/* 背景 */
.sb-image-viewer-backdrop {
    position: absolute;
    inset: 0;
}

/* 图片舞台 */
.sb-image-viewer-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 图片本体 */
.sb-image-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;

    transform-origin: center center;
    will-change: transform;
    user-select: none;
    cursor: grab;
}

/* 关闭按钮 */
.sb-image-viewer-close {
    position: fixed;
    top: 38px;
    right: 38px;
    width: 38px;
    height: 38px;
    text-align: center;
    line-height: 38px;
    font-size: 24px;
    color: var(--thm-secondary);
    cursor: pointer;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 3px rgb(51, 51, 51);
    z-index: 1;
    margin-right: 0;
}

/* 移动端友好 */
@media (max-width: 768px) {
    .sb-image-viewer-close {
        top: 10px;
        right: 10px;
    }
}
