﻿/* 共用容器 */
.pch-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
}

/* === 區塊一：Hero === */
.hero-title-main {
    font-size: 2.5rem;
    font-weight: 900;
}

.hero-title-sub {
    font-size: 3rem;
    font-weight: 900;
}

.vehicle-hero {
    height: 100vh;
    padding-top: 60vh;
    position: relative;
}

    .vehicle-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url("../img/BANNER-CLIFF_640.webp");
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        z-index: -1;
    }

    .vehicle-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
    }

/* === 區塊二：車輛規格 === */
.vehicle-specs-section {
    max-width: 1320px;
}

.vehicle-specs-header {
    background-color: #faaf3a;
    color: #fff;
    margin-bottom: 2rem;
    margin-top: 3rem;
}

.vehicle-specs-title {
    font-size: 22pt;
    font-weight: bold;
    display: inline-block;
    margin-right: 0.5rem;
}

.vehicle-specs-title-en {
    font-size: 18pt;
    font-weight: normal;
}

.spec-item {
    margin-bottom: 1.5rem;
    max-width: 440px;
}

.spec-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spec-label-fixed {
    width: 100px;
    text-align: left;
    flex-shrink: 0;
    line-height: 1.4;
    font-size: 15pt !important;
    font-weight: 900 !important;
    color: #000;
}

.spec-label-fixed2 {
    font-size: 15pt !important;
    font-weight: 900 !important;
    color: #000;
}

.spec-main {
    line-height: 1.4;
    font-size: 15pt !important;
    font-weight: 900 !important;
    color: #000;
    display: flex;
}

.spec-sub {
    font-size: 0.95rem;
    line-height: 1.3;
    color: #333;
    padding-left: calc(120px + 0.5rem);
}

.spec-col-div {
    padding: 0;
}

.spec-col:nth-child(2) .spec-main,
.spec-col:nth-child(3) .spec-main {
    display: block;
}

.spec-col:nth-child(2) .spec-text,
.spec-col:nth-child(3) .spec-text {
    margin-top: 0.2rem;
}

.adventure-box {
    min-height: 150px;
}

.adventure-text {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: #ccc !important;
}

/* === 區塊三：車上設備 === */
.equipment-section {
    max-width: 1320px;
}

.equipment-header {
    background-color: #faaf3a;
    color: #fff;
    margin: 3rem 0;
    text-align: center;
}

.equipment-title {
    font-size: 22pt;
    font-weight: bold;
    display: inline-block;
    margin-right: 0.5rem;
}

.equipment-title-en {
    font-size: 18pt;
    font-weight: normal;
}

.equipment-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.equipment-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    margin-right: 0.75rem;
}

.equipment-text {
    font-size: 15pt;
    color: #333;
    font-weight: bold;
}

.equipment-grid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* === 區塊四：隨車設備 === */
.accessories-header {
    background-color: #faaf3a;
    color: #fff;
    margin-bottom: 3rem;
    margin-top: 3rem;
    text-align: center;
}

.accessories-section {
    max-width: 1320px;
}

.accessories-title {
    font-size: 22pt;
    font-weight: bold;
    display: inline-block;
    margin-right: 0.5rem;
}

.accessories-title-en {
    font-size: 18pt;
    font-weight: normal;
}

.accessories-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.accessories-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    margin-right: 0.75rem;
}

.accessories-text {
    font-size: 15pt;
    color: #333;
    font-weight: bold;
}

.accessories-grid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* === 區塊五：車內實景照片 === */
.floorplan-header {
    background-color: #FFC35C;
    color: #333;
    padding: 1rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.floorplan-title {
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    margin-right: 0.5rem;
}

    .floorplan-title .en {
        font-size: 1.2rem;
        font-weight: normal;
    }

.floorplan-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    background-color: #f1f1f1;
}

.floorplan-section {
    background-color: #f1f1f1;
}

.floorplan-header div {
    background-color: #f1f1f1;
}

/* === 區塊六：影片/圖庫 === */
.gallery-tabs {
    margin-bottom: 1.5rem;
}

    .gallery-tabs .nav-link {
        color: #000;
        border: none;
        font-size: 22pt;
        font-weight: bold;
        padding: 0.5rem 1rem;
        margin: 0 0.5rem;
    }

        .gallery-tabs .nav-link.active {
            color: #333;
            border-bottom: 3px solid #FFC35C;
            background-color: transparent;
        }

.main-image {
    width: 100%;
    height: auto;
    max-height: 900px;
    object-fit: cover;
    cursor: pointer; /* 讓鼠標變成手指，暗示可點擊 */
}

.thumb-grid .thumb-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, border 0.2s;
    border: 2px solid transparent;
}

    .thumb-grid .thumb-img:hover {
        opacity: 1;
    }

    .thumb-grid .thumb-img.active {
        opacity: 1;
        border-color: #FFC35C;
    }

/* === 區塊七：影片 === */
.video-title-container {
    margin-bottom: 2rem;
    text-align: center;
}

.video-title {
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    color: #333;
}

.youtube-logo {
    color: #FF0000;
    font-size: 1.5rem;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.video-item-row {
    display: flex;
    justify-content: space-evenly;
}

.video-item {
    display: flex;
    text-decoration: none;
    padding: 1.5rem;
    min-height: 200px;
    background-color: #cbcbcb;
    color: #333;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    gap: 1rem;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.video-item-div {
    width: 29.333333% !important;
    padding: 0% 0% 2% 0% !important;
}

.video-item:hover {
    background-color: #dee2e6;
    color: #333;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.video-play-icon {
    color: #FF0000;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.video-text {
    font-size: 18pt;
    font-weight: bold;
    text-align: center;
    letter-spacing: 6pt;
    color: #fff;
}

.video-section {
    border-top: 1px #dcdcdc solid;
    border-bottom: 1px #dcdcdc solid;
}

/* ========================================= */
/* 【NEW】YouTube 嵌入影片樣式 */
/* ========================================= */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem; /* 圓角 */
    background-color: #000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 輕微陰影 */
}

    .video-responsive iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

/* 影片下方的標題文字 */
.video-caption {
    font-size: 1.2rem; /* 對應原本的 18pt/video-text 大小 */
    font-weight: bold;
    text-align: center;
    color: #333; /* 改為深色字 */
    margin-top: 10px;
    display: block;
    letter-spacing: 2px;
}

/* === 區塊八：FAQ === */
.faq-section {
    background-color: #fff;
    padding: 3rem 0;
}

.faq-title {
    font-size: 16pt;
    font-weight: 500;
    margin-bottom: 2rem;
    color: #333;
}

.faq-container {
    max-width: 1320px;
}

.accordion-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
    background-color: transparent;
}

.accordion-button {
    background-color: transparent !important;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    padding: 1rem 0;
    box-shadow: none !important;
}

    .accordion-button:not(.collapsed)::after {
        transform: rotate(-180deg);
    }

    .accordion-button::after {
        margin-right: 0.5rem;
        font-size: 1.25rem;
    }

.accordion-item:last-of-type {
    border-bottom: none;
}

.accordion-body {
    padding-top: 0;
    padding-bottom: 1.5rem;
    font-size: 1rem;
    color: #6c757d;
}

/* === 區塊九：評價 === */
.testimonials-section {
    background-color: #ffffff;
    padding: 4rem 0;
    max-width: 1320px;
    margin: auto;
}

.testimonials-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2.5rem;
    color: #333;
}

.testimonials-container {
    max-width: 1320px;
}

.testimonial-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.testimonial-card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    height: 100%;
    border-radius: 0.5rem;
}

    .testimonial-card .card-body {
        padding: 1.5rem !important;
        height: 100%;
    }

.testimonial-top-content {
    height: 100%;
    display: flex;
}

.testimonial-left-col {
    width: 60px;
    flex-shrink: 0;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-right-col {
    justify-content: space-between;
}

.testimonial-meta-row {
    margin-top: 1rem !important;
}

.testimonial-meta {
    font-size: 0.9rem;
    color: #333;
}

i.fas.fa-star {
    color: #fb973a;
}

.testimonial-model {
    color: #fb973a;
}

.carousel-control-prev,
.carousel-control-next {
    width: 7%;
    filter: invert(0);
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
    width: 2rem;
    height: 2rem;
}

.carousel-control-prev {
    left: 3%;
}

.carousel-control-next {
    right: 3%;
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

@media (min-width: 992px) {
    .carouselcol {
        width: 27.333333% !important;
        height: 12rem;
    }
}

@media (max-width: 992px) {
    .vd-quick-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vd-gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .vd-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vd-review-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .carouselcol {
        width: 40.333333% !important;
        height: 12rem;
    }
}

@media (max-width: 576px) {
    .vd-hero-bg {
        height: 280px;
    }

    .vd-hero-title {
        font-size: 26px;
    }

    .vd-quick-info-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .vd-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .carouselcol {
        width: 79.333333% !important;
        height: 12rem;
    }
}

@media (max-width: 426px) {
    .spec-icon {
        margin-left: 1rem;
    }

    .spec-label-fixed2 {
        font-size: 14pt !important;
    }
}

/* ========================================= */
/* 手機版橫向捲動優化 (Video Section) */
/* ========================================= */
.video-item-row {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .video-item-row::-webkit-scrollbar {
        display: none;
    }

.video-item-div {
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

@media (max-width: 767px) {
    .video-item-div {
        /* width: auto !important;  <-- 原始有問題的寫法 */
        width: 85vw !important; /* <-- 修正後：設定固定寬度 (85% 視窗寬度) */
        flex: 0 0 auto;
        padding: 0 10px 10px 0 !important;
        scroll-snap-align: center; /* 確保滑動時會停在正中間 */
    }
}

/* ========================================= */
/* 【NEW】手機版縮圖橫向捲動優化 (Gallery Section) */
/* ========================================= */
@media (max-width: 767px) {
    .thumb-grid .row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        padding-bottom: 10px;
    }

    .thumb-grid .col {
        flex: 0 0 auto;
        width: 28%;
        scroll-snap-align: start;
        padding: 0 !important;
    }

    .thumb-grid .row::-webkit-scrollbar {
        display: none;
    }

    .thumb-grid .row {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* ========================================= */
/* 【NEW】進階燈箱 (Lightbox) 樣式 - 包含導航與文字 */
/* ========================================= */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    max-width: 80%;
    margin-top: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: 0.3s;
}

    .lightbox-close:hover {
        color: #bbb;
    }

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.1);
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

    .lightbox-prev:hover,
    .lightbox-next:hover {
        background-color: rgba(0, 0, 0, 0.8);
    }

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        font-size: 24px;
        padding: 12px;
        background-color: rgba(0, 0, 0, 0.3);
    }
}


/* ================================================= */
/* 【NEW】YouTube API 互動功能樣式 (修正版) */
/* ================================================= */

/* 1. 確保影片區塊可以定位選單 */
.video-item-div {
    position: relative !important;
    overflow: visible !important; /* ★關鍵：確保選單不會被裁切 */
}

/* 2. 新的標題與按鈕控制列 */
.video-control-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 5px;
    background-color: transparent;
    position: relative;
    z-index: 10;
}

/* 3. 調整後的影片標題 */
.video-caption-new {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 1px;
    margin: 0;
}

/* 4. 黃色資訊圈圈按鈕 */
.info-btn {
    width: 20px;
    height: 20px;
    background-color: #faaf3a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-family: serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    user-select: none;
    z-index: 20;
}

    .info-btn:hover {
        transform: scale(1.15);
        background-color: #e09b30;
    }

    .info-btn:active {
        transform: scale(0.95); /* 點擊時的微縮效果，提供回饋 */
    }

/* 5. 黑色彈出選單 (章節列表) */
.chapter-menu {
    display: none;
    position: absolute;
    bottom: 60px; /* 顯示在控制列上方 */
    right: 15px;
    width: 260px;
    background-color: rgba(0, 0, 0, 0.95); /* 加深背景 */
    border-radius: 8px;
    padding: 15px;
    z-index: 9999; /* ★關鍵：設定極高層級，確保蓋過影片 */
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    text-align: left;
    backdrop-filter: blur(2px);
    /* 進場動畫 */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    /* 顯示狀態 */
    .chapter-menu.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

/* 選單標題 */
.menu-title {
    color: #faaf3a;
    font-size: 13px;
    font-weight: bold;
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

/* 選單項目 */
.chapter-item {
    display: block;
    cursor: pointer;
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

    .chapter-item:last-child {
        border-bottom: none;
    }

    .chapter-item:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .chapter-item span {
        color: #faaf3a;
        font-weight: bold;
        margin-right: 10px;
        display: inline-block;
        width: 35px;
    }

/* 主圖容器確保內容不會溢出圓角 */
.main-image-container {
    overflow: hidden;
    border-radius: 0.25rem;
}

/* 疊加在圖片上的文字條 */
.main-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5); /* 黑色半透明陰影背景 */
    color: #ffffff; /* 白色文字 */
    padding: 10px 15px;
    font-size: 15pt; /* 依據您的風格設定字級 */
    font-weight: bold;
    pointer-events: none; /* 點擊文字會穿透到圖片，不影響開啟燈箱 */
    letter-spacing: 2px;
}