/* 基础样式 */
:root {
    --primary: #2c3e50;
    --secondary: #e74c3c;
    --accent: #3498db;
    --light-bg: #F5F2EC;
    --dark-text: #333;
    --light-text: #555;
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--light-text);
    border-radius: 10px;
    border: 3px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-text);
}

.scroll-x {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
    cursor: grab;
    user-select: none;
    gap: 30px;
    padding: 20px 0;
}

/* 拖動時的鼠標樣式 */
.scroll-x:active {
    cursor: grabbing;
}

.scroll-x>* {
    min-width: min(280px, 100%);
    max-width: 280px;
    scroll-snap-align: start;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    overflow: hidden;
}

body {
    color: var(--dark-text);
}

img {
    max-width: 100%;
    height: auto;
}

p {
    font-size: 1rem;
}

.main {
    margin-top: 6rem;
}

/* 通用组件样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1rem;
    color: var(--primary);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--secondary);
}

.section:nth-child(even) {
    background: #effbf9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

/* 第一區塊 - 预订表单 */
.product-header {
    /* border: 1px solid red; */
    display: flex;
    flex-wrap: wrap;
    padding: 60px 0;
}

/* swiper圖片優化-Start */
.swiper {
    /* border: 1px solid #AAA; */
    box-shadow: 5px 5px 5px #555;
    flex: 0 0 00%;
    min-width: 200px;
    height: 500px;
    padding: 5px;
}

.swiper .swiper-wrapper img {
    width: 100%;
    height: 440px;
    object-fit: cover;
}

.swiper .swiper-pagination img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.swiper .swiper-button-next,
.swiper .swiper-button-prev {
    /* border: 1px solid red; */
    color: white;
    height: 440px;
    width: 10%;
    top: 0;
}

@media (max-width: 1000px) {
    .swiper {
        flex: 0 0 100%;
    }
}

/* swiper圖片優化-End */

.gallery {
    position: relative;
    flex: 0 0 40%;
    max-width: 40%;
}

.product-options {
    padding: 30px min(30px, 3%);
    border-radius: 15px;
    flex: 0 0 60%;
    max-width: 60%;
}

.product-title {
    font-size: min(1.8rem, calc(1.1rem + 2vw));
    color: var(--primary);
    margin-bottom: 5px;
}

.product-subtitle {
    font-size: min(1.2rem, calc(1rem + 2vw));
    color: var(--light-text);
    margin-bottom: 20px;
    font-style: italic;
}

.price-box {
    font-size: min(2rem, calc(1.2rem + 2vw));
    color: var(--secondary);
    margin: 20px 0;
    font-weight: bold;
}

.notice {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.option-group {
    margin-bottom: 25px;
}

.option-title {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.date-input {
    border-radius: 10px;
    line-height: 2.5rem;
    border: var(--light-text) solid 1px;
    padding: 0 10px;
    font-size: 1rem;
}

.date-input:hover {
    border-color: var(--accent);
}

.date-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.date-option {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.date-option:hover,
.date-option.selected {
    border-color: var(--accent);
    background: rgba(52, 152, 219, 0.1);
}

.group-size {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.size-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.size-btn:hover,
.size-btn.selected {
    border-color: var(--accent);
    background: rgba(52, 152, 219, 0.1);
}

.room-type {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.room-option {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.room-option:hover,
.room-option.selected {
    border-color: var(--accent);
    background: rgba(52, 152, 219, 0.1);
}

.visa-option {
    margin: 15px 0;
}

.visa-option select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.book-btn {
    width: 100%;
    margin: 20px 0;
    font-size: 1.1rem;
    padding: 15px;
}

.collapse-section {
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.collapse-title {
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-bg);
    font-weight: bold;
}

.collapse-title::after {
    content: '+';
    font-size: 1.2rem;
}

.collapse-title.active::after {
    content: '-';
}

.collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 15px;
}

.collapse-content-inner {
    padding: 15px 0;
}

.required::after {
    content: '*';
    color: var(--secondary);
    margin-left: 5px;
    font-size: 0.9rem;
}

/* 表单验证样式 */
.error-message {
    color: var(--secondary);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.has-error .date-input,
.has-error select {
    border-color: var(--secondary);
}

.has-error .error-message {
    display: block;
}

/* 第二區塊 - 旅程簡介 */
.intro-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.intro-section:not(:has(.intro-image)) {
    grid-template-columns: 1fr;
}

.intro-image {
    border-radius: 15px;
    overflow: hidden;
}

.intro-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.intro-image:hover img {
    transform: scale(1.05);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 特点容器 */
.lg-container {
    position: relative;
    height: 70vh;
}

.features-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.feature-section.active {
    opacity: 1;
    transform: translateY(0);
}

.feature-content {
    max-width: 600px;
}

.feature-content p:first-child {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.feature-content p:last-child {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
    display: -webkit-inline-box;
    -webkit-line-clamp: 7;
    line-clamp: 7;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
}

.feature-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 60vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

/* 导航指示器 - 桌面端 */
.feature-nav {
    position: absolute;
    left: 30px;
    bottom: 30px;
    z-index: 10;
    display: flex;
    gap: 15px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background: #27ae60;
    transform: scale(1.3);
}

/* 第三區塊 - 費用說明 */
.fees-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.included-box,
.excluded-box {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.included-box h3,
.excluded-box h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.included-list,
.excluded-list {
    list-style-type: none;
}

.included-list li,
.excluded-list li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.included-list li::before {
    content: '✓';
    color: #27ae60;
    position: absolute;
    left: 0;
}

.excluded-list li::before {
    content: '✗';
    color: #e74c3c;
    position: absolute;
    left: 0;
}

/* 第四區塊 - 優勢說明 */
.benifit-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.benifit-card {
    background: var(--light-bg);
    padding: 1.5rem;
}

/* 第五區塊 - 每日行程輪播 */
.day-card {
    min-width: min(600px, 100%);
    max-width: 600px;
    padding: 0;
}

.day-image {
    height: min(400px, 50vh);
    overflow: hidden;
}

.day-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.day-card:hover .day-image img {
    transform: scale(1.1);
}

.day-content {
    padding: 20px;
}

.day-time {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* 第六區塊 - 詳細行程 */
.detailed-itinerary {
    margin-top: 30px;
}

.day-accordion {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.day-accordion-header {
    padding: 15px;
    background: var(--light-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.day-accordion-header::after {
    content: '+';
    font-size: 1.2rem;
}

.day-accordion-header.active::after {
    content: '-';
}

.day-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.day-accordion-inner {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.day-accordion-inner:not(:has(.day-accordion-image)) {
    grid-template-columns: 1fr;
}

.day-accordion-text {
    font-size: 0.95rem;
    line-height: 1.8;
    flex: 1;
}

.day-accordion-image {
    border-radius: 10px;
    overflow: hidden;
}

.day-accordion-image img {
    width: 100%;
    height: auto;
}

/* 第七區塊 - 住宿房型 */
.room-card {
    min-width: min(360px, 100%);
    max-width: 360px;
    padding: 0;
}

.room-image {
    height: 340px;
    overflow: hidden;
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.room-card:hover .room-image img {
    transform: scale(1.1);
}

.room-content {
    padding: 20px;
}

/* 第八區塊 - 準備指南 */
.step-card {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 15px;
}

/* 第九區塊 - FAQ */
.faq-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* 列間距 */
}

/* 每列的容器 */
.faq-column {
    flex: 1;
    min-width: min(300px, 100%);
    /* 防止內容溢出 */
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 問題間距 */
}

/* 問題項目樣式 */
.faq-item {
    break-inside: avoid;
    /* 防止列內分頁斷裂 */
    page-break-inside: avoid;
    /* 舊版瀏覽器支持 */
}

.faq-question {
    padding: 15px;
    background: var(--light-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
}

.faq-question.active::after {
    content: '-';
}

.faq-answer {
    border: 1px solid #eee;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* 第十區塊 - 客戶評價 */
.testimonial-card {
    text-align: justify;
}

.testimonial-rating {
    color: #f1c40f;
    font-size: 1.2rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--light-text);
}

.testimonial-author {
    font-weight: bold;
}

.testimonial-date {
    font-size: 0.8rem;
    color: #aaa;
}

/* 第十一區塊 - 推薦行程 */
.tour-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* 多區塊共用的樣式 */
.benifit-title,
.day-title,
.room-title,
.step-title,
.testimonial-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.benifit-desc,
.day-desc,
.room-desc,
.step-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--light-text);
}

/* 响应式设计 */
/* 桌面端竖向布局 (≥992px) */
@media (min-width: 992px) {
    .features-container {
        overflow: hidden;
    }

    .feature-section {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 10%;
        transition: transform 1s ease, opacity 1s ease;
        opacity: 0;
        transform: translateY(100%);
        z-index: 1;
    }

    .feature-content {
        flex: 1;
        padding-right: 5%;
    }

    .feature-image-container {
        flex: 1;
    }

    /* 桌面端显示导航点 */
    .feature-nav {
        display: flex;
    }
}

/* 移动端布局 */
@media (max-width: 991px) {
    .lg-container {
        height: auto;
    }

    .features-container {
        display: flex;
        flex-direction: row;
        height: auto;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .feature-section {
        position: relative;
        min-width: 100%;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        padding: min(5vw, 20px);
        transform: none !important;
        opacity: 1 !important;
        align-items: center;
        background: none;
        box-shadow: none;
    }

    .feature-content {
        width: 100%;
        margin-bottom: 30px;
        min-height: 12rem;
    }

    .feature-image-container {
        width: 100%;
        display: flex;
    }

    .feature-image {
        margin: auto;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    /* 隐藏左下角导航点 */
    .feature-nav {
        display: none;
    }

    /* 添加底部滚动指示器 */
    .scroll-indicator {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 10;
    }

    .scroll-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .scroll-dot.active {
        background: #27ae60;
        transform: scale(1.3);
    }

    .tour-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-header {
        /* grid-template-columns: 1fr; */
        padding: 30px 0;
    }

    .gallery {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .product-options {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .intro-section,
    .fees-container,
    .benifit-container,
    .day-accordion-inner {
        grid-template-columns: 1fr;
    }

    .feature-content {
        padding: 0;
    }

    .feature-content h2 {
        font-size: 1.5rem;
    }

    .feature-content p:last-child {
        font-size: 1rem;
    }

    .tour-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 425px) {

    .thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-content h2 {
        font-size: 1.3rem;
    }

    .feature-image {
        max-height: 40vh;
    }

    .faq-item {
        flex: 100%;
    }

    .tour-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}