/* =====================================================================
   御輕燃脂草本粉｜一頁式落地頁樣式
   版型對照 forum-tw.online 的 lander 版型重寫，未使用對方任何資源檔
   （圖片、影片、留言頭像全部為你自己提供或占位）
   ===================================================================== */

:root {
  --brand: #3f8f5b;
  --brand-dark: #2c6b42;
  --brand-soft: #eef7f1;
  --alert: #e36b6a;
  --line: #e9ebee;
  --fb-blue: #4267b2;
  --fb-link: #365899;
  --price: #f20;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fff;
  color: #1c1e21;
  -webkit-text-size-adjust: 100%;
}

body.noscroll { height: 100vh; overflow: hidden; }

img { max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ---------- 卡片外框（模擬 FB 貼文卡片） ---------- */
.fb-card {
  max-width: 900px;
  margin: 10px auto 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 20px;
  position: relative;
  color: var(--fb-blue);
}

.fb-card + .fb-card { margin-top: 10px; }

/* ---------- 貼文表頭 ---------- */
.fb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.fb-header__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fb-header__meta { flex: 1; min-width: 0; }

.fb-header__name { font-weight: 700; color: #1c1e21; font-size: 15px; }
.fb-header__sub { color: #90949c; font-size: 13px; display: flex; align-items: center; gap: 6px; }

.fb-header__globe {
  width: 12px;
  height: 12px;
  color: #90949c;
}

.fb-header__more {
  color: #90949c;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 2px;
}

/* ---------- 主標題 ---------- */
.main_header {
  font-size: 34px;
  line-height: 1.35;
  font-weight: 800;
  max-width: 800px;
  margin: 4px auto 20px;
  padding: 14px 18px;
  text-align: center;
  border-radius: 10px;
  background-color: var(--alert);
  color: #fff;
}

/* ---------- 影片區 ---------- */
.video-container { position: relative; z-index: 2; }

.video-container__video {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(76vh, 900px);
  background: #000;
  border-radius: 8px;
}

.video-container.fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.video-container.fullscreen .video-container__video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
}

/* 影片上的三個覆蓋層：__open / __popup / __play */
.video-container__open,
.video-container__popup,
.video-container__play {
  display: none;
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  text-align: center;
  z-index: 2;
  height: 150px;
}

.video-container__play { display: block; }

.video-container__open > div,
.video-container__play > div {
  position: relative;
  margin: 0 auto;
  padding: 18px 16px 20px;
  width: min(78%, 330px);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 12px;
  cursor: pointer;
  background-color: rgba(198, 96, 90, 0.86);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.video-container__open h4,
.video-container__play h4 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
}

/* 按鈕上的靜音喇叭圖示 */
.video-container__icon {
  display: block;
  width: 74px;
  height: 74px;
  margin: 2px auto 0;
}

.video-container__popup {
  padding: 5px 20px;
  margin: 0 auto;
  width: 60%;
  top: 40%;
  height: auto;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  background-color: rgba(255, 0, 0, 0.75);
}

.video-container__popup-text { font-size: 26px; margin: 12px 0; }

.video-container__close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.3 5.71 12 12.01l-6.3-6.3-1.41 1.42 6.3 6.29-6.3 6.3 1.41 1.41 6.3-6.3 6.3 6.3 1.41-1.41-6.3-6.3 6.3-6.29z' fill='%23ffffff'/></svg>");
  background-size: cover;
  background-repeat: no-repeat;
}

@keyframes softPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.soft-pulse { animation: softPulse 1.6s ease-in-out infinite; }

/* ---------- 商品資訊條（新增版位，可直接刪除） ---------- */
.product-block {
  display: none;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--brand-soft);
}

/* 預設隱藏，等訂單彈窗被關掉之後才出現（見 landing.js 的 revealOffer） */
.product-block.is-visible { display: flex; }

.product-block__img {
  flex: 0 0 180px;
  max-width: 180px;
}

.product-block__img img { display: block; width: 100%; border-radius: 8px; }

.product-block__body { flex: 1 1 320px; min-width: 260px; }

.product-block__name {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #1c1e21;
}

.product-block__tags { margin: 0 0 10px; color: var(--brand-dark); font-weight: 600; }

.product-block__list {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #4b4f56;
  line-height: 1.7;
  font-size: 15px;
}

.product-block__price { font-size: 15px; color: #4b4f56; }
.product-block__price del { color: #90949c; margin-right: 8px; }
.product-block__price b { color: var(--price); font-size: 26px; }

.product-block__promo {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--price);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  vertical-align: 2px;
}

.product-block__btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.product-block__btn:hover { background: var(--brand-dark); }

/* ---------- 訂單表單 ---------- */
.order-form { display: none; margin: 0 auto; }

.order-form__wrapper {
  max-width: 600px;
  font-size: 17px;
  padding: 0.6em 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem auto;
  border-radius: 0.5em;
  background-image:
    linear-gradient(90deg, var(--fb-blue) 50%, transparent 50%),
    linear-gradient(90deg, var(--fb-blue) 50%, transparent 50%),
    linear-gradient(0, var(--fb-blue) 50%, transparent 50%),
    linear-gradient(0, var(--fb-blue) 50%, transparent 50%);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: 10px 2px, 10px 2px, 2px 10px, 2px 10px;
  animation: marching-ants 400ms infinite linear;
}

@keyframes marching-ants {
  0% { background-position: 0 0, 10px 100%, 0 10px, 100% 0; }
  100% { background-position: 10px 0, 0 100%, 0 0, 100% 10px; }
}

.order-form__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.order-form__text { display: block; margin: 0; text-align: center; }
.order-form__text--highlight { margin-bottom: 0.5em; }
.order-form__text--counter { font-size: 0.925em; }
.order-form__instock--low { color: var(--price) !important; font-weight: 700 !important; }
.order-form__text--note { font-size: 0.9em; }

.order-form__image { max-width: 320px; margin: 1em 0; }
.order-form__image img { display: block; width: 100%; }

.order-form__price { display: flex; align-items: center; flex-direction: column; }
.order-form__price-box { display: flex; align-items: center; }
.order-form__price-text { margin-bottom: 0.55em; font-weight: 700; font-size: 1.25em; }
.order-form__price-old { font-size: 1.15em; text-decoration: line-through; margin-right: 0.5em; color: #90949c; }
.order-form__price-new { font-size: 2em; font-weight: 700; color: var(--price); }

.order-form__timer {
  margin: 1.5em 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.order-form__time {
  display: flex;
  font-size: 2em;
  font-variant-numeric: tabular-nums;
  color: rgb(88, 88, 88);
}

.order-form__input {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 1em;
  max-width: 320px;
  width: 100%;
}

.order-form__input label { font-size: 0.94em; margin-bottom: 0.25em; align-self: flex-start; }

.order-form__input input {
  display: block;
  width: 100%;
  padding: 0.6em 0.65em;
  border: 1px solid #3578e563;
  border-radius: 4px;
  font-size: 1em;
}

.order-form__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  padding: 0.75em 0;
  margin-bottom: 1em;
  background: #3580ed;
  border: 1px solid #3580ed;
  border-radius: 4px;
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  transition: transform 0.4s;
}

.order-form__button:hover,
.order-form__button:active { transform: scale(0.97); }

.order-form__date { font-weight: 700; }

.order-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 1em;
  color: #4b4f56;
  font-size: 0.8em;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.order-form__consent input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.order-form__consent a {
  color: var(--fb-blue);
  text-decoration: underline;
}

/* 蜜罐欄位：移到畫面外，真人看不到，機器人會照填 */
.order-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 留言區 ---------- */
.comments-header { text-align: center; margin-bottom: 18px; }
.comments-header h2 { margin: 0; font-size: 22px; color: #1c1e21; }

.comment {
  display: flex;
  gap: 10px;
  padding: 14px 6px;
  color: #000;
  border-bottom: 1px solid var(--line);
}

.comment:last-child { border-bottom: 0; }

.comment__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  background: #8a9bb0;
  overflow: hidden;
}

/* 把真實顧客照片放進 assets/avatars/1.jpg ~ 10.jpg 就會自動換成照片 */
.comment__avatar img {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.comment__avatar.has-photo img { display: block; }
.comment__avatar.has-photo span { display: none; }

.comment__content { flex: 1; min-width: 0; }

.comment__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.comment__header {
  font-weight: 700;
  color: var(--fb-link);
  font-size: 0.95em;
  margin-bottom: 6px;
}

.comment__date {
  color: #90949c;
  font-size: 0.75em;
  white-space: nowrap;
}

.comment__text {
  background-color: #eaebef;
  border-radius: 18px;
  padding: 10px 15px;
  font-size: 0.95em;
  line-height: 1.5;
}

.comment__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
  padding-left: 4px;
  font-size: 0.8em;
  color: #90949c;
}

.comment__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  color: #90949c;
  font-size: inherit;
  cursor: pointer;
}

.comment__action:hover { text-decoration: underline; }

.comment__icon { width: 16px; height: 16px; fill: #f02849; }
.comment__icon--reply { width: 18px; height: 18px; }

/* ---------- 訂單彈窗 ---------- */
#order_popup {
  display: none;
  align-items: safe center;
  justify-content: center;
  position: fixed;
  overflow-y: auto;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background-color: rgba(51, 51, 51, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#order_popup .order-form { margin: auto; }

#order_popup .order-form__wrapper {
  background-color: #fff;
  padding-top: 2em;
}

.close_order_popup {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 2;
  font-size: 34px;
  line-height: 1;
  color: rgb(172, 172, 172);
  text-align: center;
}

/* ---------- 底部固定購買列（新增版位，可關閉） ---------- */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  align-items: center;
  gap: 12px;
}

.sticky-cta.is-visible { display: flex; }

.sticky-cta__info { flex: 1; min-width: 0; font-size: 13px; color: #4b4f56; }
.sticky-cta__info b { display: block; font-size: 15px; color: #1c1e21; }

.sticky-cta__btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- 手機版 ---------- */
@media (max-width: 600px) {
  .fb-card { margin-left: 8px; margin-right: 8px; padding: 14px; }
  .main_header { font-size: 22px; padding: 12px; }

  .video-container__open > div,
  .video-container__play > div { padding: 15px 12px 17px; }
  .video-container__play h4,
  .video-container__open h4 { font-size: 17px; }
  .video-container__icon { width: 64px; height: 64px; }
  .video-container__video { max-height: 70vh; border-radius: 0; }

  .video-container__popup { width: 86%; }
  .video-container__popup-text { font-size: 20px; }

  .product-block { gap: 14px; }
  .product-block__img { flex: 0 0 120px; max-width: 120px; }
  .product-block__name { font-size: 19px; }
}
