/* ============================================================
 * 通用 cms-tpl 基础样式
 * ========================================================== */
.cms-tpl {
    box-sizing: border-box;
    color: #303133;
    line-height: 1.6;
}

.cms-tpl * {
    box-sizing: border-box;
}

.cms-tpl-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #303133;
}

.cms-tpl-empty {
    padding: 18px 12px;
    border: 1px dashed #dcdfe6;
    border-radius: 6px;
    text-align: center;
    color: #909399;
    background: #fafafa;
}

.cms-tpl-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cms-tpl-list-item,
.cms-tpl-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}

.cms-tpl-list-item a,
.cms-tpl-list li a {
    color: #303133;
    text-decoration: none;
}

.cms-tpl-list-item a:hover,
.cms-tpl-list li a:hover {
    color: #409eff;
}

.cms-tpl-time,
.cms-tpl-list time {
    font-size: 12px;
    color: #909399;
    white-space: nowrap;
}

.cms-tpl-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 32px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #303133;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cms-tpl-page-btn:hover {
    color: #409eff;
    border-color: #a0cfff;
}

.cms-tpl-page-btn.is-disabled,
.cms-tpl-page-btn.is-disabled:hover {
    color: #c0c4cc;
    border-color: #ebeef5;
    background: #f5f7fa;
    cursor: not-allowed;
}

.cms-tpl-img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 120px;
    color: #909399;
    background: #f5f7fa;
    border: 1px dashed #dcdfe6;
    border-radius: 6px;
}

/* ============================================================
 * 轮播图 - 舞台与面板
 * ========================================================== */
.cms-tpl-carousel .cms-tpl-carousel-stage {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.cms-tpl-carousel .cms-tpl-carousel-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.cms-tpl-carousel .cms-tpl-carousel-panel.is-active {
    opacity: 1;
    z-index: 2;
}

.cms-tpl-carousel .cms-tpl-carousel-slide,
.cms-tpl-carousel .cms-tpl-carousel-image-track {
    width: 100%;
    height: 100%;
    display: block;
}

.cms-tpl-carousel .cms-tpl-carousel-slide {
    position: relative;
    overflow: hidden;
}

.cms-tpl-carousel .cms-tpl-carousel-image-track {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    background-size: var(--lbt-img-width, auto) 100%;
    background-position: center center;
  background-repeat: repeat-x;
}

.cms-tpl-carousel .cms-tpl-carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
    font-size: 14px;
}

/* ============================================================
 * 轮播图 - 左右切换按钮
 * ========================================================== */
.cms-tpl-carousel .cms-tpl-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    text-decoration: none;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    font-size: 18px;
    z-index: 5;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.cms-tpl-carousel .cms-tpl-carousel-stage:hover .cms-tpl-carousel-nav {
    opacity: 1;
}

.cms-tpl-carousel .cms-tpl-carousel-nav.is-prev {
    left: 12px;
}

.cms-tpl-carousel .cms-tpl-carousel-nav.is-next {
    right: 12px;
}

@media (max-width: 640px) {
    .cms-tpl-carousel .cms-tpl-carousel-nav {
        display: none;
    }
}

/* ============================================================
 * 轮播图 - 底部圆点指示器
 * ========================================================== */
.cms-tpl-carousel .cms-tpl-carousel-dots {
    position: absolute;
    bottom: 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.cms-tpl-carousel .cms-tpl-dot {
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    font-size: 1px;
    color: #ffffff;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.cms-tpl-carousel .cms-tpl-dot.is-active {
    min-width: 14px;
    height: 14px;
    color: #ffffff73;
    background: #ffffff73;
}

/* ============================================================
 * Hero 容器适配（首页全宽轮播）
 * ========================================================== */
.hero {
    width: 100%;
    height: 500px;
    padding: 0;
}

.container,
.hero-grid {
    max-width: none;
    padding: 0;
    height: 100%;
}

.hero section {
    position: relative;
    height: 100%;
}

.hero section .cms-tpl-carousel-stage {
    height: 100%;
    border-radius: 0;
}