/* Section Builder 共用樣式（前台/後台/預覽共用） */
/* 容器寬度與間距 */
body .container section.b {
    max-width: 1000px;
    margin: 24px auto;
}

/* 單圖＋文字 */
.b.b-image-text > img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.b.b-image-text > div {
    margin-top: 12px;
}

/* 圖文並排（左圖右文） */
.b.b-its .ta-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 24px;
}

    .b.b-its .ta-row > .ta-col:first-child {
        flex: 0 0 40%;
        max-width: 40%;
        height: 60vh;
    }

        .b.b-its .ta-row > .ta-col:first-child img {
            height: 100%;
            width: 100%;
            object-fit: contain;
            object-position: center;
        }

    .b.b-its .ta-row > .ta-col:last-child {
        flex: 1;
        height: 60vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px;
        box-sizing: border-box;
        position: relative;
    }

        .b.b-its .ta-row > .ta-col:last-child > div {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.6;
            font-size: 1rem;
        }

            .b.b-its .ta-row > .ta-col:last-child > div::after {
                content: "";
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                height: 40px;
                background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
                pointer-events: none;
            }

/* 圖懸浮（左中／右中） */
.b.b-float {
    position: relative;
    min-height: 300px;
}

    .b.b-float .float-wrap {
        position: relative;
        padding-left: 35%;
    }

    .b.b-float .float-img {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 45%;
        max-width: 520px;
    }

        .b.b-float .float-img img {
            width: 100%;
            height: auto;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
        }

    .b.b-float.right .float-wrap {
        padding-left: 0;
        padding-right: 35%;
    }

    .b.b-float.right .float-img {
        left: auto;
        right: 0;
    }

/* 修改圖懸浮左樣式 - 添加 60vh 高度設置和防滾動優化 */
/* 圖懸浮左 - 圖片重疊在文字內容上 */
.b.b-float-left {
    position: relative;
    min-height: 60vh;
/*    padding: 0px 20px;*/
    overflow: hidden;
}

    .b.b-float-left .ta-float-container {
        position: relative;
        display: flex;
        align-items: center;
        min-height: 60vh;
        max-width: 100%;
        overflow: hidden;
    }

    .b.b-float-left .ta-float-content {
        background: rgba(0, 0, 0, 0.85);
        color: white;
        padding: 40px 50px 40px 30px;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 1;
        flex: 1;
        margin-left: 25%;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

        .b.b-float-left .ta-float-content h3 {
            margin: 0 0 20px 0;
            font-size: 1.75rem;
            font-weight: 700;
            color: white;
            word-wrap: break-word;
        }

        .b.b-float-left .ta-float-content p {
            margin: 0;
            font-size: 1rem;
            opacity: 0.9;
            word-wrap: break-word;
        }

    .b.b-float-left .ta-float-image {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 45%;
        max-width: 400px;
    }

        .b.b-float-left .ta-float-image img {
            width: 100%;
            height: 60vh;
            object-fit: cover;
            border-radius: 12px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

            .b.b-float-left .ta-float-image img:hover {
                transform: translateY(-4px);
                box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
            }

/* 修改圖懸浮右樣式 - 添加 60vh 高度設置和防滾動優化 */
/* 圖懸浮右 - 圖片重疊在文字內容上 */
.b.b-float-right {
    position: relative;
    min-height: 60vh;
    padding: 0px 20px;
    overflow: hidden;
}

    .b.b-float-right .ta-float-container {
        position: relative;
        display: flex;
        align-items: center;
        min-height: 60vh;
        max-width: 100%;
        overflow: hidden;
    }

    .b.b-float-right .ta-float-content {
        background: rgba(0, 0, 0, 0.85);
        color: white;
        padding: 40px 30px 40px 50px;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 1;
        flex: 1;
        margin-right: 25%;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

        .b.b-float-right .ta-float-content h3 {
            margin: 0 0 20px 0;
            font-size: 1.75rem;
            font-weight: 700;
            color: white;
            word-wrap: break-word;
        }

        .b.b-float-right .ta-float-content p {
            margin: 0;
            font-size: 1rem;
            opacity: 0.9;
            word-wrap: break-word;
        }

    .b.b-float-right .ta-float-image {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 45%;
        max-width: 400px;
    }

        .b.b-float-right .ta-float-image img {
            width: 100%;
            height: 60vh;
            object-fit: cover;
            border-radius: 12px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

            .b.b-float-right .ta-float-image img:hover {
                transform: translateY(-4px);
                box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
            }

/* 改善多圖並排的響應式設計 */
/* 多圖並排 - 響應式網格佈局 */
.ta-multi {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 100%;
}

    .ta-multi img {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        object-fit: cover;
        object-position: center;
        display: block;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

        .ta-multi img:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        }

        /* 限制最多 6 張圖片的顯示 */
        .ta-multi img:nth-child(n + 7) {
            display: none;
        }

/* Swiper 置中與圖片裁切 */
.swiper {
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center center;
        display: block;
    }

/* 新增 Coverflow 效果樣式 */
/* Coverflow Swiper 特殊樣式 */
.coverflow-swiper {
    padding: 50px 0;
    overflow: visible;
}

    .coverflow-swiper .swiper-slide {
        background-position: center;
        background-size: cover;
        width: 300px;
        height: 300px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }

        .coverflow-swiper .swiper-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }

    /* Coverflow 分頁指示器 */
    .coverflow-swiper .swiper-pagination {
        position: relative;
        margin-top: 30px;
    }

    .coverflow-swiper .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        background: rgba(0, 0, 0, 0.3);
        opacity: 1;
        transition: all 0.3s ease;
    }

    .coverflow-swiper .swiper-pagination-bullet-active {
        background: #007aff;
        transform: scale(1.2);
    }

    /* Coverflow 導航按鈕 */
    .coverflow-swiper .swiper-button-next,
    .coverflow-swiper .swiper-button-prev {
        color: #007aff;
        background: rgba(255, 255, 255, 0.9);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

        .coverflow-swiper .swiper-button-next:hover,
        .coverflow-swiper .swiper-button-prev:hover {
            background: rgba(255, 255, 255, 1);
            transform: scale(1.1);
        }

        .coverflow-swiper .swiper-button-next::after,
        .coverflow-swiper .swiper-button-prev::after {
            font-size: 1.125rem;
            font-weight: bold;
        }

/* 新增垂直輪播縮略圖導航樣式 */
/* 垂直輪播容器 */
.vertical-carousel-container {
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.vertical-carousel-wrapper {
    display: flex;
    gap: 20px;
    height: 100%;
}

/* 左側縮略圖容器 */
.thumbs-container {
    flex: 0 0 120px;
    height: 400px;
}

.thumbs-swiper {
    height: 100%;
}

    .thumbs-swiper .swiper-slide {
        height: auto;
        cursor: pointer;
        opacity: 0.6;
        transition: all 0.3s ease;
        border-radius: 8px;
        overflow: hidden;
    }

    .thumbs-swiper .swiper-slide-thumb-active {
        opacity: 1;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .thumbs-swiper .swiper-slide img {
        width: 100%;
        height: 80px;
        object-fit: cover;
        border-radius: 8px;
    }

/* 右側主內容容器 */
.main-container {
    flex: 1;
    position: relative;
}

.main-swiper {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

    .main-swiper .swiper-slide {
        background: #f8f9fa;
    }

        .main-swiper .swiper-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
        }

    /* 垂直輪播分頁指示器 */
    .main-swiper .swiper-pagination {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
    }

    .main-swiper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        background: rgba(255, 255, 255, 0.5);
        opacity: 1;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .main-swiper .swiper-pagination-bullet-active {
        background: #ffffff;
        transform: scale(1.2);
    }

/* 垂直輪播外層遮罩（保持向後兼容） */
.b.b-vc {
    position: relative;
    overflow: hidden;
}

.ta-v-carousel {
    position: relative;
    overflow: hidden;
    height: 60vh;
    min-height: 300px;
}

/* 添加重點縮放功能的完整樣式 */
/* 重點縮放 - 圖片熱點功能 */
.b.b-hotspot {
    position: relative;
    overflow: hidden;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

    .b.b-hotspot .hotspot-title {
        text-align: center;
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
        font-weight: 600;
        color: #333;
    }

    .b.b-hotspot .hotspot-container {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 比例 */
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .b.b-hotspot .hotspot-image-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .b.b-hotspot .hotspot-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform 0.3s ease;
    }

        .b.b-hotspot .hotspot-image:hover {
            transform: scale(1.02);
        }

    /* 熱點標記 */
    .b.b-hotspot .hotspot-point {
        position: absolute;
        cursor: pointer;
        z-index: 10;
        transform: translate(-50%, -50%);
        transition: all 0.3s ease;
    }

        .b.b-hotspot .hotspot-point:hover {
            transform: translate(-50%, -50%) scale(1.2);
        }

        .b.b-hotspot .hotspot-point .hotspot-marker {
            width: 24px;
            height: 24px;
            position: relative;
            animation: pulse 2s infinite;
        }

            .b.b-hotspot .hotspot-point .hotspot-marker svg {
                width: 100%;
                height: 100%;
                filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
            }

/* 熱點脈衝動畫 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* 工具提示 */
.b.b-hotspot .hotspot-tooltip {
    position: absolute;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-width: 200px;
    max-width: 320px;
    font-size: 0.875rem;
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .b.b-hotspot .hotspot-tooltip.show {
        display: block;
        opacity: 1;
    }

    /* 工具提示箭頭 */
    .b.b-hotspot .hotspot-tooltip::before {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border: 8px solid transparent;
    }

/* 不同位置的工具提示 */
.b.b-hotspot .hotspot-point[data-position="top"] .hotspot-tooltip {
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
}

    .b.b-hotspot .hotspot-point[data-position="top"] .hotspot-tooltip::before {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-top-color: rgba(255, 255, 255, 0.95);
    }

.b.b-hotspot .hotspot-point[data-position="bottom"] .hotspot-tooltip {
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
}

    .b.b-hotspot .hotspot-point[data-position="bottom"] .hotspot-tooltip::before {
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-bottom-color: rgba(255, 255, 255, 0.95);
    }

.b.b-hotspot .hotspot-point[data-position="left"] .hotspot-tooltip {
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
}

    .b.b-hotspot .hotspot-point[data-position="left"] .hotspot-tooltip::before {
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        border-left-color: rgba(255, 255, 255, 0.95);
    }

.b.b-hotspot .hotspot-point[data-position="right"] .hotspot-tooltip {
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
}

    .b.b-hotspot .hotspot-point[data-position="right"] .hotspot-tooltip::before {
        right: 100%;
        top: 50%;
        transform: translateY(-50%);
        border-right-color: rgba(255, 255, 255, 0.95);
    }

.b.b-hotspot .hotspot-point[data-position="center"] .hotspot-tooltip {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

    .b.b-hotspot .hotspot-point[data-position="center"] .hotspot-tooltip::before {
        display: none;
    }

/* 編輯按鈕 */
.b.b-hotspot .hotspot-edit-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 30;
}

    .b.b-hotspot .hotspot-edit-button .btn {
        background: rgba(0, 123, 255, 0.9);
        border: none;
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.875rem;
        font-weight: 500;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
        transition: all 0.3s ease;
    }

        .b.b-hotspot .hotspot-edit-button .btn:hover {
            background: rgba(0, 123, 255, 1);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
        }

        .b.b-hotspot .hotspot-edit-button .btn svg {
            margin-right: 6px;
            vertical-align: middle;
        }

/* RWD */
@media (max-width: 768px) {
    .b.b-its .ta-row {
        flex-direction: column;
    }

        .b.b-its .ta-row > .ta-col:first-child {
            width: 100%;
            max-width: 100%;
            height: auto;
        }

        .b.b-its .ta-row > .ta-col:last-child {
            height: auto;
            max-height: none;
            overflow: visible;
        }

            .b.b-its .ta-row > .ta-col:last-child > div::after {
                display: none;
            }

    /* 圖懸浮左右響應式調整 - 改為上下排列，保持重疊效果，調整圖片高度 */
    .b.b-float-left,
    .b.b-float-right {
        min-height: auto;
        padding: 20px;
    }

        .b.b-float-left .ta-float-container,
        .b.b-float-right .ta-float-container {
            flex-direction: column;
            min-height: auto;
            gap: 20px;
        }

        .b.b-float-left .ta-float-content,
        .b.b-float-right .ta-float-content {
            margin: 0;
            padding: 30px 25px;
            order: 2;
        }

        .b.b-float-left .ta-float-image,
        .b.b-float-right .ta-float-image {
            position: relative;
            left: auto;
            right: auto;
            top: auto;
            transform: none;
            width: 80%;
            max-width: 300px;
            margin: 0 auto;
            order: 1;
        }

            .b.b-float-left .ta-float-image img,
            .b.b-float-right .ta-float-image img {
                height: 40vh;
            }

    /* 多圖並排平板響應式調整 - 保持 2 列但稍小 */
    .ta-multi {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

        .ta-multi img {
            aspect-ratio: 4 / 3;
        }

    /* Coverflow 響應式調整 */
    .coverflow-swiper .swiper-slide {
        width: 250px;
        height: 250px;
    }

    .coverflow-swiper .swiper-button-next,
    .coverflow-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }

        .coverflow-swiper .swiper-button-next::after,
        .coverflow-swiper .swiper-button-prev::after {
            font-size: 0.875rem;
        }

    /* 小螢幕垂直輪播調整 */
    .vertical-carousel-container {
        min-height: 300px;
    }

    .main-swiper {
        height: 300px;
    }

    .thumbs-swiper .swiper-slide img {
        width: 50px;
        height: 50px;
    }

    /* 重點縮放平板響應式調整 */
    .b.b-hotspot {
        padding: 16px;
    }

        .b.b-hotspot .hotspot-title {
            font-size: 1.25rem;
            margin-bottom: 1rem;
        }

        .b.b-hotspot .hotspot-container {
            padding-bottom: 60%; /* 調整比例 */
        }

        .b.b-hotspot .hotspot-tooltip {
            min-width: 150px;
            max-width: 250px;
            font-size: 0.75rem;
            padding: 10px 12px;
        }

        .b.b-hotspot .hotspot-edit-button {
            bottom: 16px;
            right: 16px;
        }

            .b.b-hotspot .hotspot-edit-button .btn {
                padding: 6px 12px;
                font-size: 0.75rem;
            }
}

@media (max-width: 480px) {
    /* 多圖並排手機響應式調整 - 改為 1 列大圖 */
    .ta-multi {
        grid-template-columns: 1fr;
        gap: 12px;
    }

        .ta-multi img {
            aspect-ratio: 16 / 9;
        }

    /* 小螢幕進一步調整 */
    .coverflow-swiper {
        padding: 30px 0;
    }

        .coverflow-swiper .swiper-slide {
            width: 200px;
            height: 200px;
        }

    /* 手機版圖懸浮進一步調整 - 設置圖片高度為 35vh */
    .b.b-float-left,
    .b.b-float-right {
        padding: 16px;
    }

        .b.b-float-left .ta-float-content,
        .b.b-float-right .ta-float-content {
            padding: 25px 20px;
        }

            .b.b-float-left .ta-float-content h3,
            .b.b-float-right .ta-float-content h3 {
                font-size: 1.5rem;
            }

        .b.b-float-left .ta-float-image,
        .b.b-float-right .ta-float-image {
            width: 90%;
            max-width: 250px;
        }

            .b.b-float-left .ta-float-image img,
            .b.b-float-right .ta-float-image img {
                height: 35vh;
            }

    /* 小螢幕垂直輪播調整 */
    .vertical-carousel-container {
        min-height: 300px;
    }

    .main-swiper {
        height: 250px;
    }

    .thumbs-swiper .swiper-slide img {
        width: 50px;
        height: 50px;
    }

    /* 重點縮放手機響應式調整 */
    .b.b-hotspot {
        padding: 12px;
    }

        .b.b-hotspot .hotspot-title {
            font-size: 1.125rem;
            margin-bottom: 0.8rem;
        }

        .b.b-hotspot .hotspot-container {
            padding-bottom: 66.67%; /* 3:2 比例 */
        }

        .b.b-hotspot .hotspot-point .hotspot-marker {
            width: 20px;
            height: 20px;
        }

        .b.b-hotspot .hotspot-tooltip {
            min-width: 120px;
            max-width: 200px;
            font-size: 0.75rem;
            padding: 8px 10px;
        }

        .b.b-hotspot .hotspot-edit-button {
            bottom: 12px;
            right: 12px;
        }

            .b.b-hotspot .hotspot-edit-button .btn {
                padding: 5px 10px;
                font-size: 0.75rem;
                border-radius: 16px;
            }

                .b.b-hotspot .hotspot-edit-button .btn svg {
                    width: 14px;
                    height: 14px;
                    margin-right: 4px;
                }
}