﻿/* 基本樣式 */
html {
  height: 100%;
}

body {
  background: #f4f7f9;
  font-family: 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 確保主要內容區域能夠伸展 */
section {
  flex: 1;
}

/* 頁尾固定在底部 */
.new-footer {
  margin-top: auto;
}

/* 行程詳細頁面容器 */
.tour-detail-container {
  max-width: 1200px;
  margin: 40px auto 0 auto;
  padding: 0 16px;
}

/* 返回按鈕 - 統一按鈕樣式 */
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 24px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #7f7fd5 0%, #6a7bb9 100%);
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(127, 127, 213, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.back-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.back-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #6a7bb9 0%, #7f7fd5 100%);
  box-shadow: 0 6px 20px rgba(127, 127, 213, 0.4);
  transform: translateY(-2px);
}

.back-button:hover::before {
  width: 300px;
  height: 300px;
}

.back-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(127, 127, 213, 0.3);
}

.back-button span {
  position: relative;
  z-index: 1;
}

/* 行程詳細頁面標題區 */
.tour-detail-header {
  background: #f3f0ff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e6e0ff;
  padding: 16px 32px 16px 32px;
  margin: 0 0 16px 0 !important;
}

/* 照片和價格並排佈局 */
.photo-price-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.photo-price-layout .banner-carousel {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.photo-price-layout .tour-price-section {
  flex: 1;
  margin-bottom: 0;
}

/* 行程圖片 */
.tour-detail-image {
  width: 625px;
  height: 625px;
  object-fit: cover;
}

/* 行程資訊區 */
.tour-detail-info {
  padding: 8px;
  padding-top: 10px !important;
}

.tour-detail-info > *:not(.carousel-thumbnails) {
  padding-left: 32px;
  padding-right: 32px;
}


/* 行程元資訊 */
.tour-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e9ecef;
}

.tour-meta-item {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 8px 10px;
  gap: 8px;
  min-height: 38px;
  flex-direction: row;
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.meta-icon {
  font-size: 1.15em !important;
  margin-right: 4px;
  flex-shrink: 0;
  color: #6a7bb9;
  width: 22px;
  text-align: center;
}

.meta-title {
  font-weight: bold;
  color: #4a5fc1;
  font-size: 0.98em !important;
  margin-right: 4px;
  min-width: 48px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.meta-value {
  color: #444;
  font-size: 0.97em !important;
  display: inline-block;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* 價格區塊 */
.tour-price-section {
  background: #ffffff;
  color: #333;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 2px solid #e1e8ed;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tour-price-section .tour-price {
  color: #fff;
  font-size: 2em !important;
  font-weight: bold;
  margin-bottom: 8px;
}

.tour-price-note {
  font-size: 0.9em !important;
  opacity: 0.9;
}

/* 價格佈局樣式 */
.price-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  height: 100%;
  justify-content: flex-start;
  padding-left: 0;
  position: relative;
}

.price-main {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 20px;
  min-width: 200px;
  padding-left: 32px;
}

.main-price {
  font-size: 2.2em !important;
  font-weight: bold;
  color: #2d7be5;
  margin-bottom: 8px;
}

.main-label {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 12px;
}

.price-intro {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 0;
  min-height: auto;
}

.intro-content {
  color: #555;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: left;
  max-width: 100%;
  word-wrap: break-word;
  padding-left: 0;
}

/* 主要內容區塊 */
.tour-detail-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.tour-main-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #e0e0e0;
  padding: 16px 32px 16px 32px;
}

.tour-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #e0e0e0;
  padding: 10px 20px 20px 20px;
}

.tour-sidebar .content-section,
.tour-sidebar .other-tours-section,
.tour-sidebar .contact-info {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

/* 內容區塊 */
.content-section {
  margin-bottom: 32px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.section-title {
  color: #6a7bb9;
  font-size: 1.4em !important;
  font-weight: bold;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
  margin-top: 10px;
}

.section-content {
  color: #555;
  line-height: 1.8;
  font-size: 1em !important;
}

/* 特色列表 */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 8px 0;
  color: #555;
  position: relative;
  padding-left: 24px;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #6a7bb9;
  font-weight: bold;
}

/* 行程天數 */
.itinerary-day {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.itinerary-day-title {
  color: #6a7bb9;
  font-weight: bold;
  margin-bottom: 8px;
}

.itinerary-day-content {
  color: #555;
  line-height: 1.6;
}

/* 預訂按鈕 */
.booking-button {
  background: linear-gradient(135deg, #6a7bb9, #8b9dc8);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1.1em !important;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}

/* 聯絡資訊 */
.contact-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.contact-info h4 {
  color: #6a7bb9;
  margin: 0 0 8px 0;
  font-size: 1em !important;
}

.contact-info p {
  color: #555;
  margin: 4px 0;
  font-size: 0.9em !important;
}

/* 注意事項列表 */
.notice-list {
  list-style: none;
  padding: 0;
}

.notice-list li {
  padding: 6px 0;
  color: #666;
  font-size: 0.9em !important;
  position: relative;
  padding-left: 16px;
}

.notice-list li::before {
  content: "⚠";
  position: absolute;
  left: 0;
  color: #ff9800;
}

/* 輪播樣式 */
.banner-carousel {
  position: relative;
  width: 625px;
  height: 625px;
  overflow: hidden;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.slide {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0; top: 0;
}

.slide.active {
  display: block;
}

.carousel-thumbnails {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 8px !important;
  margin-bottom: 0;
  overflow-x: auto;
  padding-bottom: 0;
  scrollbar-width: thin;
  padding-left: 0;
  padding-right: 0;
  position: relative;
  height: 80px;
  width: 100%;
}

.carousel-thumbnails .thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  background: #f8f9fa;
  display: block;
  flex: 0 0 auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.carousel-thumbnails .thumbnail.active {
  border: 2px solid #6a7bb9;
  opacity: 1;
  box-shadow: 0 4px 8px rgba(106, 123, 185, 0.3);
  transform: scale(1.05);
}

.carousel-thumbnails .thumbnail.placeholder {
  background: #e0e0e0;
  border: 2px dashed #bbb;
  cursor: default;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-thumbnails .thumbnail.placeholder::after {
  content: '+';
  color: #bbb;
  font-size: 1.5em !important;
  font-weight: bold;
}

.carousel-prev, .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.25);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 30;
  width: 40px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background-color 0.3s ease;
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* 單照片布局樣式 */
.single-photo-container {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
}

.single-photo-container .tour-detail-image {
  width: 625px;
  height: 625px;
  object-fit: cover;
  transition: all 0.3s ease;
}

/* 照片放大模態視窗樣式 */
.photo-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  max-width: 45vw;
  max-height: 45vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

/* DM照片專用模態視窗樣式 */
.dm-modal-content {
  position: relative;
  max-width: 35vw;
  max-height: 35vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: #fff;
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.modal-prev, .modal-next {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 30px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.modal-prev {
  margin-left: -70px;
}

.modal-next {
  margin-right: -70px;
}

/* DM模態視窗按鈕樣式 */
.dm-modal-prev, .dm-modal-next {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 30px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  pointer-events: auto;
  z-index: 1002;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.dm-modal-prev {
  left: 10px;
}

.dm-modal-next {
  right: 10px;
}

.dm-modal-close {
  position: absolute;
  top: -100px;
  right: -40px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
  background: rgba(255, 239, 239, 0.7);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 其他行程建議卡片區塊樣式 */
.other-tours-section {
  margin-top: 10px;
  padding: 24px 0 0 0;
}

.other-tours-section h3 {
  color: #4a5fc1;
  font-size: 20px !important;
  margin-bottom: 16px;
  font-weight: bold;
  padding-bottom: 8px;
  margin-top: 0;
}

.other-tours-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.tour-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  width: 280px;
  transition: box-shadow 0.2s;
}

.tour-card img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  display: block;
}

.tour-info h3 {
  margin: 0;
}

.tour-title {
  color: #4a5fc1;
  font-size: 18px !important;
  font-weight: bold;
  margin-bottom: 8px;
}

.tour-summary {
  display: grid;
  grid-template-columns: 1fr auto 1.5fr;
  align-items: center;
  margin-top: 4px;
  padding: 4px 0;
  width: 100%;
  box-sizing: border-box;
  gap: 4px;
}

.tour-destination {
  color: #e74c3c;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  grid-column: 1;
  justify-self: start;
}

.tour-days {
  color: #e74c3c;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  grid-column: 2;
  justify-self: center;
}


.tour-desc {
  color: #444;
  font-size: 15px !important;
  margin-bottom: 12px;
}

.tour-price {
  color: #e74c3c;
  font-size: 16px !important;
  font-weight: bold;
  grid-column: 3;
  justify-self: end;
  white-space: nowrap;
  overflow: visible;
}

/* 讓 sidebar 內的推薦卡片更大、更顯眼 */
.tour-sidebar .other-tours-section {
  margin-top: 10px;
  padding: 0;
}

.tour-sidebar .other-tours-list {
  display: block;
}

.tour-sidebar .tour-card {
  width: 280px;
  max-width: 280px;
  margin: 0 auto 20px auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-radius: 18px;
}

.tour-sidebar .tour-card img {
  height: 280px;
  width: 280px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.tour-sidebar .tour-info {
  padding: 20px 18px 18px 18px;
}

.tour-sidebar .tour-title {
  font-size: 19px !important;
}

.tour-sidebar .tour-desc {
  font-size: 15px !important;
}

.tour-sidebar .tour-price {
  font-size: 18px !important;
}

/* 標題行佈局 */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.header-row .tour-detail-title {
  margin: 0;
  color: #1e40af;
  flex: 1;
  font-weight: 700;
  font-size: 1.4em;
  letter-spacing: -0.5px;
}

.tour-detail-id {
  color: #64748b !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  background: #f8f9fa;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  position: absolute;
  top: 20px;
  right: 20px;
}

.tour-detail-id span {
  color: #2d7be5 !important;
  font-weight: 600 !important;
}

/* 特殊ID樣式 */
#VV0 ul, #VV1 ul, #VV2 ul {
  list-style: none;
  padding: 0;
}

#VV0 ul li, #VV1 ul li, #VV2 ul li {
  padding: 8px 0;
  color: #555;
  position: relative;
  padding-left: 24px;
}

#VV0 ul li::before, #VV1 ul li::before, #VV2 ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #6a7bb9;
  font-weight: bold;
}

/* 注意事項列表樣式 */
#VTT ul {
  list-style: none;
  padding: 0;
}

#VTT ul li {
  padding: 6px 0;
  color: #666;
  font-size: 0.9em;
  position: relative;
  padding-left: 16px;
}

#VTT ul li::before {
  content: "⚠";
  position: absolute;
  left: 0;
  color: #ff9800;
}

/* DM照片展示樣式 - 大圖單行顯示 */
.dm-photos-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.dm-photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.dm-photo {
  width: 625px;
  height: 625px;
  object-fit: cover;
  display: block;
}

/* 行程卡片樣式 - 用於首頁和列表頁 */
.scroll-tours {
  margin: 24px 0 16px 0;
}

.scroll-tours h2 {
  color: #7f7fd5;
  margin: 0 0 5px 0;
  font-size: 1.4em;
  text-align: center;
}

.scroll-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 5px 0 8px 0;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.scroll-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #e0e0e0;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.scroll-card:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px #d0d0d0;
}

.scroll-card:active {
  transform: scale(1.02);
  box-shadow: 0 2px 8px #c0c0c0;
}

.scroll-card img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px 16px 0 0;
}

.scroll-info {
  padding: 16px 12px 12px 24px;
  width: 100%;
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
}

.scroll-info h3 {
  margin: 0 0 6px 0;
  color: #7f7fd5;
  font-size: 1.1em;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.scroll-info p {
  color: #555;
  margin-bottom: 6px;
}

.scroll-info span {
  color: #d32f2f;
  font-weight: bold;
}



/* 響應式設計 */
@media (max-width: 900px) {
  .photo-price-layout {
    flex-direction: column;
    gap: 16px;
  }
  
  .tour-info-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tour-detail-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tour-detail-info {
    padding: 24px;
  }
  
  .tour-main-content {
    padding: 24px;
  }
  
  
  .scroll-cards { 
    gap: 12px; 
  }
  
  .scroll-card { 
    width: calc(50% - 6px); 
    min-width: 200px; 
  }
}

@media (max-width: 768px) {
  .single-photo-container {
    min-height: 250px;
  }
  
  .single-photo-container .tour-detail-image {
    object-fit: contain;
    object-position: center;
  }
  
  .dm-photos-grid {
    gap: 16px;
  }
  
  .dm-photo {
    width: 625px;
    height: 625px;
  }
}



@media (max-width: 600px) {
  .tour-detail-container {
    padding: 0 12px;
    margin: 20px auto 0 auto;
  }
  
  .tour-detail-image {
    width: 625px;
    height: 625px;
  }
  
  .tour-detail-info {
    padding: 20px;
  }
  
  .tour-main-content {
    padding: 20px;
  }
  .tour-detail-meta {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }
  
  .tour-meta-item {
    padding: 7px 6px;
  }
  
  .meta-title {
    min-width: 40px;
    max-width: 60px;
  }
  
  .meta-value {
    max-width: 90px;
  }

  /* 價格佈局響應式設計 */
  .price-layout {
    gap: 12px;
  }
  
  .price-main {
    padding-right: 0;
    padding-bottom: 0;
  }
  
  .price-intro {
    padding: 0 20px;
    min-height: auto;
  }

  .intro-content {
    font-size: 0.9em;
    text-align: left;
    line-height: 1.4;
  }
  
  .main-price {
    font-size: 1.8em !important;
  }
  
  .scroll-cards { 
    flex-direction: column; 
    gap: 8px; 
  }
  
  .scroll-card { 
    width: 100%; 
    min-width: 90vw; 
    max-width: 98vw; 
  }
  
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .header-row .tour-detail-title {
    font-size: 1.2em;
  }
  
  .tour-detail-id {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .dm-photos-grid {
    gap: 12px;
  }
  
  .dm-photo {
    width: 625px;
    height: 625px;
  }
}

/* 主頁樣式 */
.scroll-tours {
  margin: 16px 0 8px 0;
}
.scroll-tours h2 {
  color: #7f7fd5;
  margin-left: 0;
  font-size: 1.4em;
  text-align: center;
  margin-bottom: 4px;
}
.scroll-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 0 8px 0;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
}
.scroll-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #e0e0e0;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.scroll-card:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px #d0d0d0;
}
.scroll-card:active {
  transform: scale(1.02);
  box-shadow: 0 2px 8px #c0c0c0;
}
.scroll-card img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px 16px 0 0;
}
.scroll-info {
  padding: 14px 14px 12px 14px;
  width: 100%;
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
}
.scroll-info h3 {
  margin: 0 0 6px 0;
  color: #7f7fd5;
  font-size: 1.05em;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.scroll-info p {
  color: #555;
  margin-bottom: 6px;
}
.scroll-info span {
  color: #d32f2f;
  font-weight: bold;
}

/* 響應式設計 */
@media (max-width: 900px) {
  .scroll-cards { 
    gap: 12px; 
  }
  .scroll-card { 
    width: calc(50% - 6px); 
    min-width: 200px; 
  }
}
@media (max-width: 600px) {
  .scroll-cards { 
    flex-direction: column; 
    gap: 8px; 
  }
  .scroll-card { 
    width: 100%; 
    min-width: 90vw; 
    max-width: 98vw; 
  }
}

/* ============================================
   清單模式樣式 (List View Mode)
   ============================================ */

.tour-list-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.tour-list-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.tour-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* 左側圖片 */
.tour-list-image {
  flex: 0 0 280px;
  width: 280px;
  height: 280px;
  overflow: hidden;
}

.tour-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tour-list-item:hover .tour-list-image img {
  transform: scale(1.05);
}

/* 右側內容 */
.tour-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  min-width: 0;
}

/* 標題區域 */
.tour-list-header {
  margin-bottom: 8px;
}

.tour-list-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.tour-list-title {
  flex: 1;
  margin: 0;
  color: #333;
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-width: 0;
}

/* 主題標籤徽章（右上角） */
.tour-list-theme-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  /* 預設樣式（如果主題沒有匹配到其他樣式） */
  background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
  color: white;
}

/* 預設樣式（季節限定） */
.tour-list-theme-badge[data-theme*="季節"] {
  background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
  box-shadow: 0 2px 8px rgba(245, 101, 101, 0.2);
}

/* 預設樣式（熱門） */
.tour-list-theme-badge[data-theme*="熱門"] {
  background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.2);
}

/* 預設樣式（精選） */
.tour-list-theme-badge[data-theme*="精選"] {
  background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
  box-shadow: 0 2px 8px rgba(128, 90, 213, 0.2);
}

/* 預設樣式（限時） */
.tour-list-theme-badge[data-theme*="限時"] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.2);
}

.tour-list-theme-badge-text {
  color: white;
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
}

.tour-list-theme-badge:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.7);
  }
}

@keyframes pulse-glow-red {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.7);
  }
}

@keyframes pulse-glow-orange {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 154, 0, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 154, 0, 0.7);
  }
}

@keyframes pulse-glow-purple {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.7);
  }
}

@keyframes pulse-glow-pink {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.7);
  }
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.tour-list-tag {
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff9a00 0%, #ff6b00 100%);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 1em;
  font-weight: 600;
  white-space: nowrap;
}

/* 元資訊 */
.tour-list-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 1em;
  color: #666;
  flex-wrap: wrap;
}

.tour-list-location {
  color: #e74c3c;
  font-weight: 600;
}

.tour-list-date {
  color: #666;
}

/* 成團狀態 */
.tour-list-status {
  color: #28a745;
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 8px;
}

/* 促銷區域 */
.tour-list-promotions {
  margin-bottom: 8px;
}

.promo-box {
  background: #fff5f5;
  border: 1px solid #ffcccc;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.95em;
  color: #d32f2f;
  line-height: 1.4;
}

.promo-active {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
}

/* 底部資訊 */
.tour-list-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: auto;
  padding-top: 8px;
}

.tour-list-days {
  color: #e74c3c;
  font-size: 1.2em;
  font-weight: 600;
}

.tour-list-price {
  color: #e74c3c;
  font-size: 1.8em;
  font-weight: bold;
}

/* 開團日期列表 */
.tour-list-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 4px 0;
}

.dates-title {
  color: #6a7bb9;
  font-size: 0.95em;
  font-weight: 600;
}

.date-pill {
  background: #f5f7fb;
  border: 1px solid #e6eaf2;
  color: #334155;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.92em;
  line-height: 1;
}

/* 快成團 - 藍色 */
.date-pill.status-urgent {
  background: rgba(227, 242, 253, 0.9);
  border-color: #90caf9;
  color: #1976d2;
}

/* 已成團/確定成團 - 綠色 */
.date-pill.status-confirmed {
  background: rgba(232, 245, 232, 0.9);
  border-color: #a5d6a7;
  color: #2e7d32;
}

/* 收客中 - 橘色 */
.date-pill.status-open {
  background: rgba(255, 237, 213, 0.9); /* 淡橘底 */
  border-color: #f6ad55;              /* 橘色邊框 */
  color: #d97706;                     /* 橘色文字 */
}

/* 已額滿/已滿額 - 紅色 */
.date-pill.status-full {
  background: rgba(255, 205, 210, 0.9);
  border-color: #ef5350;
  color: #b71c1c;
}

/* 已取消 - 灰色 */
.date-pill.status-cancel {
  background: #f5f5f5;
  border-color: #e0e0e0;
  color: #757575;
}

.date-more {
  color: #94a3b8;
  font-size: 0.92em;
  font-weight: 600;
  padding: 0 4px;
}

/* 出發地樣式 */
.tour-list-departure {
  color: #6a7bb9;
  font-size: 0.95em;
  font-weight: 500;
}

/* 團號樣式 */
.tour-list-tour-id {
  color: #ffffff;
  font-size: 1em;
  font-weight: 700;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  padding: 5px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
  border: 1px solid #2e6da4;
}


/* 主題標籤容器 */
.tour-list-tag-container {
  margin-top: 8px;
}

.tour-list-theme-tag {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* 響應式設計 */
@media (max-width: 900px) {
  .tour-list-container {
    padding: 12px;
    gap: 16px;
  }
  
  .tour-list-image {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
  }
  
  .tour-list-title {
    font-size: 1.15em;
  }
  
  .tour-list-price {
    font-size: 1.6em;
  }
  
  .tour-list-theme-badge {
    max-width: 180px;
  }
  
  .tour-list-theme-badge-text {
    font-size: 0.85em;
  }
}

@media (max-width: 600px) {
  .tour-list-item {
    flex-direction: column;
  }
  
  .tour-list-image {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  
  .tour-list-content {
    padding: 12px;
  }
  
  .tour-list-title-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  
  .tour-list-theme-badge {
    margin-top: 8px;
  }
  
  .tour-list-footer {
    justify-content: space-between;
  }
}

/* 分頁導航樣式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 20px 0;
  flex-wrap: wrap;
}

.page-btn, .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  color: #666;
  text-decoration: none;
  font-size: 1em;
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-btn:hover, .page-num:hover {
  background: #f8f9fa;
  border-color: #6a7bb9;
  color: #6a7bb9;
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

.page-num.active {
  background: linear-gradient(135deg, #6a7bb9, #8b9dc8);
  color: white;
  border-color: #6a7bb9;
  font-weight: 600;
  cursor: default;
}

.page-num.active:hover {
  background: linear-gradient(135deg, #6a7bb9, #8b9dc8);
  border-color: #6a7bb9;
  color: white;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: #999;
  font-size: 1em;
}

.pagination-info {
  text-align: center;
  color: #666;
  font-size: 0.95em;
  margin-bottom: 40px;
}

@media (max-width: 600px) {
  .pagination {
    gap: 6px;
    margin: 30px 0 15px 0;
  }
  
  .page-btn, .page-num {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.9em;
  }
  
  .pagination-info {
    font-size: 0.85em;
    padding: 0 16px;
  }
}
