
:root {
  --ink: #263229;
  --muted: #657066;
  --leaf: #3f6447;
  --line: #d8ddd4;
  --paper: #fbfaf5;
  --soft: #eef1e8;
  --gold: #b59a5a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, "Noto Sans TC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(214, 222, 205, .96);
  border-bottom: 1px solid #aebba7;
  backdrop-filter: blur(12px);
}
.topbar nav { margin-left: auto; }
.brand {
  font-weight: 700;
  text-decoration: none;
  font-size: 26px;
}
nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}
nav a, nav button {
  color: inherit;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.nav-menu { position: relative; }
.category-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 160px;
  display: none;
  padding: 8px;
  background: #d6decd;
  border: 1px solid #9dac93;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(38, 50, 41, .14);
}
.category-menu.open { display: grid; gap: 4px; }
.category-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
}
.category-menu button:hover { background: #c5d0bd; color: var(--leaf); }
.category-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.category-links a {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--ink);
  background: var(--soft);
  background-size: cover;
  background-position: center;
  text-decoration: none;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(38, 50, 41, .08);
}
.category-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(251, 250, 245, .72);
}
.category-links a span {
  position: relative;
  z-index: 1;
}
.category-links a:hover {
  border-color: var(--gold);
  color: var(--leaf);
  transform: translateY(-2px);
}
.nav-search {
  display: flex;
  align-items: center;
  min-width: min(320px, 38vw);
}
.nav-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: white;
  font: inherit;
}
.nav-search button {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 9px 14px;
  color: var(--leaf);
  background: #f6f7f1;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-search button:hover {
  border-color: var(--gold);
  color: var(--ink);
}
.hero {
  min-height: 58vh;
  display: grid;
  align-items: end;
  padding: 80px clamp(18px, 6vw, 96px);
  background:
    linear-gradient(90deg, rgba(251,250,245,.95), rgba(251,250,245,.7), rgba(251,250,245,.25)),
    url("assets/hero-tea.svg");
  background-size: cover;
  background-position: center;
}
.hero > div { max-width: 680px; }
.eyebrow {
  color: var(--leaf);
  font-weight: 700;
  margin: 0 0 8px;
}
h1, h2 { line-height: 1.18; margin: 0 0 14px; }
h1 { font-size: clamp(40px, 7vw, 82px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
.hero p { font-size: 18px; color: var(--muted); }
.section {
  padding: 72px clamp(18px, 6vw, 96px);
}
.product-page { min-height: calc(100vh - 72px); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head p { max-width: 360px; color: var(--muted); margin: 0; }
.empty-state {
  margin: 28px 0 0;
  color: var(--muted);
}
.text-link {
  color: var(--leaf);
  font-weight: 700;
  text-decoration: none;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.featured-section .product-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.product-page .product-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.product-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform .18s ease, border-color .18s ease;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.product-card div { padding: 18px; }
.product-card h3 { margin: 0 0 8px; font-size: 21px; }
.product-card p { margin: 6px 0; color: var(--muted); }
.price { color: var(--leaf); font-weight: 700; }
.stock { color: var(--gold); font-weight: 700; }
.badge {
  display: inline-block;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 9px;
  color: #6f5520;
  background: #f3ead2;
  font-size: 13px;
  font-weight: 700;
}
.contact {
  padding: 56px clamp(18px, 6vw, 96px);
  background: var(--soft);
}
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0;
}
.contact-list a, .contact-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 14px;
}
.product-dialog {
  width: min(1000px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
}
.product-dialog::backdrop { background: rgba(28, 36, 30, .58); }
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: white;
  font-size: 28px;
  cursor: pointer;
}
.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
  gap: 28px;
  padding: 28px;
}
.image-viewer {
  position: relative;
}
.dialog-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
  cursor: zoom-in;
}
.image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 8px;
  color: white;
  background: rgba(38, 50, 41, .5);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.image-nav:hover { background: rgba(38, 50, 41, .72); }
.image-prev { left: 10px; }
.image-next { right: 10px; }
.image-nav[hidden] { display: none; }
.thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 12px;
}
.thumbs button {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.thumbs img {
  width: 82px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.thumbs button.active { border-color: var(--gold); }
.share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.share-button,
.share-link {
  min-width: 132px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.share-button {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.share-feedback {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.image-lightbox {
  width: min(1200px, calc(100vw - 24px));
  max-width: 1200px;
  border: 0;
  padding: 0;
  background: transparent;
}
.image-lightbox::backdrop { background: rgba(12, 16, 14, .86); }
.lightbox-image {
  width: 100%;
  max-height: calc(100vh - 36px);
  object-fit: contain;
  display: block;
}
@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  nav { width: 100%; flex-wrap: wrap; }
  .topbar nav { margin-left: 0; }
  .nav-search { width: 100%; min-width: 100%; }
  .category-menu { left: 0; right: auto; }
  .category-links,
  .featured-section .product-grid,
  .product-page .product-grid {
    grid-template-columns: 1fr 1fr;
  }
  .section-head { display: block; }
  .dialog-body { grid-template-columns: 1fr; padding: 18px; }
  .hero { min-height: 50vh; }
}
