/* ========================================
   Contact Page – 迋斯生技 Figma 聯絡我們
   ======================================== */

.contact-main {
  margin-top: var(--header-height);
  background: var(--color-wants-cream, #ffffff);
}

/* ---------- Hero Zone ---------- */
.contact-hero-zone {
  background: var(--color-wants-cream, #ffffff);
}

/* ---------- Hero ---------- */
.contact-hero {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.contact-hero picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.contact-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  text-align: center;
  color: #fff;
}

.contact-hero__title {
  font-family: "Georgia", "Noto Sans TC", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: normal;
  margin: 0;
}

.contact-hero__subtitle {
  font-family: "Georgia", "Noto Sans TC", serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  margin: 0;
}

/* ---------- Contact Cards ---------- */
.contact-cards {
  position: relative;
  z-index: 2;
  margin-top: 47px;
  padding: 0 20px 47px;
  background: var(--color-wants-cream, #ffffff);
}

.contact-cards__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 992px;
  margin: 0 auto;
}

.contact-card {
  flex: 0 1 226px;
  min-width: min(226px, 100%);
  /*
   * 原本是固定 height: 130px + overflow: hidden，說明文字一換行就被裁掉。
   * 改成最小高度，讓四張卡在 flex 容器裡等高、內容多的自然變高。
   */
  min-height: 130px;
  background: #fff;
  border: 0;
  border-radius: 3px;
  /* 設計稿是柔和無方向性的陰影，原本 4px 4px 的右下偏移看起來像舊版卡片 */
  box-shadow:
    0 2px 6px rgba(58, 63, 59, 0.08),
    0 8px 24px rgba(58, 63, 59, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 21px 20px;
}

.contact-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
}

.contact-card__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.contact-card__icon-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contact-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 19px;
  flex-shrink: 0;
}

.contact-card--email .contact-card__icon-wrap {
  height: 16px;
}

.contact-card--store .contact-card__icon-wrap {
  width: 18px;
}

.contact-card__icon {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

.contact-card__title {
  font-family: "Georgia", "Noto Sans TC", serif;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-wants-dark);
  margin: 0;
  white-space: nowrap;
}

.contact-card__value {
  font-family: "Georgia", "Noto Sans TC", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-wants-gold, #987b4f);
  margin: 0;
  white-space: nowrap;
}

.contact-card__link {
  color: inherit;
  text-decoration: none;
}

.contact-card__link:hover,
.contact-card__link:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-card--email .contact-card__value,
.contact-card--line .contact-card__value {
  font-size: 14px;
}

.contact-card--store .contact-card__value {
  color: var(--color-wants-gold, #987b4f);
  font-size: 14px;
}

.contact-card__note {
  font-family: "Georgia", "Noto Sans TC", serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-wants-accent, #808080);
  margin: 0;
  /*
   * 原本是 nowrap，卡片只有 226px 寬，像「歡迎光臨實體店面，來電採購、驚喜贈品…」
   * 這種長度會整段溢出卡片被裁掉。改成正常換行。
   */
  white-space: normal;
}

/* ---------- Body / Form Section ---------- */
.contact-body {
  position: relative;
  /*
   * 原本另外鋪 contact-body-background.png ——RoRich 的咖啡豆線條圖騰配奶油底，
   * 跟 Kushon 的深灰／紅金色系衝突，已移除。設計稿這一區是淺色純底。
   *
   * 要放回背景圖請用「外觀 → 自訂 → 頁面區塊背景 → 聯絡我們 → 聯絡表單區」。
   */
  /* 設計稿這段是淺灰，跟上方白色卡片區分層 */
  background: #f5f5f5;
  padding: 59px 20px 80px;
  overflow: hidden;
}

.contact-body__bg {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100%;
  min-width: 1920px;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  opacity: 1;
  z-index: 0;
}

.contact-body__inner {
  position: relative;
  z-index: 1;
  max-width: 1170px;
  margin: 0 auto;
}

.contact-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.contact-section-title {
  font-family: "Georgia", "Noto Sans TC", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
  color: var(--color-section-title, #7e7e7e);
  margin: 0;
}

.contact-section-title-bar {
  display: block;
  width: 40px;
  height: 5px;
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 51px;
}

/* ---------- Form ---------- */
.contact-form {
  flex: 0 1 441px;
  width: 100%;
  max-width: 441px;
}

.contact-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 27px;
}

.contact-form__field {
  margin-bottom: 16px;
}

.contact-form__field--half {
  flex: 1 1 207px;
  min-width: 0;
}

.contact-form__label {
  display: block;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-wants-dark);
  margin-bottom: 7px;
}

.contact-form__required-mark {
  color: var(--color-wants-orange, #a82020);
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
  width: 100%;
  border: none;
  border-radius: 3px;
  /* 設計稿的欄位是白底浮起，不是米色平面 */
  background: #fff;
  box-shadow: 0 5px 14px rgba(58, 63, 59, 0.18);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: #4a4a4a;
  outline: none;
}

.contact-form__input,
.contact-form__select {
  height: 45px;
  padding: 0 14px;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(74, 74, 74, 0.48);
}

.contact-form__select {
  appearance: none;
  background-color: #fff;
  /*
   * 箭頭用 inline SVG 畫在右側，不再依賴 option 文字裡的「▼」。
   * 顏色跟著強調色走，所以用 currentColor 沒辦法 —— 直接把色碼寫進 SVG，
   * 並在 :focus 時換一版，避免整個重畫。
   */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23987b4f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 6px;
  /* 留出箭頭的位置，長選項才不會壓到它 */
  padding-right: 34px;
  color: rgba(74, 74, 74, 0.48);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

/*
 * 尚未選擇時顯示淡色（佔位感），選了之後轉為正常文字色。
 * placeholder 那個 option 設了 disabled，所以「有選值」等同 :valid。
 */
.contact-form__select:valid {
  color: #4a4a4a;
}

.contact-form__select option {
  color: #4a4a4a;
  background: #fff;
}

/* 停用的佔位項在展開清單裡也要看得出來是提示而非選項 */
.contact-form__select option[disabled] {
  color: rgba(74, 74, 74, 0.45);
}

.contact-form__select:hover {
  box-shadow:
    0 1px 3px rgba(58, 63, 59, 0.14),
    0 4px 12px rgba(58, 63, 59, 0.1);
}

.contact-form__textarea {
  min-height: 150px;
  padding: 14px;
  resize: vertical;
}

.contact-form__textarea::placeholder {
  font-size: 13px;
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
  box-shadow:
    0 1px 3px rgba(58, 63, 59, 0.1),
    0 4px 12px rgba(58, 63, 59, 0.06),
    0 0 0 2px var(--color-wants-gold, #987b4f);
}

.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
}

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 162px;
  height: 50px;
  padding: 0;
  border: none;
  border-radius: 50px;
  background: var(--color-wants-gold, #987b4f);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.contact-form__submit:hover {
  opacity: 0.88;
}

.contact-form__required-note {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-wants-accent, #808080);
  margin: 0;
}

/* ---------- Location Card ---------- */
.contact-location {
  flex: 0 1 599px;
  width: 100%;
  max-width: 599px;
  min-height: 592px;
  background: #fff;
  border: 1px solid rgba(58, 63, 59, 0.06);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(58, 63, 59, 0.18);
  overflow: hidden;
}

.contact-location__map-wrap {
  display: flex;
  justify-content: center;
  padding: 22px 24px 18px;
}

.contact-location__map {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 236px;
  border: 0;
  border-radius: 0;
  background: #f5f5f5;
}

.contact-location__body {
  padding: 0 24px 24px;
  font-family: "Noto Sans TC", sans-serif;
}

.contact-location__info {
  margin-bottom: 18px;
}

.contact-location__name {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-wants-gold, #987b4f);
  margin: 0 0 8px;
}

.contact-location__address {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: #595757;
  margin: 0 0 10px;
}

.contact-location__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-location__meta p {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-wants-accent, #808080);
  margin: 0;
}

.contact-location__address a,
.contact-location__meta a {
  color: inherit;
  text-decoration: none;
}

.contact-location__address a:hover,
.contact-location__address a:focus,
.contact-location__meta a:hover,
.contact-location__meta a:focus {
  color: var(--color-wants-accent, #808080);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/*
 * 交通提醒上方的分隔線。
 *
 * 原本是 divider.svg —— 內容只是一條 #AFAFAF 的直線，卻要多一次 HTTP 請求，
 * 而且它寫的 var(--stroke-0) 在外部 SVG 裡讀不到主頁面的變數，永遠用不上。
 * 改成 CSS 邊框，顏色也就能跟著後台走。
 */
.contact-location__divider {
  display: block;
  width: 100%;
  height: 0;
  border: 0;
  border-top: 1px solid var(--color-divider, #afafaf);
  margin-bottom: 18px;
}

.contact-location__notice {
  margin-bottom: 24px;
}

.contact-location__notice-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-wants-dark, #3a3f3b);
}

.contact-location__notice-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid #e57145;
  border-radius: 50%;
  color: var(--color-wants-orange, #a82022);
  flex-shrink: 0;
}

.contact-location__notice-icon::before {
  content: "!";
  display: block;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.contact-location__notice-text {
  white-space: nowrap;
}

.contact-location__notice p {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--color-wants-accent, #808080);
  margin: 0;
}

.contact-location__notice p + p {
  margin-top: 2px;
}

.contact-location__map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--color-wants-gold, #987b4f);
  border-radius: 50px;
  background: transparent;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-wants-gold, #987b4f);
  text-align: center;
  transition:
    background 0.3s ease,
    color 0.3s ease;
  align-self: flex-start;
}

.contact-location__map-btn:hover {
  background: var(--color-wants-gold, #987b4f);
  color: #fff;
  opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .contact-body__bg {
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    height: clamp(85px, 24.53vw, 92px);
    min-height: 0;
  }

  .contact-hero__content {
    gap: 5px;
  }

  .contact-hero__title {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(15px, 4.2vw, 18px);
    line-height: 1.35;
  }

  .contact-hero__subtitle {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(11px, 3.3vw, 14px);
    line-height: 1.4;
  }

  .contact-cards {
    margin-top: 36px;
    padding: 0 16px 31px;
  }

  .contact-cards__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    width: 100%;
    max-width: 315px;
  }

  .contact-card {
    width: 100%;
    height: auto;
    min-height: 0;
    min-width: 0;
    aspect-ratio: 1.12 / 1;
    padding: clamp(12px, 4vw, 21px) clamp(6px, 2.5vw, 12px);
  }

  .contact-card__body {
    gap: clamp(6px, 2vw, 8px);
  }

  .contact-card__icon-title {
    gap: clamp(5px, 1.8vw, 8px);
  }

  .contact-card__title {
    font-size: clamp(12px, 3.7vw, 14px);
  }

  .contact-card__value,
  .contact-card--email .contact-card__value,
  .contact-card--line .contact-card__value,
  .contact-card--store .contact-card__value {
    max-width: 100%;
    font-size: clamp(10px, 3.25vw, 14px);
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .contact-card__note {
    max-width: 100%;
    font-size: clamp(9px, 2.85vw, 11px);
    line-height: 1.35;
    white-space: normal;
  }

  .contact-body {
    padding: 43px 0 60px;
    background: var(--color-wants-cream);
  }

  .contact-body__bg {
    display: none;
  }

  .contact-body__inner {
    width: calc(100% - 40px);
    max-width: 340px;
  }

  .contact-section-header {
    gap: 4px;
    margin-bottom: 28px;
  }

  .contact-section-title {
    font-family: "Noto Sans TC", sans-serif;
    font-size: 13px;
    line-height: 20px;
    color: var(--color-section-title, #7e7e7e);
  }

  .contact-section-title-bar {
    width: 32px;
    height: 4px;
  }

  .contact-content {
    display: block;
    gap: 32px;
  }

  .contact-form {
    width: 100%;
    max-width: none;
  }

  .contact-form__row {
    display: contents;
  }

  .contact-form__field,
  .contact-form__field--half {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
  }

  .contact-form__label {
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    color: #777;
    white-space: nowrap;
  }

  .contact-form__input,
  .contact-form__select {
    height: 33px;
    /* 右側同樣留給箭頭，否則長選項會壓在圖示上 */
    padding: 0 28px 0 10px;
    background-position: right 10px center;
    font-size: 12px;
  }

  .contact-form__field--message {
    display: block;
  }

  .contact-form__field--message .contact-form__label {
    display: block;
    margin-bottom: 7px;
  }

  .contact-form__textarea {
    min-height: 155px;
    padding: 11px;
    font-size: 12px;
    resize: none;
  }

  .contact-form__textarea::placeholder {
    font-size: 12px;
  }

  .contact-form__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 25px;
  }

  .contact-form__submit {
    width: 100%;
    height: 38px;
    border-radius: 999px;
    font-size: 13px;
  }

  .contact-form__required-note {
    font-size: 10px;
    line-height: 14px;
  }

  .contact-location {
    width: 100%;
    max-width: 336px;
    min-height: 0;
    margin: 32px auto 0;
    border-radius: 10px;
  }

  .contact-location__map-wrap {
    padding: clamp(24px, 7vw, 30px) clamp(20px, 6vw, 24px) 0;
  }

  .contact-location__map {
    width: 100%;
    height: auto;
    aspect-ratio: 1.16 / 1;
    border-radius: 0;
  }

  .contact-location__body {
    padding: clamp(24px, 7vw, 30px) clamp(20px, 6vw, 24px)
      clamp(24px, 7vw, 30px);
  }

  .contact-location__info {
    margin-bottom: clamp(16px, 4.6vw, 20px);
  }

  .contact-location__name {
    margin-bottom: 4px;
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.35;
    white-space: nowrap;
  }

  .contact-location__address {
    margin-bottom: clamp(10px, 3.5vw, 14px);
    font-size: clamp(12px, 3.3vw, 14px);
    line-height: 1.45;
    white-space: nowrap;
  }

  .contact-location__meta {
    gap: 2px;
  }

  .contact-location__meta p {
    font-size: clamp(10px, 3vw, 14px);
    line-height: 1.45;
    white-space: nowrap;
  }

  .contact-location__divider {
    margin-bottom: clamp(16px, 4.8vw, 20px);
  }

  .contact-location__notice {
    margin-bottom: clamp(20px, 5.8vw, 24px);
  }

  .contact-location__notice-head {
    gap: 8px;
    margin-bottom: 6px;
    font-size: clamp(13px, 3.6vw, 16px);
  }

  .contact-location__notice-icon {
    width: 20px;
    height: 20px;
    border-width: 2px;
  }

  .contact-location__notice-icon::before {
    font-size: 13px;
  }

  .contact-location__notice p {
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.45;
    white-space: normal;
  }

  .contact-location__map-btn {
    display: flex;
    width: clamp(156px, 48vw, 180px);
    height: clamp(34px, 9.5vw, 36px);
    margin: 0 auto;
    border-radius: 999px;
    font-size: clamp(12px, 3.5vw, 14px);
    font-weight: 700;
  }
}

@media (max-width: 520px) {
  .contact-body__inner {
    width: calc(100% - 64px);
    max-width: 336px;
  }
}
