/* preview.css */

body {
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
  color: #222;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 模板一預覽頁面的樣式 */
.preview-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px;
}

/* 模板二預覽頁面的樣式 */
.preview-container-2 {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0px 32px;
}

.preview-text-block {
  /* font-size: 18px; */
  /* line-height: 1.8; */
  margin-bottom: 24px;
  letter-spacing: 2.4px;
}

.preview-text-block p {
  margin: 15px 0 0 0;
}

/* 按鈕(超連結)元件預覽樣式*/
.preview-btn-link-outer {
  margin: 32px 0 0 0;
  display: flex;
  justify-content: space-around;
  margin-bottom: 50px;
}

.preview-btn-link {
  width: 50%;
  min-width: 120px;
  background: #000;
  color: #fff !important;
  border: 1px solid #c5cfd8;
  font-size: 18px;
  border-radius: 0;
  text-align: center;
  letter-spacing: 3px;
  font-weight: 500;
  box-sizing: border-box;
  text-decoration: none !important;
  transition: background .18s;
  margin: 0;
  cursor: pointer;
  line-height: 2;
}

.preview-btn-link:hover,
.preview-btn-link:focus {
  background: #222;
  color: #fff;
  text-decoration: underline;
}

.preview-caption {
  font-size: 17px;
  line-height: 1.8;
  color: #444;
  /* height: 50px; */
  margin-bottom: 16px;
}

.preview-caption p {
  margin: 8px 0 0 0;
}

.preview-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

/* 單圖圖片容器樣式 */
.single-image-wrapper {
  width: 100%;
  /* height: 500px; */
}

.single-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 10px auto;
}


/* 分隔元件預覽樣式 */
.preview-divider-image {
  display: block;
  margin: 0 auto 48px auto;
}

.preview-footer {
  font-size: 14px;
  color: #777;
  margin-top: 64px;
  border-top: 1px solid #eee;
  padding-top: 16px;
  text-align: left;
}

/*雙圖組建預覽樣式*/
.preview-double-container {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  /* margin: 24px 0 0 0; */
}

/*三圖組建預覽樣式*/
.preview-three-container {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  /* margin: 24px 0 0 0; */
}

.preview-image-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-height: unset;
  align-items: center;
}

.preview-image-wrapper img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  margin-bottom: 10px;
  display: block;
}

/*Google Maps 組建預覽樣式*/
.preview-map-container {
  position: relative;
  margin: 24px 0;
  background-color: rgb(247 249 250);
  border-radius: 20px;
  /* overflow: hidden; */
  flex: 1 1 0;
}

.preview-map-container-empty {
  position: relative;
  flex: 1 1 0;
}

/* 地圖區塊（含iframe） */
.preview-map-iframe {
  width: 100%;
  aspect-ratio: 20/8;
  position: relative;
  min-height: 180px;
  overflow: hidden;

}

.preview-map-iframe iframe {
  width: 100%;
  height: 100%;
  border-radius: 20px 20px 0 0;
  border: 0 !important;
  background: #fff !important;
  display: block;
}

/* icon+文字水平排列 */
.preview-map-infos {
  position: relative;
  display: flex;
  margin-top: 0 0 8px 0;
  flex-direction: column;
  padding: 24px 12px;
  font-size: 18px;
}

/* 每一個icon+文字 */
.preview-map-info {
  display: flex;
  align-items: center;
  color: #2D2D2D;
  margin-bottom: 12px;
  align-items: start;

}

.preview-map-info img {
  margin-right: 8px;
}

.preview-map-info p {
  margin: 0;
  font-size: 18px;
  color: #2D2D2D;
}

/* 右上標籤 */
.preview-map-label {
  position: absolute;
  top: 24px;
  right: 12px;
  border-radius: 20px;
  border: 1px solid #AD1546;
  color: #AD1546;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 12px;
  box-shadow: 0 2px 10px 0 rgba(173, 21, 70, 0.10);
  letter-spacing: 0.5px;
  z-index: 2;
  white-space: nowrap;
  line-height: 20px;
}

.preview-map-label p {
  margin: 0;
}

/* 兩個並排 google maps 元件預覽樣式*/
.preview-double-map-container {
  display: flex;
  gap: 32px;
  justify-content: space-between;
  margin: 40px 0;
}

.preview-double-map-container .preview-map-iframe {
  aspect-ratio: 1 / 0.7;
}

/* youtube 元件預覽樣式*/
.preview-youtube-iframe {
  width: 100%;
  aspect-ratio: 16/8;
  overflow: hidden;
  margin-bottom: 18px;
}

.preview-youtube-iframe iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* 通用 iframe 元件預覽樣式 */
.preview-generic-iframe-container {
  margin-bottom: 18px;
}

.preview-generic-iframe {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: 2600px;
}
iframe::-webkit-scrollbar {   /* Chrome, Safari */
  display: none;
}

.preview-generic-iframe iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* ==== Image-Text 預覽樣式 ==== */
.preview-image-text-container {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  align-items: flex-start;
}

.preview-image-text-left,
.preview-image-text-right {
  flex: 1;
  margin: auto 0;
}

.preview-image-text-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.preview-image-text-content {
  padding: 1rem;
  line-height: 1.6;
}

/* 模板二預覽頁面的聯絡我們Card樣式 */
.editor-content-wrapper {
  display: flex;
  padding: 1rem;
  position: relative;
  max-width: 90%;
  margin: 0 auto;
}

.floating-contact-card {
  width: 318px;
  height: fit-content;
  background-color: #F7F9FA;
  border-radius: 20px;
  padding: 48px 10px;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12), 0px 4px 6px 0px rgba(0, 0, 0, 0.20), 0px 0px 4px 0px rgba(0, 0, 0, 0.14);
  border: 1px solid #e1e5e9;
  position: sticky;
  top: 25px;
  flex-shrink: 0;
  text-align: center;
  margin-top: 230px;
}

.floating-contact-card h3 {
  color: #495057;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
}

.contact-divider {
  height: 1px;
  background: linear-gradient(90deg, #d4a574, #b8860b);
  margin-bottom: 1.5rem;
  border-radius: 1px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 110px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-value {
  font-size: 20px;
  color: #404446;
  line-height: 16px;
}

.preview-content {
  flex: 1;
  min-width: 0;
  padding: 0;
  order: 1;
  /* 放在左侧 */
}

/* ===== 模板二：頁首固定文字＋圖片樣式 ===== */
.fixed-top-section {
  padding: 0 0 16px;
  background: #fff;
  max-width: 88%;
  margin: 0 auto;
  padding: 48px 32px;
}

.fixed-text-block {
  text-align: center;
}

/* .gold-wave-divider {
  height: 18px;
  background-image: url('https://auctionhouse.tw/spring_auction_advertising/2.png');
  background-repeat: repeat-x;
  background-size: auto 18px;
  margin: 10px 0 16px;
} */

.fixed-image-top-text,
.fixed-image-bottom-text {
  color: #444;
  line-height: 1.8;
  letter-spacing: 2px;
}

.fixed-image-top-text p,
.fixed-image-bottom-text p {
  margin-top: 8px;
  margin-bottom: 8px;
}

.fixed-image-container {
  width: 100%;
  height: 500px;
}

.fixed-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fixed-image {
  display: block;
  width: 100%;
  height: auto;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .preview-container {
    padding: 32px 48px;
  }

  .preview-container-2 {
    padding: 0;
    margin: 0;
    width: auto;
  }

  .preview-generic-iframe-container {
    margin-bottom: 12px;
  }

  /* 大字標題強制縮小到更適合手機觀看 */
  .preview-container span[style*="font-size:36px"],
  .preview-container-2 span[style*="font-size:36px"] {
    font-size: 24px !important;
  }

  .preview-container span[style*="font-size:32px"],
  .preview-container-2 span[style*="font-size:32px"],
  .fixed-text-block h1 {
    font-size: 20px !important;
  }

  .preview-container span[style*="font-size:24px"],
  .preview-container-2 span[style*="font-size:24px"],
  .fixed-text-block h2 {
    font-size: 18px !important;
  }

  .preview-container span[style*="font-size:20px"],
  .preview-container-2 span[style*="font-size:20px"],
  .fixed-text-block p {
    font-size: 14px !important;
  }

  .preview-container span[style*="font-size:18px"],
  .preview-container-2 span[style*="font-size:18px"] {
    font-size: 12px !important;
  }

  .preview-container span[style*="font-size:16px"],
  .preview-container-2 span[style*="font-size:16px"] {
    font-size: 12px !important;
  }

  .preview-container span[style*="font-size:14px"],
  .preview-container-2 span[style*="font-size:14px"] {
    font-size: 12px !important;
  }

  .preview-container p,
  .preview-container-2 p {
    font-size: 14px !important;
    font-weight: 500;
  }

  .preview-text-block,
  .preview-caption {
    /* font-size: 12px; */
    line-height: 1.6;
  }

  /* 單圖圖片容器樣式 */
  .single-image-wrapper {
    width: 100%;
    height: auto;
  }

  .single-image-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  .preview-double-container {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 16px;
  }

  .preview-three-container {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 16px;
  }

  /* .preview-image-wrapper img {
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    margin-bottom: 5px;
  } */

  .preview-caption {
    height: auto;
    margin-bottom: 16px;
  }

  .preview-double-map-container {
    flex-direction: column;
    gap: 24px;
  }

  .preview-map-container-empty {
    display: none;
  }

  /* 按鈕(超連結)元件預覽樣式*/
  .preview-btn-link {
    width: 100%;
  }

  .preview-divider-image {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 50%;
  }

  /* 響應式設計 - Image-Text 預覽 */
  .preview-image-text-container {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 16px;
}

.preview-image-text-content {
    padding: 0.75rem;
}

.preview-image-text-image,
.preview-image-wrapper .preview-image{
  /* max-width: 100% !important;
  height: auto !important;  */
  object-fit: cover;
  display: block;
  margin-bottom: 5px;
}

  /* 模板二手機版排版 */
  .editor-content-wrapper {
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
    max-width: 95%;
    align-items: center;
  }

  .floating-contact-card {
    width: 85%;
    position: relative;
    top: auto;
    padding: 0 20px;
    margin-top: 30px;
  }

  .preview-content {
    padding: 0;
    width: 85%;
  }

  /* 模板二頁首固定區塊手機版調整 */
  .fixed-top-section {
    max-width: 100%;
    padding: 8px 0;
  }

  .fixed-image-top-text,
  .fixed-image-bottom-text {
    font-size: 14px !important;
    line-height: 1.6;
  }

  .fixed-text-block {
    font-size: 14px !important;
    line-height: 1.6;
  }

  .fixed-image-container {
    width: 100%;
    height: auto;
  }

  .fixed-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .preview-generic-iframe {
    width: 100%;
    height: 2200px;
  }
}