/* ===== INDEX Page ===== */
/* ===== Base reset ===== */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  color: #222;
  background: #fff;
}

a { color: inherit; text-decoration: none; } /* 連結顏色繼承父元素的文字色，不用瀏覽器預設藍/紫 */
ul { margin: 0; padding: 0; list-style: none; } /* 瀏覽器會預設縮排與外距，清掉更容易用 Flex/Grid 自己排間距 */
img { display: block; max-width: 100%; height: auto; } /* 讓圖片不會超出容器寬度、在小螢幕自適應 */
button { font: inherit; }

/* ===== Containers ===== */
.header__container,
.hero__container,
.main-content__container,
.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== Header ===== */
.header {
  background: #fff;
  height: 54px;
  border-bottom: #E8E8E8 1px solid;
}

.header--sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* box-shadow: 0 2px 10px rgba(0,0,0,.08); */
}

.header__container {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-weight: 800;
  font-size: 30px;
  color: #448899;
  white-space: nowrap; /* 不換行 */
}

.header__nav {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.header__nav-link {
  font-size: 16px;
  color: #666666;
  padding: 10px 10px;
}

.header__nav-link:hover { color: #448899; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 320px;
  overflow: visible;
  color: #fff;
}

.hero__bg {
  position: absolute;
  inset: 0; /* top/right/bottom/left 全為 0 */
  background-image: url("/static/images/welcome.png");
  background-size: cover; /* 按比例放大並裁切圖片以填滿容器 */
  background-position: center top; /* 以中央對齊裁切 */
}

.hero__container {
  position: relative;
  min-height: inherit;
  display: flex;
  align-items: center;
}

.hero__content {
  margin: 75px 0 76px;
}

.hero__title {
  margin: 0 0 15px;
  font-size: 28px;
  font-weight: 700;
}

.hero__subtitle {
  margin: 0 0 25px;
  font-size: 16px;
  font-weight: 700;
}

/* ===== Search Bar ===== */
.search-bar {
  border-radius: 5px;
}
.search-bar__group {
  position: relative; /* dropdown panel 定位基準 */
  display: flex;
  align-items: stretch;
  height: 46px;
  width: 460px;
  max-width: 100%;
}

.category-dropdown__trigger {
  height: 46px;
  border: 0;
  background: #EEEEEE;
  display: inline-flex; 
  align-items: center;
  cursor: pointer;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.category-dropdown__trigger-text {
  font-weight: 500;
  color: #111;
  font-size: 16px;
  white-space: nowrap;
  line-height: 1; /* 確保文字基線不偏移 */
  padding: 16px 8px;
}

.search-bar__field {
  flex: 1 1 auto; /* 彈性填滿 category按鈕與submit按鈕間的剩餘空間，但會在空間不足時縮小 */
  height: 46px;
}

.search-bar__input {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 15px 15px;
  font-size: 16px;
  color: #111;
}

.search-bar__input::placeholder { color: #999; }

.search-bar__submit {
  width: 60px;
  height: 46px;
  border: 0;
  cursor: pointer;
  background: #448899;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.search-bar__submit-icon {
  padding: 8px 15px;
  width: 30px;
  height: 30px;
  background-image: url("/static/images/search.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== Category Dropdown Panel ===== */
.category-dropdown__panel[hidden] { display: none; }
.category-dropdown__panel {
  position: absolute;
  top: calc(100% + 5px);
  left: 0; /* 對齊到定位參考的左邊緣 */
  width: 300px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0px 0px 20px rgba(0,0,0,.18);
  z-index: 30;
}

.category-dropdown__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.category-dropdown__item {
  font-size: 14px;
  height: 40px;
  padding: 10px 0 9px;
  text-align: center;
  color: #222;
  cursor: pointer;
  white-space: nowrap;
}

.category-dropdown__item:hover {
  color: #448899;
  font-weight: 700;
}

/* ===== Main Content ===== */
.main-content { margin: 40px 0}

/* MRT scroll */
.mrt-scroll {
  display: flex;
  align-items: center;
  padding: 0px 0px 20px 0px;
}

.mrt-scroll__arrow {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.45;
  transition: opacity 160ms ease;
}

.mrt-scroll__arrow:hover {
  opacity: 1;
}

.mrt-scroll__arrow--left {
  margin: 9px 0 9px 15px;
  background-image: url("/static/images/btn_left.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.mrt-scroll__arrow--right {
  margin: 9px 15px 9px 0;
  background-image: url("/static/images/btn_right.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.mrt-scroll__viewport {
  flex: 1 1 auto;
  overflow-x: auto; /* 若內容超出容器寬度，會出現水平滾動條並允許水平捲動；否則不顯示 */
  overflow-y: hidden; /* 垂直方向不允許捲動 */
  display: flex;
  justify-content: flex-start;
  scrollbar-width: none;
}

.mrt-scroll__viewport::-webkit-scrollbar { display: none; } /* 隱藏捲軸但保留捲動功能 */

.mrt-scroll__list {
  display: flex;
  width: max-content; /* 讓 list 寬度撐開到包住所有 item */
  align-items: center;
  min-width: max-content;
}

.mrt-scroll__item {
  flex: 0 0 auto; /* 每個 item 不要被壓縮 */
}

.mrt-scroll__btn {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  padding: 9px 15px;
}

.mrt-scroll__btn:hover {
  color: #448899;
  font-weight: 700;
}

/* ===== Attraction Card ===== */
.attraction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  justify-content: center;
}

.attraction-card {
  border: 1px solid #E8E8E8;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}

.attraction-card__link { display: block; }

.attraction-card__media {
  position: relative;
  width: 100%;
  height: 197px;
  overflow: hidden;
  background: #f3f3f3;
}

.attraction-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attraction-card__title-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.55);
}

.attraction-card__title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  height: 40px;
  padding: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attraction-card__meta {
  height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  font-size: 14px;
  color: #666;
}

/* ===== Footer ===== */
.footer {
  background: #757575;
  padding: 40px 0;
}

.footer__text {
  display: block;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* Auth Dialog */
.auth-dialog {
  border: 0;
  padding: 0;
  width: 340px;
  max-width: calc(100% - 20px); /* 視窗太窄時不要超出畫面：最大寬度 = 視窗寬 - 20px（等於左右各留 10px 緩衝） */
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 60px 0 rgba(170,170,170,1); /* 陰影效果：垂直往下 4px、模糊半徑 60px，1=不透明，讓彈窗看起來浮在頁面上。 */
  position: relative;
}

.auth-dialog::backdrop {
  background: rgba(0,0,0,0.25);
}

.auth-dialog__bar {
  height: 10px;
  background: linear-gradient(to right, #66AABB, #337788);
}

.auth-dialog__close {
  position: absolute;
  padding: 0;
  top: 20px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

.auth-dialog__close-icon {
  width: 16px;
  height: 16px;
  background: transparent;
  background-image: url("/static/images/close_btn.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-dialog__title {
  margin: 15px 15px 0px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #666;
}

.auth-form[hidden] { display: none; }

.auth-form {
  margin: 15px 15px 16px;
  width: 310px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form__input {
  height: 47px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 16.5px 15px;
  font-size: 16px;
}

.auth-form__submit {
  height: 46px;
  border: 0;
  border-radius: 5px;
  background: #448899;
  color: #fff;
  font-size: 19px;
  cursor: pointer;
}
.auth-form__submit:hover { filter: brightness(0.95); }

.auth-form__switch {
  margin: 0;
  text-align: center;
  font-size: 16px;
  color: #666;
  height: 22px;
}
.auth-form__switch a { text-decoration: underline; }

.auth-form__message {
  height: 22px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #666;
}
.auth-form__message:empty { display: none; } /* visibility: hidden 時，元素仍佔位， margin 會保留；只有 display: none 時，才會連同 margin 一起消失 */
.auth-form__message.is-error { color: #c43131; }
.auth-form__message.is-success { color: #2a7b2a; }

/* ===== AppUI: Top Loading Bar ===== */
/* 圓圈 loading */
.top-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.top-loading[hidden] { display: none; }

.top-loading::after {
  content: "";
  width: 75px;
  height: 75px;
  border: 15px solid #dddddd;
  border-top-color: #009578;
  border-radius: 50%;
  animation: loading 0.75s ease infinite;
}

.top-loading.is-active {
  opacity: 1;
  visibility: visible;
}

@keyframes loading {
  from { transform: rotate(0turn) }
  to { transform: rotate(1turn) }
}

/* 長條 loading */
/* .top-loading {
  position: fixed; 固定在視窗上，不會因為頁面滾動而跑掉
  left: 0; 貼齊上方，左右撐滿整個視窗寬度
  right: 0;
  top: 0;
  height: 5px;
  z-index: 2001;
  pointer-events: none; 這條 bar 不會吃掉滑鼠事件（例如點最上方的按鈕/連結，不會被它擋住）
  opacity: 0; 預設透明（看不到），配合 is-active 切到 1 做淡入
  transition: opacity 160ms ease; 當 opacity/transform 改變時，走動畫而不是瞬間跳
}

.top-loading.is-active {
  opacity: 1;
}

.top-loading__bar {
  height: 100%; 內條高度等於外層容器
  width: 35%;
  background: linear-gradient(
    90deg,
    rgba(68, 136, 153, 0) 0%,
    rgba(68, 136, 153, 1) 50%,
    rgba(68, 136, 153, 0) 100%
  ); 做出中間亮、兩側透明的光帶 
  animation: topLoadingMove 900ms ease-in-out infinite; /* 套用 keyframes 讓光帶一直水平移動：把 topLoadingMove 的動畫套用在此元素上，每一輪跑 900ms，速度曲線是 ease-in-out（一開始慢 → 中間快 → 結尾慢），而且無限重複（一直跑，代表「還在載入」）
}

定義光帶移動：從螢幕左外面 → 跑過去 → 跑到右外面
@keyframes topLoadingMove {
  0% { transform: translateX(-60%); }
  50% { transform: translateX(160%); } 動畫跑到一半（900ms 的一半 = 450ms） 
  100% { transform: translateX(360%); }
} */

/* ===== AppUI: Fade/Slide utility ===== */
.fade-slide {
  opacity: 0; /* 預設看不到，等 is-open 才可見 */
  transition: opacity 700ms ease; /* 淡入/滑入的動畫時間，當 opacity/transform 改變時，走動畫而不是瞬間跳 */
}

.fade-slide.is-open {
  opacity: 1;
}

/* ===== Dialog/backdrop（<dialog> 在 showModal() 時，瀏覽器會自動產生的一層「遮罩」） ===== */
.auth-dialog::backdrop {
  background: rgba(0, 0, 0, 0); /* 一開始是 完全透明（黑色但 alpha=0） */
  transition: background 700ms ease; /* 當 backdrop 的 background 值改變時，不要瞬間跳，而是用 700ms 的時間平滑過渡（ease：一開始慢、中間快、結尾慢） */
}

.auth-dialog.is-open::backdrop {
  background: rgba(0, 0, 0, 0.25); /* 半透明的黑遮罩 */
}

/* ===== RWD：Tablet (<=1200px) ===== */
@media (max-width: 1200px) {
    .hero__container,
    .main-content__container,
    .footer__container {
      width: 90%;
      margin: 0 auto;
    }

  /* 平板改 2 欄，寬度自適應 */
  .attraction-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== RWD：Mobile (<=600px) ===== */
@media (max-width: 600px) {
  .header__container{
    padding: 0 10px;
  }

  .hero__content { margin: 76px 0 75px; }

  .search-bar__group { width: 320px; }
  .category-dropdown__panel { width: 300px }

  .mrt-scroll__btn { padding: 5px 15px; }

  .attraction-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* ===== Attraction Page ===== */
.page__main { padding: 40px 0 0; }

.page__main.index__main { padding: 0; }

.attraction-content__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.attraction-hero {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  min-height: 400px;
}

.attraction-hero__gallery {
  flex: 0 0 540px;  /* flex-grow: 0（不放大）、flex-shrink: 0（不縮小）、flex-basis: 540px（基準寬 540px） */
}

.carousel {
  position: relative; /* 讓 carousel__btn 定位 */
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  background: #f3f3f3;
  aspect-ratio: 540 / 400; /* 給容器一個固定長寬比，在還沒載入圖片時也有穩定高度 */
}

.carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 不變形地填滿整個容器 */
}

/* 左右箭頭 */
.carousel__btn {
  position: absolute;
  top: 50%; /* 按鈕的上緣放在容器高度的 50%（中間） */
  transform: translateY(-50%); /* 把按鈕往上拉「自己高度的一半」，讓按鈕的「中心點」對齊容器垂直正中央 */
  width: 36px;
  height: 36px;
  border: 0; /* 移除 <button> 預設邊框 */
  cursor: pointer;
  opacity: 0.7;
  background: rgba(255,255,255,0.6);
  border-radius: 50%; /* 方形加上圓角 50% 就會變圓形 */
}

.carousel__btn:hover {
  opacity: 1;
}

.carousel__btn--left {
  left: 10px;
  background-image: url("/static/images/btn_left.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.carousel__btn--right { 
  right: 10px;
  background-image: url("/static/images/btn_right.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* indicator */
.carousel__indicator {
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
  display: flex;
  height: 5px;
}

.carousel__segment {
  flex: 1 1 0; /* 平均分配寬度，flex-basis: 0 代表元素的初始寬度為 0，換句話說，元素的起始尺寸會由 flex-grow 來決定 */
  background: #FFFFFF;
  opacity: 0.75;
}

.carousel__segment.is-active {
  background: #000000;
}

.attraction-hero__info {
  flex: 0 1 600px; /* 不用放大，但允許變窄以避免溢出 */
  min-width: 0;
  height: 390px;
}

.attraction-hero__title {
  margin: 0 0 15px; /* 上 / 左右 / 下 */
  font-weight: 700;
  font-size: 24px;
  color: #666;
  height: 33px;
}

.attraction-hero__subtitle {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 400;
  color: #666;
}

/* booking-card */
.booking-card {
  width: 100%;
  background: #e8e8e8;
  border-radius: 5px;
  padding: 15px 20px;
  height: 302px;
}

.booking-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #666;
  height: 22px;
  line-height: 24px;
}

.booking-card__desc {
  margin: 15px 0 0;
  font-size: 16px;
  font-weight: 400;
  color: #666;
  height: auto;  
  line-height: 1.4;
}

.booking-card__form {
  display: flex;
  flex-direction: column;
}

.booking-card__row {
  display: flex;
  align-items: center;
  margin: 15px 0 0;
  gap: 5px;
  height: 22px;
  line-height: 13.3px;
}

.booking-card__row--date {
  height: 35px;
}

.booking-card__label {
  flex: 0 0 auto; /* flex-basis: auto 代表該元素的初始尺寸是由元素本身的內容決定的 */
  font-size: 16px;
  font-weight: 700;
  color: #666;
  white-space: nowrap;
}

/* 日期 */
.booking-card__input {
  height: 35px;
  width: 193px; 
  padding: 5px 10px 5px 10px;
  border: 0;
  background: #fff;
  font-size: 16px;
  color: #000;
}

/* 時段 */
.booking-card__time {
  display: flex;
  align-items: center;
  gap: 5px;
}

.booking-card__radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.booking-card__radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid; /* ::before 生成的偽元素，預設行為像行內元素（inline），不吃 width/height（寬高由文字行盒決定），因此把父層變成 grid，偽元素就成為 grid item（能吃寬高）。也可以偽元素 display:block;＋margin:auto; 或 position:relative;＋ 偽元素 position:absolute; inset:0;＋margin:auto; */
  place-items: center; /* 把圓點置中 */
  background: #fff;
}

.booking-card__radio input::before {
  content: "";
  width: 18px; /* 圓點的尺寸 */
  height: 18px; /* 圓點的尺寸 */
  border-radius: 50%;
  transform: scale(0); /* 圓點初始大小（存在但縮到看不見） */
  transition: transform 0.12s ease-in-out; /* 當 transform 的值改變時（scale(0) → scale(1)），以 0.12 秒、先慢後快再慢的節奏平滑過渡 */
  background: #448899;
}

.booking-card__radio input:checked::before {
  transform: scale(1); /* 被選取時，圓點放大顯示 */
}

.booking-card__radio-text {
  font-size: 16px;
  font-weight: 400;
  color: #666;
}

.booking-card__price {
  font-size: 16px;
  font-weight: 400;
  color: #666;
}

.booking-card__submit {
  align-self: flex-start;
  margin: 25px 0px auto;
  padding: 10px 20px;
  border: 0;
  border-radius: 5px;
  background: #448899;
  color: #fff;
  font-size: 19px;
  line-height: 16px;
  font-weight: 400;
  cursor: pointer;
}

.booking-card__submit:hover {
  filter: brightness(0.95);
}

/* 分隔線 */
.attraction-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 40px 0 40px;
}

/* 下方內文 */
.attraction-detail {
  min-height: 362px;
  height: auto;
  margin: 0 0 40px;
  padding: 0 10px;
}

.attraction-detail__description {
  margin: 10px 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

.attraction-detail__heading {
  font-size: 16px;
  font-weight: 700;
  color: #666;
}

.attraction-detail__text {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

/* ===== RWD：Tablet (<=1200px) ===== */
@media (max-width: 1200px) {
  .attraction-content__container {
    width: 90%;
    padding: 0 10px;
  }

  .attraction-hero {
    flex-direction: column;
    gap: 20px;
    margin: 0; /* 上方圖片貼齊 header */
    height: auto;
  }

  /* 圖片滿版 */
  .attraction-hero__gallery {
    flex: none;
    width: 100vw;
    max-width: none;
    padding: 0 10px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .attraction-hero__info {
    flex: 0 1 auto;
    width: 100%;
    height: auto;
  }
}

/* ===== RWD：Mobile (<=600px) ===== */
@media (max-width: 600px) {
  .attraction-content { 
    margin: 0;
    display: flex;
    justify-content: center;
  }

  .attraction-content__container {
    width: 100%;
  }

  .attraction-hero__gallery {
    padding: 0;
  }

  .carousel {
    aspect-ratio: 360 / 350;
    border-radius: 0; /* 手機滿版不圓角 */
  }

  .attraction-hero__title {
    margin: 10px 0 10px;
    height: auto;
  }

  .attraction-hero__subtitle {
    margin: 0 0 20px;
  }

  .booking-card {
    height: auto;
  }

  .booking-card__row {
    flex-wrap: wrap;
  }

  .attraction-detail {
    padding: 0;
    margin: 0 0 40px;
  }
}

/* ===== Booking Page ===== */
/* 讓「empty state」時 footer 下方能延伸灰底 */
body { /* 把 body 背景改成灰色。footer 下方（沒被任何元素佔到的剩下視窗高度）會顯示 body 或 html 的 background */
  background: #757575;
  min-height: 100vh; /* 讓 body 最小高度撐滿整個視窗高度（通常 body 的高度跟內容一樣短） */
}
body .page__main { /* 但 main 內容區仍維持白底 */
  background: #fff;
}

/* container */
.booking-page__container {
  max-width: 1000px;
  margin: 0 auto; /* 上下 margin 0，左右 auto → 水平置中（前提是有 max-width/width） */
  padding: 0px 0px 40px;
}

.booking-page__headline {
  margin: 0 0 30px;
  font-size: 19px;
  font-weight: 700;
  color: #666;
  height: 24px;
}

.booking-page__empty {
  margin: 0; /* 取消 <p> 預設上下 margin */
  font-size: 16px;
  color: #666;
}

.booking-page__inner {
  padding: 0 10px;
}

.booking-page__divider {
  border: 0;
  border-top: 1px solid #E8E8E8; /* 上邊框」當分隔線 */
  margin: 40px 0; /* 上下留 40px、左右 0*/
  width: min(1200px, calc(100vw - 30px));
  position: relative; /* left 只有在非 static 的定位下才會生效 */
  left: 50%; /* 把 divider 的「左邊界」往右推到父層寬度的 50% 位置 */
  transform: translateX(-50%); /* 把 divider 再往左拉回自身寬度的 50%，讓它的中心點剛好落在父層的 50% 位置。 */
}

/* Trip card (desktop) */
.booking-trip-card {
  display: grid; /* 把卡片變成 CSS Grid 容器，用欄位排列（左圖、右info） */
  grid-template-columns: 250px 1fr; /* 左欄固定 250px，右欄彈性填滿剩餘空間 */
  column-gap: 30px;
  align-items: start; /* Grid 內容在垂直方向對齊上方，不要置中 */
}

.booking-trip-card__info{
  position: relative;      /* 讓裡面的 absolute （垃圾桶）以它為基準 */
  height: 200px;
}

.booking-trip-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.booking-trip-card__name {
  display: inline-block; /* 讓 <a> 像 inline，但可以吃 margin / 寬高行為更可控 */
  margin: 0 0 20px; /* 下方空 20px */
  font-size: 16px;
  font-weight: 700;
  color: #448899;
  height: 24px;
}

.booking-trip-card__line {
  margin: 0 0 10px;
  font-size: 16px;
  color: #666;
  height: 24px;
}

.booking-trip-card__label {
  font-weight: 700;
}

.booking-trip-card__delete {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;

  border: 0;
  padding: 0;
  cursor: pointer;
  width: 30px;
  height: 30px;

  background: transparent;
  background-image: url("/static/images/trash.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* section */
.booking-page__section-title {
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 700;
  color: #666;
  height: 24px;
}

/* ===== TapPay Fields ===== */
.tpfield {
  width: 200px;
  height: 38px;
  padding: 10px 10px;
  border: 1px solid #E8E8E8;
  border-radius: 5px;
  background: #fff;
}

/* TapPay 會在 focus 時幫容器自動加上這個 class */
.tappay-field-focus {
  border-color: #66afe9;
  box-shadow: 0 0 0 3px rgba(102, 175, 233, .25);
}

/* form rows */
.booking-page__form-row {
  display: flex; /* 一行內「label + input」水平排 */
  align-items: center;
  gap: 0;
  margin: 0 0 15px;
}

.booking-page__label {
  min-width: 81px;
  font-size: 16px;
  color: #666;
  white-space: nowrap; /* 不換行 */
}

.booking-page__input {
  width: 200px;
  height: 38px;
  padding: 10px 10px;
  border: 1px solid #E8E8E8;
  border-radius: 5px;
  font-size: 16px;
}

.booking-page__hint {
  margin: 15px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #666;
  height: 24px;
}

/* total + button */
.booking-page__action {
  display: flex;
  flex-direction: column; /* 讓 total 與 button 垂直排列 */
  align-items: flex-end; /* 整組靠右對齊 */
  gap: 22px;
  height: 100px;
}

.booking-page__total {
  margin: 0; /* 取消 <p> 預設上下 margin */
  font-size: 16px;
  font-weight: 700;
  color: #666;
}

.booking-page__submit {
  width: 173px;
  height: 36px;
  border: 0;
  border-radius: 5px;
  background: #448899;
  color: #fff;
  font-size: 19px;
  cursor: pointer;
}
.booking-page__submit:hover { filter: brightness(0.95); } /* hover 時變暗一點點（亮度乘 0.95） */

/* ===== RWD：Tablet (<=1200px) ===== */
@media (max-width: 1200px) {
    .hero__container,
    .booking-page__container,
    .footer__container {
      width: 90%;
      margin: 0 auto;
    }
}

/* ===== RWD：Mobile (<=700px) ===== */
@media (max-width: 700px) {
  .booking-page__container {
    width: 100%;
    padding: 0px 10px 40px;
  }

  .booking-page__inner{
    padding: 0;
  }

  .booking-trip-card {
    grid-template-columns: 1fr;
    row-gap: 30px;
    min-height: auto;
  }

  .booking-trip-card__image {
    width: 100%;
    height: 200px;
  }

  .booking-trip-card__delete {
    top: auto; /* 取消 top 的定位約束  */
    bottom: 0;
  }

  .booking-trip-card__line--address {
    margin: 0;
  }

  .booking-page__hint {
    height: 48px;
  }
}

/* ===== Thankyou Page ===== */
#payment-content {
  margin-top: 10px;
}

#payment-content--failed,
#payment-content--success {
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  background: #fff;
  padding: 22px 20px;
  box-shadow: 0 2px 18px rgba(0,0,0,.06);
}

/* 說明文字 */
.thankyou__desc {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  font-weight: 600;
}

/* 訂單號碼區 */
.thankyou__number {
  margin: 0 0 18px;
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f7f7;
  border: 1px dashed #E0E0E0;
  color: #666;
}

.thankyou__number span[data-order-number] {
  font-weight: 800;
  color: #111;
  letter-spacing: 0.5px;
}

/* 按鈕列 */
.thankyou__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 共用 Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;
  padding: 0 16px;

  border-radius: 6px;
  border: 1px solid transparent;

  background: #448899;
  color: #fff;
  font-size: 16px;
  font-weight: 700;

  cursor: pointer;
  user-select: none;
  transition: transform 120ms ease, filter 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover {
  filter: brightness(0.95);
  box-shadow: 0 6px 18px rgba(68,136,153,.18);
}

.btn:active {
  transform: translateY(1px);
}

/* 次要按鈕（回首頁這種） */
.btn--ghost {
  background: #fff;
  color: #448899;
  border-color: #448899;
}

.btn--ghost:hover {
  background: rgba(68,136,153,.08);
  filter: none;
}

/* 成功頁面下方的「景點資訊」區塊微調：讓它像卡片、跟上面狀態卡一致 */
#payment-content--success section {
  margin-top: 16px;
  border-top: 1px solid #E8E8E8;
  padding-top: 16px;
}

/* thankyou 成功 */
#payment-content--success .booking-trip-card {
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

#payment-content--success .booking-trip-card__info {
  padding: 16px 16px 14px;
  height: auto;
}

#payment-content--success .booking-trip-card__name {
  margin-bottom: 14px;
}

#payment-content--success .booking-trip-card__line {
  margin-bottom: 8px;
  height: auto;
}

@media (max-width: 600px) {
  #payment-content--failed,
  #payment-content--success {
    padding: 18px 14px;
  }

  .thankyou__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}