:root {
  --green-950: #10291f;
  --green-900: #183b2b;
  --green-800: #234b38;
  --green-700: #356247;
  --sage: #9eaa92;
  --cream: #f3eee2;
  --paper: #fbf9f4;
  --white: #fff;
  --ink: #24251f;
  --muted: #686b62;
  --gold: #b89553;
  --line: rgba(31, 54, 42, .14);
  --serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --shadow: 0 24px 70px rgba(20, 46, 34, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.is-dialog-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: #fff;
  padding: .7rem 1rem;
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 5rem);
  background: rgba(251, 249, 244, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--serif); font-size: 1.08rem; letter-spacing: .18em; }
.brand small { margin-top: .24rem; color: var(--green-700); font-size: .58rem; letter-spacing: .13em; }
.site-header nav { display: flex; align-items: center; gap: clamp(.75rem, 2.3vw, 2rem); }
.site-header nav a { font-size: .92rem; text-decoration: none; }
.site-header nav a:hover { color: var(--green-700); }
.nav-contact {
  padding: .48rem .95rem;
  color: var(--white);
  background: var(--green-900);
  border-radius: 999px;
}
.site-header nav .nav-contact:hover { color: #fff; background: var(--green-700); }

.hero {
  position: relative;
  min-height: min(790px, calc(100vh - 82px));
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  background: var(--cream);
}
.hero-image {
  min-height: 690px;
  background:
    linear-gradient(90deg, transparent 70%, rgba(243, 238, 226, .65) 100%),
    url("assets/brand/tea-garden.jpg") center / cover no-repeat;
}
.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3.5rem, 8vw, 8rem) clamp(1.4rem, 6vw, 6.5rem);
}
.edition-label {
  position: absolute;
  top: 2rem;
  right: 2rem;
  padding: .32rem .72rem;
  border: 1px solid rgba(24, 59, 43, .28);
  border-radius: 999px;
  color: var(--green-800);
  font-size: .7rem;
  letter-spacing: .08em;
}
.eyebrow {
  margin: 0 0 .8rem;
  color: var(--green-700);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .18em;
}
h1, h2 { font-family: var(--serif); font-weight: 600; }
h1 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(2.75rem, 5.5vw, 5.6rem);
  line-height: 1.15;
  letter-spacing: .02em;
}
.hero-intro {
  max-width: 34rem;
  margin: 1.65rem 0 2.1rem;
  color: #50534c;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
}
.hero-actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.25rem;
  border: 1px solid var(--green-900);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--green-900); }
.button-quiet { color: var(--green-900); background: transparent; }

.compatibility {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.5rem clamp(1rem, 6vw, 6rem);
  color: #fff;
  background: var(--green-900);
}
.compatibility div {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,.16);
}
.compatibility div:last-child { border-right: 0; }
.compatibility strong { font-family: var(--serif); font-size: 1.45rem; }
.compatibility span { color: rgba(255,255,255,.72); font-size: .78rem; }

.products-section { padding: clamp(4.5rem, 9vw, 8.5rem) clamp(.9rem, 6vw, 6rem); }
.section-heading {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}
.section-heading h2, .origin-copy h2, .story-copy h2, .contact-section h2 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  line-height: 1.2;
}
.section-heading > p { max-width: 31rem; margin: 0; color: var(--muted); font-size: .92rem; }
.filters {
  max-width: 1200px;
  margin: 0 auto 1.4rem;
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto;
  padding: .58rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-800);
  background: transparent;
  cursor: pointer;
}
.filter.is-active { color: #fff; border-color: var(--green-900); background: var(--green-900); }

.product-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.75rem, 2.2vw, 1.8rem);
}
.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 12px 38px rgba(25, 51, 38, .05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-card-image { position: relative; aspect-ratio: 1; overflow: hidden; background: #f1ece3; }
.product-card-image { display: block; text-decoration: none; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-card-image img { transform: scale(1.025); }
.card-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  padding: .26rem .55rem;
  color: #fff;
  background: rgba(16, 41, 31, .88);
  border-radius: 999px;
  font-size: .68rem;
  letter-spacing: .06em;
}
.product-card-copy { padding: clamp(.85rem, 2.5vw, 1.45rem); }
.product-type { margin: 0 0 .3rem; color: var(--green-700); font-size: .7rem; letter-spacing: .08em; }
.product-card h3 { min-height: 2.8em; margin: 0; font-family: var(--serif); font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.4; }
.product-card h3 a { text-decoration: none; }
.product-meta { min-height: 1.55em; margin: .45rem 0 .7rem; color: var(--muted); font-size: clamp(.72rem, 1.4vw, .88rem); }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.price { color: var(--green-950); font-size: clamp(.96rem, 1.7vw, 1.2rem); font-weight: 700; }
.product-open {
  display: inline-block;
  padding: .44rem .72rem;
  border: 0;
  border-bottom: 1px solid var(--green-800);
  color: var(--green-800);
  background: transparent;
  cursor: pointer;
  font-size: .8rem;
  text-decoration: none;
}
.product-count { max-width: 1200px; margin: 1rem auto 0; color: var(--muted); text-align: right; font-size: .78rem; }

.origin-section, .story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.origin-section { background: var(--green-950); }
.origin-photo { min-height: 680px; overflow: hidden; }
.origin-photo img { width: 100%; height: 100%; object-fit: cover; }
.origin-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 7.5rem);
  color: rgba(255,255,255,.76);
}
.origin-copy .eyebrow { color: #c6d0b9; }
.origin-copy h2 { color: #fff; }
.origin-copy > p:not(.eyebrow) { max-width: 34rem; }
.origin-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.5rem 0 0; }
.origin-facts div { padding: 1rem; border: 1px solid rgba(255,255,255,.13); border-radius: .85rem; }
.origin-facts dt { color: rgba(255,255,255,.55); font-size: .72rem; }
.origin-facts dd { margin: .18rem 0 0; color: #fff; font-family: var(--serif); }

.story-section { background: var(--cream); }
.story-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 7.5rem);
}
.story-copy > p:not(.eyebrow) { max-width: 31rem; color: var(--muted); }
.text-link { width: max-content; margin-top: 1rem; color: var(--green-800); text-decoration: none; border-bottom: 1px solid currentColor; }
.story-section > img { width: 100%; height: 100%; min-height: 660px; object-fit: cover; }

.contact-section { padding: clamp(4.5rem, 9vw, 8rem) clamp(1rem, 6vw, 6rem); }
.contact-section > div:first-child { max-width: 1200px; margin: 0 auto 2rem; }
.contact-section > div:first-child > p:last-child { max-width: 42rem; color: var(--muted); }
.contact-cards { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.contact-cards article { min-height: 190px; display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.contact-cards span { color: var(--green-700); font-size: .75rem; letter-spacing: .08em; }
.contact-cards strong { margin: auto 0 .5rem; font-family: var(--serif); font-size: 1.15rem; }
.contact-cards small { color: var(--muted); }
.contact-cards a { width: max-content; color: var(--green-700); font-size: .85rem; }
.wechat-card {
  grid-row: span 2;
  min-height: 560px !important;
  display: grid !important;
  grid-template-columns: minmax(210px, .9fr) 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
  color: #fff;
  background: var(--green-950) !important;
}
.wechat-card img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: .8rem;
  background: #fff;
}
.wechat-card div { display: flex; flex-direction: column; }
.wechat-card span { color: #c6d0b9; }
.wechat-card strong { margin: .8rem 0; color: #fff; font-size: clamp(1.35rem, 2.5vw, 2.15rem); line-height: 1.35; }
.wechat-card small { color: rgba(255,255,255,.66); }
.website-card { color: #fff; background: var(--green-800) !important; }
.website-card span, .website-card small { color: rgba(255,255,255,.7); }
.website-card strong { color: #fff; font-size: clamp(1.4rem, 2.8vw, 2.2rem); }
.website-card a {
  margin-top: .85rem;
  padding-bottom: .1rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.65);
}

.detail-main { padding: clamp(1.2rem, 4vw, 3.5rem) clamp(.85rem, 5vw, 5rem) clamp(4rem, 8vw, 8rem); }
.detail-breadcrumb {
  max-width: 1200px;
  margin: 0 auto 1rem;
  color: var(--muted);
  font-size: .82rem;
}
.detail-breadcrumb a { color: var(--green-700); text-decoration: none; }
.detail-hero {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: var(--shadow);
}
.detail-gallery { padding: clamp(.7rem, 2vw, 1.3rem); background: #eee8dc; }
.detail-primary-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 1rem; background: #fff; }
.detail-thumbnails { display: flex; gap: .6rem; margin-top: .7rem; overflow-x: auto; }
.detail-thumbnail {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: .65rem;
  background: #fff;
  cursor: pointer;
}
.detail-thumbnail.is-active { border-color: var(--green-800); }
.detail-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 4rem); }
.detail-copy h1 { font-size: clamp(2rem, 4vw, 4.2rem); }
.detail-price { margin: 1rem 0 0; color: var(--green-800); font-size: clamp(1.35rem, 2.4vw, 2rem); font-weight: 700; }
.detail-spec { margin: .3rem 0 1.4rem; color: var(--muted); }
.detail-description { color: #4f534c; white-space: pre-line; }
.detail-attributes {
  display: grid;
  gap: .7rem;
  margin: 1.4rem 0 0;
}
.detail-attributes > div {
  display: grid;
  grid-template-columns: minmax(3.5rem, .3fr) 1fr;
  gap: .9rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(24,59,43,.14);
}
.detail-attributes dt { color: var(--green-800); font-weight: 700; }
.detail-attributes dd { margin: 0; color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.detail-source-note { margin-top: 1.2rem; color: var(--muted); font-size: .78rem; }
.product-content-section {
  width: min(100%, 980px);
  margin: clamp(3rem, 7vw, 6rem) auto;
}
.product-content-heading {
  max-width: 760px;
  margin: 0 auto 1.8rem;
  text-align: center;
}
.product-content-heading h2 {
  margin: 0;
  color: var(--green-950);
  font-size: clamp(2rem, 4vw, 3.6rem);
}
.product-content-heading p:last-child { color: var(--muted); }
.product-content-images {
  display: grid;
  gap: clamp(.7rem, 2vw, 1.5rem);
}
.product-content-images img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(.6rem, 1.5vw, 1.2rem);
  background: #fff;
  box-shadow: 0 16px 50px rgba(24,59,43,.08);
}
.product-content-text {
  padding: clamp(1.3rem, 4vw, 3rem);
  color: #3f463f;
  line-height: 1.9;
  white-space: pre-line;
  background: #fff;
  border: 1px solid rgba(24,59,43,.11);
  border-radius: 1.2rem;
  box-shadow: 0 16px 50px rgba(24,59,43,.08);
}
.detail-info {
  max-width: 1200px;
  margin: clamp(2.5rem, 6vw, 5rem) auto 0;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(1.2rem, 4vw, 4rem);
  align-items: center;
}
.detail-info-copy { padding: clamp(.5rem, 3vw, 2rem); }
.detail-info-copy h2, .related-section h2 { margin: 0; color: var(--green-950); font-size: clamp(1.8rem, 3vw, 3.2rem); }
.detail-info-copy p { color: var(--muted); }
.detail-wechat {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1rem, 3vw, 2rem);
  color: #fff;
  background: var(--green-950);
  border-radius: 1.2rem;
}
.detail-wechat img { width: 100%; border-radius: .7rem; }
.detail-wechat strong { display: block; margin-bottom: .5rem; font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 2rem); }
.detail-wechat p { margin: 0; color: rgba(255,255,255,.68); }
.related-section { max-width: 1200px; margin: clamp(3.5rem, 8vw, 7rem) auto 0; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.3rem; }
.related-card { overflow: hidden; border: 1px solid var(--line); border-radius: .9rem; background: #fff; text-decoration: none; }
.related-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.related-card div { padding: .8rem; }
.related-card strong { display: block; font-family: var(--serif); }
.related-card small { color: var(--green-700); }
.detail-error { max-width: 760px; margin: 10vh auto; padding: 3rem; text-align: center; }

footer { padding: 2.8rem 1rem; color: rgba(255,255,255,.72); background: var(--green-950); text-align: center; }
.footer-brand { color: #fff; font-family: var(--serif); font-size: 1.5rem; text-decoration: none; letter-spacing: .2em; }
footer p { margin: .5rem 0; }

.product-dialog {
  width: min(960px, calc(100% - 2rem));
  max-height: min(760px, calc(100vh - 2rem));
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 1.3rem;
  background: var(--paper);
  box-shadow: 0 30px 120px rgba(0,0,0,.38);
}
.product-dialog::backdrop { background: rgba(8, 23, 17, .72); backdrop-filter: blur(6px); }
.dialog-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 41, 31, .86);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}
.dialog-layout { display: grid; grid-template-columns: 1fr 1fr; }
.dialog-layout > img { width: 100%; height: 100%; min-height: 570px; object-fit: cover; }
.dialog-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 3.5rem); }
.dialog-copy h2 { margin: 0; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.25; }
.dialog-price { margin: 1rem 0; color: var(--green-800); font-size: 1.35rem; font-weight: 700; }
.dialog-note { margin: 1rem 0 1.5rem; padding: .85rem; color: var(--muted); background: #eee9de; border-radius: .7rem; font-size: .82rem; }

@media (max-width: 820px) {
  .site-header { height: 68px; padding: 0 .85rem; }
  .brand img { width: 42px; height: 42px; }
  .brand span { display: none; }
  .site-header nav { gap: .75rem; }
  .site-header nav a { font-size: .78rem; }
  .nav-contact { padding: .36rem .65rem; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-image { min-height: 52vh; background-position: center; }
  .hero-copy { padding: 3rem 1.1rem 4rem; }
  .edition-label { position: static; width: max-content; margin-bottom: 1.8rem; }
  .compatibility { grid-template-columns: 1fr 1fr; padding: .75rem; }
  .compatibility div:nth-child(2) { border-right: 0; }
  .compatibility div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.16); }
  .section-heading { display: block; }
  .section-heading > p { margin-top: .8rem; }
  .origin-section, .story-section { grid-template-columns: 1fr; }
  .origin-photo { min-height: 420px; }
  .story-copy { order: 2; }
  .story-section > img { min-height: 420px; }
  .contact-cards { grid-template-columns: 1fr; }
  .wechat-card { grid-row: auto; grid-template-columns: minmax(170px, .8fr) 1fr; min-height: 420px !important; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-layout > img { min-height: auto; aspect-ratio: 1; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-info { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  h1 { font-size: 2.55rem; }
  .products-section { padding-left: .7rem; padding-right: .7rem; }
  .product-grid { gap: .55rem; }
  .product-card { border-radius: .85rem; }
  .product-card-copy { padding: .72rem; }
  .product-card h3 { min-height: 3.9em; font-size: .94rem; }
  .product-meta { min-height: 3em; font-size: .68rem; }
  .product-card-footer { align-items: end; }
  .product-open { padding: .3rem 0; white-space: nowrap; }
  .price { font-size: .9rem; }
  .card-badge { top: .45rem; left: .45rem; }
  .origin-facts { grid-template-columns: 1fr; }
  .wechat-card { display: flex !important; min-height: 0 !important; }
  .wechat-card img { width: min(100%, 310px); margin: 0 auto; }
  .wechat-card div { width: 100%; }
  .detail-main { padding-left: .55rem; padding-right: .55rem; }
  .detail-copy { padding: 1.25rem; }
  .detail-wechat { grid-template-columns: 1fr; }
  .detail-wechat img { width: min(100%, 300px); margin: 0 auto; }
  .product-dialog { width: calc(100% - .8rem); max-height: calc(100vh - .8rem); }
  .dialog-actions { flex-direction: column; }
}

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