/* ════════════════════════════════════════════════════════
   Bear Fruit — shared styles for products.html / product.html
════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream-50);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { background: none; border: none; cursor: pointer; padding: 0; }

:root {
  --green-dk:  #2E4528;
  --green-md:  #3D5C35;
  --green-pr:  #567A4D;
  --cream-50:  #FEFCF8;
  --cream-100: #FAF6EF;
  --cream-200: #F0E9DC;
  --gold:      #C9A46B;
  --ink:       #1A1A18;
  --ink-mid:   #3D3D3A;
  --ink-muted: #6B6B64;
  /* Display serif — Latin in Marcellus; CJK falls back to Noto Serif TC */
  --serif: 'Marcellus', 'Noto Serif TC', 'Times New Roman', serif;
  /* Body — humanist grotesque; CJK glyphs fall back to the Chinese serif */
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, 'Noto Serif TC', sans-serif;
  /* Chinese serif — correct Traditional-Chinese coverage for Hong Kong */
  --cjk:  'Noto Serif TC', serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-page: clamp(24px, 6vw, 80px);
}
html[lang="zh-HK"] { --sans: 'Noto Serif TC', 'Hanken Grotesk', sans-serif; }

/* ── Shared typography ── */
.eyebrow {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--green-pr);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.2vw, 3.5rem); font-weight: 400;
  line-height: 1.06; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance;
}
.rule { width: 38px; height: 1px; background: var(--gold); }
.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green-pr);
  transition: gap 0.25s var(--ease);
}
.text-link:hover { gap: 18px; }
.btn-solid {
  display: inline-block; font-size: 0.71rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: #fff;
  background: var(--green-md); padding: 16px 40px; white-space: nowrap;
  transition: background 0.25s;
}
.btn-solid:hover { background: var(--green-dk); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; } .d3 { transition-delay: 0.3s; }

/* ════════════════ NAV (solid white) ════════════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad-page); background: #fff;
  transition: padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.scrolled { padding-top: 13px; padding-bottom: 13px; box-shadow: 0 1px 20px rgba(0,0,0,0.08); }
.nav__right { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); }
.nav__logo { height: 30px; width: auto; filter: brightness(0); }
.nav__links { display: flex; align-items: center; gap: clamp(22px, 2vw, 34px); }
.nav__links a {
  font-size: 0.71rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mid); opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
}
.nav__links a:hover { opacity: 1; color: var(--green-pr); }
.lang-toggle { display: flex; align-items: center; justify-content: center; color: var(--ink-mid); opacity: 0.85; padding: 4px; line-height: 0; transition: color 0.2s, opacity 0.2s; }
.lang-toggle:hover { opacity: 1; color: var(--green-pr); }
.nav__order {
  font-size: 0.71rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mid); opacity: 0.85; white-space: nowrap;
  transition: color 0.2s, opacity 0.2s;
}
.nav__order:hover { opacity: 1; color: var(--green-pr); }

/* Mobile menu */
.nav__burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 28px; height: 28px; z-index: 320; }
.nav__burger span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.2s var(--ease), background 0.3s var(--ease); }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 190; background: var(--green-dk);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a { font-size: 1.05rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.85); transition: color 0.2s; }
.mobile-menu a:hover { color: #fff; }
.mobile-menu__order { margin-top: 6px; border: 1px solid rgba(255,255,255,0.5); padding: 13px 34px; color: #fff !important; }
body.menu-open { overflow: hidden; }
body.menu-open .nav__order { opacity: 0; pointer-events: none; }
body.menu-open .nav__burger span { background: #fff; }

/* ════════════════ PRODUCT LISTING ════════════════ */
.catalog { padding: clamp(120px, 16vh, 180px) var(--pad-page) clamp(72px, 10vw, 130px); }
.catalog__head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; margin-bottom: clamp(48px, 7vw, 84px); }
.catalog__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.5vw, 56px) clamp(20px, 2.5vw, 40px);
  max-width: 1200px; margin: 0 auto;
}
.pcard { display: block; color: inherit; }
.pcard__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: #b8cdb4; }
.pcard__media .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px; }
.pcard__media .ph::after { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(255,255,255,0.4); }
.pcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), opacity 1.2s var(--ease); }
.pcard:hover .pcard__img { transform: scale(1.05); }
.pcard__slideshow .pcard__img { opacity: 0; }
.pcard__slideshow .pcard__img.is-active { opacity: 1; }
.pcard__body { padding: 18px 4px 0; text-align: center; }
.pcard__name { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; letter-spacing: 0; color: var(--ink); transition: color 0.2s; }
.pcard:hover .pcard__name { color: var(--green-pr); }
.pcard__desc { display: block; margin-top: 7px; font-size: 0.76rem; font-weight: 300; line-height: 1.65; color: var(--ink-muted); }

/* Placeholder label chips (shared with listing + detail) */
.ph-label { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.92); background: rgba(0,0,0,0.28); padding: 6px 12px; border-radius: 2px; }
.ph-spec { font-size: 0.58rem; font-weight: 300; color: rgba(255,255,255,0.72); line-height: 1.5; }

/* ════════════════ PRODUCT DETAIL ════════════════ */
/* Immersive: photo fills the left 65% at full height; info on the right 35% */
.pd-hero {
  display: grid; grid-template-columns: 65% 35%;
  align-items: stretch; min-height: 100vh;
}
.pd-hero__media { position: relative; min-height: 100vh; overflow: hidden; background: #b8cdb4; }
.pd-hero__media .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; }
.pd-hero__media .ph::after { content: ''; position: absolute; inset: 14px; border: 1px dashed rgba(255,255,255,0.4); }
.pd-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s var(--ease); }
.pd-hero__img.is-active { opacity: 1; }
.pd-hero__info {
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: clamp(96px, 13vh, 140px) clamp(36px, 4.5vw, 76px) clamp(50px, 8vh, 90px);
}
.pd-name { font-family: var(--serif); font-size: clamp(2.2rem, 4.2vw, 3.2rem); font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; color: var(--ink); }
.pd-name-cjk { display: block; font-family: var(--cjk); font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--ink-muted); letter-spacing: 0.1em; margin-top: 8px; }
.pd-desc { font-size: clamp(0.95rem, 1.3vw, 1.05rem); font-weight: 300; line-height: 2; color: var(--ink-mid); max-width: 46ch; }
.pd-flavours { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.pd-flavour { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-pr); border: 1px solid var(--cream-200); background: var(--cream-100); padding: 8px 16px; border-radius: 100px; }
.pd-badge { align-self: flex-start; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; background: var(--gold); padding: 6px 14px; border-radius: 100px; }
.pd-note { font-size: 1rem; font-weight: 300; color: var(--ink-muted); }
.pcard__badge { position: absolute; top: 12px; left: 12px; z-index: 3; font-size: 0.58rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; background: var(--gold); padding: 6px 12px; border-radius: 100px; }

/* Packaging section */
.pd-pack { background: var(--cream-100); padding: clamp(72px, 10vw, 130px) var(--pad-page); }
.pd-pack__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(36px, 5vw, 60px); }
.pd-pack__head { display: flex; flex-direction: column; gap: 14px; }
.pack-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(24px, 3vw, 44px); }
.pack-item { display: block; color: inherit; }
.pack-item__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: #b8cdb4; margin-bottom: 16px; }
.pack-item__media .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; }
.pack-item__media .ph::after { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(255,255,255,0.4); }
.pack-item__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.2s var(--ease); }
.pack-item__slideshow img { opacity: 0; }
.pack-item__slideshow img.is-active { opacity: 1; }
.pack-item__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pack-item__name { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: var(--ink); }
.pack-item__price { font-size: 0.95rem; font-weight: 500; color: var(--green-pr); white-space: nowrap; }

/* Related / all-products at the bottom of a detail page */
.pd-related { padding: clamp(72px, 10vw, 130px) var(--pad-page); text-align: center; }
.pd-related__head { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: clamp(40px, 6vw, 72px); }

/* ════════════════ FOOTER (Page-Top banner) ════════════════ */
.footer { background: var(--green-dk); color: #fff; padding: clamp(52px, 7vw, 96px) var(--pad-page) clamp(30px, 3.5vw, 44px); display: flex; flex-direction: column; align-items: center; gap: clamp(40px, 6vw, 72px); }
.footer__pagetop { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; color: rgba(255,255,255,0.65); transition: color 0.25s var(--ease); }
.footer__pagetop:hover { color: #fff; }
.footer__pagetop-arrow { display: block; transition: transform 0.3s var(--ease); }
.footer__pagetop:hover .footer__pagetop-arrow { transform: translateY(-4px); }
.footer__pagetop-line { position: relative; width: 1px; height: 52px; background: rgba(255,255,255,0.22); overflow: hidden; }
.footer__pagetop-line::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.85); transform: translateY(100%); animation: pagetop 2.4s var(--ease) infinite; }
@keyframes pagetop { 0% { transform: translateY(100%); } 55% { transform: translateY(-100%); } 100% { transform: translateY(-100%); } }
.footer__pagetop-text { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.footer__bar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 26px 48px; flex-wrap: wrap; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.footer__nav a { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer__nav a:hover { color: #fff; }
.footer__brand { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 26px); }
.footer__motto { font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 400; letter-spacing: 0.03em; color: rgba(255,255,255,0.9); white-space: nowrap; }
.footer__sep { color: rgba(255,255,255,0.28); font-weight: 200; font-size: 1.3em; }
.footer__logo-link { flex-shrink: 0; line-height: 0; }
.footer__logo { height: clamp(30px, 3vw, 44px); width: auto; filter: brightness(0) invert(1); opacity: 0.92; transition: opacity 0.2s; }
.footer__logo-link:hover .footer__logo { opacity: 1; }
.footer__copy { width: 100%; font-size: 0.61rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.3); border-top: 1px solid rgba(255,255,255,0.12); padding-top: clamp(20px, 2.5vw, 30px); }
@media (max-width: 720px) {
  .footer__bar { flex-direction: column; align-items: center; text-align: center; gap: 32px; }
  .footer__nav { justify-content: center; }
  .footer__brand { flex-direction: column; gap: 18px; }
  .footer__sep { display: none; }
  .footer__copy { text-align: center; }
}

/* ════════════════ ACCESSIBILITY ════════════════ */
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition-duration: 0.001s; }
  .pcard__img, .pd-hero__img { transition: opacity 0.4s ease; }
  .footer__pagetop-line::after { animation: none; opacity: 0; }
}

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__order { display: none; }
  .nav__burger { display: flex; }
  .catalog__grid { grid-template-columns: repeat(2, 1fr); }
  .pd-hero { grid-template-columns: 1fr; min-height: auto; }
  .pd-hero__media { min-height: unset; aspect-ratio: 4 / 5; }
  .pd-hero__info { padding: 40px var(--pad-page) 64px; }
}
@media (max-width: 560px) {
  .nav { padding: 14px 20px; }
  .nav__logo { height: 26px; }
  .nav__order { padding: 9px 16px; font-size: 0.63rem; }
  .catalog__grid { grid-template-columns: 1fr; max-width: 420px; }
  .pack-item { flex-direction: column; gap: 6px; }
}
