/* =============================================================
 * 鼎崴茶業・日月潭紅茶 - 前台樣式
 * 設計原則：手機優先、老人友善（大字體、大按鈕、高對比）
 * 配色：紅茶湯色為主（深琥珀、赭紅、茶褐），
 *       日月潭湖水墨綠／晨霧灰藍為輔，溫潤沉穩
 * ============================================================= */
:root {
  --bg: #faf6ee;          /* 米白（暖紙色） */
  --ink: #2e2620;
  --green: #9a4a2e;       /* 赭紅（紅茶湯色・主色） */
  --green-dark: #7c3a22;  /* 深赭紅 */
  --clay: #c07f3e;        /* 深琥珀（點綴） */
  --clay-dark: #a05f27;
  --lake: #2e4f4a;        /* 日月潭湖水墨綠 */
  --mist: #7d8fa0;        /* 晨霧灰藍 */
  --bark: #4a2f24;        /* 茶褐（頁首） */
  --line: #e8dcc8;
  --card: #ffffff;
  --muted: #7a6f63;
  --danger: #b3402e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 18px; } /* 老人友善：基準字體放大 */
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- 頁首 ---------- */
.site-header { background: var(--bark); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.logo { color: #fff; font-size: 1.4rem; font-weight: 700; text-decoration: none; letter-spacing: 2px; }
.logo img { max-height: 52px; width: auto; vertical-align: middle; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { color: #fff; text-decoration: none; padding: 10px 12px; font-size: 1rem; border-radius: 8px; }
.main-nav a:active { background: var(--green-dark); }
.cart-link { background: var(--clay); font-weight: 700; }

/* ---------- 主視覺：日月潭 ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  margin: 20px 0; text-align: center; color: #fff;
  background: linear-gradient(180deg, #8fa3b5 0%, #5d7a72 34%, var(--lake) 55%, #3a2a20 100%);
}
.hero svg.lake-scene { display: block; width: 100%; height: auto; }
.hero-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.hero-text h1 { margin: 0 0 8px; font-size: 2rem; letter-spacing: 4px; }
.hero-text p { margin: 4px 0; font-size: 1.15rem; }
.hero-text .slogan {
  display: inline-block; margin-top: 10px; padding: 8px 22px;
  background: rgba(154,74,46,.92); border-radius: 999px;
  font-size: 1.05rem; font-weight: 700; letter-spacing: 2px; text-shadow: none;
}

/* ---------- 分類 ---------- */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 12px; }
.cat-btn {
  flex: 0 0 auto; padding: 12px 20px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 1.05rem; text-decoration: none;
}
.cat-btn.on { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; }

/* ---------- 商品卡 ---------- */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 24px; }
.product-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; display: block;
}
.product-img {
  aspect-ratio: 1/1; background: linear-gradient(135deg, #e8c98f 0%, #c07f3e 55%, #8a4b2a 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: #fff8ee; text-shadow: 0 2px 8px rgba(90,40,15,.45);
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 12px; }
.product-body h3 { margin: 0 0 4px; font-size: 1.1rem; }
.product-body .summary { margin: 0 0 8px; color: var(--muted); font-size: .95rem; }
.price { color: var(--clay-dark); font-weight: 700; font-size: 1.25rem; }
.soldout-tag {
  display: inline-block; background: #ddd; color: #666; border-radius: 6px;
  padding: 4px 10px; font-size: .95rem;
}

/* ---------- 表單 ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 1.05rem; }
.field input[type=text], .field input[type=tel], .field input[type=email],
.field input[type=password], .field input[type=number], .field input[type=date],
.field select, .field textarea {
  width: 100%; padding: 14px; font-size: 1.1rem;
  border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green); outline: none;
}
.hint { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.err { color: var(--danger); font-weight: 700; margin: 8px 0; }

/* ---------- 按鈕（大、好按） ---------- */
.btn {
  display: block; width: 100%; padding: 16px; font-size: 1.25rem; font-weight: 700;
  border: none; border-radius: var(--radius); cursor: pointer; text-align: center;
  text-decoration: none; margin: 10px 0;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:active { background: var(--green-dark); }
.btn-accent { background: var(--clay); color: #fff; }
.btn-accent:active { background: var(--clay-dark); }
.btn-ghost { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin: 10px 0; }

/* 付款方式大按鈕 */
.pay-methods { display: grid; gap: 12px; }
.pay-method, .invoice-type {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 18px; font-size: 1.2rem; font-weight: 700; text-align: left;
  background: #fff; border: 3px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-family: inherit; color: inherit;
}
.pay-method.on, .invoice-type.on { border-color: var(--green); background: #f2f6f1; }
.pay-method small, .invoice-type small { display: block; font-weight: 400; font-size: .95rem; color: var(--muted); }

/* ---------- 購物車／訂單 ---------- */
.cart-item {
  display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; margin-bottom: 12px; align-items: center;
}
.cart-item .thumb {
  width: 72px; height: 72px; flex: 0 0 72px; border-radius: 8px;
  background: linear-gradient(135deg, #e8c98f 0%, #c07f3e 55%, #8a4b2a 100%);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff8ee;
}
.cart-item .info { flex: 1; }
.cart-item .info h4 { margin: 0 0 2px; font-size: 1.05rem; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 44px; height: 44px; font-size: 1.4rem; border-radius: 10px;
  border: 2px solid var(--line); background: #fff; cursor: pointer;
}
.qty-ctrl span { min-width: 2em; text-align: center; font-size: 1.15rem; font-weight: 700; }

.totals { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 1.1rem; }
.totals .row.grand { font-size: 1.4rem; font-weight: 700; color: var(--clay-dark); border-top: 2px solid var(--line); margin-top: 8px; padding-top: 12px; }

/* 免運進度條 */
.ship-progress { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.ship-progress .bar { height: 14px; background: #eee; border-radius: 7px; overflow: hidden; margin-top: 8px; }
.ship-progress .bar i { display: block; height: 100%; background: var(--green); border-radius: 7px; }

/* 步驟指示 */
.steps { display: flex; margin: 16px 0; }
.steps div { flex: 1; text-align: center; padding: 10px 4px; font-size: 1rem; color: var(--muted); border-bottom: 4px solid var(--line); }
.steps div.on { color: var(--green); font-weight: 700; border-color: var(--green); }

.flash { background: #fff8e6; border: 2px solid #e8c96a; border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.order-no { font-size: 1.6rem; font-weight: 700; color: var(--green); letter-spacing: 1px; }

/* 商品詳情 */
.detail-img {
  border-radius: var(--radius); background: linear-gradient(135deg, #e8c98f 0%, #c07f3e 55%, #8a4b2a 100%);
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: #fff8ee; text-shadow: 0 2px 10px rgba(90,40,15,.45); margin: 12px 0;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.spec-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.spec-opt {
  padding: 14px 22px; border: 3px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 1.15rem; cursor: pointer;
}
.spec-opt.on { border-color: var(--green); font-weight: 700; background: #f2f6f1; }
.spec-opt:disabled { opacity: .45; cursor: not-allowed; background: #f1ede6; }

/* 頁尾 */
.site-footer { margin-top: 32px; padding: 24px 0; border-top: 2px solid var(--line); color: var(--muted); text-align: center; }
.site-footer .tiny { font-size: .85rem; }

/* 桌機：商品三欄 */
@media (min-width: 700px) {
  .products { grid-template-columns: 1fr 1fr 1fr; }
  .wrap { max-width: 960px; }
}

/* 商品詳細介紹（富文字） */
.desc-body p { margin: 0 0 1em; }
.desc-body p:last-child { margin-bottom: 0; }
.desc-body ul, .desc-body ol { margin: 0 0 1em; padding-left: 1.6em; }
.desc-body h3, .desc-body h4 { margin: 1.2em 0 .6em; }
.desc-body blockquote { margin: 0 0 1em; padding-left: 1em; border-left: 4px solid var(--line); color: var(--muted); }
.desc-body img { max-width: 100%; height: auto; border-radius: 8px; }
.desc-body a { color: var(--green); }

/* 社群分享 */
.share-box h3 { font-size: 1.15rem; }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.share-btn {
  flex: 1 1 0; min-width: 100px; padding: 14px 8px; text-align: center;
  font-size: 1.05rem; font-weight: 700; text-decoration: none;
  color: var(--green); background: #fff; border: 2px solid var(--green);
  border-radius: 10px; cursor: pointer; font-family: inherit;
}
.share-btn:active { background: #f2f6f1; }

/* 特價商品區 */
.sale-section { margin: 28px 0; }
.sale-title { font-size: 1.6rem; margin: 0 0 14px; }
.product-img { position: relative; }
.sale-tag {
  position: absolute; top: 8px; left: 8px;
  display: inline-block; background: #c0392b; color: #fff; border-radius: 6px;
  padding: 4px 10px; font-size: .95rem; font-weight: 700;
}
.orig-price { color: #999; font-size: .95rem; margin-right: 8px; }

/* 特價跑馬燈 */
.sale-track-wrap { position: relative; }
.sale-track {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 2px 14px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.sale-track::-webkit-scrollbar { display: none; }
.sale-track .sale-card {
  flex: 0 0 clamp(210px, 62vw, 260px);
  scroll-snap-align: start;
}
.sale-nav {
  position: absolute; top: 38%; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15); background: rgba(255,255,255,.92);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.sale-nav.prev { left: -6px; }
.sale-nav.next { right: -6px; }
.sale-nav:hover { background: #fff; }
@media (max-width: 640px) {
  .sale-nav { display: none; }
}

/* ---------- ATM 轉帳回報 ---------- */
.rp-wrap { max-width: 620px; margin: 0 auto; padding: 12px 0 8px; }
.rp-kicker { text-align: center; color: var(--muted); font-size: 1rem; margin: 6px 0 4px; letter-spacing: .1em; }
.rp-title { text-align: center; font-size: 1.7rem; margin: 0 0 20px; }
.rp-steps { display: flex; list-style: none; padding: 0; margin: 0 0 26px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.rp-steps li { flex: 1; text-align: center; padding: 13px 4px; color: var(--muted); font-size: .95rem; font-weight: 700; }
.rp-steps li + li { border-left: 2px solid var(--line); }
.rp-steps .n { display: inline-block; width: 1.7em; height: 1.7em; line-height: 1.7em; text-align: center; background: #e8dcc8; border-radius: 50%; margin-right: 8px; font-size: .85em; }
.rp-steps li.done .n { background: var(--green); color: #fff; }
.rp-steps li.now { color: var(--ink); background: #fdf9f0; }
.rp-steps li.now .n { background: var(--green); color: #fff; }
.rp-panel { border: 2px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 26px; background: var(--card); }
.rp-panel h2 { font-size: 1.15rem; margin: 0 0 8px; }
.rp-note { white-space: pre-line; margin: 6px 0 0; line-height: 2; }
.rp-dl { margin: 0; }
.rp-dl > div { display: flex; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.rp-dl > div:first-child { border-top: none; }
.rp-dl dt { width: 4em; flex-shrink: 0; color: var(--muted); font-weight: 700; }
.rp-dl dd { margin: 0; font-size: 1.15rem; }
.rp-dl dd.acct { font-size: 1.45rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--green-dark); }
.rp-sec-title { font-size: 1.2rem; margin: 0 0 16px; }
.rp-order { margin-top: 30px; padding: 16px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; color: var(--muted); font-size: .95rem; text-align: center; }
.rp-order .sep { margin: 0 10px; }
.rp-privacy { color: var(--muted); font-size: .92rem; margin-top: 12px; }
.rp-done { text-align: center; padding: 26px 12px; margin-bottom: 24px; border: 2px solid var(--green); border-radius: 12px; background: #fdf9f0; }
.rp-done .tick { display: inline-flex; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 12px; }
.rp-done h2 { font-size: 1.3rem; margin: 0 0 8px; }
.rp-done p { margin: 4px 0; }
.req { color: var(--danger); }
input.acct5 { letter-spacing: .4em; font-size: 1.45rem !important; font-variant-numeric: tabular-nums; }
