/* ═══════════════════════════════════════════
   蘇格菲莉 SugarFree — 商城頁面樣式
   （沿用 style.css 的色彩 tokens 與元件）
   ═══════════════════════════════════════════ */

/* ── 內頁固定深色導覽列 ── */
.site-header.solid{
  background: rgba(16,32,30,.97);
  box-shadow: 0 1px 0 rgba(251,250,245,.08);
}
body.is-inner{ padding-top: 0; }
.page-main{
  min-height: 60vh;
  padding: 8.5rem 0 5rem;
}

/* ── 導覽列擴充：搜尋/購物車/語系/下拉 ── */
.nav-search input{
  background: rgba(251,250,245,.08);
  border: 1px solid rgba(251,250,245,.2);
  border-radius: 4px;
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
  width: 130px;
  transition: width .2s ease, border-color .2s ease;
}
.nav-search input::placeholder{ color: rgba(251,250,245,.45); }
.nav-search input:focus{ outline: none; border-color: var(--amber); width: 170px; }

.nav-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  color: var(--ivory);
  border-radius: 50%;
  transition: color .15s ease;
}
.nav-icon:hover{ color: var(--amber); }
.nav-icon svg{ width: 21px; height: 21px; }
.cart-badge{
  position: absolute;
  top: 0; right: -2px;
  background: var(--amber);
  color: var(--ink-teal-deep);
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.lang-switch{
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(251,250,245,.65);
  border: 1px solid rgba(251,250,245,.25);
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  transition: color .15s ease, border-color .15s ease;
  /* 觸控目標至少 44×44：手機上按鈕太小會誤觸旁邊的購物車 */
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.lang-switch:hover{ color: var(--amber); border-color: var(--amber); }

.nav-drop{ position: relative; }
.nav-drop-menu{
  position: absolute;
  top: 100%; left: -0.8rem;
  background: rgba(16,32,30,.98);
  border: 1px solid rgba(251,250,245,.1);
  border-radius: 6px;
  padding: 0.5rem 0;
  min-width: 170px;
  display: none;
  z-index: 50;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu{ display: block; }
.nav-drop-menu a{
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  color: rgba(251,250,245,.82);
  border-bottom: none !important;
}
.nav-drop-menu a:hover{ color: var(--amber); background: rgba(251,250,245,.05); }

/* ── 公告列 ── */
.announce-bar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  background: var(--amber);
  color: var(--ink-teal-deep);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  padding: .45rem 1rem;
}
.announce-bar ~ .site-header{ top: 32px; }
body:has(.announce-bar) .page-main{ padding-top: 10.5rem; }
body:has(.announce-bar) .hero{ padding-top: 32px; }

/* ── Flash 訊息 ── */
.flash{
  position: fixed;
  top: 84px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ivory);
  box-shadow: var(--shadow-lift);
  animation: flashIn .3s var(--ease-out), flashOut .4s ease 3.6s forwards;
}
.flash-success{ background: var(--success, #4C7A63); }
.flash-error{ background: var(--error, #B5453F); }
@keyframes flashIn{ from{ opacity: 0; transform: translate(-50%, -12px); } }
@keyframes flashOut{ to{ opacity: 0; visibility: hidden; } }

/* ── 頁面標頭與麵包屑 ── */
.page-head{ margin-bottom: 2.5rem; }
.breadcrumb{
  font-size: 0.8rem;
  color: rgba(26,33,31,.55);
  margin-bottom: 0.8rem;
}
.breadcrumb a{ color: inherit; }
.breadcrumb a:hover{ color: var(--amber-dark); }
.page-head h1{
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ink-teal);
}
.page-head .count{ font-size: 0.85rem; color: rgba(26,33,31,.55); margin-top: 0.4rem; }

/* ── 商品列表版型 ── */
.catalog-layout{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.catalog-side{
  background: var(--ivory);
  border-radius: 8px;
  padding: 1.4rem 1.3rem;
  position: sticky;
  top: 90px;
}
.catalog-side h3{
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: 0.9rem;
}
.catalog-side a{
  display: block;
  padding: 0.45rem 0.2rem;
  font-size: 0.9rem;
  color: rgba(26,33,31,.75);
  border-bottom: 1px solid rgba(26,33,31,.06);
  transition: color .15s ease, padding-left .15s ease;
}
.catalog-side a:hover{ color: var(--amber-dark); padding-left: 0.5rem; }
.catalog-side a.active{ color: var(--ink-teal); font-weight: 700; }

.catalog-toolbar{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.4rem;
}
.catalog-toolbar select{
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(26,33,31,.18);
  border-radius: 4px;
  background: var(--ivory);
  color: var(--deep-ink);
}

.price-row{ display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.price-strike{
  font-size: 0.85rem;
  color: rgba(26,33,31,.45);
  text-decoration: line-through;
}
.price-ref{ font-size: 0.72rem; color: rgba(26,33,31,.5); }
.level-hint{
  font-size: 0.72rem;
  color: var(--amber-dark);
}

/* ── 分頁 ── */
.pagination{
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 3rem;
}
.pagination a, .pagination span{
  min-width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(26,33,31,.15);
  color: rgba(26,33,31,.7);
  background: var(--ivory);
}
.pagination a:hover{ border-color: var(--amber); color: var(--amber-dark); }
.pagination .current{
  background: var(--ink-teal);
  color: var(--ivory);
  border-color: var(--ink-teal);
}

/* ── 商品詳情 ── */
.product-detail{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.pd-gallery{ position: sticky; top: 90px; }
.pd-main-img{
  background: var(--ivory);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.pd-main-img img{ width: 100%; aspect-ratio: 1; object-fit: cover; }
.pd-thumbs{ display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.pd-thumbs img{
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
}
.pd-thumbs img.active{ border-color: var(--amber); }

.pd-info .cat{ font-size: 0.8rem; color: var(--amber-dark); letter-spacing: 0.08em; }
.pd-info h1{ font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--ink-teal); margin: 0.5rem 0 0.8rem; }
.pd-info .summary{ font-size: 0.95rem; color: rgba(26,33,31,.65); margin-bottom: 1.5rem; }
.pd-price-box{
  background: var(--ivory);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}
.pd-price-box .now{
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--amber-dark);
  font-variant-numeric: tabular-nums;
}
.pd-actions{ display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }
.pd-actions .btn-teal{ background: transparent; color: var(--ink-teal); border: 1.5px solid var(--ink-teal); }
.pd-actions .btn-teal:hover{ background: var(--ink-teal); color: var(--ivory); }

/* 加入購物車確認卡：滑出式，不打斷瀏覽 */
.cart-toast{
  position: fixed;
  right: 1.4rem; bottom: 1.4rem;
  z-index: 150;
  width: 320px;
  max-width: calc(100vw - 2.8rem);
  background: var(--ivory);
  border-radius: 8px;
  box-shadow: var(--shadow-lift);
  padding: 1.1rem 1.2rem;
  transform: translateY(24px) scale(.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out), visibility 0s linear .3s;
}
.cart-toast.show{
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.cart-toast-row{ display: flex; gap: .8rem; align-items: center; }
.cart-toast-row img{ width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.cart-toast-row strong{ font-size: .88rem; color: var(--success, #4C7A63); display: block; }
.cart-toast-row p{ font-size: .8rem; color: rgba(26,33,31,.65); margin: .2rem 0 0; }
.cart-toast-actions{ display: flex; gap: .6rem; margin-top: .9rem; }
.cart-toast-actions .btn{ flex: 1; }

/* 手機吸底購買列：長頁面捲動時購買動作隨手可及 */
.sticky-buy-bar{
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--ivory);
  box-shadow: 0 -4px 16px rgba(26,33,31,.12);
  padding: .8rem 1rem;
  padding-bottom: calc(.8rem + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sbb-price .now{
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--amber-dark);
  font-variant-numeric: tabular-nums;
}
.sticky-buy-bar .btn{ flex-shrink: 0; padding: .75rem 1.6rem; }

/* 會員中心：推薦好友主打卡片 */
.dash-referral-card{
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--ink-teal), var(--ink-teal-deep));
  color: var(--ivory);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2rem;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.dash-referral-card:hover{ box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.drc-icon{ font-size: 1.8rem; flex-shrink: 0; }
.drc-text strong{ font-size: .96rem; color: var(--amber); display: block; }
.drc-text p{ font-size: .8rem; color: rgba(251,250,245,.72); margin: .3rem 0 0; }
.drc-arrow{ font-size: 1.3rem; color: var(--amber); flex-shrink: 0; margin-left: auto; }

/* 結帳頁信任強化文字 */
.checkout-trust{
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(26,33,31,.08);
  font-size: .74rem;
  color: rgba(26,33,31,.5);
}
.qty-input{
  display: inline-flex;
  border: 1px solid rgba(26,33,31,.2);
  border-radius: 4px;
  overflow: hidden;
  background: var(--ivory);
}
.qty-input button{
  width: 38px; height: 44px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--deep-ink);
}
.qty-input input{
  width: 52px;
  border: none;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.qty-input input:focus{ outline: none; }

.stock-note{ font-size: 0.8rem; color: rgba(26,33,31,.55); margin-top: 0.9rem; }
.bundle-box{
  border: 1px dashed rgba(190,140,78,.5);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  font-size: 0.85rem;
}
.bundle-box strong{ color: var(--amber-dark); }

/* Tabs */
.pd-tabs{ margin-top: 4rem; }
.pd-tab-nav{
  display: flex;
  gap: 0.3rem;
  border-bottom: 2px solid rgba(26,33,31,.1);
  flex-wrap: wrap;
}
.pd-tab-nav button{
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.8rem 1.4rem;
  border: none;
  background: transparent;
  color: rgba(26,33,31,.55);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.pd-tab-nav button.active{ color: var(--ink-teal); border-bottom-color: var(--amber); }
.pd-tab-panel{ display: none; padding: 2rem 0.2rem; line-height: 2; max-width: 46rem; }
.pd-tab-panel.active{ display: block; }
.spec-table{ width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.spec-table th{
  text-align: left;
  width: 9em;
  padding: 0.7rem 0.9rem;
  background: var(--ivory);
  color: var(--amber-dark);
  font-weight: 700;
  vertical-align: top;
  border-bottom: 1px solid rgba(26,33,31,.07);
}
.spec-table td{ padding: 0.7rem 0.9rem; border-bottom: 1px solid rgba(26,33,31,.07); }

.review-item{ border-bottom: 1px solid rgba(26,33,31,.08); padding: 1rem 0; }
.review-item .stars{ color: var(--amber); letter-spacing: 0.1em; }
.review-item .meta{ font-size: 0.78rem; color: rgba(26,33,31,.5); }

/* ── 表格（購物車/訂單） ── */
.shop-table{
  width: 100%;
  border-collapse: collapse;
  background: var(--ivory);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.9rem;
}
.shop-table th{
  text-align: left;
  padding: 0.9rem 1.1rem;
  background: var(--ink-teal);
  color: var(--ivory);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.shop-table td{
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(26,33,31,.06);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.shop-table .item-cell{ display: flex; align-items: center; gap: 0.9rem; }
.shop-table .item-cell img{ width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.table-scroll{ overflow-x: auto; }

/* ── 摘要卡（購物車/結帳） ── */
.summary-card{
  background: var(--ivory);
  border-radius: 8px;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-card);
}
.summary-card h3{ font-size: 1.05rem; color: var(--ink-teal); margin-bottom: 1.1rem; }
.summary-row{
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  color: rgba(26,33,31,.75);
  font-variant-numeric: tabular-nums;
}
.summary-row.total{
  border-top: 1px solid rgba(26,33,31,.12);
  margin-top: 0.6rem;
  padding-top: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-teal);
}
.summary-row.total .amount{ font-family: var(--font-serif); font-size: 1.3rem; color: var(--amber-dark); }
.cart-layout{
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 2rem;
  align-items: start;
}

/* ── 表單 ── */
.form-card{
  background: var(--ivory);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.form-group{ margin-bottom: 1.2rem; }
.form-group label{
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-teal);
  margin-bottom: 0.4rem;
}
.form-group label .req{ color: var(--error, #B5453F); }
.form-control{
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(26,33,31,.2);
  border-radius: 4px;
  background: #fff;
  color: var(--deep-ink);
  transition: border-color .15s ease;
}
.form-control:focus{ outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(190,140,78,.15); }
textarea.form-control{ resize: vertical; min-height: 90px; }
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint{ font-size: 0.78rem; color: rgba(26,33,31,.5); margin-top: 0.35rem; }
.auth-card{ max-width: 440px; margin: 0 auto; }
.auth-card .form-foot{ text-align: center; font-size: 0.85rem; margin-top: 1.4rem; color: rgba(26,33,31,.6); }
.auth-card .form-foot a{ color: var(--amber-dark); font-weight: 700; }

.auth-divider{
  display: flex; align-items: center; gap: .8rem;
  margin: 1.3rem 0; color: rgba(26,33,31,.4); font-size: .78rem;
}
.auth-divider::before, .auth-divider::after{ content: ''; flex: 1; height: 1px; background: rgba(26,33,31,.12); }
.btn-line{
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: #06C755; color: #fff;
}
.btn-line:hover{ background: #05a648; }
.btn-fb{
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: #1877F2; color: #fff;
}
.btn-fb:hover{ background: #0f61d6; }

/* 訂單進度條 */
.order-progress{
  display: flex; align-items: flex-start; justify-content: space-between;
  margin: 0 auto 1.8rem; max-width: 520px;
}
.order-progress .op-step{ display: flex; flex-direction: column; align-items: center; gap: .4rem; flex-shrink: 0; width: 68px; }
.order-progress .op-dot{
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  background: var(--jade-ash); color: rgba(26,33,31,.45);
  border: 2px solid var(--jade-ash); transition: all .3s ease;
}
.order-progress .op-label{ font-size: .74rem; color: rgba(26,33,31,.5); text-align: center; }
.order-progress .op-step.done .op-dot{ background: var(--success,#4C7A63); border-color: var(--success,#4C7A63); color: #fff; }
.order-progress .op-step.active .op-dot{ background: var(--amber); border-color: var(--amber); color: var(--ink-teal-deep); box-shadow: 0 0 0 4px rgba(190,140,78,.2); }
.order-progress .op-step.done .op-label,
.order-progress .op-step.active .op-label{ color: var(--ink-teal); font-weight: 700; }
.order-progress .op-line{ flex: 1; height: 2px; background: var(--jade-ash); margin-top: 17px; }
.order-progress .op-line.done{ background: var(--success,#4C7A63); }

/* 結帳升級提示 */
.upgrade-hint{
  margin-top: .9rem; padding: .7rem .9rem;
  background: linear-gradient(135deg, rgba(190,140,78,.12), rgba(190,140,78,.05));
  border: 1px dashed rgba(190,140,78,.5); border-radius: 6px;
  font-size: .82rem; color: var(--ink-teal); line-height: 1.5;
}
.upgrade-hint strong{ color: var(--amber-dark); }

/* 訪客商品頁註冊誘因 */
.guest-price-cta{
  margin-top: .6rem; padding: .6rem .8rem;
  background: rgba(190,140,78,.08); border-radius: 6px;
  font-size: .8rem; color: rgba(26,33,31,.7); line-height: 1.6;
}
.guest-price-cta a{ color: var(--amber-dark); font-weight: 700; text-decoration: underline; }

/* ── 行銷遊戲 ── */
.game-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.game-card{ display: flex; gap: .9rem; background: var(--ivory); border-radius: 8px; padding: 1.3rem 1.4rem; box-shadow: var(--shadow-card); }
.game-card .gc-icon{ font-size: 2.2rem; line-height: 1; }
.game-card .gc-body{ flex: 1; min-width: 0; }
.game-card h3{ font-size: 1.05rem; color: var(--ink-teal); margin: 0 0 .4rem; }
.game-card p{ font-size: .82rem; color: rgba(26,33,31,.6); margin: 0 0 .9rem; line-height: 1.5; }
.game-card .gc-foot{ display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.game-card .gc-credits{ font-size: .82rem; color: rgba(26,33,31,.6); }
.game-card .gc-credits strong{ color: var(--amber-dark); font-size: 1.1rem; }

.game-stage{ text-align: center; background: var(--ivory); border-radius: 12px; padding: 2rem 1.4rem; box-shadow: var(--shadow-card); }
.game-credits-badge{ display: inline-block; background: var(--jade-ash); border-radius: 20px; padding: .4rem 1.2rem; font-size: .9rem; margin-bottom: 1.4rem; }
.game-credits-badge strong{ color: var(--amber-dark); font-size: 1.15rem; }

/* 轉盤 */
.wheel-wrap{ position: relative; width: 280px; height: 280px; margin: 0 auto; }
.wheel-pointer{ position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 1.8rem; color: var(--rose); z-index: 5; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.wheel{ width: 280px; height: 280px; border-radius: 50%; position: relative; overflow: hidden; border: 6px solid var(--amber-dark); box-shadow: 0 4px 20px rgba(26,33,31,.2); }
.wheel-seg{ position: absolute; width: 50%; height: 50%; top: 0; left: 50%; transform-origin: 0% 100%; overflow: hidden; }
.wheel-seg span{ position: absolute; left: -60px; top: 30px; width: 120px; text-align: center; color: #fff; font-size: .72rem; font-weight: 700; transform-origin: center; display: block; }

/* 拉霸 */
.slot-wrap{ max-width: 320px; margin: 0 auto; }
.slot-reels{ display: flex; gap: .5rem; justify-content: center; background: var(--ink-teal); padding: 1rem; border-radius: 10px; }
.slot-reel{ width: 90px; height: 64px; overflow: hidden; background: var(--ivory); border-radius: 6px; position: relative; }
.slot-strip{ display: flex; flex-direction: column; }
.slot-item{ height: 64px; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; color: var(--ink-teal); }

#drawBtn:disabled{ opacity: .5; cursor: not-allowed; }

/* 結果 */
.game-result{ margin-top: 1.6rem; padding: 1rem 1.2rem; border-radius: 8px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.game-result.show{ opacity: 1; transform: translateY(0); }
.game-result.is-win{ background: linear-gradient(135deg, rgba(190,140,78,.15), rgba(190,140,78,.05)); }
.gr-title{ font-size: 1.1rem; font-weight: 700; }
.gr-title.win{ color: var(--amber-dark); }
.gr-title.lose{ color: rgba(26,33,31,.55); }
.gr-detail{ font-size: .9rem; color: var(--ink-teal); margin-top: .4rem; }
.gr-detail code{ background: var(--jade-ash); padding: .1rem .5rem; border-radius: 4px; letter-spacing: .05em; }

.radio-tile{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(26,33,31,.15);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  margin-bottom: 0.6rem;
  background: #fff;
  font-size: 0.9rem;
  transition: border-color .15s ease;
}
.radio-tile:has(input:checked){ border-color: var(--amber); box-shadow: 0 0 0 2px rgba(190,140,78,.2); }
.radio-tile input{ accent-color: var(--amber-dark); }

/* ── 會員中心 ── */
.member-layout{
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.member-side{
  background: var(--ink-teal);
  border-radius: 8px;
  padding: 1.6rem 0;
  position: sticky;
  top: 90px;
}
.member-side .who{
  padding: 0 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(251,250,245,.12);
  margin-bottom: 0.8rem;
}
.member-side .who .name{ color: var(--ivory); font-weight: 700; }
.member-side .who .level{
  display: inline-block;
  font-size: 0.72rem;
  background: var(--amber);
  color: var(--ink-teal-deep);
  font-weight: 700;
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  margin-top: 0.4rem;
}
.member-side a{
  display: block;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  color: rgba(251,250,245,.75);
  border-left: 3px solid transparent;
  transition: color .15s ease, background-color .15s ease;
}
.member-side a:hover{ color: var(--ivory); background: rgba(251,250,245,.05); }
.member-side a.active{
  color: var(--amber);
  border-left-color: var(--amber);
  background: rgba(251,250,245,.05);
  font-weight: 700;
}

.stat-cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.stat-card{
  background: var(--ivory);
  border-radius: 8px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.stat-card .label{ font-size: 0.78rem; color: rgba(26,33,31,.55); letter-spacing: 0.05em; }
.stat-card .value{
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink-teal);
  font-variant-numeric: tabular-nums;
  margin-top: 0.2rem;
}
.stat-card .value.amber{ color: var(--amber-dark); }

.progress-card{
  background: linear-gradient(135deg, var(--ink-teal), var(--ink-teal-deep));
  color: var(--ivory);
  border-radius: 8px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 2rem;
}
.progress-card .row{ display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; }
.progress-card .lv{ font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--amber); }
.progress-card .hint{ font-size: 0.8rem; color: rgba(251,250,245,.65); }
.progress-track{
  height: 8px;
  background: rgba(251,250,245,.15);
  border-radius: 4px;
  margin-top: 1rem;
  overflow: hidden;
}
.progress-fill{
  height: 100%;
  background: linear-gradient(to right, var(--amber-dark), var(--amber));
  border-radius: 4px;
  transition: width .8s var(--ease-out);
}

.status-pill{
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}
.pill-success{ background: rgba(76,122,99,.15); color: #3A6350; }
.pill-warning{ background: rgba(201,122,61,.15); color: #A5602A; }
.pill-info{ background: rgba(61,110,114,.15); color: #2E585B; }
.pill-error{ background: rgba(181,69,63,.12); color: #96362F; }

/* 推薦頁 */
.referral-hero{
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  background: var(--ivory);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  align-items: center;
}
#qrcode{ width: 168px; height: 168px; padding: 12px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-card); }
#qrcode img, #qrcode canvas{ width: 100%; height: 100%; }
.ref-code-big{
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--amber-dark);
}
.copy-row{ display: flex; gap: 0.6rem; margin-top: 0.9rem; flex-wrap: wrap; }
.copy-row input{ flex: 1; min-width: 220px; }

/* 內容頁 */
.prose{
  background: var(--ivory);
  border-radius: 8px;
  padding: 2.5rem 2.8rem;
  box-shadow: var(--shadow-card);
  max-width: 50rem;
  line-height: 2;
}
.prose h2{ font-size: 1.4rem; color: var(--ink-teal); margin: 0 0 1rem; }
.prose h3{ font-size: 1.05rem; color: var(--amber-dark); margin: 1.6rem 0 0.5rem; }
.prose p, .prose li{ font-size: 0.94rem; color: rgba(26,33,31,.78); }
.prose ol, .prose ul{ padding-left: 1.4rem; }

.news-card{
  display: block;
  background: var(--ivory);
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1rem;
  transition: box-shadow .2s ease;
}
.news-card:hover{ box-shadow: var(--shadow-lift); }
.news-card .date{ font-size: 0.78rem; color: var(--amber-dark); font-variant-numeric: tabular-nums; }
.news-card h3{ font-size: 1.1rem; color: var(--ink-teal); margin-top: 0.3rem; }

/* FAQ 折疊 */
.faq-item{
  background: var(--ivory);
  border-radius: 6px;
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq-item summary{
  cursor: pointer;
  padding: 1rem 1.3rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-teal);
  list-style: none;
}
.faq-item summary::before{ content: 'Q '; color: var(--amber-dark); font-family: var(--font-serif); }
.faq-item p{ padding: 0 1.3rem 1.1rem; margin: 0; font-size: 0.88rem; color: rgba(26,33,31,.7); line-height: 1.9; }

/* ── 加購優惠區 ── */
.addon-zone{
  margin-top: 2.5rem;
  background: linear-gradient(135deg, rgba(190,140,78,.08), rgba(190,140,78,.03));
  border: 1px dashed rgba(190,140,78,.45);
  border-radius: 8px;
  padding: 1.6rem 1.8rem;
}
.addon-head{ display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.addon-head h2{
  font-size: 1.15rem;
  color: var(--amber-dark);
}
.addon-head h2::before{ content: '🎁 '; }
.addon-head p{ font-size: .8rem; color: rgba(26,33,31,.55); margin: 0; }
.addon-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.addon-card{
  display: flex;
  gap: .9rem;
  background: var(--ivory);
  border-radius: 6px;
  padding: .9rem;
  box-shadow: var(--shadow-card);
  align-items: center;
}
.addon-card.locked{ opacity: .65; }
.addon-card img{ width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.addon-body h3{ font-size: .88rem; margin: 0 0 .3rem; }
.addon-body h3 a{ color: var(--ink-teal); }
.addon-price{
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--rose);
}
.addon-hint{ font-size: .72rem; color: rgba(26,33,31,.55); margin: .3rem 0 0; }

/* 空狀態 */
.empty-state{
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(26,33,31,.5);
}
.empty-state .icon{ font-size: 2.4rem; margin-bottom: 0.8rem; opacity: 0.5; }

/* 錯誤頁 */
.error-page{ text-align: center; padding: 6rem 2rem; }
.error-page .code{
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 700;
  color: var(--ink-teal);
  opacity: 0.25;
}

/* ── RWD ── */
@media (max-width: 1024px){
  .catalog-layout, .member-layout{ grid-template-columns: 1fr; }
  .catalog-side, .member-side{ position: static; }
  .member-side{ padding: 0.8rem 0; }
  .product-detail{ grid-template-columns: 1fr; gap: 2rem; }
  .pd-gallery{ position: static; }
  .cart-layout{ grid-template-columns: 1fr; }
  .stat-cards{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px){
  .nav-search{ display: none; }
  .page-main{ padding-top: 6.5rem; }
  .sticky-buy-bar{ display: flex; }
  body:has(.sticky-buy-bar) .page-main{ padding-bottom: 5.5rem; }
}
@media (max-width: 640px){
  .form-row{ grid-template-columns: 1fr; }
  .referral-hero{ grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .stat-cards{ grid-template-columns: 1fr; }
  .prose{ padding: 1.6rem 1.4rem; }
}

/* 我的報表 */
.report-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.report-card{
  background: var(--ivory);
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-card);
}
.report-card .rc-icon{ font-size: 1.6rem; margin-bottom: .5rem; }
.report-card h3{ font-size: 1rem; color: var(--ink-teal); margin: 0 0 .4rem; }
.report-card p{ font-size: .82rem; color: rgba(26,33,31,.6); line-height: 1.6; margin: 0 0 1rem; }
.report-card .rc-form{ display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.report-card .rc-form input[type=date]{ flex: 1; min-width: 110px; padding: .5rem .6rem; font-size: .82rem; }
.report-card .rc-form span{ font-size: .78rem; color: rgba(26,33,31,.4); }
.report-card .rc-actions{ display: flex; gap: .6rem; width: 100%; margin-top: .3rem; }
@media (max-width: 640px){ .report-grid{ grid-template-columns: 1fr; } }

/* ── 共享池：本期預估可領 ── */
.pool-est{border:1px solid rgba(190,140,78,.35);background:linear-gradient(180deg,rgba(190,140,78,.05),transparent 60%);}
.pool-est-total{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;
  padding:.9rem 1.1rem;background:#fff;border-radius:12px;margin:.9rem 0 1rem;
  border:1px solid rgba(27,54,52,.1);}
.pool-est-total span{font-size:.88rem;color:rgba(26,33,31,.62);}
.pool-est-total strong{font-size:clamp(1.6rem,5vw,2.1rem);color:var(--amber-dark);font-family:var(--font-serif);line-height:1;}
.pool-est-total strong em{font-size:.9rem;font-style:normal;font-weight:400;margin-left:.25rem;color:rgba(26,33,31,.5);}

.pool-est-rows{display:flex;flex-direction:column;gap:.55rem;}
.pool-est-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,1.5fr) auto;
  gap:.5rem 1rem;align-items:center;padding:.75rem .95rem;background:#fff;
  border:1px solid rgba(27,54,52,.1);border-radius:11px;}
.pool-est-row.is-off{opacity:.62;background:rgba(26,33,31,.02);}
.pool-est-k{font-weight:700;font-size:.92rem;color:var(--ink-teal);}
.pool-est-k small{display:block;font-weight:400;font-size:.74rem;color:rgba(26,33,31,.5);margin-top:.15rem;}
.pool-est-calc{font-size:.8rem;color:rgba(26,33,31,.6);line-height:1.7;}
.pool-est-v{font-size:1.1rem;font-weight:700;color:var(--amber-dark);white-space:nowrap;text-align:right;}
.pool-est-row.is-off .pool-est-v{color:rgba(26,33,31,.35);}
@media(max-width:600px){
  .pool-est-row{grid-template-columns:1fr auto;}
  .pool-est-calc{grid-column:1/-1;order:3;}
}

/* ── 共享池：本期提撥明細 ── */
.pool-contrib{margin-top:.8rem;border:1px solid rgba(27,54,52,.1);border-radius:11px;overflow:hidden;}
.pool-contrib-head,.pool-contrib-row{display:grid;grid-template-columns:1.3fr .9fr 1.2fr .9fr;
  gap:.5rem;padding:.6rem .85rem;font-size:.83rem;align-items:center;}
.pool-contrib-head{background:var(--ivory);font-size:.75rem;color:rgba(26,33,31,.55);font-weight:700;}
.pool-contrib-row{border-top:1px solid rgba(27,54,52,.07);}
.pool-contrib-row span:nth-child(2),.pool-contrib-row span:nth-child(4),
.pool-contrib-head span:nth-child(2),.pool-contrib-head span:nth-child(4){text-align:right;}
.pool-contrib-row .gold{color:var(--amber-dark);font-weight:700;}
.pool-contrib-row .no{color:var(--rose,#C74463);font-weight:700;}
.pool-contrib-sum{background:var(--ivory);font-weight:700;}
@media(max-width:600px){
  .pool-contrib-head{display:none;}
  .pool-contrib-row{grid-template-columns:1fr auto;row-gap:.15rem;}
  .pool-contrib-row span:nth-child(2){text-align:right;font-size:.76rem;color:rgba(26,33,31,.55);}
  .pool-contrib-row span:nth-child(3){grid-column:1;font-size:.76rem;color:rgba(26,33,31,.55);}
  .pool-contrib-row span:nth-child(4){text-align:right;}
}

/* 分頁數字：每個都是獨立點擊目標，手機需 ≥44px。
   放在 shop.css 是因為本檔在 style.css 之後載入，同權重時以此為準。 */
@media (max-width: 768px){
  .pagination a, .pagination span{
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
}

/* 外幣參考價（本站一律台幣結算，外幣僅供星馬客人參考） */
.price-ref{ font-size: .78rem; color: rgba(26,33,31,.55); display: block; margin-top: .15rem; line-height: 1.5; }
.pool-fx{ font-size: .78rem; color: rgba(26,33,31,.5); margin-left: .3rem; }
.pool-badge .price-ref, .pool-badge small{ font-size: .72rem; opacity: .85; }
.co-notice{
  background: var(--ivory,#FBFAF5); border-left: 3px solid var(--amber,#BE8C4E);
  border-radius: 0 10px 10px 0; padding: .8rem 1rem; margin-bottom: 1.2rem;
}
.co-notice strong{ display: block; font-size: .88rem; color: var(--ink-teal,#1B3634); margin-bottom: .3rem; }
.co-notice p{ margin: 0; font-size: .82rem; line-height: 1.85; color: rgba(26,33,31,.68); }
#coAmountRef{ font-weight: 400; }

/* ── 滿額贈禮進度 ── */
.gift-box{
  background: linear-gradient(180deg, rgba(190,140,78,.09), rgba(190,140,78,.03));
  border: 1px solid rgba(190,140,78,.35);
  border-radius: 12px; padding: .9rem 1rem; margin: .9rem 0;
}
.gift-head{ display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; }
.gift-icon{ font-size: 1.15rem; }
.gift-head strong{ font-size: .93rem; color: var(--ink-teal); }
.gift-period{ display: block; font-size: .72rem; color: rgba(26,33,31,.5); }
.gift-spend{ font-size: .84rem; margin: 0 0 .6rem; color: rgba(26,33,31,.72); }
.gift-spend strong{ color: var(--amber-dark); font-size: .95rem; }
.gift-tiers{ display: flex; flex-direction: column; gap: .3rem; }
.gift-tier{
  display: grid; grid-template-columns: 20px 66px 1fr auto;
  gap: .45rem; align-items: center;
  font-size: .81rem; padding: .32rem .5rem; border-radius: 7px;
  background: rgba(255,255,255,.55); color: rgba(26,33,31,.55);
}
.gift-tier.is-reached, .gift-tier.is-got{ background: #fff; color: var(--ink-teal); font-weight: 600; }
.gift-tier.is-got .gift-mark, .gift-tier.is-reached .gift-mark{ color: #4C7A63; }
.gift-mark{ text-align: center; }
.gift-amt{ font-variant-numeric: tabular-nums; }
.gift-state{ font-size: .74rem; opacity: .85; white-space: nowrap; }
.gift-next{
  font-size: .84rem; margin: .65rem 0 0; padding: .5rem .65rem;
  background: #fff; border-radius: 8px; color: var(--ink-teal); line-height: 1.7;
}
.gift-next strong{ color: var(--amber-dark); }
.gift-all{ background: rgba(76,122,99,.1); color: #35604C; }
.gift-note{ font-size: .72rem; color: rgba(26,33,31,.5); margin: .55rem 0 0; line-height: 1.65; }
@media (max-width: 600px){
  .gift-tier{ grid-template-columns: 18px 58px 1fr; row-gap: .1rem; }
  .gift-state{ grid-column: 2 / -1; }
}

/* ═══════════════════════════════════════════
   主選單大選單（方案 A，2026-09-14）
   主選單平鋪三條產品線，其餘分類收進這個兩欄面板。
   ═══════════════════════════════════════════ */

/* 面板本體：沿用 .nav-drop-menu 的顯示切換（hover / focus-within），
   這裡只覆寫尺寸與排版，避免重複定義開合行為 */
.nav-mega .mega-panel{
  left: auto;
  right: -0.8rem;
  min-width: 430px;
  padding: 1.25rem 1.5rem 1rem;
  display: none;               /* 由 .nav-drop:hover 規則改為 grid，見下方 */
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 2rem;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
}
.nav-drop.nav-mega:hover .mega-panel,
.nav-drop.nav-mega:focus-within .mega-panel{ display: grid; }

.mega-col h5{
  margin: 0 0 .55rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
}
.mega-panel .mega-col a{
  display: block;
  padding: .42rem 0;
  font-size: .86rem;
  line-height: 1.5;
  color: rgba(251,250,245,.82);
  border-bottom: none !important;
  white-space: nowrap;
}
.mega-panel .mega-col a:hover{ color: var(--amber); background: none; }

/* 底部整列的「查看全部商品」 */
.mega-foot{
  grid-column: 1 / -1;
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(251,250,245,.12);
}
.mega-panel .mega-foot a{
  display: inline-block;
  padding: 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--amber);
  border-bottom: none !important;
}
.mega-panel .mega-foot a:hover{ opacity: .78; }

/* 面板超出視窗右緣時的保險：主選單項目變多時仍不會被裁切 */
@media (max-width: 1180px){
  .nav-mega .mega-panel{ min-width: 380px; gap: .35rem 1.4rem; }
}

/* ── 手機：沒有 hover，面板改為直接攤平在選單裡 ── */
@media (max-width: 900px){
  .site-header.nav-open .nav-mega{ width: 100%; }
  .site-header.nav-open .nav-mega .mega-panel{
    display: block;
    position: static;
    min-width: 0;
    width: 100%;
    margin: .2rem 0 .4rem;
    padding: .2rem 0 .2rem .9rem;
    background: none;
    border: none;
    border-left: 2px solid rgba(251,250,245,.14);
    border-radius: 0;
    box-shadow: none;
  }
  .site-header.nav-open .nav-mega .mega-col{ margin-bottom: .5rem; }
  .site-header.nav-open .nav-mega .mega-col h5{ margin: .5rem 0 .1rem; }
  /* 手機的可點範圍維持 44px，與其他選單項一致 */
  .site-header.nav-open .mega-panel a{
    padding: .55rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: .95rem;
    white-space: normal;
  }
  .site-header.nav-open .mega-foot{ margin-top: .3rem; padding-top: .5rem; }
}

/* 手機選單展開時改為不透明。
   原本 .main-nav 的背景是 97% 半透明，選單只有五項時看不出來；
   加入大選單後選單變長，背後的輪播大圖會透出來影響閱讀。 */
@media (max-width: 900px){
  .site-header.nav-open .main-nav{ background: #101e1c; }
  .site-header.nav-open{ background: #101e1c; }
}

/* ───────── 密碼欄位的顯示／隱藏按鈕 ───────── */
.pw-wrap{ position: relative; display: block; }
.pw-wrap .form-control{ padding-right: 2.9rem; }
.pw-toggle{
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(26,33,31,.45);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.pw-toggle:hover{ color: var(--amber-dark, #9A6B33); background: rgba(190,140,78,.1); }
.pw-toggle:focus-visible{ outline: 2px solid var(--amber, #BE8C4E); outline-offset: 1px; }
.pw-toggle svg{
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pw-toggle[aria-pressed="true"]{ color: var(--amber-dark, #9A6B33); }

/* ── 跑馬燈（沿用 .announce-bar 的版位與頁首高度補償） ── */
.marquee-bar{ padding: 0; height: 32px; line-height: 32px; overflow: hidden; }
.marquee-viewport{
  height: 32px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
.marquee-track{
  display: flex; width: max-content;
  animation: mqScroll var(--mq-duration, 28s) linear infinite;
  will-change: transform;
}
.marquee-group{ display: flex; align-items: center; flex: 0 0 auto; }
.marquee-item{
  font-size: .82rem; font-weight: 700; letter-spacing: .02em;
  color: inherit; text-decoration: none; white-space: nowrap;
}
a.marquee-item:hover{ text-decoration: underline; text-underline-offset: 3px; }
a.marquee-item:focus-visible{ outline: 2px solid var(--ink-teal-deep); outline-offset: 2px; border-radius: 2px; }
.marquee-sep{ margin: 0 1.6rem; opacity: .45; }
/* 滑過或鍵盤聚焦時暫停，讓人看得完 */
.marquee-bar:hover .marquee-track,
.marquee-bar:focus-within .marquee-track{ animation-play-state: paused; }
@keyframes mqScroll{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
/* 只有一則時置中靜止，不必追著跑 */
.marquee-bar.is-single .marquee-viewport{ -webkit-mask-image: none; mask-image: none; }
.marquee-bar.is-single .marquee-track{ animation: none; width: 100%; justify-content: center; }
.marquee-bar.is-single .marquee-sep{ display: none; }
@media (prefers-reduced-motion: reduce){
  .marquee-track{ animation: none !important; width: auto; }
  .marquee-viewport{ overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 640px){
  .marquee-item{ font-size: .76rem; }
  .marquee-sep{ margin: 0 1rem; }
  .marquee-viewport{
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }
}

/* ══════════ 分類清單頁廣告（後台：Banner／廣告管理 → 分類頁廣告）══════════
   位置：商品列表下方，兩塊並排、等寬等高，左右與頁面其他內容切齊。
   高度用 aspect-ratio 鎖住，所以就算客戶兩張圖尺寸不一樣，版面仍然整齊；
   圖片以 cover 填滿，主體請放在畫面中央。 */
.cat-ads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 34px 0 10px;
}
.cat-ads .cat-ad { border-radius: 10px; overflow: hidden; line-height: 0; }
/* 只啟用一塊時自動橫跨整列，不留半邊空洞 */
.cat-ads .cat-ad:only-child { grid-column: 1 / -1; }
.cat-ads .cat-ad > a,
.cat-ads .cat-ad > img { display: block; width: 100%; height: 100%; }
.cat-ads .cat-ad img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.cat-ads .cat-ad a { transition: opacity .3s ease, transform .5s cubic-bezier(.22,1,.36,1); }
.cat-ads .cat-ad a:hover { opacity: .94; transform: translateY(-2px); }
.cat-ads .cat-ad a:focus-visible { outline: 2px solid var(--amber, #BE8C4E); outline-offset: 3px; }
@media (max-width: 760px) {
  .cat-ads { grid-template-columns: 1fr; gap: 14px; margin: 24px 0 6px; }
  .cat-ads .cat-ad { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-ads .cat-ad a { transition: none; }
  .cat-ads .cat-ad a:hover { transform: none; }
}

/* ══════════ 品牌理念主視覺：完整顯示，不裁切 ══════════
   原本 style.css 的 .tilt-frame img 固定 aspect-ratio: 4/3.4 並用 cover 裁切，
   但這張圖已改為客戶可自行更換，裁切會讓橫式圖被切掉一半。
   改為依圖片原始比例完整呈現；max-height 只是極端直式圖的保險。 */
.philosophy-visual .tilt-frame img {
  aspect-ratio: auto;
  height: auto;
  max-height: 760px;
  object-fit: contain;
}

/* ══════════ 首頁 · AI 顯化儀入口 ══════════
   位置：五行能量香酚（深墨綠）之後、精選商品（米白）之前。
   做成一條窄版的深色「橋接帶」：延續上方深色但份量更輕，
   不與五行區搶主角，下接米白時也乾淨。 */
/* 區段底色：延續上方深色，做成一條窄版的深色「橋接帶」，
   下接米白時收得乾淨。改版後卡片變高，上方補一點留白才不會貼著上一區。 */
.aitool {
  background: linear-gradient(180deg, var(--ink-teal-deep, #10201E) 0%, #142623 100%);
  padding: 3.2rem 0 5.5rem;
  margin-top: -1px;
}

@media (max-width: 860px) {
  .aitool { padding: 2.2rem 0 3.6rem; }
}

/* ─────────────────────────────────────────────────────────────
   首頁 · AI 顯化儀入口（2026-10-06 主視覺改版）

   構圖：左側實色區放文字，右側放主視覺，中間用漸層銜接。
   這樣文字永遠落在純色底上，不是壓在圖片上，可讀性不依賴透明度，
   圖片本身也不會被遮罩蓋掉而失去細節。
   ───────────────────────────────────────────────────────────── */

.aitool-card {
  position: relative;
  overflow: hidden;
  display: block;                 /* 原本是 grid，改為單一容器，由內層自行排版 */
  padding: 0;
  min-height: 25rem;
  border: 1px solid rgba(190, 140, 78, .3);
  border-radius: 16px;
  background: linear-gradient(135deg, #16302C 0%, #10201E 62%, #0C1917 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18), 0 28px 60px -40px rgba(0, 0, 0, .9);
  isolation: isolate;
}

/* ── 主視覺：靠右、完整高度、不裁掉角色 ── */
.aitool-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: clamp(27rem, 56%, 46rem);
  z-index: 0;
  pointer-events: none;
}
.aitool-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;       /* 新圖已裁切聚焦公仔，置中即可 */
  display: block;
}

/* 左→右的漸層，把圖的左緣融進卡片底色；右側保持原圖不被壓暗 */
.aitool-art-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      #12241F 0%,
      rgba(18, 36, 31, .96) 22%,
      rgba(18, 36, 31, .55) 48%,
      rgba(18, 36, 31, .12) 72%,
      rgba(18, 36, 31, 0) 100%);
}

/* ── 文字區：永遠在實色底上 ── */
.aitool-body {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  padding: 3rem 3.2rem;
}

.aitool-eyebrow {
  font-family: var(--font-sans);
  font-size: .74rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--amber, #BE8C4E);
  margin: 0 0 .75rem;
}

.aitool-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  line-height: 1.34;
  letter-spacing: .04em;
  color: var(--ivory, #FBFAF5);
  margin: 0 0 .85rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}

.aitool-desc {
  font-size: .95rem;
  line-height: 1.95;
  color: rgba(232, 238, 234, .88);
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
}

.aitool-note {
  margin: 1rem 0 0;
  font-size: .74rem;
  line-height: 1.75;
  color: rgba(226, 232, 229, .58);
  max-width: 34rem;
}

/* ── 按鈕：移到文字下方，不再與文字爭同一列 ── */
.aitool-action {
  position: relative;
  z-index: 2;
  margin-top: 1.7rem;
  text-align: left;
}

.aitool-btn {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .95rem 2.1rem;
  border: 1px solid var(--amber, #BE8C4E);
  border-radius: 999px;
  background: rgba(16, 32, 30, .5);
  color: var(--amber-soft, #EBDCC2);
  font-size: .95rem;
  letter-spacing: .06em;
  white-space: nowrap;
  text-decoration: none;
  transition: background .4s var(--ease-out, ease), color .4s ease,
              transform .4s var(--ease-out, ease), box-shadow .4s ease;
}
.aitool-btn:hover,
.aitool-btn:focus-visible {
  background: var(--amber, #BE8C4E);
  color: #10201E;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(190, 140, 78, .9);
}
.aitool-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aitool-ext {
  margin: .6rem 0 0;
  font-size: .72rem;
  color: rgba(226, 232, 229, .45);
}

/* ── 平板：圖縮窄，漸層加重，確保文字不壓圖 ── */
@media (max-width: 1100px) {
  .aitool-art { width: 46%; }
  .aitool-art-fade {
    background: linear-gradient(90deg,
      #12241F 0%, rgba(18, 36, 31, .97) 30%,
      rgba(18, 36, 31, .6) 58%, rgba(18, 36, 31, 0) 100%);
  }
  .aitool-body { max-width: 34rem; padding: 2.6rem 2.4rem; }
}

/* ── 手機：改為上下排列，圖在上、文字在下，完全不重疊 ── */
@media (max-width: 860px) {
  .aitool-card { min-height: 0; }

  .aitool-art {
    position: relative;
    inset: auto;
    width: 100%;
    height: 17rem;
  }
  .aitool-art img { object-position: 50% 46%; }

  /* 手機改為由下往上的漸層，讓圖與下方文字自然銜接 */
  .aitool-art-fade {
    background: linear-gradient(180deg,
      rgba(18, 36, 31, 0) 44%,
      rgba(18, 36, 31, .72) 78%,
      #12241F 100%);
  }

  .aitool-body { max-width: none; padding: 1.6rem 1.5rem 2.2rem; }
  .aitool-title { font-size: 1.42rem; }
  .aitool-desc { font-size: .9rem; line-height: 1.9; }
  .aitool-action { margin-top: 1.4rem; }
  .aitool-btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .aitool-art { height: 14rem; }
  .aitool-body { padding: 1.4rem 1.2rem 2rem; }
}

/* 減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
  .aitool-btn { transition: none; }
  .aitool-btn:hover { transform: none; }
}

/* ═══════════════════════════════════════════
   [MENU2-20261020] 頁首選單第二層（後台「品牌識別・頁首頁尾 → 頁首選單」）
   桌機：沿用上方 .nav-drop／.nav-drop-menu 的 hover／focus 下拉，不另寫開合行為。
   手機（中文 ≤979px、英文 ≤1240px 收成漢堡時）：沒有 hover，子項目直接縮排攤平。
   ═══════════════════════════════════════════ */
.nav-sub-label{ cursor: pointer; }
.nav-sub .nav-sub-menu a{ white-space: nowrap; }
@media (max-width: 979px){
  .site-header.nav-open .nav-sub{ width: 100%; }
  .site-header.nav-open .nav-sub .nav-sub-menu{
    display: block; position: static; min-width: 0; width: 100%;
    margin: 0 0 .4rem; padding: 0 0 0 .9rem;
    background: none; border: none; border-left: 2px solid rgba(251,250,245,.14);
    border-radius: 0; box-shadow: none;
  }
  .site-header.nav-open .nav-sub .nav-sub-menu a{
    padding: .55rem 0; min-height: 44px; display: flex; align-items: center;
    font-size: .95rem; white-space: normal;
  }
}
@media (max-width: 1240px){
  html[lang="en"] .site-header.nav-open .nav-sub{ width: 100%; }
  html[lang="en"] .site-header.nav-open .nav-sub .nav-sub-menu{
    display: block; position: static; min-width: 0; width: 100%;
    margin: 0 0 .4rem; padding: 0 0 0 .9rem;
    background: none; border: none; border-left: 2px solid rgba(251,250,245,.14);
    border-radius: 0; box-shadow: none;
  }
  html[lang="en"] .site-header.nav-open .nav-sub .nav-sub-menu a{
    padding: .55rem 0; min-height: 44px; display: flex; align-items: center;
    font-size: .95rem; white-space: normal;
  }
}

/* ══════════ 首頁 · 幸運色算一算 [PROMO-20261025 v2] ══════════
   後台：首頁管理 → 首頁 · 幸運色算一算（主視覺、連結、中英文案）
   深墨綠底延續五行區，左文右圖；主視覺外圍是依五行色旋轉的光環、金色光點上飄、全站共用的 3D 傾斜。
   五個五行標籤依相生順序（木→火→土→金→水）輪流亮起。動畫只用 CSS，「減少動態效果」時全部停止。 */
.lucky {
  --c-wood: #4ade80; --c-fire: #f87171; --c-earth: #facc15; --c-metal: #f1f5f9; --c-water: #60a5fa;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: -1px;
  padding: 6.5rem 0 7rem;
  background:
    radial-gradient(ellipse 60% 55% at 78% 45%, rgba(190,140,78,.16) 0%, transparent 70%),
    linear-gradient(180deg, #132724 0%, var(--ink-teal-deep, #10201E) 100%);
}
.lucky::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: min(560px, 70%); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(190,140,78,.55), transparent);
}
/* 背景五色星雲：極淡、緩慢飄移，只做氣氛 */
.lucky-nebula {
  position: absolute; inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 30%, rgba(74,222,128,.07), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(248,113,113,.07), transparent 26%),
    radial-gradient(circle at 70% 80%, rgba(96,165,250,.08), transparent 30%),
    radial-gradient(circle at 30% 85%, rgba(250,204,21,.06), transparent 26%);
  filter: blur(10px);
  animation: luckyDrift 26s ease-in-out infinite alternate;
}
@keyframes luckyDrift { to { transform: translate3d(3%, -4%, 0) rotate(6deg); } }

.lucky-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  grid-template-areas: "head visual" "body visual";
  grid-template-rows: auto 1fr;
  column-gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.lucky-head { grid-area: head; align-self: end; }
.lucky-body { grid-area: body; }
.lucky-visual { grid-area: visual; align-self: center; }

.lucky-eyebrow {
  display: flex; align-items: center; gap: .7rem;
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .84rem;
  letter-spacing: .2em;
  color: var(--amber, #BE8C4E);
}
.lucky-badge {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: .22rem .7rem;
  border-radius: 999px;
  color: var(--ink-teal-deep, #10201E);
  background: linear-gradient(100deg, #e7c48c, var(--amber, #BE8C4E));
}
.lucky-title {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.4;
  color: var(--ivory, #FBFAF5);
  background: linear-gradient(100deg, #FBFAF5 0%, #FBFAF5 45%, #e7c48c 60%, #FBFAF5 75%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: luckyGleam 7s ease-in-out infinite;
}
@keyframes luckyGleam { 0%, 55% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
.lucky-sub {
  margin: 1.2rem 0 0;
  max-width: 30em;
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(251,250,245,.74);
}

/* 五行標籤：依序輪流亮起 */
.lucky-els {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .45rem;
  margin: 2rem 0 0; padding: 0;
}
.lucky-el {
  --c: #fff;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .78rem .4rem .62rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  color: rgba(251,250,245,.82);
  background: rgba(251,250,245,.05);
  border: 1px solid rgba(251,250,245,.14);
  animation: luckyChip 7.5s ease-in-out infinite;
  animation-delay: calc(var(--n) * 1.5s);
}
.lucky-el .dot {
  width: .62rem; height: .62rem; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.lucky-el--wood  { --c: var(--c-wood); }
.lucky-el--fire  { --c: var(--c-fire); }
.lucky-el--earth { --c: var(--c-earth); }
.lucky-el--metal { --c: var(--c-metal); }
.lucky-el--water { --c: var(--c-water); }
@keyframes luckyChip {
  0%, 22%, 100% { border-color: rgba(251,250,245,.14); box-shadow: none; color: rgba(251,250,245,.82); }
  8%, 14% { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 22px -4px var(--c); color: #fff; }
}

/* 三個步驟 */
.lucky-steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem;
  margin: 1.8rem 0 0; padding: 0;
}
.lucky-steps li {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem .85rem;
  border-radius: 12px;
  background: rgba(251,250,245,.04);
  border: 1px solid rgba(190,140,78,.22);
  font-size: .86rem;
  line-height: 1.5;
  color: rgba(251,250,245,.82);
}
.lucky-steps .no {
  flex: none;
  width: 1.75rem; height: 1.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink-teal-deep, #10201E);
  background: var(--amber, #BE8C4E);
}

/* 按鈕：金色、光澤掃過 */
.lucky-cta { margin-top: 2.2rem; }
.lucky-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .75rem;
  min-height: 3.5rem;
  padding: 0 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .06em;
  color: var(--ink-teal-deep, #10201E);
  background: linear-gradient(100deg, #e7c48c 0%, var(--amber, #BE8C4E) 55%, #d9aa66 100%);
  box-shadow: 0 10px 30px -10px rgba(190,140,78,.75);
  text-decoration: none;
  transition: transform .3s var(--ease-out, cubic-bezier(.22,1,.36,1)), box-shadow .3s ease;
}
.lucky-btn::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: luckySweep 4.5s ease-in-out infinite;
}
@keyframes luckySweep { 0%, 60% { left: -60%; } 90%, 100% { left: 130%; } }
.lucky-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.lucky-btn:hover { color: var(--ink-teal-deep, #10201E); transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(190,140,78,.9); }
.lucky-btn:hover svg { transform: translateX(4px); }
.lucky-btn:focus-visible { outline: 2px solid #e7c48c; outline-offset: 4px; }
.lucky-note { margin: .9rem 0 0; font-size: .74rem; color: rgba(251,250,245,.45); }

/* 主視覺：五行色旋轉光環 + 金框 + 光點 */
.lucky-visual {
  position: relative;
  display: block;
  max-width: 560px;
  width: 100%;
  margin-left: auto;
  perspective: 1200px;
  text-decoration: none;
}
.lucky-halo {
  position: absolute; inset: -7%;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c-wood), var(--c-fire), var(--c-earth), var(--c-metal), var(--c-water), var(--c-wood));
  filter: blur(46px);
  opacity: .38;
  animation: luckySpin 18s linear infinite;
}
@keyframes luckySpin { to { transform: rotate(360deg); } }
.lucky-frame {
  position: relative; z-index: 1;
  display: block;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(231,196,140,.75), rgba(190,140,78,.18) 42%, rgba(190,140,78,.6));
  box-shadow: 0 2px 10px rgba(0,0,0,.3), 0 40px 80px -40px rgba(0,0,0,.95);
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}
.lucky-frame img {
  display: block;
  width: 100%; height: auto;
  border-radius: 12px;
}
/* 滑鼠位置的柔光（座標由全站 tilt 程式寫入 --gx/--gy）＋ 斜向光澤 */
.lucky-shine {
  position: absolute; inset: 8px;
  border-radius: 12px;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.18), transparent 45%);
  opacity: 0;
  transition: opacity .3s ease;
}
.lucky-visual:hover .lucky-shine { opacity: 1; }
.lucky-sparks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.lucky-sparks i {
  position: absolute;
  bottom: 6%;
  width: 4px; height: 4px; border-radius: 50%;
  background: #f5d9a3;
  box-shadow: 0 0 8px 2px rgba(245,217,163,.75);
  opacity: 0;
  animation: luckyFloat 7s ease-in infinite;
}
.lucky-sparks i:nth-child(1)  { left: 6%;  animation-delay: 0s;   }
.lucky-sparks i:nth-child(2)  { left: 14%; animation-delay: 2.6s; animation-duration: 8s; }
.lucky-sparks i:nth-child(3)  { left: 23%; animation-delay: 1.2s; }
.lucky-sparks i:nth-child(4)  { left: 31%; animation-delay: 4.1s; animation-duration: 9s; }
.lucky-sparks i:nth-child(5)  { left: 40%; animation-delay: .6s;  }
.lucky-sparks i:nth-child(6)  { left: 48%; animation-delay: 3.3s; animation-duration: 6.5s; }
.lucky-sparks i:nth-child(7)  { left: 56%; animation-delay: 5.2s; }
.lucky-sparks i:nth-child(8)  { left: 63%; animation-delay: 1.9s; animation-duration: 8.5s; }
.lucky-sparks i:nth-child(9)  { left: 71%; animation-delay: 4.6s; }
.lucky-sparks i:nth-child(10) { left: 78%; animation-delay: .3s;  animation-duration: 7.5s; }
.lucky-sparks i:nth-child(11) { left: 85%; animation-delay: 3.8s; }
.lucky-sparks i:nth-child(12) { left: 92%; animation-delay: 2.2s; animation-duration: 9.5s; }
.lucky-sparks i:nth-child(13) { left: 36%; animation-delay: 6s;   width: 3px; height: 3px; }
.lucky-sparks i:nth-child(14) { left: 67%; animation-delay: 6.8s; width: 3px; height: 3px; }
@keyframes luckyFloat {
  0%   { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  15%  { opacity: .95; }
  70%  { opacity: .6; }
  100% { transform: translate3d(14px, -380px, 0) scale(1); opacity: 0; }
}

@media (max-width: 900px) {
  .lucky { padding: 4.4rem 0 5rem; }
  .lucky-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "visual" "body";
    grid-template-rows: auto;
    row-gap: 2.2rem;
  }
  .lucky-head { text-align: center; }
  .lucky-eyebrow { justify-content: center; }
  .lucky-sub { margin-left: auto; margin-right: auto; }
  .lucky-visual { margin: 0 auto; max-width: 480px; }
  .lucky-els { justify-content: center; margin-top: 0; }
  .lucky-cta { text-align: center; }
}
@media (max-width: 560px) {
  .lucky-title { font-size: 1.75rem; }
  .lucky-sub { font-size: .95rem; }
  .lucky-steps { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
  .lucky-steps li { padding: .7rem .85rem; }
  .lucky-btn { width: 100%; justify-content: center; }
  .lucky-frame { padding: 6px; border-radius: 14px; }
  .lucky-halo { inset: -4%; filter: blur(34px); }
}
@media (prefers-reduced-motion: reduce) {
  .lucky-nebula, .lucky-title, .lucky-el, .lucky-btn::after, .lucky-halo, .lucky-sparks i { animation: none !important; }
  .lucky-title { -webkit-text-fill-color: currentColor; background: none; }
  .lucky-sparks { display: none; }
}

/* ══════════ 首頁 · 品牌理念的連結 [PHILO-LINK-20261025] ══════════
   內文下方的「認識品牌故事 →」與可點的主視覺；連結在後台「首頁管理 → 品牌理念」設定 */
.philosophy-more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-bottom: .3rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--amber-dark, #9C7038);
  border-bottom: 1.5px solid rgba(156,112,56,.35);
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}
.philosophy-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.philosophy-more:hover { color: var(--ink-teal, #1B3634); border-bottom-color: currentColor; }
.philosophy-more:hover svg { transform: translateX(4px); }
.philosophy-more:focus-visible { outline: 2px solid var(--amber, #BE8C4E); outline-offset: 4px; }
a.philosophy-visual-link { display: block; cursor: pointer; }
a.philosophy-visual-link:focus-visible { outline: 2px solid var(--amber, #BE8C4E); outline-offset: 4px; }
@media (max-width: 860px) { .philosophy-more { margin-top: 1.2rem; } }

/* ══════════ 商品頁活動 Banner／優惠活動頁／加購專區頁 [PROMO2-20261025] ══════════
   後台：🖼 Banner／廣告管理（活動 Banner、兩頁文字）、🎁 滿額贈禮（門檻與贈品）、商品管理（加購價）。 */

/* ── 活動 Banner ── */
.promo-banner { display: block; margin: 0 0 2.2rem; border-radius: 14px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow-card); transition: transform .4s var(--ease-out), box-shadow .3s ease; }
.promo-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.promo-banner:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.promo-banner--image img { display: block; width: 100%; height: auto; }

.promo-banner--auto {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.4rem;
  color: var(--ivory);
  background:
    radial-gradient(ellipse 60% 120% at 0% 0%, rgba(190,140,78,.28), transparent 60%),
    linear-gradient(120deg, #1B3634 0%, #10201E 70%);
  isolation: isolate;
}
.promo-banner--auto::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.07) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: pbSheen 6s ease-in-out infinite;
}
@keyframes pbSheen { 0%, 50% { background-position: 120% 0; } 90%, 100% { background-position: -40% 0; } }
.pb-copy { display: flex; flex-direction: column; gap: .35rem; }
.pb-eyebrow { font-size: .76rem; font-weight: 700; letter-spacing: .2em; color: var(--amber); }
.pb-title { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.3; }
.pb-period { font-size: .95rem; color: rgba(251,250,245,.78); letter-spacing: .06em; }
.pb-btn { align-self: flex-start; margin-top: .7rem; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink-teal-deep); background: linear-gradient(100deg, #e7c48c, var(--amber)); }
.pb-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pb-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; padding: 1rem; border-radius: 12px; background: rgba(251,250,245,.06); border: 1px solid rgba(190,140,78,.35); }
.pb-tiers-head { grid-column: 1 / -1; text-align: center; font-weight: 700; letter-spacing: .12em; color: #e7c48c; margin-bottom: .2rem; }
.pb-tier { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: 8px; background: rgba(16,32,30,.55); font-size: .88rem; min-width: 0; }
.pb-amt { flex: none; font-weight: 700; color: var(--ink-teal-deep); background: var(--amber); border-radius: 6px; padding: .1rem .45rem; font-size: .8rem; }
.pb-gift { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 優惠活動頁、加購專區頁共用的頁首 ── */
.promo-eyebrow { font-family: var(--font-serif); font-style: italic; font-size: .82rem; letter-spacing: .2em; color: var(--amber-dark); margin: .8rem 0 .3rem; }
.promo-lead { max-width: 40em; margin: .7rem 0 0; color: rgba(26,33,31,.72); line-height: 1.85; }

/* ── 優惠活動頁：滿額贈 ── */
.promo-gift { background: var(--ivory); border-radius: 16px; padding: 2rem 2.2rem; box-shadow: var(--shadow-card); }
.promo-gift-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.promo-gift-tag { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: var(--amber-dark); }
.promo-gift h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--ink-teal); }
.promo-gift-period { margin: .4rem 0 0; font-size: .9rem; color: rgba(26,33,31,.65); }
.promo-basis { display: inline-block; margin-left: .5rem; font-size: .74rem; padding: .1rem .55rem; border-radius: 999px; background: rgba(27,54,52,.08); color: var(--ink-teal); }
.promo-gift-intro { margin: 1rem 0 0; color: rgba(26,33,31,.75); line-height: 1.8; }
.promo-tiers { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.promo-tier { display: flex; align-items: center; gap: .7rem; padding: .95rem 1rem; border-radius: 12px; background: #fff; border: 1px solid rgba(190,140,78,.3); }
.pt-step { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: #fff; background: var(--ink-teal); }
.pt-amt { flex: none; font-weight: 800; color: var(--amber-dark); }
.pt-amt small, .pt-gift small { font-weight: 500; color: rgba(26,33,31,.55); font-size: .78rem; }
.pt-arrow { color: rgba(26,33,31,.3); }
.pt-gift { font-weight: 700; color: var(--ink-teal); min-width: 0; }
.promo-note { margin: 1.1rem 0 0; font-size: .82rem; color: rgba(26,33,31,.58); line-height: 1.75; }
.promo-progress { margin-top: 1.4rem; }
.promo-login { margin: 1.2rem 0 0; font-size: .9rem; color: rgba(26,33,31,.7); }
.promo-login a { color: var(--amber-dark); font-weight: 700; }
.promo-empty { text-align: center; padding: 3.5rem 1rem; background: var(--ivory); border-radius: 16px; box-shadow: var(--shadow-card); color: rgba(26,33,31,.7); }
.promo-empty .icon { font-size: 2.6rem; margin: 0 0 .4rem; }
.promo-empty .btn { margin-top: .8rem; }

.promo-addon-link { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; padding: 1.1rem 1.4rem; border-radius: 14px; background: var(--ink-teal); color: var(--ivory); text-decoration: none; transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.promo-addon-link:hover { color: var(--ivory); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.promo-addon-link strong { display: block; font-size: 1.05rem; }
.promo-addon-link small { display: block; color: rgba(251,250,245,.7); font-size: .84rem; }
.pal-icon { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: var(--ink-teal-deep); background: var(--amber); }
.pal-go { margin-left: auto; font-size: 1.3rem; color: var(--amber); }

/* ── 加購專區頁 ── */
.addon-status { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 1.6rem; padding: 1rem 1.3rem; border-radius: 12px; background: var(--ivory); border-left: 4px solid var(--amber); box-shadow: var(--shadow-card); }
.addon-status strong { font-size: 1.15rem; color: var(--ink-teal); }
.as-label { font-size: .86rem; color: rgba(26,33,31,.65); }
.as-how { flex: 1 1 260px; font-size: .84rem; color: rgba(26,33,31,.6); }
.as-cart { font-weight: 700; font-size: .88rem; color: var(--amber-dark); white-space: nowrap; }
.addon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.addon-item { display: flex; flex-direction: column; background: var(--ivory); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); transition: transform .35s var(--ease-out), box-shadow .3s ease; }
.addon-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ai-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; }
.ai-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.addon-item.is-locked .ai-media img { filter: saturate(.75); }
.ai-save { position: absolute; top: .7rem; left: .7rem; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--rose); box-shadow: 0 4px 12px rgba(166,107,114,.35); }
.ai-body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.1rem 1.2rem; }
.ai-body h3 { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.5; }
.ai-body h3 a { color: var(--ink-teal); }
.ai-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem; }
.ai-label { font-size: .74rem; font-weight: 700; color: var(--amber-dark); border: 1px solid rgba(156,112,56,.4); border-radius: 4px; padding: 0 .35rem; }
.ai-now { font-size: 1.35rem; font-weight: 800; color: var(--rose); }
.ai-rules { list-style: none; margin: .6rem 0 0; padding: 0; font-size: .8rem; color: rgba(26,33,31,.62); line-height: 1.7; }
.ai-rules li::before { content: "・"; color: var(--amber); }
.ai-action { margin-top: auto; padding-top: .9rem; }
.ai-action .btn { width: 100%; justify-content: center; }
.ai-lock { margin: 0 0 .5rem; font-size: .84rem; font-weight: 700; color: var(--amber-dark); }
.ai-ok { margin: .45rem 0 0; font-size: .8rem; color: #3c7a5e; }

@media (max-width: 760px) {
  .promo-banner { margin-bottom: 1.6rem; border-radius: 12px; }
  .promo-banner--auto { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding: 1.4rem 1.2rem; }
  .pb-tiers { grid-template-columns: minmax(0, 1fr); }
  .promo-gift { padding: 1.4rem 1.1rem; }
  .promo-gift-head .btn { width: 100%; justify-content: center; }
  .promo-tiers { grid-template-columns: minmax(0, 1fr); }
  .addon-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .ai-body { padding: .8rem .8rem 1rem; }
  .ai-body h3 { font-size: .9rem; }
  .ai-now { font-size: 1.15rem; }
  .ai-rules { font-size: .74rem; }
  .addon-status { padding: .9rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-banner--auto::after { animation: none; }
  .promo-banner, .addon-item, .promo-addon-link { transition: none; }
}

/* ══════════ 命理小工具 /fortune 與會員引導頁 [FORTUNE-20261026] ══════════
   後台：🔮 命理小工具。深墨綠夜色＋金色，星點閃爍、卡片左右交錯；動畫只用 CSS，「減少動態效果」時停止。 */
.page-main.fortune-page { padding-top: 0 !important; background: var(--jade-ash); }
.ft-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 9.5rem 0 5.5rem;
  color: var(--ivory);
  background:
    radial-gradient(ellipse 55% 70% at 85% 10%, rgba(190,140,78,.22), transparent 65%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(96,165,250,.10), transparent 60%),
    linear-gradient(180deg, #10201E 0%, #16302C 100%);
  text-align: center;
}
.ft-hero::after { content: ""; position: absolute; left: 50%; bottom: 0; width: min(600px, 70%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(190,140,78,.6), transparent); }
.ft-crumb { color: rgba(251,250,245,.55); justify-content: center; }
.ft-crumb a { color: rgba(251,250,245,.75); }
.ft-eyebrow { display: inline-flex; align-items: center; gap: .7rem; margin: 1.4rem 0 .9rem; font-family: var(--font-serif); font-style: italic; letter-spacing: .2em; font-size: .84rem; color: var(--amber); }
.ft-badge { font-family: var(--font-sans); font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .1em; padding: .25rem .8rem; border-radius: 999px; color: var(--ink-teal-deep); background: linear-gradient(100deg, #e7c48c, var(--amber)); }
.ft-title { margin: 0 auto; max-width: 18em; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.35; color: var(--ivory); }
.ft-sub { margin: 1.2rem auto 0; max-width: 36em; color: rgba(251,250,245,.75); line-height: 1.95; font-size: 1.02rem; }
.ft-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ft-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #f5d9a3; box-shadow: 0 0 6px 1px rgba(245,217,163,.7); opacity: .2; animation: ftTwinkle 4s ease-in-out infinite; }
.ft-stars i:nth-child(1){left:6%;top:22%}.ft-stars i:nth-child(2){left:14%;top:62%;animation-delay:1.2s}.ft-stars i:nth-child(3){left:22%;top:34%;animation-delay:2.4s}.ft-stars i:nth-child(4){left:31%;top:78%;animation-delay:.6s}
.ft-stars i:nth-child(5){left:39%;top:18%;animation-delay:3s}.ft-stars i:nth-child(6){left:47%;top:70%;animation-delay:1.8s}.ft-stars i:nth-child(7){left:55%;top:28%;animation-delay:.3s}.ft-stars i:nth-child(8){left:63%;top:84%;animation-delay:2.7s}
.ft-stars i:nth-child(9){left:71%;top:40%;animation-delay:1.5s}.ft-stars i:nth-child(10){left:79%;top:66%;animation-delay:3.3s}.ft-stars i:nth-child(11){left:87%;top:24%;animation-delay:.9s}.ft-stars i:nth-child(12){left:93%;top:56%;animation-delay:2.1s}
.ft-stars i:nth-child(13){left:10%;top:88%;animation-delay:3.6s}.ft-stars i:nth-child(14){left:50%;top:46%;animation-delay:2.9s;width:2px;height:2px}.ft-stars i:nth-child(15){left:68%;top:12%;animation-delay:1.1s}.ft-stars i:nth-child(16){left:27%;top:12%;animation-delay:.2s}
@keyframes ftTwinkle { 50% { opacity: 1; transform: scale(1.6); } }

/* 工具卡片：圖文左右交錯 */
.ft-list { padding: 5rem 0 2rem; }
.ft-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; margin: 0 auto 5rem; max-width: 1080px; scroll-margin-top: 120px; }
.ft-card.is-flip .ft-media { order: 2; }
.ft-media { position: relative; display: block; border-radius: 20px; padding: 8px; background: linear-gradient(145deg, rgba(231,196,140,.85), rgba(190,140,78,.2) 45%, rgba(190,140,78,.7)); box-shadow: var(--shadow-lift); transform-style: preserve-3d; will-change: transform; }
.ft-media img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; }
.ft-media[aria-disabled="true"] { pointer-events: none; }
.ft-media[aria-disabled="true"] img { filter: saturate(.55) brightness(.92); }
.ft-seal { position: absolute; right: -14px; bottom: -14px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: #fff; background: radial-gradient(circle at 35% 30%, #c2414b, #8e2430); box-shadow: 0 8px 20px rgba(142,36,48,.45), inset 0 0 0 3px rgba(255,255,255,.35); transform: rotate(-8deg) translateZ(30px); }
.ft-no { margin: 0; font-family: var(--font-serif); font-size: 3rem; line-height: 1; color: rgba(156,112,56,.28); font-weight: 700; }
.ft-name { margin: .2rem 0 .3rem; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--ink-teal); }
.ft-tag { margin: 0 0 1rem; font-weight: 700; letter-spacing: .04em; color: var(--amber-dark); }
.ft-desc { margin: 0; line-height: 1.95; color: rgba(26,33,31,.78); }
.ft-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1.4rem 0 0; }
.ft-facts div { padding: .75rem .95rem; border-radius: 12px; background: var(--ivory); border: 1px solid rgba(190,140,78,.25); }
.ft-facts dt { font-size: .74rem; font-weight: 700; letter-spacing: .1em; color: var(--amber-dark); }
.ft-facts dd { margin: .2rem 0 0; font-size: .92rem; color: var(--ink-teal); font-weight: 700; }
.ft-action { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-top: 1.6rem; }
.ft-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .6rem; min-height: 3.3rem; padding: 0 1.9rem; border-radius: 999px; font-weight: 700; letter-spacing: .06em; color: var(--ivory); background: linear-gradient(100deg, var(--ink-teal), #24443F); box-shadow: 0 10px 26px -12px rgba(16,32,30,.8); text-decoration: none; transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.ft-btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(231,196,140,.45), transparent); transform: skewX(-20deg); animation: ftSweep 5s ease-in-out infinite; }
@keyframes ftSweep { 0%, 60% { left: -60%; } 90%, 100% { left: 130%; } }
.ft-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s ease; }
.ft-btn:hover { color: var(--ivory); transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(16,32,30,.9); }
.ft-btn:hover svg { transform: translateX(4px); }
.ft-btn.is-soon { color: rgba(26,33,31,.55); background: rgba(26,33,31,.08); box-shadow: none; cursor: default; }
.ft-btn.is-soon::after { display: none; }
.ft-lock { font-size: .84rem; color: rgba(26,33,31,.6); }

/* 三步驟、FAQ、提醒 */
.ft-how { padding: 3rem 0 6rem; }
.ft-how-title { text-align: center; font-size: clamp(1.5rem, 2.8vw, 2rem); color: var(--ink-teal); margin: 0 0 2rem; }
.ft-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 960px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ft-steps li { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--ivory); box-shadow: var(--shadow-card); font-weight: 700; color: var(--ink-teal); line-height: 1.5; }
.ft-steps .no { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-serif); color: var(--ink-teal-deep); background: linear-gradient(100deg, #e7c48c, var(--amber)); }
.ft-join { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .8rem 1.4rem; margin-top: 2.2rem; }
.ft-login { font-weight: 700; color: var(--amber-dark); }
.ft-faq { max-width: 760px; margin: 3rem auto 0; }
.ft-faq .faq-item { background: var(--ivory); border-radius: 12px; padding: .2rem 1.2rem; margin-bottom: .7rem; box-shadow: var(--shadow-card); }
.ft-faq summary { cursor: pointer; padding: 1rem 0; font-weight: 700; color: var(--ink-teal); list-style: none; }
.ft-faq summary::-webkit-details-marker { display: none; }
.ft-faq summary::after { content: "＋"; float: right; color: var(--amber-dark); }
.ft-faq details[open] summary::after { content: "－"; }
.ft-faq details p { margin: 0 0 1rem; color: rgba(26,33,31,.72); line-height: 1.85; }
.ft-note { max-width: 760px; margin: 1.6rem auto 0; text-align: center; font-size: .8rem; color: rgba(26,33,31,.5); line-height: 1.8; }

/* 會員引導頁 */
.fortune-gate { min-height: 70vh; background: linear-gradient(180deg, #10201E 0, #16302C 340px, var(--jade-ash) 340px); }
.fg-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); max-width: 880px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: var(--ivory); box-shadow: var(--shadow-lift); }
.fg-art { position: relative; background: #10201E; }
.fg-art img { display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover; opacity: .9; }
.fg-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: rgba(16,32,30,.72); box-shadow: 0 0 0 6px rgba(231,196,140,.35); animation: fgPulse 2.6s ease-in-out infinite; }
@keyframes fgPulse { 50% { box-shadow: 0 0 0 14px rgba(231,196,140,.12); } }
.fg-body { padding: 2.6rem 2.6rem 2.2rem; }
.fg-eyebrow { margin: 0 0 .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--amber-dark); }
.fg-body h1 { margin: 0 0 .8rem; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--ink-teal); }
.fg-text { margin: 0; line-height: 1.9; color: rgba(26,33,31,.78); }
.fg-actions { display: grid; gap: .7rem; margin-top: 1.6rem; }
.fg-actions .btn { width: 100%; justify-content: center; }
.btn.btn-ghost-dark { color: var(--ink-teal); background: transparent; border: 1.5px solid rgba(27,54,52,.35); }
.btn.btn-ghost-dark:hover { color: var(--ink-teal); border-color: var(--ink-teal); }
.fg-note { margin: 1rem 0 0; font-size: .84rem; color: #3c7a5e; }
.fg-back { display: inline-block; margin-top: 1rem; font-size: .88rem; color: var(--amber-dark); font-weight: 700; }
.pd-tool { display: flex; flex-wrap: wrap; gap: .7rem; }

@media (max-width: 860px) {
  .ft-hero { padding: 7.5rem 0 4rem; }
  .ft-list { padding-top: 3.2rem; }
  .ft-card, .ft-card.is-flip { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; margin-bottom: 3.6rem; }
  .ft-card.is-flip .ft-media { order: 0; }
  .ft-media { max-width: 440px; width: 100%; margin: 0 auto; }
  .ft-steps { grid-template-columns: minmax(0, 1fr); }
  .fg-card { grid-template-columns: minmax(0, 1fr); }
  .fg-art img { min-height: 0; max-height: 240px; }
  .fg-body { padding: 1.8rem 1.4rem; }
}
@media (max-width: 560px) {
  .ft-eyebrow { flex-direction: column; gap: .55rem; letter-spacing: .14em; }
  .ft-badge { white-space: nowrap; }
  .ft-facts { grid-template-columns: minmax(0, 1fr); }
  .ft-action .ft-btn { width: 100%; justify-content: center; }
  .ft-seal { width: 54px; height: 54px; font-size: 1.35rem; right: -8px; bottom: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ft-stars i, .ft-btn::after, .fg-lock { animation: none; }
  .ft-btn, .ft-btn svg { transition: none; }
}

/* ══════════ 頁首選單 10 項的間距分段 [FORTUNE-20261026] ══════════
   主選單新增「優惠活動」「加購專區」「命理小工具」後，原本的間距在部分寬度會把 Logo 擠成兩行，
   或把購物車、語言鈕擠出畫面。這裡依寬度分段收緊間距與字級（不刪任何項目），
   收合成漢堡選單的斷點維持原樣（中文 ≤979px、英文 ≤1240px）。 */
.brand-name{ white-space: nowrap; }
@media (min-width: 980px) and (max-width: 1080px){
  html:not([lang="en"]) .header-inner{ gap: .6rem; padding: 0 .7rem; }
  html:not([lang="en"]) .main-nav{ gap: .4rem; }
  html:not([lang="en"]) .main-nav a{ font-size: .72rem; letter-spacing: 0; }
  html:not([lang="en"]) .header-actions{ gap: .3rem; }
  html:not([lang="en"]) .header-actions .nav-search input{ width: 64px; min-width: 0; }
  html:not([lang="en"]) .header-actions .btn-sm{ padding: .45rem .6rem; }
}
@media (min-width: 1081px) and (max-width: 1240px){
  html:not([lang="en"]) .header-inner{ gap: .8rem; padding: 0 .9rem; }
  html:not([lang="en"]) .main-nav{ gap: .55rem; }
  html:not([lang="en"]) .main-nav a{ font-size: .78rem; letter-spacing: 0; }
  html:not([lang="en"]) .header-actions{ gap: .4rem; }
  html:not([lang="en"]) .header-actions .nav-search input{ width: 84px; min-width: 0; }
  html:not([lang="en"]) .header-actions .btn-sm{ padding: .48rem .7rem; }
}
@media (min-width: 1241px){
  html:not([lang="en"]) .main-nav{ gap: .85rem; }
}
@media (min-width: 1241px) and (max-width: 1400px){
  html[lang="en"] .header-inner{ gap: .7rem; padding: 0 .8rem; }
  html[lang="en"] .main-nav{ gap: .5rem; }
  html[lang="en"] .main-nav a{ font-size: .76rem; letter-spacing: 0; }
  html[lang="en"] .header-actions{ gap: .35rem; }
  html[lang="en"] .header-actions .nav-search input{ width: 78px; min-width: 0; }
  html[lang="en"] .header-actions .btn-sm{ padding: .45rem .65rem; }
}
@media (min-width: 1401px){
  html[lang="en"] .header-inner{ gap: 1rem; padding: 0 1rem; }
  html[lang="en"] .main-nav{ gap: .7rem; }
  html[lang="en"] .main-nav a{ font-size: .8rem; letter-spacing: .02em; }
  html[lang="en"] .header-actions{ gap: .45rem; }
  html[lang="en"] .header-actions .nav-search input{ width: 96px; min-width: 0; }
  html[lang="en"] .header-actions .btn-sm{ padding: .5rem .8rem; }
}

/* ══════════ [MQ2-20261026] 跑馬燈改放在頁首選單「下方」＋ 深墨綠／金色新樣式 ══════════
   跑馬燈現在是 <header class="site-header"> 裡的最後一列（layout.php），跟著頁首一起固定、一起縮小，
   所以不再需要舊的 top:32px 位移。文字、連結、排序、上下架日期仍由後台「跑馬燈管理」維護。 */
.announce-bar ~ .site-header{ top: 0; }
.site-header:has(> .announce-bar){ padding-bottom: 0; }
.site-header > .announce-bar{
  position: relative; top: auto; left: auto; right: auto; z-index: auto;
  display: flex; align-items: center; gap: .9rem;
  height: 34px; line-height: 34px;
  margin-top: 1rem; padding: 0 max(1.25rem, calc((100% - 1320px) / 2 + 1.25rem));
  background:
    linear-gradient(90deg, rgba(190,140,78,.20) 0%, rgba(190,140,78,.06) 28%, rgba(190,140,78,.06) 72%, rgba(190,140,78,.20) 100%),
    linear-gradient(90deg, rgba(16,32,30,.94) 0%, rgba(32,62,58,.94) 50%, rgba(16,32,30,.94) 100%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(190,140,78,.28);
  border-bottom: 1px solid rgba(190,140,78,.55);
  box-shadow: 0 6px 18px -10px rgba(0,0,0,.55);
  color: #ECD3A2;
  font-weight: 600; text-align: left;
  transition: margin-top .3s ease;
}
.site-header.scrolled > .announce-bar{ margin-top: .6rem; }
/* 英文版頁首較寬（1480px），公告標籤跟著與 logo 對齊 */
html[lang="en"] .site-header > .announce-bar{ padding: 0 max(1.25rem, calc((100% - 1480px) / 2 + 1.25rem)); }
/* 左側「公告」小標籤：讓人一眼知道這是重要訊息，但不搶主選單 */
.site-header .mq-label{
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: .35rem;
  height: 20px; line-height: 20px; padding: 0 .6rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #D3A466, var(--amber));
  color: var(--ink-teal-deep);
  font-size: .7rem; font-weight: 800; letter-spacing: .12em;
  box-shadow: 0 0 0 1px rgba(235,220,194,.25), 0 0 12px rgba(190,140,78,.35);
}
.site-header .mq-label::before{
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-teal-deep);
  animation: mqPulse 2.4s ease-in-out infinite;
}
@keyframes mqPulse{ 0%,100%{ opacity: 1; } 50%{ opacity: .25; } }
.site-header > .announce-bar .marquee-viewport,
.site-header > .announce-bar .announce-text{ flex: 1 1 auto; min-width: 0; height: 34px; }
.site-header > .announce-bar .announce-text{ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .84rem; }
.site-header > .marquee-bar.is-single .marquee-track{ justify-content: flex-start; }
.site-header > .marquee-bar.is-single .marquee-viewport{
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
}
.site-header .marquee-item{ font-size: .84rem; font-weight: 600; letter-spacing: .04em; color: #ECD3A2; }
.site-header a.marquee-item{ text-decoration: none; border-bottom: 1px dashed rgba(236,211,162,.4); line-height: 1.5; }
.site-header a.marquee-item:hover{ color: #FFF1D6; border-bottom-color: #FFF1D6; text-decoration: none; }
.site-header a.marquee-item:focus-visible{ outline: 2px solid var(--amber); outline-offset: 2px; }
.site-header .marquee-sep{ margin: 0 1.8rem; color: var(--amber); opacity: .85; font-size: .7rem; }
/* 手機選單展開時先收起跑馬燈，選單才會緊貼在頁首下方 */
.site-header.nav-open > .announce-bar{ display: none; }
/* 頁面內容的上方留白：原本 10.5rem 已含跑馬燈高度；首頁大圖往下讓 34px */
body:has(.site-header > .announce-bar) .hero{ padding-top: 34px; }
@media (prefers-reduced-motion: reduce){ .site-header .mq-label::before{ animation: none; } }
@media (max-width: 640px){
  .site-header > .announce-bar,
  html[lang="en"] .site-header > .announce-bar{ gap: .55rem; padding: 0 .75rem; margin-top: .75rem; }
  .site-header .mq-label{ font-size: .64rem; padding: 0 .45rem; letter-spacing: .06em; }
  .site-header .mq-label::before{ display: none; }
  .site-header .marquee-item{ font-size: .78rem; }
  .site-header .marquee-sep{ margin: 0 1.1rem; }
}

/* ══════════ [FORTUNE2-20261026] 命理小工具：圖片角標、沒有圖片時的底圖 ══════════ */
.ft-ribbon { position: absolute; left: 22px; top: 22px; z-index: 2; padding: .3rem .8rem; border-radius: 8px; background: linear-gradient(180deg, #b86b62, #9b5249); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .08em; box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); }
.ft-noimg { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; background: radial-gradient(ellipse at 50% 30%, #24443F, var(--ink-teal) 55%, var(--ink-teal-deep)); color: rgba(231,196,140,.85); font-family: var(--font-serif); font-size: clamp(4rem, 12vw, 7rem); }
.fg-art .ft-noimg { border-radius: inherit; }
@media (max-width: 640px) { .ft-ribbon { left: 16px; top: 16px; font-size: .72rem; } }
