/* ===== Tab Widget ===== */
.elementor-widget-custom_tab_widget {
    --cw-tab-left: 4fr;
    --cw-tab-right: 6fr;
}

.cw-tab-widget {
    display: flex;
    flex-direction: column;
}

/* ── 面板 ── */
.cw-tab-panel {
    display: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cw-tab-panel.is-active {
    display: block;
}

.cw-tab-inner {
    display: grid;
    grid-template-columns: var(--cw-tab-left, 4fr) var(--cw-tab-right, 6fr);
    gap: 40px;
    padding: 60px;
    align-items: center;
}

/* ── 左侧 ── */
.cw-tab-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.cw-tab-number {
    font-size: 64px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 16px;
}

.cw-tab-heading {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.2;
}

.cw-tab-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 30px;
    width: 100%;
}

.cw-tab-desc p {
    margin: 0 0 8px;
}

.cw-tab-desc p:last-child {
    margin-bottom: 0;
}

/* ── 询盘按钮（复用 button-widget 样式，补充 CSS 变量默认值） ── */
.elementor-widget-custom_tab_widget {
    --cw-gc1: rgba(255, 255, 255, 0);
    --cw-gp1: 0%;
    --cw-gc2: rgba(255, 255, 255, 0.12);
    --cw-gp2: 100%;
    --cw-ga: 180deg;
}

/* ── 右侧轮播 ── */
.cw-tab-right {
    position: relative;
    width: 100%;
    min-width: 0;
}

.cw-swiper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.cw-swiper .swiper-slide {
    position: relative;
    overflow: hidden;
}

.cw-swiper .swiper-slide img {
    width: 100%;
    height: 380px;
    display: block;
    object-fit: cover;
}

.cw-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.cw-swiper .swiper-button-prev,
.cw-swiper .swiper-button-next {
    color: #ffffff;
}

.cw-swiper .swiper-button-prev::after,
.cw-swiper .swiper-button-next::after {
    font-size: 16px;
}

/* ── Tab 导航 ── */
.cw-tab-nav-wrap {
    overflow: hidden;
}

.cw-tab-nav {
    display: flex;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    margin-left: 40px;
    margin-right: 40px;
}

.cw-tab-nav-item {
    flex: 1;
    text-align: center;
    padding: 20px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.cw-tab-nav-item.is-active {
    background-color: #4a90d9;
    color: #ffffff;
}

/* ── 手机端 ── */
@media (max-width: 768px) {

    .cw-tab-nav-wrap {
        order: -1;
    }

    .cw-tab-panels {
        order: 1;
    }

    .cw-tab-inner {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 24px;
    }

    .cw-tab-left {
        order: 2;
    }

    .cw-tab-right {
        order: 1;
    }

    .cw-tab-nav {
        margin-left: 16px;
        margin-right: 16px;
        flex-wrap: wrap;
    }

    .cw-swiper .swiper-slide img {
        height: 260px;
    }
}
