/* =========================================================
   茂洋旭美 - Stylesheet
   結構：image stack + slick carousels（沿用 jingcube 架構）
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #ff3c00;
  color: #2b2118;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 70px; /* 預留 bottom-bar 空間 */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* =========================================================
   Main Container
   設計稿為手機直式版型，桌機以置中窄欄呈現
   ========================================================= */
main {
  background: #ff3c00;
}

.container {
  width: 100%;
  max-width: 567px;
  margin: 0 auto;
}

.box {
  width: 100%;
  display: block;
  line-height: 0;
  font-size: 0;
}

.box > img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

/* CTA 整張圖可點擊 */
.box--cta a {
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}
.box--cta a:hover {
  opacity: 0.92;
}

/* =========================================================
   frame：橘框白卡中間嵌輪播的段落（AESTHETIC / GLITTER / BEYOND）
   白卡在設計稿中為 x17~549 / 567，故左右留 3%
   輪播圖在白卡中左右各內縮 25.5px（白卡寬 533）→ 4.8%
   ========================================================= */
.frame {
  background: #ff3c00;
  line-height: 0;
  font-size: 0;
}

.frame > img {
  width: 100%;
  display: block;
  vertical-align: top;
}

.frame__panel {
  background: #fff;
  margin: 0 3%;
  padding: 5% 4.8%;
}

/* =========================================================
   SLICK CAROUSELS
   ========================================================= */
.slick_row {
  padding: 0;
  margin: 0;
  line-height: 0;
  font-size: 0;
}

.build3d,
.facility,
.works {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
}

.slick-slider { margin: 0 !important; padding: 0 !important; }

.slick-list,
.slick-track {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
  font-size: 0;
}

.slick-slide {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
  font-size: 0;
}

.slick-slide > section {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 0;
}

.slick-slide img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

/* Slick 左右箭頭 */
.slick-prev,
.slick-next {
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.45) !important;
  border-radius: 50%;
}
.slick-prev { left: 8px; }
.slick-next { right: 8px; }
.slick-prev::before,
.slick-next::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  opacity: 1;
}
.slick-prev::before { content: "\f053"; }
.slick-next::before { content: "\f054"; }

/* Slick dots：壓在圖片內部底端，不推擠下方內容 */
.slick-dots {
  bottom: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.slick-dots li { margin: 0 3px !important; }
.slick-dots li button {
  font-size: 0 !important;
  line-height: 0 !important;
}
.slick-dots li button::before {
  font-size: 9px;
  color: #fff;
  opacity: 0.5;
  line-height: 20px;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}
.slick-dots li.slick-active button::before {
  color: #ff6a2b;
  opacity: 1;
}

@media (max-width: 600px) {
  .slick-prev, .slick-next { width: 30px; height: 30px; }
  .slick-prev::before, .slick-next::before { font-size: 13px; }
}

/* =========================================================
   表單區 (data_bg)
   ========================================================= */
.data_bg {
  background: #f5f1ea;
  padding: 50px 16px 70px;
}

.formTable {
  max-width: 567px;
  margin: 0 auto;
  background: #fff;
  padding: 32px 24px;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.formTable .title,
.map_section .title {
  text-align: center;
  margin: 0 0 26px;
}

.formTable .title span,
.map_section .title span {
  display: inline-block;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 600;
  color: #ff3d00;
  letter-spacing: 0.15em;
  position: relative;
  padding: 0 28px;
}

.formTable .title span::before,
.formTable .title span::after,
.map_section .title span::before,
.map_section .title span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20px;
  height: 1px;
  background: #ff3d00;
}
.formTable .title span::before,
.map_section .title span::before { left: 0; }
.formTable .title span::after,
.map_section .title span::after { right: 0; }

.formTable .content { width: 100%; }

.formTable .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.formTable .row_col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.formTable .col {
  display: flex;
  flex-direction: column;
}

.formTable label {
  font-size: 14px;
  color: #4a3a2a;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.formTable .req { color: #c83e3e; margin: 0 2px; }

.formTable input[type="text"],
.formTable input[type="tel"],
.formTable select,
.formTable textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d8d4cc;
  border-radius: 3px;
  font-size: 16px; /* iOS 聚焦時不放大畫面 */
  color: #2b2118;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.formTable input:focus,
.formTable select:focus,
.formTable textarea:focus { border-color: #ff3d00; }

.formTable textarea {
  resize: vertical;
  min-height: 110px;
}

.formTable select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 32px;
}

.check_row {
  margin-top: 20px;
  text-align: center;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #4a3a2a;
}

.check input { margin: 0; }

.privacy-link {
  color: #ff3d00;
  text-decoration: underline;
}

.send {
  margin-top: 22px;
  text-align: center;
}

#submitBtn {
  background: #ff3d00;
  color: #fff;
  border: none;
  padding: 14px 60px;
  font-size: 17px;
  letter-spacing: 0.2em;
  border-radius: 3px;
  transition: background 0.2s;
}

#submitBtn:hover { background: #e03400; }
#submitBtn:disabled { background: #999; cursor: not-allowed; }

.form-result {
  margin-top: 16px;
  padding: 12px;
  text-align: center;
  font-size: 15px;
  border-radius: 4px;
}
.form-result.success { background: #e8f5e9; color: #1b5e20; }
.form-result.error { background: #ffebee; color: #b71c1c; }

@media (min-width: 769px) {
  .formTable { padding: 40px 32px; }
}

/* =========================================================
   map_section (公司資訊)
   ========================================================= */
.map_section {
  max-width: 640px;
  margin: 32px auto 0;
  background: #fff;
  padding: 32px 24px;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map_section .content { width: 100%; }

.map_section .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.map_section .data {
  display: flex;
  flex-direction: column;
}

.map_section .data .col {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid #e0ddd6;
}

.map_section .data .col > span {
  color: #7a6a58;
  font-size: 15px;
  min-width: 90px;
  letter-spacing: 0.06em;
}

.map_section .company,
.map_section .appointment,
.map_section .reception {
  color: #2b2118;
  font-size: 15px;
  font-weight: 500;
}

.map_section .appointment a {
  color: #ff3d00;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.map_section .iframe_col {
  position: relative;
  width: 100%;
  padding-bottom: 70%;
  overflow: hidden;
  border-radius: 4px;
}

.map_section .iframe_col iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.iframe_col__link {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-top {
  position: fixed;
  right: 14px;
  bottom: 78px;
  width: 42px;
  height: 42px;
  background: rgba(43, 33, 24, 0.8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  border-radius: 4px;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover { background: #ff3d00; }

/* =========================================================
   BOTTOM BAR
   ========================================================= */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1b1b1b;
  display: flex;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  gap: 4px;
  transition: background 0.2s;
  border-right: 1px solid #333;
}

.bottom-bar__item:last-child { border-right: none; }
.bottom-bar__item:hover { background: #ff3d00; }
.bottom-bar__item i { font-size: 19px; }

/* =========================================================
   PRIVACY MODAL
   ========================================================= */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.privacy-modal[hidden] { display: none; }

.privacy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.privacy-modal__box {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
}

.privacy-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: #666;
  z-index: 2;
  line-height: 1;
}

.privacy-modal__box h3 {
  padding: 20px 24px 14px;
  margin: 0;
  font-family: "Noto Serif TC", serif;
  color: #ff3d00;
  border-bottom: 1px solid #e0ddd6;
}

.privacy-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.85;
  color: #333;
}

.privacy-modal__body p { margin: 0 0 12px; }
.privacy-modal__body ul { margin: 0 0 14px; padding-left: 20px; }
.privacy-modal__body li { margin-bottom: 4px; }

.privacy-modal__footer {
  padding: 14px 24px;
  border-top: 1px solid #e0ddd6;
  text-align: right;
}

.privacy-modal__ok {
  background: #ff3d00;
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 15px;
  letter-spacing: 0.1em;
}

/* =========================================================
   TOAST SUCCESS
   ========================================================= */
.toast-success {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.toast-success[hidden] { display: none; }

.toast-success__box {
  background: #fff;
  border-radius: 8px;
  padding: 36px 28px 28px;
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.toast-success__box i {
  font-size: 56px;
  color: #ff3d00;
  margin-bottom: 14px;
}

.toast-success__box h4 {
  font-family: "Noto Serif TC", serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: #2b2118;
}

.toast-success__box p {
  color: #555;
  font-size: 15px;
  margin: 0 0 20px;
  line-height: 1.7;
}

.toast-success__box button {
  background: #ff3d00;
  color: #fff;
  border: none;
  padding: 10px 36px;
  font-size: 15px;
  letter-spacing: 0.1em;
}
