/* ===== Mobile-first 一頁式 ===== */
:root {
  --cream: #FDFBF7;
  --teal: #1A434E;
  --teal-light: #2A5D6B;
  --gold: #C5A059;
  --gold-light: #E8D5A8;
  --red: #C0392B;
  --text: #3D4F54;
  --text-light: #6B7D82;
  --white: #FFFFFF;
  --max-w: 480px;
  --promo-h: 36px;
  --header-h: 48px;
  --cta-h: 58px;
  --top-offset: calc(var(--promo-h) + var(--header-h));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-serif: 'Noto Serif TC', Georgia, serif;
  --font-sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: #E8E4DE;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--cream);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* ===== 頂部活動列 + 倒數 ===== */
.promo-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  z-index: 110;
  height: var(--promo-h);
  background: linear-gradient(90deg, var(--teal), #2A5D6B);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  overflow: hidden;
}

.promo-marquee {
  display: flex;
  gap: 1.5rem;
  animation: marquee 12s linear infinite;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}

.promo-marquee span { flex-shrink: 0; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.promo-countdown {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
}

.countdown-label {
  font-size: 0.65rem;
  opacity: 0.9;
}

.countdown-timer {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: var(--promo-h);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  z-index: 100;
  height: var(--header-h);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 67, 78, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal);
  font-weight: 500;
}

.logo-icon {
  width: 26px;
  height: 26px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
}

.logo-text { font-size: 0.95rem; }

.header-cta {
  background: var(--teal);
  color: var(--white);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ===== Slides ===== */
.slides {
  padding-top: var(--top-offset);
  padding-bottom: calc(var(--cta-h) + var(--safe-bottom) + 12px);
}

.slide { margin: 0; line-height: 0; }

.slide img {
  width: 100%;
  aspect-ratio: 1086 / 1448;
  object-fit: cover;
}

#faq-img img {
  aspect-ratio: 1086 / 355;
}

/* ===== 方案價格區 ===== */
.shop-section {
  padding: 1.25rem 1rem 1.75rem;
  background: var(--white);
  border-top: 1px solid rgba(26, 67, 78, 0.06);
}

.shop-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.shop-visual {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #F5F2EC;
  box-shadow: 0 4px 24px rgba(26, 67, 78, 0.08);
}

.shop-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
}

.shop-img-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFF9EE, #F0DDB8);
  border: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.badge-crown { font-size: 0.85rem; line-height: 1; }

.badge-text {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.15;
  margin-top: 1px;
}

.shop-detail { flex: 1; }

.shop-title {
  font-family: var(--font-serif);
  color: var(--teal);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.shop-subtitle {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.shop-price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.shop-price-original {
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.shop-price-sale {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.shop-save-badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: #EEF1F0;
  color: var(--text-light);
  font-size: 0.72rem;
  border-radius: 6px;
  border: 1px solid #D8DEDB;
  white-space: nowrap;
}

.shop-trust-box {
  border: 1.5px dashed #C5CCC8;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1rem;
  background: #FAFAF8;
}

.trust-row {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.5;
}

.trust-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.pay-icons {
  display: flex;
  gap: 0.35rem;
}

.pay-icon {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.pay-icon.visa { background: #1A1F71; color: #fff; }
.pay-icon.mc { background: #EB001B; color: #fff; }
.pay-icon.jcb { background: #0B6E3E; color: #fff; }

.trust-ship { color: var(--text-light); }

.spec-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

.plan-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.plan-tab {
  position: relative;
  padding: 0.7rem 0.35rem;
  border: 2px solid #DDE5E3;
  border-radius: 10px;
  background: var(--white);
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.plan-tab.active {
  border-color: var(--teal);
  background: rgba(26, 67, 78, 0.04);
  box-shadow: 0 0 0 1px rgba(26, 67, 78, 0.08);
}

.tab-crown {
  display: block;
  font-size: 0.75rem;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.plan-highlight {
  background: #F7F9F8;
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.plan-highlight h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.35rem;
  font-family: var(--font-serif);
}

.plan-highlight p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.55;
}

.coupon-box {
  background: #F9F1E8;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.coupon-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

.coupon-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.coupon-row input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.88rem;
}

.coupon-row button {
  padding: 0.6rem 1rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.coupon-hint {
  font-size: 0.78rem;
  color: var(--text-light);
}

.coupon-code {
  background: var(--gold);
  color: var(--white);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.82rem;
  margin-left: 0.25rem;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.qty-label {
  font-weight: 600;
  color: var(--teal);
  font-size: 0.95rem;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #E8E4DE;
  border-radius: 8px;
  padding: 0.25rem;
}

.qty-control button {
  width: 32px;
  height: 32px;
  background: var(--cream);
  border-radius: 6px;
  font-size: 1.1rem;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-control span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

.btn-shop-main {
  width: 100%;
  padding: 0.95rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(26, 67, 78, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-cart { font-size: 1.1rem; }

.btn-shop-main:active { background: var(--teal-light); }

.shop-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

/* ===== FAQ ===== */
.slide-faq {
  padding: 2rem 1.25rem 1rem;
  background: var(--cream);
}

.slide-faq h2 {
  font-family: var(--font-serif);
  color: var(--teal);
  font-size: 1.35rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.faq-item {
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 0.6rem;
  box-shadow: 0 2px 12px rgba(26, 67, 78, 0.06);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.1rem;
  font-weight: 500;
  color: var(--teal);
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--gold); font-size: 1.2rem; }
.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  padding: 0 1.1rem 1rem;
  font-size: 0.88rem;
  color: var(--text-light);
  border-top: 1px dashed rgba(26, 67, 78, 0.1);
  margin: 0 1.1rem;
  padding-top: 0.75rem;
}

.faq-notice {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: #F9F1E8;
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--text-light);
}

.faq-notice ul { margin-top: 0.5rem; padding-left: 1.1rem; list-style: disc; }

/* ===== Footer（對照 follow0717.zeabur.app）===== */
.site-footer {
  padding: 2rem 1.1rem 2.25rem;
  text-align: center;
  background: #ECEEEA;
  color: #5A6560;
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.footer-links a {
  color: #3D5248;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.footer-sep {
  color: #8A9490;
  font-weight: 400;
}

.footer-company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.company-line {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #6B7570;
}

.company-label {
  display: inline-block;
  background: #E2E6E2;
  color: #3D5248;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: baseline;
  white-space: nowrap;
}

.company-line span,
.company-line a {
  color: #6B7570;
  word-break: break-word;
}

.company-email {
  text-decoration: underline;
  color: #6B7570;
}

.footer-divider {
  border: none;
  border-top: 1px solid #D5DAD6;
  max-width: 400px;
  margin: 0 auto 1.25rem;
}

.footer-disclaimer {
  font-size: 0.72rem;
  color: #8A9490;
  line-height: 1.8;
  max-width: 400px;
  margin: 0 auto 1rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.72rem;
  color: #8A9490;
}

@media (max-width: 360px) {
  .footer-company-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
}

/* ===== 回到頂部 ===== */
.scroll-top {
  position: fixed;
  bottom: calc(var(--cta-h) + var(--safe-bottom) + 20px);
  right: max(1rem, calc(50% - var(--max-w) / 2 + 1rem));
  z-index: 104;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--teal);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(26, 67, 78, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Progress bar ===== */
.progress-bar {
  position: fixed;
  top: var(--top-offset);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: 3px;
  background: rgba(26, 67, 78, 0.08);
  z-index: 99;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transition: width 0.15s ease-out;
}

#faq-img,
.slide-faq,
.shop-section {
  scroll-margin-top: var(--top-offset);
}

/* ===== 底部固定購買列 ===== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  z-index: 100;
  padding: 0.65rem 0.75rem calc(0.65rem + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(26, 67, 78, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.sticky-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sticky-plan {
  font-size: 0.78rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
}

.btn-buy {
  flex-shrink: 0;
  padding: 0.7rem 1.25rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(26, 67, 78, 0.25);
  white-space: nowrap;
}

.btn-buy:active { background: var(--teal-light); transform: scale(0.98); }

/* ===== 購買通知 ===== */
.purchase-toast {
  position: fixed;
  bottom: calc(var(--cta-h) + var(--safe-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 24px));
  width: calc(100% - 2rem);
  max-width: calc(var(--max-w) - 2rem);
  z-index: 105;
  background: var(--white);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(26, 67, 78, 0.08);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.purchase-toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-icon { font-size: 1.3rem; flex-shrink: 0; }

.toast-text {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}

.toast-text strong { color: var(--teal); }

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--text-light);
  font-size: 1.2rem;
  line-height: 1;
}

@media (min-width: 481px) {
  body { background: #D5D0C8; }
}
