/* ============================================================
   一襲芳華｜Floral Grace — Stylesheet
   現代東方美學 · 月門為品牌識別意象
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* 現代東方美學：米白、墨黑、淡金 — 極簡高級留白配色 */
  --ink: #17140f;
  --ink-dark: #000000;
  --ink-soft: #5c574d;
  --gold: #b79355;
  --gold-light: #d8c48f;
  --gold-soft: rgba(183, 147, 85, 0.12);
  --paper: #f7f4ec;
  --paper-deep: #efe9da;
  --white: #ffffff;
  --line: rgba(23, 20, 15, 0.12);
  --shadow: 0 10px 30px rgba(23, 20, 15, 0.1);
  --radius-arch: 50% 50% 0 0 / 60% 60% 0 0;

  /* 相容舊命名，統一指向新的極簡配色 */
  --wine: var(--ink);
  --wine-dark: var(--ink-dark);
  --wine-soft: var(--ink-soft);
  --jade: var(--gold);
  --blush: var(--gold-soft);

  --font-display: "Noto Serif TC", "Songti TC", serif;
  --font-accent: "Cormorant Garamond", "Noto Serif TC", serif;
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;

  --maxw: 1180px;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100vw;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
p {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) {
  .container {
    padding: 0 40px;
  }
}

/* ---------- Utility ---------- */
.eyebrow {
  font-family: var(--font-accent);
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wine);
  font-size: 0.85rem;
  font-weight: 600;
}
.section {
  padding: 64px 0;
}
.section-alt {
  background: var(--paper-deep);
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 10px 0 14px;
}
.section-head p {
  color: var(--ink-soft);
}
.knot-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0;
  color: var(--gold);
}
.knot-divider::before,
.knot-divider::after {
  content: "";
  height: 1px;
  width: 46px;
  background: var(--gold);
  opacity: 0.6;
}
.knot-divider svg {
  width: 20px;
  height: 20px;
}

/* Buttons — min 44px tap target */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--wine);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--wine-dark);
}
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover {
  background: #9c7a26;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.88rem;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--wine);
  color: var(--white);
}
.tag-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

/* ---------- Top notice bar ---------- */
.notice-bar {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 0.8rem;
  padding: 8px 12px;
  letter-spacing: 0.03em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 236, 223, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}
.logo svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-text .zh {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.logo-text .en {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--wine);
}

.main-nav {
  display: none;
}
.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active {
  border-color: var(--wine);
  color: var(--wine);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  color: var(--ink);
  background: transparent;
  border: none;
}
.icon-btn:hover {
  background: var(--blush);
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--wine);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.menu-toggle {
  display: inline-flex;
}
@media (min-width: 960px) {
  .main-nav {
    display: block;
  }
  .menu-toggle {
    display: none;
  }
}

/* Search flyout */
.search-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 16px 0;
}
.search-panel.open {
  display: block;
}
.search-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}
.search-form input {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.search-results {
  max-width: 520px;
  margin: 14px auto 0;
  display: grid;
  gap: 10px;
}
.search-result-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
}
.search-result-item:hover {
  background: var(--paper);
}
.search-result-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
}

/* Mobile drawer nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
}
.mobile-nav.open {
  visibility: visible;
}
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 33, 28, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav.open .mobile-nav-backdrop {
  opacity: 1;
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(82vw, 340px);
  background: var(--paper);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}
.mobile-nav.open .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.mobile-nav a {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn {
  margin-top: 20px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 40px 0 60px;
}
.hero-inner {
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero-copy .eyebrow {
  display: block;
  margin-bottom: 14px;
}
.hero-copy h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.25;
}
.hero-copy h1 em {
  display: block;
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--wine);
  font-size: 0.5em;
  margin-top: 8px;
  letter-spacing: 0.08em;
}
.hero-copy p {
  margin: 20px 0 28px;
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-figure {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
}
.moon-gate {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-arch);
  overflow: hidden;
  border: 10px solid var(--white);
  box-shadow: var(--shadow);
  background: var(--blush);
}
.moon-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-arch);
  border: 2px solid var(--gold);
  pointer-events: none;
}
.moon-gate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-badge {
  position: absolute;
  bottom: -18px;
  left: -14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
}
.hero-badge svg {
  width: 26px;
  height: 26px;
  color: var(--wine);
  flex-shrink: 0;
}
.hero-badge .t1 {
  font-size: 0.78rem;
  font-weight: 700;
}
.hero-badge .t2 {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
  .hero-figure {
    justify-self: end;
  }
}

/* ---------- Marquee strip ---------- */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.trust-strip ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 22px 0;
  text-align: center;
}
.trust-strip li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.trust-strip svg {
  width: 26px;
  height: 26px;
  color: var(--wine);
}
@media (min-width: 640px) {
  .trust-strip ul {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Category chips ---------- */
.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}
.chip {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip.active,
.chip:hover {
  border-color: var(--wine);
  color: var(--wine);
  background: var(--blush);
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
@media (min-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.product-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.product-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--blush);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-thumb .tag {
  position: absolute;
  top: 10px;
  left: 10px;
}
.product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-info .cat {
  font-size: 0.72rem;
  color: var(--jade);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.product-info h3 {
  font-size: 1rem;
  line-height: 1.4;
}
.product-info .price {
  margin-top: auto;
  font-weight: 700;
  color: var(--wine);
  font-size: 1.05rem;
}
.product-info .btn {
  margin-top: 8px;
}

.view-all-wrap {
  text-align: center;
  margin-top: 36px;
}

/* ---------- Brand story ---------- */
.story-grid {
  display: grid;
  gap: 30px;
  align-items: center;
}
.story-figure {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/5;
}
.story-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-copy h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 10px 0 18px;
}
.story-copy p {
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.story-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.story-stats div {
  text-align: center;
  padding: 14px 6px;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
}
.story-stats .num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--wine);
  font-weight: 700;
}
.story-stats .label {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
@media (min-width: 860px) {
  .story-grid {
    grid-template-columns: 1fr 1.15fr;
  }
  .story-grid.reverse {
    grid-template-columns: 1.15fr 1fr;
  }
  .story-grid.reverse .story-figure {
    order: 2;
  }
}

/* ---------- Values ---------- */
.value-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
  text-align: center;
}
.value-card svg {
  width: 34px;
  height: 34px;
  color: var(--gold);
  margin-bottom: 12px;
}
.value-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.value-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: transparent;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 0.98rem;
  min-height: 48px;
}
.faq-q svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--gold);
}
.faq-item.open .faq-q svg {
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.faq-item.open .faq-a {
  padding-bottom: 18px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 30px;
}
@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
}
.contact-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.contact-list svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-list .t1 {
  font-weight: 700;
  font-size: 0.92rem;
}
.contact-list .t2 {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.form-row {
  display: grid;
  gap: 14px;
}
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.form-row textarea {
  min-height: 110px;
  resize: vertical;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 50px 0 26px;
}
.footer-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
.footer-brand .logo-text .zh {
  color: var(--paper);
}
.footer-brand p {
  color: rgba(243, 236, 223, 0.65);
  font-size: 0.85rem;
  margin-top: 12px;
  max-width: 32ch;
}
.footer-col h4 {
  color: var(--gold-light);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-col ul {
  display: grid;
  gap: 10px;
}
.footer-col a {
  color: rgba(243, 236, 223, 0.78);
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: var(--gold-light);
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(243, 236, 223, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-social svg {
  width: 18px;
  height: 18px;
}
.footer-bottom {
  border-top: 1px solid rgba(243, 236, 223, 0.15);
  margin-top: 36px;
  padding-top: 20px;
  font-size: 0.78rem;
  color: rgba(243, 236, 223, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 18px 0 0;
}
.breadcrumb a:hover {
  color: var(--wine);
}

/* ---------- Product detail page ---------- */
.pd-wrap {
  display: grid;
  gap: 34px;
  padding: 24px 0 60px;
}
@media (min-width: 860px) {
  .pd-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

/* Carousel + magnifier */
.pd-gallery {
  position: relative;
}
.pd-gallery-main {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  background: var(--paper-deep);
  touch-action: pan-y;
}
.pd-gallery-main .pd-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}
.pd-gallery-main .pd-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.pd-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.pd-gallery-main.zoomed .pd-track {
  transition: none;
}
.pd-gallery-main.zoomed img {
  transform: scale(2);
  cursor: zoom-out;
}
.pd-lens {
  position: absolute;
  border: 2px solid var(--gold);
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
  display: none;
  border-radius: 8px;
}
.pd-zoom-panel {
  position: absolute;
  top: 0;
  left: calc(100% + 20px);
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background-repeat: no-repeat;
  display: none;
  z-index: 5;
}
@media (min-width: 1180px) {
  .pd-gallery-main:hover .pd-lens,
  .pd-gallery-main:hover .pd-zoom-panel {
    display: block;
  }
}
.pd-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  box-shadow: var(--shadow);
}
.pd-gallery-nav.prev {
  left: 12px;
}
.pd-gallery-nav.next {
  right: 12px;
}
.pd-gallery-nav svg {
  width: 18px;
  height: 18px;
}
.pd-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 4;
}
.pd-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0;
}
.pd-dots button.active {
  background: var(--white);
  width: 20px;
  border-radius: 4px;
}
.pd-zoom-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(23, 20, 15, 0.55);
  color: var(--white);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 4;
  pointer-events: none;
}
.pd-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.pd-thumbs button {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  width: 70px;
  height: 90px;
  padding: 0;
  background: none;
}
.pd-thumbs button.active {
  border-color: var(--gold);
}
.pd-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Spec table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.spec-table tr {
  border-bottom: 1px solid var(--line);
}
.spec-table tr:last-child {
  border-bottom: none;
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: 10px 4px;
  vertical-align: top;
}
.spec-table th {
  width: 32%;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Sticky mobile buy bar */
.pd-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -6px 20px rgba(23, 20, 15, 0.08);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.pd-sticky-bar.show {
  transform: translateY(0);
}
.pd-sticky-bar .price {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  white-space: nowrap;
}
.pd-sticky-bar .btn {
  flex: 1;
  min-height: 48px;
}
@media (min-width: 860px) {
  .pd-sticky-bar {
    display: none;
  }
}
@media (max-width: 859px) {
  #pdRoot {
    padding-bottom: 84px;
  }
}
.pd-info .cat {
  color: var(--jade);
  font-weight: 700;
  font-size: 0.8rem;
}
.pd-info h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 8px 0 10px;
}
.pd-info .en {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 14px;
  display: block;
}
.pd-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--wine);
  margin: 10px 0 18px;
}
.pd-desc {
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.pd-block {
  margin-bottom: 20px;
}
.pd-block h4 {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.size-opt {
  min-width: 48px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-weight: 600;
  font-size: 0.88rem;
}
.size-opt.active {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty-control button {
  width: 48px;
  height: 48px;
  background: var(--white);
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
}
.qty-control button:hover {
  background: var(--blush);
}
.qty-control span {
  min-width: 40px;
  text-align: center;
  font-weight: 700;
}
.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.pd-actions .btn {
  flex: 1;
  min-width: 160px;
}
.pd-note {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper-deep);
  padding: 12px 14px;
  border-radius: 12px;
}
.pd-note svg {
  width: 20px;
  height: 20px;
  color: var(--jade);
  flex-shrink: 0;
}

/* ---------- Cart page ---------- */
.cart-wrap {
  padding: 24px 0 70px;
  display: grid;
  gap: 30px;
}
@media (min-width: 900px) {
  .cart-wrap {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
  }
}
.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item img {
  width: 84px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}
.cart-item h3 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}
.cart-item .meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.cart-item .price {
  font-weight: 700;
  color: var(--wine);
  margin-top: 6px;
}
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.remove-btn {
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-decoration: underline;
  min-height: 44px;
  padding: 0 4px;
}
.remove-btn:hover {
  color: var(--wine);
}
.summary-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  position: sticky;
  top: 90px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 14px;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.1rem;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.empty-state svg {
  width: 60px;
  height: 60px;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ---------- Checkout page ---------- */
.checkout-wrap {
  padding: 24px 0 70px;
  display: grid;
  gap: 30px;
}
@media (min-width: 900px) {
  .checkout-wrap {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}
.checkout-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}
.checkout-section h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.pay-options {
  display: grid;
  gap: 12px;
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
}
.pay-option:hover {
  border-color: var(--gold);
}
.pay-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--wine);
}
.pay-option svg {
  width: 26px;
  height: 26px;
  color: var(--wine);
  flex-shrink: 0;
}
.pay-option .t1 {
  font-weight: 700;
  font-size: 0.95rem;
}
.pay-option .t2 {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.pay-option.selected {
  border-color: var(--wine);
  background: var(--blush);
}
.order-line {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.order-line img {
  width: 50px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}
.order-line .name {
  font-weight: 600;
}
.order-line .meta {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  padding: 30px 0 10px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------- Confirmation ---------- */
.confirm-box {
  text-align: center;
  padding: 60px 20px;
  max-width: 560px;
  margin: 0 auto;
}
.confirm-box svg {
  width: 64px;
  height: 64px;
  color: var(--gold);
  margin-bottom: 18px;
}
.confirm-box h2 {
  margin-bottom: 10px;
}
.confirm-box p {
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.order-id-box {
  display: inline-block;
  background: var(--paper-deep);
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

/* Scrollbar niceties for chip row */
.chip-row::-webkit-scrollbar {
  height: 6px;
}
.chip-row::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

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


/* ---------- ECPay payment ---------- */
.payment-security-note{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:14px 16px;
  margin:0 0 14px;
  border:1px solid rgba(164,132,67,.26);
  background:rgba(164,132,67,.07);
  border-radius:12px;
}
.payment-security-note strong{
  font-size:.88rem;
  color:var(--ink);
}
.payment-security-note span{
  color:var(--muted);
  font-size:.79rem;
  line-height:1.65;
}
.payment-loading{
  opacity:.65;
  pointer-events:none;
}

.form-help{font-size:.82rem;color:var(--muted);margin:4px 0 0;line-height:1.6}
.contact-list a,.brand-link-list a{color:inherit}.contact-list a:hover,.brand-link-list a:hover{color:var(--wine)}
.contact-list select,.auth-form select,.auth-form input,.auth-form textarea{width:100%}
.auth-page,.dashboard-page,.contact-page{min-height:75vh;padding:80px 0;background:var(--paper)}
.auth-grid{display:grid;grid-template-columns:1fr .9fr;gap:70px;align-items:center}
.auth-intro h1,.dashboard-page h1,.contact-page h1,.admin-page h1{font-family:"Noto Serif TC",serif;font-size:clamp(2.2rem,5vw,4rem);margin:.2em 0}
.auth-intro p{color:var(--muted);line-height:1.9;max-width:560px}
.auth-benefits{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}.auth-benefits span{border:1px solid var(--line);border-radius:999px;padding:9px 13px;background:#fff;font-size:.82rem}
.auth-card,.dash-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:30px;box-shadow:0 18px 55px rgba(60,48,28,.06)}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line);margin-bottom:24px}.auth-tab{border:0;background:none;padding:13px;font-weight:700;color:var(--muted);cursor:pointer}.auth-tab.active{color:var(--ink);border-bottom:2px solid var(--gold)}
.auth-form{display:grid;gap:16px}.auth-form label{display:grid;gap:7px;font-size:.86rem;font-weight:600}
.auth-form input,.auth-form textarea,.auth-form select,.inline-form input{border:1px solid var(--line);background:#fff;border-radius:10px;padding:13px 14px;font:inherit;color:var(--ink);outline:none}
.auth-form input:focus,.auth-form textarea:focus,.auth-form select:focus,.inline-form input:focus{border-color:var(--gold)}
.auth-admin-link{text-align:center;margin-top:20px;font-size:.8rem;color:var(--muted)}
.dash-heading{display:flex;justify-content:space-between;gap:24px;align-items:end;margin-bottom:30px}.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.dash-card h2{font-family:"Noto Serif TC",serif;margin-top:0}.data-list{display:grid;gap:12px}
.data-item,.message-item{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fcfaf6}.data-item{display:flex;justify-content:space-between;gap:18px}.data-item>div{display:flex;flex-direction:column;gap:4px}.data-item small,.message-item small{color:var(--muted)}.data-right{text-align:right}
.message-head{display:flex;justify-content:space-between;gap:10px}.message-item p{line-height:1.75;color:#57524b}.admin-reply{margin:14px 0;padding:14px;background:#f2ecdf;border-left:3px solid var(--gold);border-radius:8px}.admin-reply p{margin:5px 0 0}
.status-pill{display:inline-flex;align-items:center;width:max-content;padding:5px 9px;border-radius:999px;background:#eee7da;font-size:.72rem;color:#5f533e}
.empty-state{padding:24px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:14px}.account-actions{display:flex;gap:12px;margin-top:24px}
.brand-link-list{display:grid;gap:10px}.brand-link-list a{display:flex;flex-direction:column;gap:4px;padding:15px;border:1px solid var(--line);border-radius:12px;background:#fcfaf6}.brand-link-list span{color:var(--muted);font-size:.85rem}
.admin-body{background:#f4f0e8}.admin-topbar{position:sticky;top:0;z-index:20;background:#17140f;color:#fff}.admin-topbar .container{height:66px;display:flex;align-items:center;justify-content:space-between}
.admin-brand{font-family:"Noto Serif TC",serif;font-weight:700}.admin-brand span{color:var(--gold-light);font-size:.75rem;margin-left:8px}.admin-topbar a,.admin-topbar button{color:#fff;background:none;border:0;margin-left:18px;cursor:pointer}
.admin-page{padding:50px 0 100px}.admin-gate{max-width:560px;margin:40px auto}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:25px}
.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px;display:flex;flex-direction:column;gap:6px}.stat-card strong{font-size:2rem;font-family:Georgia,serif}.stat-card span{color:var(--muted);font-size:.8rem}
.admin-tabs{display:flex;gap:6px;margin-bottom:16px;overflow:auto}.admin-tabs button{border:1px solid var(--line);background:#fff;padding:10px 15px;border-radius:999px;cursor:pointer;font-weight:700;white-space:nowrap}.admin-tabs button.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.admin-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.panel-head h2{font-family:"Noto Serif TC",serif;margin:0}
.admin-table-wrap{overflow:auto}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{text-align:left;border-bottom:1px solid var(--line);padding:12px;font-size:.82rem;vertical-align:top}.admin-table th{color:var(--muted);font-weight:700}
.admin-message-row{border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:12px;background:#fcfaf6}.admin-message-meta{display:flex;gap:8px;flex-direction:column}.admin-message-meta span,.admin-message-meta small{color:var(--muted);font-size:.78rem}.admin-message-row>p{line-height:1.75}
.admin-reply-edit{display:grid;grid-template-columns:1fr 130px auto;gap:10px;align-items:end}.admin-reply-edit textarea,.admin-reply-edit select{border:1px solid var(--line);border-radius:9px;padding:10px;font:inherit;background:#fff}
.inline-form{padding:16px;background:#f8f4ed;border-radius:12px;margin-bottom:18px}.mini-grid{display:grid;grid-template-columns:1fr 1.3fr 1fr auto;gap:10px}.btn-sm{padding:9px 14px;min-height:auto}.btn-xs{padding:6px 9px;font-size:.72rem;min-height:auto}
@media(max-width:800px){.auth-grid,.account-grid{grid-template-columns:1fr}.auth-page,.dashboard-page,.contact-page{padding:45px 0}.auth-grid{gap:30px}.dash-heading{align-items:flex-start;flex-direction:column}.stat-grid{grid-template-columns:repeat(2,1fr)}.admin-reply-edit,.mini-grid{grid-template-columns:1fr}.account-actions{flex-direction:column}}
