/* =========================================
   強制系統商品頁 100% 滿版 (消除系統自帶的白邊)
   ========================================= */
section.group_table .container,
#ProductContent .container {
    width: 100% !important;
    max-width: 100% !important; /* 覆蓋系統預設的 max-width (例如 1140px 或 1200px) */
    padding-left: 0 !important; /* 清除系統預設的左右留白 */
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}


/* 2. 消除 row 預設的負 margin，避免產生水平卷軸 */
#ProductContent .container > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 3. 【最關鍵】消除系統欄位 (col-12) 預設左右各 15px 的留白 */
#ProductContent .container > .row > div[class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/**/
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-inline-block {
    display: inline-block !important;
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-inline-block {
        display: inline-block !important;
    }
}

@media (min-width: 960px) {
    .d-lg-none {
        display: none !important;
    }

    .d-lg-block {
        display: block !important;
    }

    .d-lg-inline-block {
        display: inline-block !important;
    }
}

/* =========================================
   01. VARIABLES & WRAPPER BASE
   ========================================= */

:root {
    --xj-gold: #c4a06b;
    --xj-dark: #1a1a1a;
    --xj-white: #ffffff;
    --xj-yellow:#ffde00;
    --xj-purple:#8533cc;
    --xj-bg: #f4f1ea;
}

.xj-wrapper {
    font-family: "Noto Sans TC", sans-serif;
    background: var(--xj-bg);
    color: var(--xj-dark);
    overflow-x: hidden;
    box-sizing: border-box;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    font-size: 16px; /* 根節點基礎大小 */
}

.xj-wrapper *,
.xj-wrapper *::before,
.xj-wrapper *::after {
    box-sizing: inherit;
}

.xj-container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

/* =========================================
   02. TYPOGRAPHY (文字排版 & RWD字體)
   ========================================= */
.xj-serif {
    font-family: "Noto Serif TC", serif;
}

.xj-p {
    font-size: clamp(1rem, 1vw + 0.6rem, 1.15rem);
    margin: 0 0 1rem 0;
    line-height: 1.85;
    color: #444;
    letter-spacing: 0.5px;
}

.xj-h1,
.xj-h2,
.xj-h3 {
    font-family: "Noto Serif TC", serif;
    font-weight: bold;
    line-height: 1.2;
    color: var(--xj-dark);
    margin: 0;
    letter-spacing: 2px;
}

.xj-h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
}
.xj-h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}
.xj-h3 {
    font-size: clamp(1.35rem, 3vw, 2.1rem);
}

/* =========================================
   03. UTILITIES & ANIMATIONS
   ========================================= */
/* 滾動進度條 */
.xj-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
}

.xj-progress-bar {
    height: 4px;
    background: var(--xj-gold);
    width: 0%;
}

/* 滾動淡入動畫 */
.xj-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.xj-reveal.xj-active {
    opacity: 1;
    transform: translateY(0);
}

/* 分隔線 */
.xj-divider {
    width: 100px;
    height: 4px;
    background: var(--xj-gold);
    margin: 20px auto;
}

/* =========================================
   04. HERO SECTION (主視覺區)
   ========================================= */
.xj-hero {
    height: 100vh;
    min-height: 540px;
    max-height: 900px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--xj-white);
    text-align: center;
    background:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url("https://www.yaofongtravel.com/material-alias/中國/北疆/紫戀北疆自由行14天/xinjiang-14day-pc.jpg")
            center/cover;
    background-attachment: fixed;
}

.xj-hero-content {
    z-index: 2;
    margin-top: -5rem;
}

.xj-hero .xj-h1 {
    letter-spacing: 10px;
    color: var(--xj-white);
}

.xj-hero .xj-h1 span {
    color: var(--xj-yellow);
}

.xj-hero .xj-p {
    margin: 10px auto;
    color: var(--xj-white);
    width: 85%;
    letter-spacing: 1px;
}

/* --- 3. 手機尺寸 --- */
@media (max-width: 768px) {
    .xj-wrapper {
        font-size: 14px;
    }

    .xj-hero-content {
        margin-top: 5rem;
    }

    /* === 新增：替換 Hero 區塊的手機版直式背景圖 === */
    .xj-hero {
        background:
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url("https://www.yaofongtravel.com/material-alias/中國/北疆/紫戀北疆自由行14天/xinjiang-14day-xs.jpg")
                center/cover; /* 請替換成您的手機版圖檔路徑 */

        /* 強烈建議在手機版取消 fixed，避免 iOS Safari 渲染背景圖異常放大的 Bug */
        background-attachment: scroll;
        align-items: flex-start;
    }
    .xj-hero .xj-h1 span {
        display: block;
    }

    .xj-guarantee-grid {
        grid-template-columns: 1fr;
    }
    .xj-image-box {
        height: 100vh;
        min-height: 768px;
    }
    .xj-content-box {
        padding: 30px 20px;
    }

    .xj-hotel-visual-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 200px 200px;
    }
    .xj-visual-main {
        grid-column: span 1;
    }
}

/* =========================================
   05. GUARANTEE SECTION (旅遊保障)
   ========================================= */
.xj-guarantee-section {
    padding: 100px 0;
    background: var(--xj-white);
    text-align: center;
}
.fa-icon  {
    display: flex;
    margin: 20px auto;
    justify-content: center;
 
}

.fa-icon > img {
    width: 45px;
}

.xj-guarantee-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.xj-guarantee-card {
    padding: 1rem;
    border: 1px solid #eee;
    transition: 0.3s;
}

.xj-guarantee-card i {
    font-size: 2.5rem;
    color: var(--xj-gold);
    margin-bottom: 20px;
}

.xj-guarantee-card .xj-h3 {
    margin-bottom: 15px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

/* =========================================
   06. HOTELS SECTION (精選住宿)
   ========================================= */
.xj-section-hotels {
    padding: 120px 0;
}

.xj-hotel-header {
    text-align: center;
    margin-bottom: 80px;
}

.xj-hotel-header .xj-h2 {
    letter-spacing: 10px;
}

.xj-hotel-header .xj-p {
    color: var(--xj-gold);
    letter-spacing: 5px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.xj-hotel-container {
    margin-bottom: 150px;
}

.xj-hotel-info-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.xj-hotel-title-area {
    flex: 1;
}

.xj-hotel-detail-area {
    flex: 1;
    padding-left: 50px;
    border-left: 1px solid #ddd;
}

.xj-hotel-subtitle {
    color: var(--xj-gold);
    font-size: 1rem;
    letter-spacing: 3px;
    margin-bottom: 15px;
    display: block;
}

.xj-hotel-info-flex .xj-p {
    color: #555;
}

.xj-hotel-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--xj-gold);
    font-weight: bold;
}

.xj-hotel-features span {
    border: 1px solid var(--xj-gold);
    padding: 4px 12px;
    border-radius: 20px;
}

/* 飯店圖片複合網格 */
.xj-hotel-visual-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 250px);
    gap: 15px;
}

.xj-visual-main {
    grid-row: span 2;
    position: relative;
    overflow: hidden;
}

.xj-visual-sub {
    position: relative;
    overflow: hidden;
}

.xj-hotel-visual-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.xj-hotel-visual-grid:hover img {
    transform: scale(1.08);
}

/* =========================================
   07. ITINERARY SECTION (行程排版)
   ========================================= */
.xj-magazine-header {
    padding: 100px 0 50px;
    text-align: center;
}

.xj-magazine-header .xj-h1 {
    letter-spacing: 15px;
    text-transform: uppercase;
}

.xj-itinerary-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    margin-bottom: 150px;
    align-items: center;
    background: var(--xj-white);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

.xj-itinerary-row.xj-reverse {
    grid-template-columns: 0.8fr 1.2fr;
}

.xj-itinerary-row.xj-reverse .xj-content-box {
    order: 2;
    border-left: 1px solid #eee;
}

.xj-itinerary-row.xj-reverse .xj-image-box {
    order: 1;
}

.xj-image-box {
    position: relative;
    height: 600px;
    overflow: hidden;
    background-color: #ddd;
}

.xj-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1.5s;
}

.xj-image-box:hover img {
    transform: scale(1.1);
}

.xj-image-tag {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background: rgba(26, 26, 26, 0.8);
    color: var(--xj-white);
    padding: 5px 15px;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.xj-content-box {
    padding: 80px;
    position: relative;
}

.xj-day-badge {
    font-family: "Noto Serif TC", serif;
    font-size: clamp(3.5rem, 8vw, 5rem);
    color: rgba(196, 160, 107, 0.15);
    position: absolute;
    top: 20px;
    left: 40px;
    font-weight: bold;
}

.xj-content-box .xj-h2 {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.xj-content-box .xj-h2 span {
    display: block;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--xj-purple);
    letter-spacing: 3px;
    margin-top: 10px;
}

.xj-feature-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.xj-feature-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    display: block;
    font-size: clamp(1rem, 1vw + 0.6rem, 1.25rem);
    line-height: 1.85;
    color: #444;
}

.xj-feature-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--xj-gold);
}

.xj-tips-tag {
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    font-style: italic;
}

/* =========================================
   08. RESPONSIVE DESIGN (RWD 斷點)
   ========================================= */
/* --- 1. 橫向平板 / 小筆電 --- */
@media (max-width: 1024px) {
    .xj-wrapper {
        font-size: 15px;
    }
    .xj-image-box {
        height: 500px;
    }
    .xj-content-box {
        padding: 40px;
    }
    .xj-guarantee-grid {
        gap: 15px;
    }
}

/* --- 2. 直向平板 --- */
@media (max-width: 992px) {
    .xj-itinerary-row,
    .xj-itinerary-row.xj-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    .xj-itinerary-row.xj-reverse .xj-content-box {
        order: unset;
        border-left: none;
    }
    .xj-itinerary-row.xj-reverse .xj-image-box {
        order: unset;
    }

    .xj-hotel-info-flex {
        flex-direction: column;
    }
    .xj-hotel-detail-area {
        padding-left: 0;
        border-left: none;
        margin-top: 30px;
    }

    .xj-hotel-visual-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 400px 250px;
    }
    .xj-visual-main {
        grid-row: span 1;
        grid-column: span 2;
    }
}

/* --- 3. 手機尺寸 --- */
@media (max-width: 768px) {
    .xj-wrapper {
        font-size: 14px;
    }
    .xj-guarantee-grid {
        grid-template-columns: 1fr;
    }
    .xj-image-box {
        height: 350px;
    }
    .xj-content-box {
        padding: 30px 20px;
    }

    .xj-hotel-visual-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 200px 200px;
    }
    .xj-visual-main {
        grid-column: span 1;
    }
}


/* =========================================
   輪播圖元件 (Carousel)
   ========================================= */
.xj-carousel {
    position: relative;
    /* 取消原本的 hover 圖片單純放大，改由輪播層控制 */
}

.xj-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* 平滑滑動曲線 */
}

.xj-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.xj-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 3s ease; /* 緩慢的呼吸放大感 */
}

/* 滑鼠移入時，當前幻燈片微微放大 */
.xj-carousel:hover .xj-carousel-slide img {
    transform: scale(1.05); 
}

/* --- 控制按鈕 (左右箭頭) --- */
.xj-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.4);
    color: var(--xj-white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    opacity: 0; /* 預設隱藏 */
}

.xj-carousel:hover .xj-carousel-btn {
    opacity: 1; /* 滑鼠移入外框才顯示按鈕 */
}

.xj-carousel-btn:hover {
    background: var(--xj-gold);
}

.xj-prev { left: 15px; }
.xj-next { right: 15px; }

/* --- 底部指示點 (Dots) --- */
.xj-carousel-indicators {
    position: absolute;
    bottom: 30px; 
    left: 1rem;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.xj-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.4s ease;
}

/* 當前啟動的點點變成長條形金色 */
.xj-dot.xj-active {
    background: var(--xj-purple);
    width: 25px;
    border-radius: 4px;
}

/* RWD: 手機版按鈕可以稍微縮小或預設顯示 */
@media (max-width: 768px) {
    .xj-carousel-btn {
        width: 35px;
        height: 35px;
        opacity: 1; /* 手機無 hover，預設顯示 */
    }
}