/* 微光盲盒 Glimmer Box
   簡約精緻：ivory, champagne gold, charcoal */

[hidden] { display: none !important; }

:root {
  --bg: #f7f4ee;
  --paper: #fbf9f5;
  --ink: #2c2a26;
  --muted: #6b6760;
  --gold: #b79a6a;
  --gold-deep: #8c7349;
  --gold-soft: #e6dcc8;
  --line: rgba(44, 42, 38, 0.12);
  --line-strong: rgba(44, 42, 38, 0.22);
  --shadow: 0 12px 32px rgba(44, 42, 38, 0.06);
  --radius: 2px;
  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", serif;
  --container: 1120px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, .brand-en {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 0.75rem; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  min-width: 0;
  max-width: 100%;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  min-width: 0;
  max-width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.logo img { width: 28px; height: 28px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--font-serif); font-size: 1.02rem; font-weight: 500; letter-spacing: 0.12em; }
.logo-text span { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }

.nav { display: none; gap: 1.5rem; align-items: center; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}
.nav a:hover { color: var(--gold-deep); }

.header-actions { display: flex; align-items: center; gap: 0.45rem; }

.cart-btn, .menu-btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}
.cart-btn:hover, .menu-btn:hover { border-color: var(--gold); }
.cart-count {
  display: inline-flex;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 1px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.68rem;
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  display: none;
  position: absolute;
  left: 0; right: 0; top: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 1.25rem 1rem;
  flex-direction: column;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0.8rem 1.4rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s;
}
.btn-gold {
  background: var(--gold);
  color: #2c2a26;
  border-color: var(--gold);
}
.btn-gold:hover { background: #c4ab7d; color: #2c2a26; }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.btn-ink {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-ink:hover { color: var(--bg); background: #1c1a17; }

/* Hero */
.hero { padding: 2.6rem 0 3.2rem; }
.hero-grid {
  display: grid;
  gap: 1.8rem;
  align-items: center;
}
.eyebrow {
  color: var(--gold-deep);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  margin-bottom: 0.2rem;
}
.brand-en {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  margin-bottom: 1.2rem;
  letter-spacing: 0.18em;
}
.hero-lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-photo {
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Sections */
.section { padding: 3.6rem 0; }
.section-alt { border-block: 1px solid var(--line); background: #f3efe7; }
.section-head { text-align: center; max-width: 36rem; margin: 0 auto 2.4rem; }
.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: 0.65rem;
  letter-spacing: 0.12em;
}
.section-head p { color: var(--muted); }
.kicker {
  color: var(--gold-deep);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.steps { display: grid; gap: 1.2rem; }
.step { padding: 0.2rem 0 0.4rem; border-top: 1px solid var(--line); }
.step-num {
  font-family: var(--font-serif);
  color: var(--gold-deep);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  margin: 0.9rem 0 0.35rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* Products */
.product-grid { display: grid; gap: 1.4rem; }
.product-card { display: flex; flex-direction: column; background: var(--paper); }
.product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eeeae2;
}
.product-body {
  padding: 1.15rem 0.15rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.product-body h3 { font-size: 1.12rem; }
.product-body p { color: var(--muted); font-size: 0.9rem; }
.price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.product-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.product-actions .qty { align-self: flex-start; }
.product-actions .btn { width: 100%; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  flex: none;
}
.qty button {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
}
.qty button:hover { background: var(--gold-soft); }
.qty input {
  width: 2.4rem;
  flex: 0 0 2.4rem;
  padding: 0;
  margin: 0;
  border: 0;
  text-align: center;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 2.1rem;
  height: 2.1rem;
  background: transparent;
  color: var(--ink);
  pointer-events: none;
}

/* Policy / collection */
.policy-grid { display: grid; gap: 1.2rem; }
.policy-card {
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
}
.policy-card h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.policy-card p { color: var(--muted); font-size: 0.94rem; }

/* Cart / checkout */
.cart-layout { display: grid; gap: 2rem; min-width: 0; }
.panel { min-width: 0; max-width: 100%; }
.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.cart-empty { color: var(--muted); padding: 1.2rem 0; }
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; }
.cart-item h4 { font-size: 0.95rem; font-family: var(--font-serif); font-weight: 500; }
.cart-item .meta { font-size: 0.8rem; color: var(--muted); }
.cart-item .remove {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.2rem 0;
  letter-spacing: 0.06em;
}
.cart-item .remove:hover { color: var(--ink); }
.cart-item .qty { width: max-content; margin-top: 0.4rem; }

.totals { margin-top: 1rem; display: grid; gap: 0.4rem; font-size: 0.95rem; }
.totals div { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; min-width: 0; }
.totals div span:first-child { min-width: 0; overflow-wrap: anywhere; }
.totals div span:last-child { white-space: nowrap; flex: 0 0 auto; }
.totals .grand {
  font-weight: 600;
  font-size: 1.05rem;
  padding-top: 0.6rem;
  margin-top: 0.2rem;
  border-top: 1px solid var(--line);
}
.note {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.85rem 0.95rem;
  margin: 0.9rem 0 0;
  background: var(--paper);
}

.form-grid { display: grid; gap: 0.85rem; min-width: 0; }
label { min-width: 0; }
label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.65rem 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
}
input:focus, textarea:focus {
  outline: none;
  border-bottom-color: var(--gold-deep);
}
textarea { min-height: 4.5rem; resize: vertical; }
.field-row { display: grid; gap: 0.85rem; }
.store-help { font-size: 0.8rem; font-weight: 400; letter-spacing: 0; }
.store-help a, .note a, .faq-body a, .contact-block a { overflow-wrap: anywhere; word-break: break-word; }
.order-text {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 8rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem;
  background: var(--paper);
}
.checkout-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.confirm {
  display: none;
  margin-top: 1.2rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--gold);
  background: var(--paper);
}
.confirm.is-visible { display: block; }
.confirm h4 { font-family: var(--font-serif); font-weight: 500; margin: 0 0 0.5rem; }
.confirm p { color: var(--muted); font-size: 0.92rem; }
.order-no { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ink); }

/* FAQ */
.faq-list { display: grid; gap: 0; max-width: 44rem; margin: 0 auto; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.8rem 1rem 0;
  font-weight: 500;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-deep);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 0 1.1rem; color: var(--muted); font-size: 0.94rem; }

/* Contact */
.contact-block { text-align: center; }
.contact-block a {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gold);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-block a:hover { color: var(--gold-deep); }
.contact-block p { color: var(--muted); margin-top: 0.8rem; }

/* Footer */
.site-footer {
  padding: 2.6rem 0 2.8rem;
  border-top: 1px solid var(--line);
  background: #2c2a26;
  color: #e8e2d6;
  text-align: center;
  width: 100%;
  max-width: 100%;
}
.site-footer a { color: #d4c4a0; }
.site-footer .foot-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}
.site-footer .domain { letter-spacing: 0.16em; font-size: 0.78rem; color: #d4c4a0; margin-bottom: 0.8rem; }
.site-footer p { color: #b8b1a6; font-size: 0.78rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  z-index: 80;
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
  pointer-events: none;
  max-width: calc(100% - 2rem);
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (min-width: 760px) {
  .menu-btn, .mobile-nav { display: none !important; }
  .nav { display: flex; }
  .hero { padding: 4rem 0 4.6rem; }
  .hero-grid { grid-template-columns: 0.9fr 1.1fr; gap: 3.2rem; }
  .hero-photo img { aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
  .step { padding-right: 0.8rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
  .policy-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .cart-layout { grid-template-columns: 1fr 1.05fr; align-items: start; gap: 2.6rem; }
  .field-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1020px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.free-ship-hint {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(196, 164, 112, 0.14);
  color: inherit;
  font-size: 0.9rem;
  text-align: center;
}

/* 下單結果與訂單查詢 */
.confirm.is-error { border-color: #b4553f; }
.confirm dl, .lookup-result dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}
.confirm dt, .lookup-result dt { color: var(--muted); }
.confirm dd, .lookup-result dd { margin: 0; color: var(--ink); word-break: break-all; }
.confirm .amount { font-family: var(--font-serif); font-size: 1.15rem; color: var(--gold-deep); }
.lookup-panel { max-width: 40rem; margin: 0 auto; }
.lookup-result {
  margin-top: 1.2rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.92rem;
}
.lookup-result h4 { font-family: var(--font-serif); font-weight: 500; margin: 0 0 0.4rem; }
.lookup-result p { color: var(--muted); }
.lookup-result ul { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-left: 0.4rem;
}
.status-badge.is-cancelled { border-color: var(--line-strong); color: var(--muted); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.lookup-result ul + p, .confirm ul + p { margin-top: 0.6rem; }

/* 匯款回報 */
.report-form {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line-strong);
}
.report-form h5 { font-family: var(--font-serif); font-weight: 500; font-size: 0.98rem; margin: 0 0 0.3rem; color: var(--ink); }
.report-form .report-status { font-size: 0.86rem; color: var(--muted); margin-bottom: 0.6rem; }
.report-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.7rem; }
.report-row label { flex: 1 1 10rem; }
.report-row input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.2em; }
.report-form + p { margin-top: 0.8rem; }
