/* DongCheng Food Trade - site styles */
:root {
  --ink: #13283b;          /* deep navy, primary */
  --ink-2: #1d3a54;
  --ink-soft: #4a5d70;
  --muted: #6f7f8f;
  --line: #dfe3e7;
  --paper: #f7f5f1;        /* warm off-white */
  --card: #ffffff;
  --accent: #b07d2a;       /* brass */
  --accent-dark: #8e6420;
  --accent-tint: #f4ead8;
  --ok: #2f7a4f;
  --err: #b3402f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(19, 40, 59, .06), 0 6px 20px rgba(19, 40, 59, .06);
  --font-zh: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --font-en: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: var(--font-en), var(--font-zh);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---- Bilingual pattern: Chinese line on top, English line below ---- */
.zh { display: block; font-family: var(--font-zh); }
.en { display: block; font-family: var(--font-en); font-size: .82em; color: var(--muted); letter-spacing: .01em; }
.inline .zh, .inline .en { display: inline; }
.inline .en::before { content: " · "; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 40, 59, .9);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
/* Translucent frosted header: page content shows faintly through while scrolling */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    /* .88 (was .72): keeps the frosted look but the small English labels stay readable
       (>= 4.5:1) when the header passes over the cream sections. */
    background: rgba(19, 40, 59, .88);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
  }
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
/* Logo sits on a white badge: its blue/red artwork needs a light background. */
.brand-mark {
  display: grid; place-items: center;
  height: 50px; padding: 4px 10px; border-radius: 8px;
  background: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.1);
}
.brand-mark img { height: 42px; width: auto; display: block; }
@media (max-width: 560px) { .brand-mark { height: 44px; padding: 3px 8px; } .brand-mark img { height: 38px; } }
.brand-text .zh { font-weight: 700; font-size: 17px; line-height: 1.2; }
.brand-text .en { color: #b9c4cf; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; padding: 8px 14px; border-radius: 6px; text-align: center; line-height: 1.25;
}
.nav a .zh { font-size: 15px; font-weight: 500; }
.nav a .en { color: #9fb0c0; font-size: 11px; }
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,.08); }

.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2); text-decoration: none;
}
.cart-btn:hover { background: rgba(255,255,255,.08); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; display: grid; place-items: center;
}
.cart-count[data-empty="true"] { background: #4b6075; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: none; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; padding: 12px 24px; border-radius: 8px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.25; font-weight: 600;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn .en { font-weight: 500; font-size: 12px; color: inherit; opacity: .8; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #b9ab93; cursor: not-allowed; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-tint); }
.btn-sm { padding: 7px 14px; border-radius: 6px; }
.btn-sm .zh { font-size: 14px; }
.btn-sm .en { font-size: 11px; }
.btn-block { width: 100%; }

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(176,125,42,.22), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  padding: 88px 0 72px;
}
.hero-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: end; }
.eyebrow { margin: 0 0 18px; color: #e3c48f; font-weight: 600; letter-spacing: .04em; }
.eyebrow .en { color: #c9b083; text-transform: uppercase; font-size: 12px; letter-spacing: .12em; }
.hero h1 { margin: 0 0 20px; }
.hero h1 .zh { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.25; font-weight: 700; letter-spacing: .01em; }
.hero h1 .en {
  margin-top: 12px; color: #c8d3dd;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(19px, 2vw, 25px); line-height: 1.35; letter-spacing: 0;
}
.lead { margin: 0 0 30px; max-width: 620px; }
.lead .zh { font-size: 17px; color: inherit; }
.lead .en { margin-top: 6px; font-size: 15px; color: #a9b7c4; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.hero-facts li { background: rgba(19,40,59,.55); padding: 20px 22px; backdrop-filter: blur(2px); }
.hero-facts strong { display: block; margin-bottom: 6px; }
.hero-facts strong .zh { font-size: 18px; color: #fff; }
.hero-facts strong .en { color: #e3c48f; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.hero-facts li > .zh { color: #d5dde4; font-size: 14px; }
.hero-facts li > .en { color: #93a5b6; font-size: 12.5px; }

/* ---- Sections ---- */
.section { padding: 80px 0; }
.section-alt { background: #efece6; }
.section-dark { background: var(--ink); color: #fff; }
.section-head { margin-bottom: 36px; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section-head h2, .contact-layout h2 { margin: 0; position: relative; padding-left: 16px; }
.section-head h2::before, .contact-layout h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--accent);
}
h2 .zh { font-size: 30px; line-height: 1.25; }
h2 .en { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.section-dark h2 .en { color: #a9b7c4; }
.section-note { margin: 0; max-width: 460px; text-align: right; font-size: 14px; color: var(--ink-soft); }
.section-note .en { font-size: 12.5px; }


/* ---- Catalogue ---- */
.catalogue-tools { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 14px; cursor: pointer; line-height: 1.2; font-size: 14px; white-space: nowrap;
}
.chip .zh { display: inline; }
.chip .en { display: inline; font-size: 11.5px; margin-left: 4px; }
.chip:hover { border-color: var(--ink-soft); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .en { color: #b9c4cf; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 0 0 260px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; color: var(--muted);
}
.search input { border: 0; outline: 0; background: none; padding: 10px 0; width: 100%; color: var(--ink); }
.search:focus-within { border-color: var(--ink-soft); box-shadow: 0 0 0 3px rgba(19,40,59,.08); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.loading, .empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 40px 0; }
.product {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s, border-color .15s;
}
.product:hover { box-shadow: var(--shadow); border-color: #cfd5db; }
.product-img {
  position: relative; margin: -18px -18px 4px; aspect-ratio: 1 / 1;
  background: #fff; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  display: grid; place-items: center; overflow: hidden;
}
/* Absolutely positioned so the image always fits the box, whatever its intrinsic size. */
.product-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.product-img.no-img { background: repeating-linear-gradient(135deg, #f4f2ee 0 10px, #efece6 10px 20px); }
.product-img.no-img::after { content: "暂无图片 · No image"; color: var(--muted); font-size: 13px; }
.promo {
  position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px);
  background: #b3402f; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3;
  padding: 3px 8px; border-radius: 4px;
}
.product-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.badge { background: var(--accent-tint); color: var(--accent-dark); padding: 2px 9px; border-radius: 4px; font-weight: 600; }
.sku { color: var(--muted); font-variant-numeric: tabular-nums; }
.product h3 { margin: 0; }
.product h3 .zh { font-size: 17px; line-height: 1.35; }
.product h3 .en { font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.product-meta { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.product-bottom { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.price { margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.price .per { color: var(--ink-soft); font-size: 13px; }
.price .moq { margin-left: auto; font-size: 12px; color: var(--muted); }
.add { display: flex; gap: 8px; }
.stepper { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex: 1; }
.stepper button { width: 34px; border: 0; background: #f2f0ec; cursor: pointer; font-size: 17px; }
.stepper button:hover { background: #e7e3dc; }
.stepper input { width: 100%; min-width: 0; border: 0; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product.in-cart { border-color: var(--accent); }
.product.in-cart .add-btn { background: var(--ink); }

/* ---- Order ---- */
.cart-empty { color: var(--muted); padding: 24px 0; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.cart-empty a { color: var(--accent-dark); }
.cart-line {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-line .name .zh { font-weight: 600; font-size: 15px; }
.cart-line .name .en { font-size: 12.5px; }
.cart-line .name small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cart-line .stepper { width: 112px; flex: none; }
.cart-line .stepper button { width: 30px; }
.cart-line .stepper input { padding: 5px 0; }
.cart-line .line-total { min-width: 84px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-line .line-note { grid-column: 1 / -1; display: block; }
.cart-line .line-note input {
  width: 100%; border: 1px dashed #cfd5db; border-radius: 6px; padding: 7px 10px;
  font-size: 13.5px; background: #fbfaf8;
}
.cart-line .line-note input::placeholder { color: #9aa6b2; }
.cart-line .line-note input:focus { outline: 0; border-style: solid; border-color: var(--ink-2); background: #fff; box-shadow: 0 0 0 3px rgba(19,40,59,.08); }
.cart-line .remove { grid-column: 1 / -1; justify-self: start; border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0; cursor: pointer; text-decoration: underline; }
.cart-line .warn { grid-column: 1 / -1; color: var(--err); font-size: 12.5px; margin: -4px 0 0; }
.totals { margin: 16px 0 0; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; align-items: baseline; }
.totals dt { color: var(--ink-soft); font-size: 14px; }
.totals dt .en { display: inline; margin-left: 6px; }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand { padding-top: 10px; margin-top: 4px; border-top: 2px solid var(--ink); }
.totals .grand dt { color: var(--ink); font-weight: 700; font-size: 15px; }
.totals .grand dd { font-size: 22px; font-weight: 700; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.label { font-size: 14px; font-weight: 600; line-height: 1.25; }
.label .en { display: inline; font-weight: 500; font-size: 12px; margin-left: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid #cfd5db; border-radius: 7px; padding: 10px 12px; background: #fff;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(19,40,59,.1); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.2em; margin: 4px 0 12px; font-size: 14px; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }
.order-done { text-align: center; padding: 20px 0; }
.order-done .no { display: inline-block; margin: 8px 0 14px; padding: 8px 16px; border-radius: 6px; background: var(--accent-tint); font-weight: 700; font-size: 18px; letter-spacing: .03em; color: var(--accent-dark); }

/* ---- Contact ---- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; }
.contact-layout .lead { margin-top: 18px; }
.contact-layout .lead .en { color: #a9b7c4; }
.contact-list { margin: 28px 0 0; display: grid; gap: 16px; }
.contact-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.contact-list dt .zh { font-weight: 600; }
.contact-list dt .en { color: #93a5b6; }
.contact-list dd { margin: 0; color: #dbe2e8; }
.contact-list dd .en { color: #a9b7c4; }
.todo { color: #e3c48f; font-size: 13px; }
.contact-form { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 26px; }
.contact-form .label .en { color: #a9b7c4; }
.contact-form .field input, .contact-form .field textarea { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; }
.contact-form .field input:focus, .contact-form .field textarea:focus { border-color: #e3c48f; box-shadow: 0 0 0 3px rgba(227,196,143,.18); }
.section-dark .form-msg.ok { color: #8fd3a9; }
.section-dark .form-msg.err { color: #f0a597; }

/* ---- Footer ---- */
.site-footer { background: #0d1d2b; color: #a9b7c4; font-size: 13.5px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0; }
.footer-inner p { margin: 0; }
.footer-inner .en { display: inline; margin-left: 6px; color: #7d8fa1; font-size: 12.5px; }
.footer-inner .zh { display: inline; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }

  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; order: 3; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--ink); padding: 8px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.1);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { text-align: left; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; gap: 10px; align-items: baseline; }
  .catalogue-tools { flex-direction: column-reverse; }
  .search { flex-basis: auto; width: 100%; }
  .chips { flex-wrap: wrap; width: 100%; gap: 6px; }
  .section-note { text-align: left; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { gap: 12px; }
  .brand-text .en { display: none; }
  .hero { padding: 56px 0 48px; }
  .hero h1 .zh { font-size: 27px; }
  .section { padding: 56px 0; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 20px; }
  .cart-line { grid-template-columns: 1fr auto; }
  .cart-line .line-total { grid-column: 2; grid-row: 1; }
  .cart-line .stepper { grid-column: 1; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
  h2 .zh { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.contact-list dd a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(227,196,143,.5); }
.contact-list dd a:hover { color: #e3c48f; }

/* ---- Order drawer ---- */
.cart-btn { background: none; color: #fff; cursor: pointer; padding: 0; }
body.drawer-open { overflow: hidden; }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 22, 34, .5);
  opacity: 0; transition: opacity .2s;
}
.drawer-backdrop.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(480px, 100vw);
  background: var(--paper);
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(10, 22, 34, .25);
  transform: translateX(100%); transition: transform .25s ease;
  visibility: hidden;
}
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: var(--ink); color: #fff;
}
.drawer-head h2 { margin: 0; line-height: 1.2; }
.drawer-head h2 .zh { font-size: 20px; }
.drawer-head h2 .en { font-family: var(--font-display); font-size: 13px; color: #a9b7c4; }
.drawer-close {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: none; color: #fff;
}
.drawer-close:hover { background: rgba(255,255,255,.1); }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 28px; }
.drawer .order-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; margin-top: 16px; }
.drawer .cart-empty { margin-top: 12px; }
.drawer .order-details { margin-top: 22px; }
.drawer-note { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-soft); }
.drawer-note .en { font-size: 12px; }
.drawer-sub { margin: 0 0 14px; }
.drawer-sub .zh { font-size: 18px; }
.drawer-sub .en { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.drawer .order-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.drawer .order-form .field-row { gap: 10px; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; transition: transform .2s, opacity .2s;
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px);
  background: var(--ink); color: #fff; padding: 10px 10px 10px 18px; border-radius: 10px;
  box-shadow: 0 8px 30px rgba(10, 22, 34, .3); font-size: 14px;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.toast-btn {
  flex: none; border: 0; border-radius: 7px; padding: 6px 12px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; line-height: 1.2;
}
.toast-btn .zh, .toast-btn .en { display: block; }
.toast-btn .en { font-size: 11px; color: #fff; opacity: .85; }

@media (max-width: 560px) {
  .drawer-body { padding: 4px 14px 24px; }
  .drawer .order-form { padding: 16px 12px; }
}
/* reduced motion for the drawer and toast: see "Reduced motion" at the end of this file */

/* ---- Wholesale-only notices ---- */
.wholesale-notice {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0 0 26px; padding: 12px 16px; max-width: 620px;
  border: 1px solid rgba(227, 196, 143, .4); border-radius: var(--r-ctl, 8px);
  background: rgba(176, 125, 42, .16); color: #fff;
}
.wholesale-notice svg { flex: none; margin-top: 3px; color: #e3c48f; }
.wholesale-notice .zh { font-size: 17px; }
.wholesale-notice .en { color: #e3c48f; font-size: 13.5px; margin-top: 2px; }
.drawer-wholesale { margin: 0 0 12px; background: #fbf3e4; border-color: #ead8b6; color: var(--ink); max-width: none; }
.drawer-wholesale svg { color: var(--accent-dark); }
.drawer-wholesale .zh { font-size: 15px; }
.drawer-wholesale .en { color: var(--accent-dark); font-size: 12.5px; }
@media (max-width: 560px) {
  .wholesale-notice .zh { font-size: 15.5px; }
}

/* ---- Account form download ---- */
.btn-download { flex-direction: row; gap: 10px; }
.btn-download > span { display: flex; flex-direction: column; align-items: flex-start; }
.btn-download svg { flex: none; color: #e3c48f; }
.account-steps { margin: 14px 0 0; max-width: 620px; font-size: 14px; color: #d5dde4; }
.account-steps .en { font-size: 12.5px; color: #93a5b6; margin-top: 2px; }
.account-steps a { color: #e3c48f; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Customer login ---- */
.account-btn {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: none; color: #fff; cursor: pointer;
  max-width: 220px;
}
.account-btn:hover { background: rgba(255,255,255,.08); }
.account-btn svg { flex: none; }
.account-label { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; }
.account-label .zh { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-label .en { font-size: 11px; color: #9fb0c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-btn.logged-in { border-color: rgba(227,196,143,.6); }
.account-btn.logged-in svg { color: #e3c48f; }

.login-dialog {
  width: min(400px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px;
  background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(10,22,34,.35);
}
.login-dialog::backdrop { background: rgba(10,22,34,.5); }
.login-form { padding: 28px 24px 22px; }
.login-form h2 { margin: 0 0 18px; }
.login-form h2 .zh { font-size: 22px; }
.login-form h2 .en { font-family: var(--font-display); font-size: 14px; }
.login-form input[name="code"] { text-transform: uppercase; letter-spacing: .04em; }
.login-help { margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.login-help .en { font-size: 12px; }
.dialog-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: var(--ink-soft); cursor: pointer;
}
.dialog-close:hover { background: rgba(19,40,59,.06); }
.account-info { margin: 0 0 18px; display: grid; gap: 8px; font-size: 14px; }
.account-info div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.account-info dt { color: var(--muted); }
.account-info dd { margin: 0; overflow-wrap: anywhere; }
.btn-ghost-dark { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost-dark:hover { background: #f1efea; }

.drawer-account {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 8px;
  background: #e9f1ec; color: #1f5a37; font-size: 13.5px;
}
.drawer-account strong { font-weight: 700; }
.drawer-account .link-btn { border: 0; background: none; color: var(--accent-dark); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; flex: none; }
.drawer-account.need-login { background: #fbf3e4; color: var(--ink); }

@media (max-width: 820px) {
  .account-btn { padding: 0 10px; }
  .account-label .en { display: none; }
}
@media (max-width: 560px) {
  .account-btn { width: 42px; padding: 0; justify-content: center; }
  .account-label { display: none; }
}
@media (max-width: 560px) {
  .header-inner { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-text .zh { font-size: 15px; white-space: nowrap; }
}
@media (max-width: 340px) { .brand-text { display: none; } }

/* ---- Excel download ---- */
.btn-excel {
  flex-direction: row; gap: 10px; margin-top: 14px;
  background: #fff; color: #1d6f42; border: 1px solid #1d6f42;
}
.btn-excel:hover { background: #eef6f0; }
.btn-excel:disabled { opacity: .6; cursor: progress; }
.btn-excel > span { display: flex; flex-direction: column; align-items: flex-start; }
.btn-excel .en { color: #1d6f42; opacity: .85; }
.order-done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.order-done-actions .btn-excel { margin-top: 0; }

/* ---- Order draft ---- */
.draft-status {
  margin: 10px 0 0; font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.draft-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2f7a4f; flex: none; }
.draft-status[data-state="saving"]::before { background: var(--accent); }
.draft-status[data-state="local"]::before { background: #b07d2a; }
.draft-status[data-state="error"] { color: var(--err); }
.draft-status[data-state="error"]::before { background: var(--err); }
.draft-offer {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius);
  background: #eaf0f6; border: 1px solid #c9d6e3; font-size: 14px;
}
.draft-offer-text { margin: 0 0 10px; }
.draft-offer-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Login tip ---- */
.login-tip {
  display: flex; gap: 10px; align-items: flex-start;
  margin: -4px 0 18px; padding: 10px 12px; border-radius: 8px;
  background: #eaf0f6; border: 1px solid #c9d6e3; color: var(--ink); font-size: 13.5px; line-height: 1.45;
}
.login-tip svg { flex: none; margin-top: 1px; color: var(--ink-2); }
.login-tip .en { font-size: 12px; margin-top: 2px; }

/* ---- Guest: log in to see prices ---- */
/* Per-card: one quiet line, still clickable. */
.price-lock {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  min-height: 32px; padding: 4px 0; border: 0; background: none; cursor: pointer;
  color: var(--accent-dark); font: inherit; text-align: left;
}
.price-lock svg { flex: none; }
.price-lock .zh { font-size: 13.5px; font-weight: 600; }
.price-lock .en { display: inline; font-size: 12px; color: var(--ink-soft); }
.price-lock:hover .zh { text-decoration: underline; text-underline-offset: 3px; }
.price-lock:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* One banner above the grid carries the guest call to action. */
.guest-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius);
  background: #fff; border: 1px solid #e6d7bb; box-shadow: var(--shadow);
}
.guest-banner[hidden] { display: none; }
.guest-banner > svg { flex: none; color: var(--accent-dark); }
.guest-banner-text { flex: 1 1 280px; margin: 0; }
.guest-banner-text .zh { display: block; font-size: 15px; color: var(--ink); }
.guest-banner-text .en { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.guest-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Order drawer for guests: no form, just the two ways forward. */
.drawer-guest {
  margin: 4px 0 16px; padding: 24px 20px 20px; text-align: center;
  border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
}
.drawer-guest[hidden] { display: none; }
.drawer-guest > svg { color: var(--accent-dark); }
.drawer-guest h3 { margin: 8px 0 8px; }
.drawer-guest h3 .zh { display: block; font-size: 19px; }
.drawer-guest h3 .en { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.drawer-guest > p { margin: 0 auto 18px; max-width: 34em; font-size: 14px; color: var(--ink); line-height: 1.55; }
.drawer-guest > p .en { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }
.drawer-guest-actions { display: grid; gap: 10px; }
.drawer-guest-call { margin: 16px 0 0 !important; font-size: 13.5px; color: var(--ink-soft) !important; }
.drawer-guest-call a { color: var(--accent-dark); font-weight: 600; white-space: nowrap; }
.drawer.is-guest .order-list,
.drawer.is-guest .drawer-note,
.drawer.is-guest .drawer-account,
.drawer.is-guest #orderForm { display: none; }
@media (max-width: 560px) {
  .guest-banner { padding: 12px 14px; gap: 10px; margin-bottom: 14px; }
  .guest-banner > svg { display: none; }
  .guest-banner-text .zh { font-size: 14px; }
  .guest-banner-actions { width: 100%; }
  .guest-banner-actions .btn { flex: 1; min-height: 44px; }
  .price-lock .en { display: none; }
}

/* Keep nav labels and the brand name on one line when the account button is wide. */
.nav a .zh, .nav a .en, .brand-text .zh, .brand-text .en { white-space: nowrap; }
.nav { flex: none; }
.account-btn { min-width: 0; flex-shrink: 1; }
/* The logo must never shrink; the brand text truncates instead. */
.brand-mark { flex: none; }
.brand { min-width: 0; }
.brand-text { min-width: 0; overflow: hidden; }
.brand-text .zh, .brand-text .en { overflow: hidden; text-overflow: ellipsis; }
/* On narrower screens the customer's name shortens before our own brand name does. */
@media (max-width: 1100px) { .account-btn { max-width: 150px; } .brand-text { flex-shrink: 0; } }
@media (max-width: 900px) { .brand-text { flex-shrink: 1; } }

/* ---- Autosave tip in the order drawer ---- */
.draft-tip {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0 0; padding: 10px 14px; border-radius: var(--radius);
  background: #e9f1ec; border: 1px solid #c5dccd; color: #1f5a37; font-size: 13.5px; line-height: 1.45;
}
.draft-tip svg { flex: none; margin-top: 1px; }
.draft-tip .en { font-size: 12px; color: #3d6e50; margin-top: 2px; }

/* ---- Search hint ---- */
.search-wrap { flex: 0 0 280px; display: flex; flex-direction: column; gap: 6px; }
.search-wrap .search { flex: none; width: 100%; }
.search-hint { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.search-hint .en { font-size: 11.5px; }
.search-hint kbd {
  font-family: var(--font-en); font-size: 12px; padding: 0 5px; border-radius: 4px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
@media (max-width: 820px) { .search-wrap { flex-basis: auto; width: 100%; } }
.nowrap { white-space: nowrap; }

/* ---- Category headings in the product grid ---- */
.cat-heading {
  grid-column: 1 / -1;           /* always starts a new row */
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 22px 0 0; padding: 0 0 10px 14px;
  border-bottom: 2px solid var(--ink); position: relative;
  scroll-margin-top: 90px;
}
.cat-heading:first-child { margin-top: 4px; }
.cat-heading::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 13px; width: 4px; border-radius: 2px; background: var(--accent);
}
.cat-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cat-name .zh { display: inline; font-size: 22px; }
.cat-name .en { display: inline; font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--muted); }
.cat-count { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); }
@media (max-width: 560px) {
  .cat-name .zh { font-size: 19px; }
  .cat-name .en { font-size: 13px; }
}

/* ---- Email address: no underline (it hides the "_"), plus a copy button ---- */
.email-line { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.email-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 8px; text-decoration: none !important; border: 1px solid rgba(227,196,143,.6);
  background: rgba(255,255,255,.06); color: #fff !important;
  font-family: var(--font-en); font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.email-chip:hover { background: rgba(227,196,143,.15); }
.email-chip svg { flex: none; color: #e3c48f; }
.email-chip .email-text { border: 0 !important; }
.copy-btn {
  border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: none; color: #dbe2e8;
  padding: 6px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { background: rgba(255,255,255,.08); }
.copy-btn.copied { border-color: #8fd3a9; color: #8fd3a9; }
.account-steps .email-line { display: flex; }
.contact-list dd .email-line { margin-top: 0; }
.contact-list dd a.email-chip { border-bottom: 1px solid rgba(227,196,143,.6); }

/* ---- Alcohol label ---- */
.alcohol-label {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin: 2px 0 0; padding: 3px 10px; border-radius: 999px;
  border: 1.5px solid #b3402f; background: #fdf0ee; color: #a2321f;
  font-size: 12.5px; font-weight: 700; line-height: 1.3;
}
.alcohol-label svg { flex: none; }
.alcohol-label.compact { display: flex; width: fit-content; margin-top: 4px; padding: 1px 8px; font-size: 11.5px; }
.alcohol-label.compact { white-space: nowrap; }

/* ---- Open-account dialog ---- */
.account-dialog { width: min(480px, calc(100vw - 32px)); }
.account-intro { margin: -6px 0 18px; font-size: 14px; color: var(--ink-soft); }
.account-intro .en { font-size: 12.5px; margin-top: 2px; }
.account-steps-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.account-steps-list li {
  display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.step-no {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 700; font-family: var(--font-display);
}
.account-steps-list strong { display: block; margin-bottom: 6px; }
.account-steps-list strong .zh { font-size: 15.5px; }
.account-steps-list strong .en { font-size: 12px; font-weight: 500; }
.account-steps-list p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.account-steps-list p .en { font-size: 12px; }
.step-btn { flex-direction: row; gap: 8px; margin-top: 2px; }
.step-btn > span { display: flex; flex-direction: column; align-items: flex-start; }
/* Email chip on a light background (the default chip is styled for the dark hero). */
.email-line.light { margin-top: 0; }
.email-line.light .email-chip { color: var(--ink) !important; background: var(--accent-tint); border-color: var(--accent); }
.email-line.light .email-chip svg { color: var(--accent-dark); }
.email-line.light .copy-btn { color: var(--ink); border-color: var(--line); background: #fff; }
.email-line.light .copy-btn.copied { color: var(--ok); border-color: var(--ok); }
.login-help a { color: var(--accent-dark); }
/* Let step content shrink on phones (the long email used to push the box wider than the screen). */
.account-steps-list li > div { min-width: 0; }
.email-line.light .email-chip { max-width: 100%; }
.email-line.light .email-text { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .account-dialog .login-form { padding: 24px 16px 18px; }
  .account-steps-list li { grid-template-columns: 28px 1fr; gap: 10px; padding: 12px; }
  .step-no { width: 28px; height: 28px; }
  .email-line.light .email-chip { font-size: 14px; padding: 6px 10px; }
}
.email-text { overflow-wrap: normal !important; }
@media (max-width: 560px) {
  .email-line.light .email-chip { font-size: 13px; letter-spacing: 0; gap: 6px; padding: 6px 8px; }
  .email-line.light .email-chip svg { width: 14px; height: 14px; }
}

/* ---- Phones: 2 compact columns, about 6 products per screen ---- */
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product { padding: 10px; gap: 5px; border-radius: 10px; }
  .product-img { margin: -10px -10px 2px; aspect-ratio: 1 / 0.8; border-radius: 10px 10px 0 0; }
  .product-img img { padding: 6px; }
  .product-img.no-img::after { font-size: 11px; }
  .promo { left: 6px; top: 6px; font-size: 10.5px; padding: 2px 6px; }
  .product-top { justify-content: flex-end; }
  .product-top .badge { display: none; }      /* the category heading above already says it */
  .sku { font-size: 10.5px; }
  .product h3 .zh { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product h3 .en { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .product-meta { font-size: 11px; gap: 2px; }
  .product-meta .origin { display: none; }
  .product-bottom { padding-top: 7px; gap: 6px; }
  .price { gap: 3px; }
  .price strong { font-size: 16px; }
  .price .per { font-size: 10.5px; }
  .price .moq { margin-left: 0; font-size: 10px; }
  .add { gap: 5px; }
  .stepper button { width: 26px; font-size: 15px; }
  .stepper input { padding: 5px 0; font-size: 13px; }
  .add-btn { padding: 5px 9px; }
  .add-btn .en { display: none; }
  .btn-login-price { padding: 7px 8px; gap: 6px; }
  .btn-login-price .zh { font-size: 12px; }
  .btn-login-price .en { display: none; }
  .btn-login-price svg { width: 14px; height: 14px; }
  .alcohol-label { font-size: 10.5px; padding: 1px 7px; gap: 4px; }
  .alcohol-label svg { width: 12px; height: 12px; }
  .cat-heading { margin-top: 14px; }
}
.btn-login-price .short { display: none; }
@media (max-width: 560px) {
  .btn-login-price .full { display: none; }
  .btn-login-price .short { display: block; }
  .btn-login-price { justify-content: center; }
  .product { position: relative; }
  .product-img { aspect-ratio: 1 / 0.72; }
  /* SKU sits in the image's top-right corner instead of taking its own line */
  .product-top { position: absolute; top: 6px; right: 6px; z-index: 1; }
  .product-top .sku { background: rgba(255,255,255,.9); padding: 1px 5px; border-radius: 4px; }
}
@media (max-width: 560px) {
  .product .stepper button { width: 28px; min-height: 32px; }
  .product .stepper input { min-width: 0; }
}
@media (max-width: 560px) { .product .stepper button { flex: none; } }
/* Phones: category buttons wrap onto new lines (no sideways scrolling anywhere). */
@media (max-width: 560px) {
  .chip { padding: 5px 10px; font-size: 13px; }
  .chip .en { font-size: 10.5px; margin-left: 3px; }
  html, body { overflow-x: clip; } /* clip (not hidden) keeps the sticky header working */
}
/* SKU placement: desktop keeps it in the top row; phones show it under the English name (not over the image). */
.sku-line { display: none; margin: -2px 0 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-width: 560px) {
  .product-top { display: none; }
  .sku-line { display: block; }
}

/* ---- Phones: compact hero so products appear sooner ---- */
@media (max-width: 560px) {
  .hero { padding: 18px 0 20px; }
  .hero-inner { gap: 0; }
  .eyebrow { margin: 0 0 8px; font-size: 13px; }
  .eyebrow .en { font-size: 10px; letter-spacing: .08em; }
  .hero h1 { margin: 0 0 8px; }
  .hero h1 .zh { font-size: 22px !important; line-height: 1.3; }
  .hero h1 .zh br { display: none; }
  .hero h1 .en { margin-top: 4px; font-size: 14px; }
  .lead { margin: 0 0 12px; }
  .lead .zh { font-size: 13.5px; line-height: 1.5; }
  .lead .en { display: none; }                /* long English paragraph hidden on phones */
  .wholesale-notice { margin: 0 0 12px; padding: 8px 12px; gap: 8px; }
  .wholesale-notice .zh { font-size: 14px; }
  .wholesale-notice .en { font-size: 11.5px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-actions .btn { padding: 9px 8px; }
  .hero-actions .btn .zh { font-size: 14px; }
  .hero-actions .btn .en { font-size: 10.5px; }
  .hero-actions .btn-primary:first-child { grid-column: 1 / -1; }   /* "浏览产品并下单" full width */
  .hero-actions .btn-download { justify-content: center; }
  .account-steps { display: none; }           /* same info is in the "成为合作客户" dialog */
  .hero-facts { display: none; }
  /* Product section heading */
  #products.section { padding-top: 20px; }
  #products .section-head { margin-bottom: 12px; gap: 4px; }
  #products h2 .zh { font-size: 22px; }
  #products h2 .en { font-size: 14px; }
  #products .section-note { font-size: 12px; }
  #products .section-note .en { display: none; }
}

/* ---- Phones: search box pinned under the header ---- */
@media (max-width: 560px) {
  /* Flatten the wrappers so the search box can stick for the whole product list. */
  #products > .wrap { display: flex; flex-direction: column; }
  #products .catalogue-tools, #products .search-wrap { display: contents; }
  #products .section-head { order: 0; }
  #products .search-bar {
    order: 1; position: sticky; top: 79px; z-index: 20; margin: 0;
    box-shadow: 0 0 0 10px #efece6, 0 12px 12px -4px rgba(239,236,230,.95);
  }
  #products .search input { padding: 11px 0; font-size: 16px; }   /* 16px stops iPhone zooming in on focus */
  #products .search-hint { order: 2; margin: 8px 0 10px; }
  #products .search-hint .en { display: none; }
  #products .chips { order: 3; margin-bottom: 4px; }
  #products #productGrid { order: 4; }
  .cat-heading { scroll-margin-top: 140px; }
}

/* ---- Phones: slimmer header + search bar, tighter product cards ---- */
@media (max-width: 560px) {
  /* Header: 69px -> ~52px */
  .header-inner { min-height: 52px; gap: 6px; }
  .brand { gap: 6px; }
  .brand-mark { height: 38px; padding: 3px 6px; border-radius: 6px; }
  .brand-mark img { height: 32px; }
  .brand-text .zh { font-size: 14px; }
  .account-btn, .cart-btn, .nav-toggle { width: 36px; height: 36px; }
  .account-btn svg, .cart-btn svg { width: 18px; height: 18px; }
  .nav-toggle { padding: 8px 7px; }
  .nav-toggle span { margin: 4px 0; }
  .cart-count { top: -5px; right: -5px; min-width: 18px; height: 18px; font-size: 11px; }
  html { scroll-padding-top: 60px; }

  /* Search bar: thinner, pinned right under the slimmer header */
  #products .search-bar { top: 58px; box-shadow: 0 0 0 6px #efece6, 0 9px 10px -4px rgba(239,236,230,.95); }
  #products .search input { padding: 4px 0; }
  #products .search-hint { margin: 6px 0 8px; font-size: 12px; }

  /* Product cards: less white space between lines */
  .product { padding: 8px; gap: 2px; }
  .product-img { margin: -8px -8px 4px; aspect-ratio: 1 / 0.7; }
  .product-img img { padding: 4px; }
  .product h3 { line-height: 1.2; }
  .product h3 .zh { font-size: 13.5px; line-height: 1.25; }
  .product h3 .en { font-size: 11px; line-height: 1.25; margin-top: 1px; }
  .sku-line { margin: 1px 0 0; font-size: 10.5px; line-height: 1.2; }
  .product-meta { font-size: 10.5px; line-height: 1.25; }
  .product-bottom { padding-top: 5px; margin-top: 3px; gap: 4px; }
  .price { line-height: 1.15; }
  .price strong { font-size: 15px; }
  .product .stepper button { min-height: 30px; }
  .product .stepper input { padding: 3px 0; }
  .add-btn { padding: 4px 9px; }
  .btn-login-price { padding: 6px 8px; }
  .alcohol-label { margin-top: 2px; }
  .cat-heading { margin-top: 10px; padding-bottom: 6px; scroll-margin-top: 120px; }
  .cat-name .zh { font-size: 17px; }
  .cat-name .en { font-size: 12px; }
  .cat-count { font-size: 11.5px; }
}

/* ---- Category quick-jump button next to the search box (phones only) ---- */
.search-bar { position: relative; display: flex; gap: 6px; align-items: stretch; }
.search-bar .search { flex: 1; min-width: 0; }
.cat-menu-btn, .cat-menu { display: none; }
@media (max-width: 560px) {
  .cat-menu-btn {
    display: inline-flex; align-items: center; gap: 4px; flex: none;
    padding: 0 10px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  }
  .cat-menu-btn[aria-expanded="true"] { background: var(--accent); }
  #products .search { border-radius: 8px; }
  #products .search svg { width: 16px; height: 16px; }
  .cat-menu:not([hidden]) {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
    max-height: min(62vh, 460px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 12px 28px rgba(19,40,59,.18);
  }
  .cat-menu button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
    padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
    color: var(--ink); line-height: 1.2;
  }
  .cat-menu button .zh { font-size: 14px; font-weight: 600; }
  .cat-menu button .en { font-size: 11px; color: var(--muted); }
  .cat-menu button[aria-current="true"] { border-color: var(--accent); background: var(--accent-tint); }
  .cat-heading { scroll-margin-top: 100px; }
}

/* ---- Desktop & tablet: category button + search pinned under the header (like phones) ---- */
@media (min-width: 561px) {
  #products > .wrap { display: flex; flex-direction: column; }
  #products .catalogue-tools, #products .search-wrap { display: contents; }
  #products .section-head { order: 0; margin-bottom: 20px; }
  #products .search-bar {
    order: 1; position: sticky; top: calc(var(--header-h, 69px) + 8px); z-index: 20;
    box-shadow: 0 0 0 8px #efece6, 0 12px 12px -4px rgba(239,236,230,.95);
  }
  #products .search { flex: 1; }
  #products .search input { padding: 8px 0; }
  #products .search-hint { order: 2; margin: 10px 0 10px; }
  #products .search-hint br { display: none; }
  #products .search-hint .zh, #products .search-hint .en { display: inline; }
  #products .search-hint .en::before { content: " · "; }
  #products .chips { order: 3; margin-bottom: 18px; flex: none; }
  #products #productGrid { order: 4; }

  .cat-menu-btn {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    padding: 0 16px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--ink); color: #fff; font-size: 15px; font-weight: 600;
  }
  .cat-menu-btn .en { font-size: 12px; font-weight: 500; color: #b9c4cf; }
  .cat-menu-btn:hover { background: #1d3a54; }
  .cat-menu-btn[aria-expanded="true"] { background: var(--accent); }
  .cat-menu-btn[aria-expanded="true"] .en { color: #fff; }
  .cat-menu:not([hidden]) {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px;
    position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: min(760px, 100%);
    max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 14px 32px rgba(19,40,59,.2);
  }
  .cat-menu button {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
    padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
    color: var(--ink); line-height: 1.25;
  }
  .cat-menu button:hover { border-color: var(--ink-soft); }
  .cat-menu button .zh { font-size: 14.5px; font-weight: 600; }
  .cat-menu button .en { font-size: 11.5px; color: var(--muted); }
  .cat-menu button[aria-current="true"] { border-color: var(--accent); background: var(--accent-tint); }
  .cat-heading { scroll-margin-top: calc(var(--header-h, 69px) + 70px); }

  /* Tighter product cards */
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
  .product { padding: 12px; gap: 4px; }
  .product-img { margin: -12px -12px 6px; aspect-ratio: 1 / 0.78; }
  .product-img img { padding: 8px; }
  .product-top { font-size: 11.5px; }
  .badge { padding: 1px 7px; }
  .product h3 { line-height: 1.2; }
  .product h3 .zh { font-size: 15.5px; line-height: 1.28; }
  .product h3 .en { font-size: 12.5px; line-height: 1.28; margin-top: 1px; }
  .product-meta { font-size: 12px; line-height: 1.3; gap: 2px 10px; }
  .product-bottom { padding-top: 8px; margin-top: 4px; gap: 7px; }
  .price { line-height: 1.2; }
  .price strong { font-size: 19px; }
  .price .per { font-size: 12px; }
  .product .stepper input { padding: 5px 0; }
  .product .add-btn { padding: 5px 12px; }
  .btn-login-price { padding: 7px 10px; }
  .alcohol-label { margin-top: 2px; }
  .cat-heading { margin-top: 18px; padding-bottom: 8px; }
}
@media (max-width: 560px) { .cat-menu-btn .en { display: none; } }
.cat-menu-btn .en { display: inline; }
@media (max-width: 560px) { .cat-menu-btn .en { display: none; } }

/* ---- Desktop & tablet: no category badge on each card (the category heading above says it);
   the SKU moves under the English name, like on phones ---- */
@media (min-width: 561px) {
  .product-top { display: none; }
  .sku-line { display: block; margin: 1px 0 0; font-size: 11.5px; line-height: 1.25; }
}

/* ---- Desktop & tablet: bigger cards, one fewer per row ---- */
@media (min-width: 561px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
  .product h3 .zh { font-size: 16.5px; }
  .product h3 .en { font-size: 13px; }
  .sku-line { font-size: 12px; }
  .product-meta { font-size: 12.5px; }
}

/* ---- Phones: game shortcut next to the login button ---- */
.game-btn { display: none; }
@media (max-width: 560px) {
  .game-btn {
    display: grid; place-items: center; flex: none; width: 36px; height: 36px;
    border: 1px solid rgba(227,196,143,.55); border-radius: 8px; color: #e3c48f; text-decoration: none;
  }
  .game-btn:hover { background: rgba(255,255,255,.08); }
}
@media (max-width: 370px) { .brand-text .zh { font-size: 13px; letter-spacing: -.01em; } .header-inner { gap: 5px; } }

/* =====================================================================
   Readability pass (2026-11-11): AA contrast, 12px text floor on phones,
   44px touch targets for the controls people use most.
   ===================================================================== */
:root { --muted: #5b6b7a; }               /* was #6f7f8f: now >= 4.5:1 on white, paper and #efece6 */

/* Filled brass buttons: white text needs the darker brass to pass AA. */
.btn-primary, .toast-btn { background: var(--accent-dark); }
.btn-primary:hover, .toast-btn:hover { background: #74501a; }
.btn-primary .en, .toast-btn .en { opacity: 1; }
.cart-count { background: var(--accent-dark); }

/* Desktop / tablet: nothing under 12px. */
.nav a .en, .btn-sm .en, .chip .en, .search-hint .en, .account-label .en,
.toast-btn .en, .cat-menu button .en { font-size: 12px; }
.alcohol-label.compact { font-size: 12px; }
.dialog-close { width: 44px; height: 44px; top: 8px; right: 8px; }
.cart-line .stepper button { width: 36px; min-height: 36px; }

@media (max-width: 560px) {
  /* 12px floor for all secondary text on cards, hero and menus. */
  .promo, .sku, .product h3 .en, .product-meta, .price .per, .price .moq,
  .alcohol-label, .chip .en, .sku-line, .eyebrow .en, .wholesale-notice .en,
  .hero-actions .btn .en, .cat-count, .cat-menu button .en, .product-top,
  .product-img.no-img::after, .cart-count { font-size: 12px; }
  .product h3 .en { line-height: 1.3; }
  .product-meta { line-height: 1.35; }

  /* Header icons: 40px boxes with a 44px hit area. */
  .game-btn, .account-btn, .cart-btn, .nav-toggle { width: 40px; height: 40px; position: relative; }
  .game-btn::after, .account-btn::after, .nav-toggle::after {
    content: ""; position: absolute; inset: -2px;
  }
  .header-inner { gap: 4px; }
  .brand { gap: 6px; }
  .brand-mark { padding: 3px 6px; }

  /* Quantity steppers and the guest price line. */
  .product .stepper button { width: 36px; min-height: 40px; }
  .product .stepper input { min-height: 40px; }
  .price-lock { min-height: 40px; }
  /* Search bar height stays compact on purpose (owner asked for a shorter bar). */
}
@media (max-width: 370px) { .brand-mark img { height: 32px; } .brand-mark { height: 40px; } .header-inner { gap: 3px; } }
@media (max-width: 370px) { .brand-mark { padding: 2px 4px; } }

/* ---- One category control (chips removed 2026-11-11): the menu button names the current category ---- */
.cat-menu-label { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.cat-menu-label .zh, .cat-menu-label .en { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-menu-caret { flex: none; opacity: .75; transition: transform .2s ease-out; }
.cat-menu-btn[aria-expanded="true"] .cat-menu-caret { transform: rotate(180deg); }
.cat-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 561px) {
  .cat-menu-btn { min-width: 168px; max-width: 300px; justify-content: space-between; }
  .cat-menu-label .en { max-width: 150px; }
  #products #productGrid { margin-top: 4px; }
}
@media (max-width: 560px) {
  .cat-menu-btn { min-width: 96px; max-width: 124px; justify-content: space-between; }
  .cat-menu-label { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .cat-menu-caret { transition: none; } }

/* ---- Round 2 fixes (2026-11-11) ---- */
/* Empty search: say what happened and offer a way forward. */
.empty { padding: 36px 16px; }
.empty-title { margin: 0 0 6px; color: var(--ink); font-size: 17px; font-weight: 600; }
.empty-title .en { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.empty-q { color: var(--accent-dark); font-weight: 700; overflow-wrap: anywhere; }
.empty-hint { margin: 0 auto 16px; max-width: 34em; font-size: 14px; color: var(--ink-soft); }
.empty-hint .en { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.empty-actions .btn { min-height: 44px; }

/* Back to top: bottom-right, inside thumb reach; only after scrolling two screens. */
.to-top {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: grid; place-items: center; gap: 0; width: 52px; height: 52px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(19,40,59,.28);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s ease-out, transform .25s cubic-bezier(.16,1,.3,1);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink-2); }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.to-top svg { margin-top: 4px; }
.to-top-label { font-family: var(--font-zh); font-size: 12px; line-height: 1; margin-top: -6px; }
body.drawer-open .to-top { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Required fields: mark them, since only optional ones were labelled. */
.contact-form .field:has(:required) .label .zh::after,
#orderForm .field:has(:required) .label .zh::after { content: " *"; color: #e3c48f; font-weight: 700; }
#orderForm .field:has(:required) .label .zh::after { color: var(--err); }
.required-note { margin: 0 0 12px; font-size: 12.5px; }
.contact-form .required-note { color: #c4cfd9; }

@media (max-width: 560px) {
  /* The game already has its own header icon on phones. */
  .nav .nav-game { display: none; }
  /* Dim the page behind the open phone menu. */
  .nav.open { box-shadow: 0 0 0 100vmax rgba(10,22,34,.45); }
  /* Category menu: taller so all categories usually fit, with a fade when more is below. */
  .cat-menu:not([hidden]) { max-height: min(calc(100dvh - 150px), 560px); }
  .cat-menu.can-scroll { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
  .to-top { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
.required-note .zh, .required-note .en { display: inline; font-size: inherit; }
.required-note .en::before { content: " · "; }
#orderForm .required-note { color: var(--ink-soft); }

/* ---- WeChat QR (hero facts + contact) ---- */
.fact-wechat { display: flex; gap: 16px; align-items: center; }
.fact-wechat img { flex: none; width: 96px; height: 96px; border-radius: 8px; background: #fff; padding: 4px; }
.fact-wechat > span > .zh { display: block; color: #d5dde4; font-size: 14px; }
.fact-wechat > span > .en { display: block; color: #93a5b6; font-size: 12.5px; }
.contact-wechat dd { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.contact-wechat img { flex: none; width: 140px; height: 140px; border-radius: 10px; background: #fff; padding: 6px; }
.wechat-note { flex: 1 1 160px; }
.wechat-note .en { display: block; margin-top: 2px; }
.wechat-mobile { display: none; }
@media (max-width: 560px) {
  .wechat-mobile { display: inline; }
  .contact-wechat img { width: 168px; height: 168px; }
}

/* Language switch (lang.js): header button sizing, and a shorter English brand name on phones */
.lang-btn { flex-shrink: 0; }
@media (max-width: 560px) {
  .lang-btn { min-width: 40px; height: 40px; padding: 0 8px; font-size: 13px; }
  html[data-lang="en"] .brand-text .brand-long { display: none; }
}
/* English mode: the hero headline is a longer sentence than the Chinese, so set it smaller */
html[data-lang="en"] .hero h1 .zh { font-size: clamp(28px, 3.3vw, 40px); line-height: 1.2; }
@media (max-width: 560px) { html[data-lang="en"] .hero h1 .zh { font-size: 22px !important; } }

/* Vector logo (2026-11-13): white SVG straight on the translucent navy header, no white badge */
.brand-mark { height: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.brand-mark img { height: 46px; width: auto; }
@media (max-width: 560px) { .brand-mark { height: auto; padding: 0; } .brand-mark img { height: 38px; } }
/* Phones under 430px: the header is full, so show the logo only (it already reads 东成 DongCheng) */
@media (max-width: 429px) {
  .brand-text { display: none; }
  .brand-mark img { height: 36px; }
}

/* =====================================================================
   Home page as an introduction (2026-11-15): about, category cards,
   how to order, break-time band. Products live on /products (log-in only).
   ===================================================================== */

/* About */
.about { background: var(--paper); }
.about-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.about-head h2 { margin: 0 0 18px; position: relative; padding-left: 16px; }
.about-head h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: var(--accent); }
.about-lead .zh { font-size: 16.5px; line-height: 1.75; color: var(--ink); }
.about-lead .en { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin-top: 8px; }
.about-points { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.about-points div { padding-top: 16px; border-top: 2px solid var(--line); }
.about-points div:first-child, .about-points div:nth-child(2) { border-top-color: var(--accent); }
.about-points dt .zh { font-size: 17.5px; font-weight: 700; color: var(--ink); }
.about-points dt .en { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.about-points dd { margin: 8px 0 0; }
.about-points dd .zh { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.about-points dd .en { font-size: 13px; color: var(--ink-soft); }

/* Category cards */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.cat-grid > .loading, .cat-grid > .empty { grid-column: 1 / -1; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--card); box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease-out;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(19,40,59,.06), 0 14px 32px rgba(19,40,59,.14); }
.cat-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cat-tile-img { display: block; aspect-ratio: 3 / 2; background: #efe6d4; overflow: hidden; }
.cat-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.16,1,.3,1); }
.cat-tile:hover .cat-tile-img img { transform: scale(1.04); }
.cat-tile-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 40px 14px 16px; }
.cat-tile-name { font-family: var(--font-zh); font-size: 18px; font-weight: 700; line-height: 1.3; }
.cat-tile-sub { font-size: 13px; color: var(--ink-soft); }
.cat-tile-arrow { position: absolute; right: 14px; bottom: 18px; color: var(--accent-dark); transition: transform .25s ease-out; }
.cat-tile:hover .cat-tile-arrow { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .cat-tile, .cat-tile-img img, .cat-tile-arrow { transition: none; }
  .cat-tile:hover { transform: none; }
  .cat-tile:hover .cat-tile-img img { transform: none; }
}

/* How to order */
.how { background: var(--paper); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: none; }
.how-steps li { position: relative; padding: 22px 0 0; border-top: 2px solid var(--line); }
.how-no {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 17px;
}
.how-steps h3 { margin: 0 0 6px; }
.how-steps h3 .zh { font-size: 18.5px; }
.how-steps h3 .en { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.how-steps p { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.how-steps p .en { font-size: 13px; }
.how-steps p a { color: var(--accent-dark); }
.how-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0;
  border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600;
  color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px;
}
.how-link .en { display: inline; font-size: inherit; color: inherit; }

/* Break-time band */
.break-band { background: var(--accent-tint); border-top: 1px solid #e6d7bb; border-bottom: 1px solid #e6d7bb; }
.break-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; flex-wrap: wrap; }
.break-inner p { margin: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; color: var(--ink); }
.break-inner p strong .zh { font-size: 18px; }
.break-inner p strong .en { font-size: 13px; color: var(--ink-soft); }
.break-inner p > .zh { font-size: 15px; }
.break-inner p > .en { font-size: 13.5px; color: var(--ink-soft); }

/* Products page: log-in gate for guests */
.product-gate {
  max-width: 560px; margin: 8px auto 24px; padding: 34px 28px 28px; text-align: center;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
}
.product-gate[hidden] { display: none; }
.product-gate > svg { color: var(--accent-dark); }
.product-gate h3 { margin: 10px 0 8px; }
.product-gate h3 .zh { font-size: 21px; }
.product-gate h3 .en { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.product-gate > p { margin: 0 auto 20px; max-width: 36em; font-size: 14.5px; color: var(--ink); line-height: 1.6; }
.product-gate > p .en { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.product-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.product-gate-actions .btn { min-width: 170px; min-height: 48px; }
.product-gate-call { margin: 18px 0 0 !important; font-size: 14px; color: var(--ink-soft) !important; }
.product-gate-call .en { display: inline; }
.product-gate-call a { color: var(--accent-dark); font-weight: 600; }
#products.is-locked .catalogue-tools,
#products.is-locked .product-grid { display: none; }
.catalogue-page { min-height: calc(100vh - 140px); }

@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .how-steps { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 560px) {
  .about-points { grid-template-columns: 1fr; gap: 20px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-tile-body { padding: 9px 30px 11px 11px; }
  .cat-tile-name { font-size: 15.5px; }
  .cat-tile-sub { font-size: 12px; }
  .cat-tile-arrow { right: 9px; bottom: 13px; width: 15px; height: 15px; }
  .product-gate { padding: 26px 18px 22px; }
  .product-gate-actions .btn { flex: 1 1 100%; }
  .break-inner .btn { width: 100%; min-height: 44px; }
}

/* "All products" card uses the same white footer as the other category cards (owner, 2026-11-15). */

/* Home page views (2026-11-15): guests get the introduction, customers the catalogue. */
html:not(.is-customer) .customer-only { display: none !important; }
html.is-customer .guest-only { display: none !important; }

/* Hero buttons (2026-11-15): both buttons the same brass style; full width on phones. */
@media (max-width: 560px) {
  .hero-actions .btn { grid-column: 1 / -1; }
}

/* =====================================================================
   Design-system pass (2026-11-15): three button tiers, one radius scale.
   Tier 1  .btn-primary   brass, white text (main actions)
   Tier 2  .btn-ghost-dark / .btn-light / .btn-excel   white, navy text, grey border
   Tier 3  text links (.how-link, .link-btn)
   Radius: controls 8px, cards and dialogs 12px, round badges 50%.
   ===================================================================== */
:root { --radius: 12px; --r-ctl: 8px; }

.btn, .btn-sm, .toast-btn, .add-btn { border-radius: var(--r-ctl); }
.btn-sm { min-height: 40px; }

.btn-ghost-dark, .btn-light, .btn-excel {
  background: #fff; color: var(--ink); border: 1px solid #c3ccd5;
}
.btn-ghost-dark:hover, .btn-light:hover, .btn-excel:hover { background: #f3efe7; border-color: var(--ink-soft); }
.btn-ghost-dark .en, .btn-light .en, .btn-excel .en { color: var(--ink-soft); opacity: 1; }
.btn-excel svg { color: var(--accent-dark); }
/* White button on the dark contact section: no grey border needed there. */
.section-dark .btn-light { border-color: #fff; }

/* After adding, the product's button keeps the brass primary colour (it no longer turns navy). */
.product.in-cart .add-btn { background: var(--accent-dark); }
.product.in-cart .add-btn:hover { background: #74501a; }

/* Controls */
.field input, .field textarea, .field select, .stepper, .cart-line .note input,
.nav a, .copy-btn, .email-chip, #products .search, .cat-menu-btn, .cat-menu button { border-radius: var(--r-ctl); }

/* Cards and dialogs */
.product, .cat-tile, .product-gate, .login-dialog, .hero-facts, .contact-form, .toast,
.drawer .order-list, .drawer .order-form, .draft-offer, .drawer-guest, .cat-menu:not([hidden]) { border-radius: var(--radius); }
@media (max-width: 560px) {
  .product { border-radius: var(--radius); }
  .product-img { border-radius: var(--radius) var(--radius) 0 0; }
}
.product-img { border-radius: var(--radius) var(--radius) 0 0; }

/* ---- Break Time hub (/games), 2026-11-15: same header, footer, palette and buttons as the site ---- */
.hub-page { min-height: 100vh; display: flex; flex-direction: column; }
.hub-section { flex: 1; background: #efece6; }
.hub-home-btn {
  display: none; align-items: center; justify-content: center; flex-direction: column; min-height: 40px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-ctl); color: #fff; text-decoration: none; line-height: 1.15;
}
.hub-home-btn .zh { font-size: 13.5px; font-weight: 600; }
.hub-home-btn .en { font-size: 12px; color: #c7d2dc; }
.hub-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hub-tile {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease-out;
}
.hub-tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(19,40,59,.06), 0 14px 32px rgba(19,40,59,.14); }
.hub-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hub-tile-art { display: grid; place-items: center; aspect-ratio: 2 / 1; background: var(--accent-tint); }
.hub-tile-art svg { width: 30%; height: auto; }
.hub-tile-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.hub-tile-name .zh { font-size: 19px; font-weight: 700; }
.hub-tile-name .en { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.hub-tile-desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 8px; }
.hub-tile-desc .en { font-size: 13px; }
.hub-tile-btn { margin-top: auto; align-self: flex-start; min-width: 104px; }
@media (prefers-reduced-motion: reduce) { .hub-tile { transition: none; } .hub-tile:hover { transform: none; } }
@media (max-width: 900px) {
  .hub-page .nav { display: none; }
  .hub-home-btn { display: inline-flex; }
}
@media (max-width: 760px) { .hub-grid { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 560px) {
  .hub-tile { flex-direction: row; }
  .hub-tile-art { aspect-ratio: auto; width: 104px; flex: none; }
  .hub-tile-art svg { width: 70%; }
  .hub-tile-body { padding: 12px 14px 14px; }
  .hub-tile-name .zh { font-size: 17px; }
}

/* Contrast fixes (2026-11-15) */
.nav a .en { color: #b4c2cf; }                               /* was #9fb0c0 */
.contact-form .required-note .zh,
.contact-form .required-note .en { color: #c4cfd9; }         /* the grey --muted leaked onto the navy form */

/* ---- Round 4 (2026-11-15): bilingual pattern, customer home, order list, phone headings ---- */
/* One bilingual pattern: Chinese line on top, English line below, one link per action. */
.how-link { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.3; }
.how-link .en { display: block; font-size: 12.5px; font-weight: 500; }
.how-email { margin: -4px 0 12px !important; font-size: 14.5px; }
.how-email a { color: var(--accent-dark); font-weight: 600; }
.break-inner p { display: block; }
.break-inner p strong { display: block; margin-bottom: 4px; }
.break-inner p strong .zh, .break-inner p strong .en { display: inline; }
.break-inner p strong .en::before { content: "  "; white-space: pre; }
.break-inner p > .zh, .break-inner p > .en { display: block; }
.cart-empty p { margin: 0 0 6px; }
.cart-empty .how-link { align-items: center; margin: 0 auto; }
.cart-empty { display: flex; flex-direction: column; align-items: center; }

/* Customer home: no marketing hero, a welcome line above the catalogue instead. */
html.is-customer .hero { display: none; }
.welcome-line { margin: 4px 0 0; flex-basis: 100%; order: -1; }
.welcome-line .zh { font-size: 15px; font-weight: 600; color: var(--accent-dark); }
.welcome-line .en { font-size: 12.5px; color: var(--ink-soft); }
html.is-customer #products { padding-top: 32px; }

/* Order list: customers are trade buyers already, so no wholesale notice; no form while empty. */
html.is-customer .drawer-wholesale { display: none; }
.drawer.is-empty .order-details .drawer-note,
.drawer.is-empty .order-details #orderForm,
.drawer.is-empty #draftTip { display: none; }

/* Phones: the page title must stay larger than section titles. */
@media (max-width: 560px) {
  .hero h1 .zh { font-size: 26px !important; line-height: 1.3; }
  h2 .zh, #products h2 .zh { font-size: 22px; }
}

/* =====================================================================
   Premium pass (2026-11-15): trust strip, brand wall, richer footer,
   new-arrivals heading, one gentle reveal for the grids.
   ===================================================================== */

/* Trust strip: four plain facts under the hero */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-list { list-style: none; margin: 0 auto; padding: 34px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; border-left: 2px solid var(--accent-tint); }
.trust-list li:first-child { border-left-color: var(--accent); }
.trust-value { font-family: var(--font-display); font-size: 40px; line-height: 1.05; font-weight: 700; color: var(--accent-dark); letter-spacing: -.01em; margin-bottom: 6px; }
.trust-value .trust-zh { font-family: var(--font-zh); font-size: 32px; letter-spacing: .02em; }
.trust-list .zh { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.trust-list .en { font-size: 12.5px; color: var(--ink-soft); }

/* Richer footer */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.3fr 1fr auto; gap: 36px; padding: 44px 0 28px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand img { width: 140px; height: auto; display: block; margin-bottom: 12px; }
.footer-brand p, .footer-col p { margin: 0 0 6px; font-size: 13.5px; color: #c7d2dc; }
.footer-brand .en, .footer-col p .en { display: block; font-size: 12.5px; color: #93a5b6; }
.footer-col h3 { margin: 0 0 10px; }
.footer-col h3 .zh { font-size: 14px; color: #fff; }
.footer-col h3 .en { font-size: 12px; color: #93a5b6; font-weight: 600; }
.footer-col a { color: #dbe2e8; text-decoration: none; border-bottom: 1px solid rgba(227,196,143,.35); }
.footer-col a:hover { color: #e3c48f; }
.footer-col a .en { display: inline; margin-left: 6px; }
.footer-wechat img { width: 92px; height: 92px; border-radius: var(--r-ctl); background: #fff; padding: 4px; }

/* New arrivals heading inside the catalogue */
.cat-heading-new .cat-name .zh { color: var(--accent-dark); }
.cat-heading-new::before { background: var(--err) !important; }

/* One gentle reveal for the trust strip, brand wall and category cards (JS adds the classes;
   without JS everything is simply visible). */
.reveal-ready [data-reveal], .reveal-ready .cat-grid > li { opacity: 0; transform: translateY(12px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal-ready [data-reveal].is-in, .reveal-ready .cat-grid > li.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal], .reveal-ready .cat-grid > li { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .trust-list { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .trust-list { padding: 24px 0; gap: 18px 14px; }
  .trust-value { font-size: 30px; }
  .trust-value .trust-zh { font-size: 24px; }
  .trust-list .zh { font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; padding-top: 32px; }
}

/* ---- Hero photo (2026-11-15): dim sum spread under a navy wash ----
   Photo: Zhe Zhang on Unsplash (Unsplash License), cropped to leave out a restaurant's printed
   spoon and a receipt. Replace public/images/hero/dimsum-*.jpg with an own photo any time. */
.hero {
  position: relative; isolation: isolate;
  background:
    linear-gradient(90deg, rgba(19,40,59,.95) 0%, rgba(19,40,59,.86) 42%, rgba(19,40,59,.55) 100%),
    url("/images/hero/dimsum-1920.jpg") center 40% / cover no-repeat,
    var(--ink);
}
.hero-facts li { background: rgba(13,29,43,.72); }
@media (max-width: 900px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(19,40,59,.8) 0%, rgba(19,40,59,.9) 70%),
      url("/images/hero/dimsum-960.jpg") center / cover no-repeat,
      var(--ink);
  }
}

/* Login button keeps its English line on tablets too (owner, 2026-11-15); phones show the icon only. */
@media (min-width: 561px) { .account-label .en { display: block; } }

/* ---------- Privacy page ---------- */
.legal-wrap { max-width: 760px; }
.legal h1 { font-family: var(--serif, "Source Serif 4", serif); margin: 0; }
.legal h2 { font-size: 19px; margin: 30px 0 8px; }
.legal p { margin: 0 0 10px; line-height: 1.7; }
.legal a { color: var(--accent-dark); }
.legal-date { margin-top: 28px !important; font-size: 13px; color: var(--ink-soft); }
.legal .section-head { display: block; }
.legal .section-head h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 12px; }

/* ==========================================================================
   Guest home page motion (2026-11-18, "medium" motion; navy + brass kept).
   JS: assets/home-motion.js (Lenis smooth scroll, hero parallax, count-up, picture band).
   Everything here is skipped for prefers-reduced-motion and for logged-in customers.
   ========================================================================== */

/* Hero: the photo moves on its own layer (slow push-in on load + parallax on scroll),
   the navy wash sits on top of it. */
.hero { background: var(--ink); overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; }
.hero::before {
  inset: -8% 0; z-index: -2;
  background: url("/images/hero/dimsum-1920.jpg") center 40% / cover no-repeat;
  transform: translate3d(0, var(--hero-shift, 0px), 0);
  will-change: transform;
}
.hero::after {
  inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(19,40,59,.95) 0%, rgba(19,40,59,.86) 42%, rgba(19,40,59,.55) 100%);
}
@media (max-width: 900px) {
  .hero { background: var(--ink); }
  .hero::before { background-image: url("/images/hero/dimsum-960.jpg"); background-position: center; }
  .hero::after { background: linear-gradient(180deg, rgba(19,40,59,.8) 0%, rgba(19,40,59,.9) 70%); }
}
.hero h1 .zh .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero h1 .zh .line > span { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.is-customer) .hero::before { animation: hero-push 16s cubic-bezier(.2,.6,.2,1) both; }
  @keyframes hero-push { from { scale: 1.14; } to { scale: 1.02; } }

  /* Entrance: copy rises in line by line, the fact cards slide in from the right. */
  @keyframes rise-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  @keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
  @keyframes slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
  html:not(.is-customer) .hero .eyebrow { animation: rise-in .8s cubic-bezier(.16,1,.3,1) .1s both; }
  html:not(.is-customer) .hero h1 .zh .line > span { animation: line-up 1s cubic-bezier(.16,1,.3,1) both; }
  html:not(.is-customer) .hero h1 .zh .line:nth-child(1) > span { animation-delay: .2s; }
  html:not(.is-customer) .hero h1 .zh .line:nth-child(2) > span { animation-delay: .34s; }
  html:not(.is-customer) .hero h1 .en { animation: rise-in .9s cubic-bezier(.16,1,.3,1) .5s both; }
  html:not(.is-customer) .hero .lead { animation: rise-in .9s cubic-bezier(.16,1,.3,1) .6s both; }
  html:not(.is-customer) .hero .wholesale-notice { animation: rise-in .9s cubic-bezier(.16,1,.3,1) .7s both; }
  html:not(.is-customer) .hero .hero-actions { animation: rise-in .9s cubic-bezier(.16,1,.3,1) .8s both; }
  html:not(.is-customer) .hero-facts li { animation: slide-in 1s cubic-bezier(.16,1,.3,1) both; }
  html:not(.is-customer) .hero-facts li:nth-child(1) { animation-delay: .55s; }
  html:not(.is-customer) .hero-facts li:nth-child(2) { animation-delay: .7s; }
  html:not(.is-customer) .hero-facts li:nth-child(3) { animation-delay: .85s; }

  /* Scroll reveal: a little further and slower than before, so sections "arrive". */
  .reveal-ready [data-reveal], .reveal-ready .cat-grid > li {
    transform: translateY(28px);
    transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  }
  /* Section headings: the brass bar grows in as the heading arrives. */
  .reveal-ready .about-head[data-reveal] h2::before { transform: scaleY(0); transform-origin: top; transition: transform .8s cubic-bezier(.16,1,.3,1) .25s; }
  .reveal-ready .about-head[data-reveal].is-in h2::before { transform: none; }
}

/* Category cards: gentle lift and photo zoom on hover */
.cat-tile { transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s; }
.cat-tile-img { overflow: hidden; }
.cat-tile-img img { transition: transform .8s cubic-bezier(.16,1,.3,1); }
.cat-tile-arrow { transition: transform .35s cubic-bezier(.16,1,.3,1); }
@media (hover: hover) {
  .cat-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(19,40,59,.14); }
  .cat-tile:hover .cat-tile-img img { transform: scale(1.05); }
  .cat-tile:hover .cat-tile-arrow { transform: translateX(4px); }
}

/* Picture band: product photos drifting sideways between About and Categories */
.pic-band { background: var(--paper); padding: 8px 0 44px; overflow: hidden; }
.pic-track { display: flex; gap: 18px; width: max-content; padding: 6px 0; }
.pic-item {
  flex: none; width: 132px; height: 132px; border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(19,40,59,.06);
}
.pic-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .pic-track.is-ready { animation: pic-drift calc(var(--pic-count, 20) * 3.2s) linear infinite; }
  .pic-band:hover .pic-track, .pic-band:focus-within .pic-track, .pic-band.is-paused .pic-track { animation-play-state: paused; }
  @keyframes pic-drift { to { transform: translateX(calc(-50% - 9px)); } }
}
@media (prefers-reduced-motion: reduce) { .pic-band { overflow-x: auto; } }
/* Pause / play for the band: quiet round button under the strip, right-aligned with the content */
.pic-ctrl { display: flex; justify-content: flex-end; margin-top: 10px; }
.pic-band:has(.pic-toggle:not([hidden])) { padding-bottom: 24px; }
.pic-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink-soft);
  cursor: pointer; transition: color .2s, border-color .2s;
}
.pic-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.pic-toggle:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.pic-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.pic-toggle .i-play, .pic-band.is-paused .pic-toggle .i-pause { display: none; }
.pic-band.is-paused .pic-toggle .i-play { display: block; }
@media (max-width: 560px) {
  .pic-band { padding: 4px 0 30px; }
  .pic-track { gap: 12px; }
  .pic-item { width: 92px; height: 92px; border-radius: 10px; }
  @keyframes pic-drift { to { transform: translateX(calc(-50% - 6px)); } }
}

/* Category showcase (desktop >= 1000px): picture on the left, names on the right (app.js). */
.cat-show { display: none; }
@media (min-width: 1000px) {
  .cat-show:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .cat-show:not([hidden]) + .cat-grid { display: none; }
  .cat-show-pic {
    position: sticky; top: calc(var(--header-h, 68px) + 28px);
    aspect-ratio: 3 / 2; border-radius: var(--radius, 12px); overflow: hidden;
    background: #fff; box-shadow: 0 18px 40px rgba(19,40,59,.12);
  }
  .cat-show-pic img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.05);
    transition: opacity .6s cubic-bezier(.16,1,.3,1), transform 1.2s cubic-bezier(.16,1,.3,1);
  }
  .cat-show-pic img.is-on { opacity: 1; transform: none; }
  .cat-show-caption {
    position: absolute; left: 16px; bottom: 16px; z-index: 1;
    padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
    background: rgba(19,40,59,.82); color: #fff; backdrop-filter: blur(6px);
  }
  .cat-show-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
  .cat-show-list li { break-inside: avoid; }
  .cat-row {
    display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; gap: 10px;
    padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
    transition: color .3s, padding-left .35s cubic-bezier(.16,1,.3,1);
  }
  .cat-row-no { font-family: var(--font-display); font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  .cat-row-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .cat-row-zh { font-size: 18px; font-weight: 700; }
  .cat-row-en { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cat-row-arrow { color: var(--accent-dark); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .35s cubic-bezier(.16,1,.3,1); }
  .cat-row.is-active, .cat-row:hover, .cat-row:focus-visible { color: var(--accent-dark); padding-left: 10px; }
  .cat-row.is-active .cat-row-no { color: var(--accent-dark); }
  .cat-row.is-active .cat-row-arrow, .cat-row:hover .cat-row-arrow, .cat-row:focus-visible .cat-row-arrow { opacity: 1; transform: none; }
  .cat-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
}

/* =====================================================================
   Refinement pass (2026-11-18): serif display type, catalogue polish,
   quick view, add-to-cart flight, softer dialogs and drawer.
   ===================================================================== */
:root {
  --font-zh-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --shadow-lift: 0 2px 4px rgba(19,40,59,.05), 0 18px 40px -12px rgba(19,40,59,.22);
}

/* ---- Display type: Chinese headings in a serif, like the English ones ---- */
.hero h1 .zh,
h2 .zh,
.cat-name .zh,
.cat-tile-name,
.cat-row-zh,
.trust-value .trust-zh,
.drawer-head h2 .zh,
.login-form h2 .zh,
.legal h1 .zh,
.drawer-guest h3 .zh,
.empty-title .zh { font-family: var(--font-zh-display); font-weight: 700; }
.hero h1 .zh { letter-spacing: .02em; line-height: 1.3; }
h2 .zh { letter-spacing: .03em; }
h2 .en { letter-spacing: .01em; }
.eyebrow .zh { letter-spacing: .12em; }
@media (min-width: 900px) {
  .section { padding: 96px 0; }
  .section-head { margin-bottom: 44px; }
  h2 .zh { font-size: 32px; }
}

/* ---- Catalogue: skeleton while loading ---- */
.product.skeleton { pointer-events: none; min-height: 380px; gap: 12px; }
.product.skeleton > i { display: block; height: 14px; border-radius: 6px; background-color: #eeebe5; }
.product.skeleton > i.short { width: 55%; }
.product.skeleton .product-img { background-color: #f3f1ec; border-bottom-color: transparent; cursor: default; }
.product.skeleton > i, .product.skeleton .product-img {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.65) 50%, transparent 80%);
  background-size: 220% 100%; background-repeat: no-repeat;
  animation: sk-shine 1.4s ease-in-out infinite;
}
@keyframes sk-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ---- Catalogue: product cards ---- */
.product {
  border-radius: 12px; border-color: #e6e2db;
  transition: box-shadow .35s var(--ease-out), transform .35s var(--ease-out), border-color .35s;
}
.product-img { border-radius: 12px 12px 0 0; border-bottom-color: #efece6; cursor: zoom-in; }
.product-img.no-img { cursor: default; }
.product-img img { transition: transform .6s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .product:not(.skeleton):hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #d9d3c8; }
  .product:hover .product-img img { transform: scale(1.05); }
}
.product-img .zoom-hint {
  position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(19,40,59,.78); color: #fff;
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s var(--ease-out);
}
.product:hover .zoom-hint { opacity: 1; transform: none; }
.product h3 .zh { font-weight: 700; }
.badge { border-radius: 999px; padding: 2px 10px; letter-spacing: .02em; }
.price strong { font-family: var(--font-display); font-size: 24px; letter-spacing: -.01em; }
.stepper { border-radius: 8px; }
.product.just-added .add-btn { animation: add-pop .45s var(--ease-out); }
@keyframes add-pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* Category headings in the catalogue: thinner rule, gold tick */
.cat-heading { border-bottom: 1px solid #cfc8bc; padding-bottom: 12px; margin-top: 34px; }
.cat-heading::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 2px; background: var(--accent); }
.cat-name .zh { font-size: 24px; letter-spacing: .03em; }
@media (max-width: 560px) { .cat-name .zh { font-size: 20px; } }

/* Flying thumbnail when adding to the order list */
.fly-dot {
  position: fixed; z-index: 120; width: 56px; height: 56px; border-radius: 50%;
  background: #fff center / 80% no-repeat; box-shadow: 0 8px 24px rgba(19,40,59,.3);
  border: 2px solid var(--accent); pointer-events: none;
}

/* ---- Quick view (bigger picture) ---- */
.quick-view {
  width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(10,22,34,.4); overflow: hidden;
}
.quick-view::backdrop { background: rgba(10,22,34,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.qv-inner { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 420px; }
.qv-pic { background: #fff; display: grid; place-items: center; padding: 28px; border-right: 1px solid #efece6; }
.qv-pic img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.qv-info { padding: 40px 30px 28px; display: flex; flex-direction: column; gap: 12px; background: var(--paper); }
.quick-view .qv-info .product-top { display: flex !important; position: static; justify-content: flex-start; gap: 10px; font-size: 12px; }
.quick-view .qv-info .product-top .badge { display: inline-block !important; }
.quick-view .qv-info .product-top .sku { background: none; padding: 0; }
.qv-info h3 { margin: 4px 0 0; }
.qv-info h3 .zh { font-family: var(--font-zh-display); font-size: 24px; line-height: 1.35; }
.qv-info h3 .en { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }
.qv-meta { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-soft); display: grid; gap: 4px; }
.qv-info .price { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.qv-info .price strong { font-size: 30px; }
.qv-info .add { margin-top: 4px; }
.qv-info .stepper { height: 44px; }
@media (max-width: 700px) {
  .qv-inner { grid-template-columns: 1fr; min-height: 0; }
  .qv-pic { border-right: 0; border-bottom: 1px solid #efece6; padding: 18px; }
  .qv-pic img { max-height: 40vh; }
  .qv-info { padding: 20px 18px 18px; }
  .quick-view { max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* ---- Dialogs: fade + rise in, blurred backdrop ---- */
.login-dialog { border-radius: 16px; box-shadow: 0 30px 80px rgba(10,22,34,.38); }
.login-dialog::backdrop { background: rgba(10,22,34,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.login-form { padding: 34px 28px 26px; }
.login-form h2 { padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); position: relative; }
.login-form h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: dlg-in .38s var(--ease-out); }
  dialog[open]::backdrop { animation: bd-in .3s ease-out; }
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bd-in { from { opacity: 0; } to { opacity: 1; } }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(176,125,42,.18);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,125,42,.15); }
.search input:focus-visible { box-shadow: none; }

/* ---- Order drawer: smoother slide, blurred page behind ---- */
.drawer { transition: transform .5s var(--ease-out), visibility 0s linear .5s; box-shadow: -24px 0 60px rgba(10,22,34,.28); }
.drawer.open { transition: transform .5s var(--ease-out), visibility 0s; }
.drawer-backdrop { transition: opacity .25s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer-head { padding: 18px 22px; background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); border-bottom: 2px solid var(--accent); }
.drawer-head h2 .zh { font-size: 21px; }
.drawer .order-list, .drawer .order-form { border-radius: 12px; border-color: #e6e2db; }

/* ---- Toast: gold tick, rounder ---- */
.toast { border-radius: 12px; padding: 10px 10px 10px 14px; transition: transform .35s var(--ease-out), opacity .25s; border: 1px solid rgba(227,196,143,.25); }
.toast.is-ok .toast-text::before {
  content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -4px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  .product, .product-img img { transition: none !important; }
  .product.skeleton > i, .product.skeleton .product-img { animation: none; }
}

/* New arrivals: one small sub-heading per container (2026-11-18) */
.arrival-sub {
  grid-column: 1 / -1; margin: 6px 0 -4px; display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--accent-dark); letter-spacing: .02em;
}
.arrival-sub::after { content: ""; flex: 1; height: 1px; background: #e6e2db; }

/* ---- 订货记录 My orders (/orders, 2026-11-18) ---- */
.order-history { display: grid; gap: 14px; max-width: 900px; }
.history-order { background: var(--card); border: 1px solid #e6e2db; border-radius: 12px; overflow: hidden; }
.history-order[open] { box-shadow: var(--shadow); }
.history-order summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; font-size: 14px;
}
.history-order summary::-webkit-details-marker { display: none; }
.history-order summary:hover { background: #fbfaf7; }
.ho-date { font-family: var(--font-zh-display); font-weight: 700; font-size: 17px; color: var(--ink); }
.ho-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.ho-count { margin-left: auto; color: var(--ink-soft); }
.ho-caret { color: var(--muted); transition: transform .25s var(--ease-out); }
.history-order[open] .ho-caret { transform: rotate(180deg); }
.ho-body { padding: 0 20px 18px; border-top: 1px solid #efece6; }
.ho-meta { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.ho-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.ho-line { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ho-line:last-child { border-bottom: 0; }
.ho-pic { width: 52px; height: 52px; border-radius: 8px; background: #f3f1ec; overflow: hidden; display: grid; place-items: center; }
.ho-pic img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ho-name { min-width: 0; line-height: 1.35; }
.ho-name .zh { display: block; font-size: 15px; }
.ho-name .en { display: block; font-size: 12.5px; color: var(--ink-soft); }
.ho-name small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ho-note { margin: 4px 0 0; font-size: 12.5px; color: var(--accent-dark); }
.ho-qty { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ho-line.is-gone { opacity: .55; }
.ho-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.ho-hint { font-size: 12.5px; color: var(--muted); }
.history-empty { background: var(--card); border: 1px dashed #d9d3c8; border-radius: 12px; padding: 36px 24px; text-align: center; max-width: 900px; }
.history-empty p { margin: 0 0 16px; color: var(--ink-soft); }
.history-empty .empty-title { color: var(--ink); font-size: 18px; margin-bottom: 8px; }
.account-orders-link { margin: 4px 0 10px; }
.drawer-history {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 14px;
  border: 1px solid #e6e2db; border-radius: 10px; background: var(--card);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
}
.drawer-history[hidden] { display: none; }
.drawer-history svg { color: var(--accent-dark); flex: none; }
.drawer-history .en { display: inline; margin-left: 6px; font-weight: 500; font-size: 12px; }
.drawer-history:hover { border-color: var(--accent); }
@media (max-width: 560px) {
  .history-order summary { padding: 14px 14px; gap: 6px 12px; }
  .ho-count { margin-left: 0; flex-basis: 100%; order: 3; }
  .ho-caret { margin-left: auto; order: 2; }
  .ho-body { padding: 0 14px 16px; }
  .ho-line { grid-template-columns: 44px 1fr auto; gap: 10px; }
  .ho-pic { width: 44px; height: 44px; }
}

/* ---- Email + code login (2026-11-18) ---- */
.login-sent { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #eef5ef; color: var(--ok); font-size: 13.5px; line-height: 1.5; }
.login-sent .en { color: #4b7a5c; font-size: 12px; margin-top: 2px; }
.code-input { font-size: 24px !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
#loginEmailField.is-locked input { background: #f2f0ec; color: var(--ink-soft); }
.login-alt { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 0; }
.login-alt .link-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; font-size: 13.5px; }
.login-alt .link-btn .zh, .login-alt .link-btn .en { display: inline; }
.login-alt .link-btn .en { margin-left: 4px; font-size: 12px; }
.account-notice { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #ead8b6; border-radius: var(--r-ctl, 8px); background: #fbf3e4; color: var(--ink); font-size: 13.5px; line-height: 1.55; }

/* ---- Customer hub: home page for logged-in customers (2026-11-18) ---- */
html.is-customer .customer-hub { padding-top: 40px; }
.ch-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 32px; flex-wrap: wrap; margin-bottom: 28px; }
.ch-head h2 { margin: 4px 0 0; }
.ch-head .welcome-line { margin: 0; color: var(--accent-dark); font-weight: 600; }
.ch-search { display: flex; gap: 10px; flex: 1 1 420px; max-width: 560px; }
.ch-search .search { flex: 1; }
.ch-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 40px; }
.ch-tile {
  background: var(--card); border: 1px solid #e6e2db; border-radius: 12px; padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 12px; min-height: 200px;
  transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
@media (hover: hover) { .ch-tile:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); } }
.ch-tile h3 { margin: 0; display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid #efece6; }
.ch-tile h3 .zh { display: inline; font-family: var(--font-zh-display); font-size: 18px; }
.ch-tile h3 .en { display: inline; font-family: var(--font-display); font-size: 13px; }
.ch-tile-body { flex: 1; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ch-tile-big { margin: 0; font-weight: 700; font-size: 15px; }
.ch-tile-note { margin: 0; font-size: 13px; color: var(--err); font-weight: 600; }
.ch-tile-empty { margin: 0; color: var(--muted); font-size: 13.5px; }
.ch-tile-empty .en { font-size: 12px; }
.ch-tile-link { align-self: flex-start; color: var(--accent-dark); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.ch-tile-link .zh, .ch-tile-link .en { display: inline; }
.ch-tile-link .en { margin-left: 4px; font-size: 12px; font-weight: 500; }
.ch-tile-link:hover { text-decoration: underline; }
.ch-thumbs { display: flex; gap: 8px; }
.ch-thumb { width: 52px; height: 52px; border-radius: 8px; background: #fff; border: 1px solid #efece6; overflow: hidden; display: grid; place-items: center; flex: none; }
.ch-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ch-freq { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.ch-freq li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.ch-freq .ch-thumb { width: 40px; height: 40px; }
.ch-freq-name { min-width: 0; line-height: 1.3; }
.ch-freq-name b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-freq-name small { color: var(--muted); font-size: 12px; }
.ch-add { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.ch-add:hover { background: var(--accent-dark); }
.ch-arrivals { margin-bottom: 40px; }
.ch-arrivals .product-grid { margin-top: 18px; }
.ch-sub { margin: 0 0 14px; }
.ch-sub .zh { display: inline; font-family: var(--font-zh-display); font-size: 20px; }
.ch-sub .en { display: inline; margin-left: 8px; font-family: var(--font-display); font-size: 14px; }
.ch-cat-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.ch-cat {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid #e6e2db; text-decoration: none; color: var(--ink);
  transition: border-color .2s, background .2s;
}
.ch-cat .zh, .ch-cat .en { display: inline; }
.ch-cat .zh { font-weight: 600; font-size: 14.5px; }
.ch-cat .en { font-size: 11.5px; }
.ch-cat:hover { border-color: var(--accent); background: #fbf3e4; }
.cat-heading-view .view-all-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent-dark); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 900px) { .ch-tiles { grid-template-columns: 1fr; } .ch-tile { min-height: 0; } }
@media (max-width: 560px) {
  html.is-customer .customer-hub { padding-top: 24px; }
  .ch-search { flex-basis: 100%; }
  .ch-search .btn { padding-inline: 16px; }
  .ch-tiles { gap: 12px; margin-bottom: 28px; }
}
/* Five menu items for logged-in customers: tighter spacing so the header row fits. */
@media (min-width: 821px) {
  html.is-customer .nav a { padding-inline: 10px; }
  html.is-customer .header-inner { gap: 16px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  html.is-customer .nav a { padding-inline: 7px; }
  html.is-customer .nav a .zh { font-size: 14px; }
}

/* ---------- Order drawer v2 (2026-11-19): thumbnails, notes on demand, promotions, sticky total, review ---------- */
.cart-line { grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: start; }
.cart-line .cart-pic { grid-row: span 2; width: 52px; height: 52px; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.cart-line .cart-pic img { width: 100%; height: 100%; object-fit: contain; }
.cart-line .name { grid-column: 2; min-width: 0; }
.cart-line .name small s { color: var(--muted); }
.cart-line .promo-price { color: var(--accent-dark); }
.cart-line .line-total { grid-column: 3; grid-row: 1; min-width: 0; }
.cart-line .line-controls { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.cart-line .stepper { width: 132px; flex: none; }
.cart-line .stepper button { width: 44px; min-height: 40px; }
.cart-line .line-controls .remove { margin-left: auto; padding: 10px 2px; }
.cart-line .note-toggle { border: 0; background: none; color: var(--accent-dark); font-size: 13.5px; font-weight: 600; padding: 10px 2px; cursor: pointer; }
.cart-line .note-toggle:hover, .cart-line .line-controls .remove:hover { color: var(--ink); }
.cart-line .line-note { grid-column: 2 / -1; }
.cart-line .warn { grid-column: 2 / -1; margin: 0; }
.cart-line.is-free .line-total { color: var(--accent-dark); }
.cart-line.is-free .name small { color: var(--accent-dark); }

.cart-promos { list-style: none; margin: 14px 0 0; padding: 10px 12px; background: var(--accent-tint); border-radius: 8px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.cart-promos[hidden] { display: none; }
.cart-promos li { position: relative; padding-left: 22px; }
.cart-promos li::before { content: ''; position: absolute; left: 1px; top: .3em; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--accent-dark); box-sizing: border-box; }
.cart-promos li.is-done { color: var(--accent-dark); font-weight: 600; }
.cart-promos li.is-done::before {
  background: var(--accent-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Sticky total + submit at the bottom of the drawer */
.drawer-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(19, 40, 59, .08);
}
.drawer-bar[hidden], .drawer.is-guest .drawer-bar { display: none; }
.db-sum { min-width: 0; line-height: 1.25; }
.db-sum b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.db-sum small { display: block; color: var(--ink-soft); font-size: 12.5px; }
.drawer-bar .btn { min-height: 48px; padding: 0 22px; flex: none; }
@media (max-width: 560px) { .drawer-bar { padding-left: 14px; padding-right: 14px; } }

/* Delivery details folded into one line once filled in */
.order-form.is-collapsed > .field-row,
.order-form.is-collapsed > .required-note,
.order-form.is-collapsed > label.field:has(input[name="address"]) { display: none; }
.delivery-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0 0 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.delivery-summary[hidden] { display: none; }
.delivery-summary p { margin: 0; display: grid; gap: 2px; font-size: 14px; line-height: 1.4; min-width: 0; }
.delivery-summary .ds-label { font-size: 12px; color: var(--ink-soft); }
.delivery-summary .ds-contact { color: var(--ink-soft); font-size: 13px; overflow-wrap: anywhere; }
.delivery-summary .link-btn { border: 0; background: none; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; padding: 8px 4px; flex: none; }

/* Review before submitting */
.review-dialog { width: min(520px, calc(100vw - 24px)); }
.review-dialog .login-form h2 { margin-bottom: 6px; }
.review-dialog .rv-count { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }
.rv-lines { list-style: none; margin: 0; padding: 0; max-height: min(38vh, 320px); overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rv-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 8px 2px; font-size: 14px; border-bottom: 1px solid #eef0f2; align-items: baseline; }
.rv-lines li:last-child { border-bottom: 0; }
.rv-name { min-width: 0; overflow-wrap: anywhere; }
.rv-qty { color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rv-amt { min-width: 72px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-lines li.is-free .rv-amt, .rv-lines li.is-free .rv-name { color: var(--accent-dark); }
.review-dialog .cart-promos { margin-top: 12px; }
.rv-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 10px; padding-top: 10px; border-top: 2px solid var(--ink); font-weight: 700; }
.rv-total b { font-size: 24px; font-variant-numeric: tabular-nums; }
.rv-deliver p { margin: 0 0 4px; font-size: 14px; display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 8px; overflow-wrap: anywhere; }
.rv-deliver span { color: var(--ink-soft); }
.rv-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 18px; }
.rv-actions .btn { min-height: 48px; }

/* My regular items (customer hub) */
.ch-regulars { margin-top: 28px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px 10px; }
.ch-regulars[hidden] { display: none; }
.ch-reg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 8px; }
.ch-reg-head .ch-sub { margin: 0 0 4px; }
.ch-reg-note { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.ch-reg-note .en { font-size: 12.5px; }
.ch-reg-head .btn { min-height: 46px; }
.ch-reg-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.ch-reg {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; column-gap: 12px; row-gap: 2px; align-items: center;
  grid-template-areas: "pic name stepper add" "pic last stepper add";
  padding: 10px 0; border-bottom: 1px solid #eef0f2;
}
.ch-reg .ch-thumb { grid-area: pic; width: 48px; height: 48px; }
.ch-reg-name { grid-area: name; min-width: 0; line-height: 1.3; }
.ch-reg-name b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-reg-name small { display: block; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-reg-last { grid-area: last; font-size: 12.5px; color: var(--accent-dark); }
.ch-reg .stepper { grid-area: stepper; width: 128px; flex: none; }
.ch-reg .stepper button { width: 44px; min-height: 44px; }
.ch-reg-add { grid-area: add; min-width: 84px; min-height: 44px; }
.ch-reg.in-cart .ch-reg-add { color: var(--accent-dark); border-color: var(--accent); }
@media (max-width: 900px) { .ch-reg-list { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .ch-regulars { padding: 16px 14px 6px; }
  .ch-reg-head .btn { width: 100%; }
  .ch-reg { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "pic name name" "pic last last" ". stepper add"; row-gap: 6px; }
  /* Toasts at the top on phones: the bottom of the screen is where the thumb taps "加入". */
  .toast { top: calc(68px + env(safe-area-inset-top, 0px)); bottom: auto; transform: translate(-50%, -16px); }
  .toast.show { transform: translate(-50%, 0); }
}

/* Order drawer v2: controls row (tap targets >= 44px; buttons must not shrink inside the flex stepper) */
.cart-line .stepper button, .ch-reg .stepper button { flex: none; }
.cart-line .stepper { width: 136px; }
.cart-line .stepper button { width: 44px; min-height: 44px; }
.cart-line .line-controls .remove {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin-left: auto;
  border-radius: 8px; color: var(--muted); text-decoration: none;
}
.cart-line .line-controls .remove:hover { background: #f2f0ec; color: var(--err); }
.cart-line .note-toggle { min-height: 44px; }
@media (max-width: 560px) {
  .cart-line .line-controls { grid-column: 1 / -1; gap: 4px 12px; }
  .cart-line .line-note, .cart-line .warn { grid-column: 1 / -1; }
}

/* Phones: name gets the full width; line total sits at the end of the controls row */
@media (max-width: 560px) {
  .cart-line .cart-pic { grid-row: 1; width: 44px; height: 44px; }
  .cart-line { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .cart-line .name { grid-column: 2 / -1; }
  .cart-line .line-controls { grid-column: 1 / 3; grid-row: 2; }
  .cart-line .line-total { grid-column: 3; grid-row: 2; align-self: center; }
  .cart-line.is-free .line-total { grid-row: 1; align-self: start; }
  .cart-line.is-free .name { grid-column: 2; }
}

/* Order line, final layout (all widths): row 1 = picture · name · remove icon; row 2 = quantity · note · line total */
.cart-line { grid-template-columns: 52px minmax(0, 1fr) 44px; }
.cart-line .cart-pic { grid-row: 1; }
.cart-line .name { grid-column: 2; grid-row: 1; }
.cart-line > .remove { grid-column: 3; grid-row: 1; align-self: start; margin: -8px -6px 0 0; }
.cart-line .line-controls { grid-column: 2 / -1; grid-row: 2; flex-wrap: nowrap; gap: 10px; }
.cart-line .line-controls .line-total { margin-left: auto; min-width: 0; white-space: nowrap; }
.cart-line.is-free { grid-template-columns: 52px minmax(0, 1fr) auto; }
.cart-line.is-free .line-total { grid-column: 3; grid-row: 1; }
.cart-line.is-free .name { grid-column: 2; }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .cart-line.is-free { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .cart-line .name { grid-column: 2; }
  .cart-line .line-controls { grid-column: 1 / -1; grid-row: 2; }
  .cart-line .stepper { width: 128px; }
}
.cart-line > .remove {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; border-radius: 8px; color: var(--muted); cursor: pointer; text-decoration: none;
}
.cart-line > .remove:hover { background: #f2f0ec; color: var(--err); }

/* Review dialog: delivery labels above their values (bilingual labels are too long for a side column) */
.rv-deliver p { display: block; margin: 0 0 8px; }
.rv-deliver span { display: block; font-size: 12.5px; }

/* Free goods: a sub-line right under the product they come with (owner's choice 2026-11-19) */
.cart-line:has(+ .cart-line.is-free) { border-bottom: 0; padding-bottom: 6px; }
.cart-line.is-free { grid-template-columns: 52px 32px minmax(0, 1fr) auto; padding-top: 0; align-items: center; }
.cart-line.is-free .cart-pic { grid-column: 2; grid-row: 1; width: 32px; height: 32px; border-radius: 6px; }
.cart-line.is-free .name { grid-column: 3; grid-row: 1; }
.cart-line.is-free .line-total { grid-column: 4; grid-row: 1; align-self: center; font-weight: 600; }
.cart-line.is-free .free-tag { display: block; color: var(--accent-dark); font-size: 13.5px; }
.cart-line.is-free .name .zh { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.cart-line.is-free .name small { color: var(--muted); }
@media (max-width: 560px) {
  .cart-line.is-free { grid-template-columns: 44px 32px minmax(0, 1fr) auto; }
}
.rv-lines li.is-free { padding-left: 20px; border-top: 0; color: var(--accent-dark); font-size: 13.5px; }
.rv-lines li:has(+ li.is-free) { border-bottom: 0; }

/* ---------- Polish after the 2026-11-19 review ---------- */
/* Product cards: full-width "加入" until added, then a live quantity stepper; 44px targets */
.product .add { display: flex; gap: 6px; }
.product:not(.in-cart) .add .stepper { display: none; }
.product.in-cart .add .add-btn { display: none; }
.product .add .add-btn { flex: 1; min-height: 44px; }
.product .add .stepper { flex: 1; min-height: 44px; }
.product.in-cart .add .stepper { border-color: var(--accent); }
.product .stepper button { width: 44px; min-height: 44px; flex: none; }
.product .stepper input { min-height: 44px; font-weight: 600; }

/* Customer hub "常订产品" quick add: 44px */
.ch-add { width: 44px; height: 44px; }

/* Contrast: skip link English line; welcome line on the cream band */
.skip .en { color: #c7d2dc; }
.welcome-line .zh, .ch-head .welcome-line, .ch-head .welcome-line .zh { color: #765219; }
.legal-date .en { font-size: 12px; }

/* Guests can't order: no cart icon in the header; on phones the login button keeps its words */
html:not(.is-customer) .cart-btn { display: none; }
@media (max-width: 560px) {
  .account-btn:not(.logged-in) { width: auto; min-width: 44px; padding: 0 10px; gap: 6px; }
  .account-btn:not(.logged-in) .account-label { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
  .account-btn:not(.logged-in) .account-label .zh { font-size: 13px; font-weight: 600; }
  .account-btn:not(.logged-in) .account-label .en { display: block; font-size: 12px; color: #c7d2dc; }
}
/* Utility pages (catalogue, my orders): content starts close to the header, not after a 96px band */
.catalogue-page, .orders-page { padding-top: 36px; }
@media (max-width: 560px) { .catalogue-page, .orders-page { padding-top: 22px; } }

/* ---------- Review round 2 fixes (2026-11-19) ---------- */
/* My regular items: fixed-width add button, so the quantity box never moves or gets covered */
.ch-reg-add { width: 96px; min-width: 96px; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.ch-reg .stepper { min-width: 0; }

/* "= 4 箱" pill on a product card's stepper (does not change the card height) */
.product .add { position: relative; }
.case-hint {
  position: absolute; top: -10px; right: -2px; z-index: 1; pointer-events: none;
  padding: 0 7px; border-radius: 999px; line-height: 19px; font-size: 12px; font-weight: 700;
  background: var(--accent-dark); color: #fff; font-variant-numeric: tabular-nums;
}
.case-hint[hidden] { display: none; }

/* Review dialog: the two buttons stay at the bottom while the item list scrolls */
.review-dialog .rv-actions {
  position: sticky; bottom: 0; z-index: 1;
  grid-template-columns: 1fr 1fr; margin: 18px -24px -22px; padding: 12px 24px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 1px solid var(--line);
}
.review-dialog .rv-actions .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* Toasts sit above the order drawer (the "撤销" toast is shown while the drawer is open) */
.toast { z-index: 120; }

/* Contrast and hit areas */
.ch-add { background: var(--accent-dark); }
.ch-add:hover { background: #765219; }
.cat-row.is-active .cat-row-no, .cat-row.is-active .cat-row-zh, .cat-row:hover .cat-row-zh { color: #765219; }
.totals dt .en { font-size: 12px; }
@media (max-width: 560px) {
  .cart-btn { position: relative; }
  .cart-btn::after { content: ""; position: absolute; inset: -2px; }
}

/* Guest hero: the headline shows almost at once (it used to stay invisible for about a second) */
@media (prefers-reduced-motion: no-preference) {
  html:not(.is-customer) .hero .eyebrow { animation-delay: 0s; }
  html:not(.is-customer) .hero h1 .zh .line > span { animation-duration: .7s; }
  html:not(.is-customer) .hero h1 .zh .line:nth-child(1) > span { animation-delay: .02s; }
  html:not(.is-customer) .hero h1 .zh .line:nth-child(2) > span { animation-delay: .1s; }
  html:not(.is-customer) .hero h1 .en { animation-delay: .18s; }
  html:not(.is-customer) .hero .lead { animation-delay: .24s; }
  html:not(.is-customer) .hero .wholesale-notice { animation-delay: .3s; }
  html:not(.is-customer) .hero .hero-actions { animation-delay: .36s; }
}

/* ---- Round-3 review fixes (2026-11-19) ---- */
/* Customer hub: two boards (last order, promotions); 我的常订单 starts folded at 8. */
.ch-tiles { grid-template-columns: repeat(2, 1fr); }
.ch-reg-list.is-folded .ch-reg:nth-child(n+9) { display: none; }
/* Phones: closed list shows no rows at all (app.js renderRegulars adds .fold-all) */
.ch-reg-list.is-folded.fold-all .ch-reg { display: none; }
.ch-reg-list.is-folded.fold-all + .ch-reg-more { margin-top: 8px; }
.ch-reg-more { margin-top: 12px; }
@media (max-width: 900px) { .ch-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  /* The two boards side by side, compact. */
  .ch-tiles { gap: 10px; margin-bottom: 24px; }
  .ch-tile { padding: 12px 12px 10px; gap: 8px; }
  .ch-tile h3 { flex-direction: column; gap: 0; padding-bottom: 6px; }
  .ch-tile h3 .zh { font-size: 16px; }
  .ch-tile h3 .en { font-size: 11.5px; }
  .ch-tile-big { font-size: 13px; line-height: 1.35; }
  .ch-thumbs { gap: 4px; }
  .ch-thumbs .ch-thumb { width: 34px; height: 34px; border-radius: 6px; }
  .ch-thumbs .ch-thumb:nth-child(n+4) { display: none; }
  .ch-tile-note { font-size: 12px; }
  .ch-tile .btn-sm { padding: 6px 10px; }
  .ch-tile-link { font-size: 12.5px; }
  .ch-tile-link .en { display: none; }
  /* Product cards: the English name may take two lines (it often carries the size: 500ml / 5L). */
  .product h3 .en { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* Toast over the header bar instead of over the page content; it has its own "view order" button. */
  .toast { top: calc(6px + env(safe-area-inset-top, 0px)); width: calc(100vw - 16px); max-width: none; justify-content: space-between; }
}
/* 500+ product cards on one page: let the browser skip laying out cards that are off screen. */
.product-grid > .product:not(.skeleton) { content-visibility: auto; contain-intrinsic-size: auto 360px; }
@media (max-width: 560px) {
  /* Regular items: two lines per item on phones. The quantity box already starts at last time's
     amount (the heading says so), so the separate "上次 120" line is left out here. */
  .ch-reg { grid-template-areas: "pic name name" "pic stepper add"; padding: 8px 0; }
  .ch-reg-last { display: none; }
  .ch-reg-note .en { display: none; }
  .ch-reg-head { gap: 10px; }
}
/* Past-orders link now sits under the order list (review round 3). */
.drawer .order-list + .drawer-history { margin: 12px 0 0; }

/* =====================================================================
   Round-3 review batch (2026-11-19): quick order, cases, search helpers,
   promo pop-up, order checks, first-time tips.
   ===================================================================== */
/* "+1 箱" next to the price */
.price { position: relative; }
.case-add {
  margin-left: auto; flex: none; border: 1px solid var(--accent); background: #fff; color: var(--accent-dark);
  border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; line-height: 1.3;
}
.case-add:hover { background: #fbf3e4; }
.price .moq:empty { display: none; }
/* "上次订过 120 瓶" */
.last-ordered { margin: 0; font-size: 12.5px; color: var(--accent-dark); font-weight: 600; }
.last-ordered::before { content: "↻ "; }

/* Quick order */
.quick-order-btn { flex: none; align-self: flex-start; padding: 9px 16px; }
.catalogue-tools { flex-wrap: wrap; }
.ch-search .quick-order-btn { padding-inline: 14px; }
.quick-order { width: min(560px, calc(100vw - 24px)); }
.qo-help { margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); }
.qo-help .en { font-size: 12px; }
.qo-example { margin: 0 0 12px; padding: 8px 12px; background: #f2f0ec; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.qo-text { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 15px; line-height: 1.5; text-transform: uppercase; }
.qo-file { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.qo-file-btn { cursor: pointer; }
.qo-file-note { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 180px; }
.qo-file-note .en { font-size: 11.5px; }
.qo-preview { list-style: none; margin: 0 0 10px; padding: 0; max-height: 220px; overflow-y: auto; font-size: 13.5px; }
.qo-preview li { padding: 5px 0 5px 22px; border-bottom: 1px dashed var(--line); position: relative; }
.qo-preview li::before { position: absolute; left: 2px; top: 5px; font-weight: 700; }
.qo-preview li.ok::before { content: "✓"; color: var(--ok); }
.qo-preview li.bad { color: var(--err); }
.qo-preview li.bad::before { content: "!"; color: var(--err); }

/* Search suggestions and recently viewed */
.search-bar { position: relative; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: min(420px, 60vh); overflow-y: auto;
  background: var(--card); border: 1px solid #e6e2db; border-radius: 12px; box-shadow: var(--shadow-lift); padding: 6px;
}
.ss-head { margin: 4px 8px 6px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.ss-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); }
.ss-item:hover, .ss-item:focus-visible { background: #fbf3e4; outline: none; }
.ss-pic { width: 44px; height: 44px; border-radius: 6px; background: #fff; border: 1px solid #efece6; overflow: hidden; display: grid; place-items: center; }
.ss-pic img { width: 100%; height: 100%; object-fit: contain; }
.ss-name { min-width: 0; line-height: 1.3; }
.ss-name b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-name small { color: var(--muted); font-size: 12px; }
.brand-filter { height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 0 10px; font-size: 14px; color: var(--ink); flex: none; }

/* Promotion pop-up */
.product .promo { cursor: help; }
.promo-pop {
  position: absolute; z-index: 60; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(10,22,34,.3); font-size: 13px; line-height: 1.45;
}
.promo-pop p { margin: 0 0 6px; }
.promo-pop p:last-child { margin: 0; }
.promo-pop .en { display: block; color: #c8d3dd; font-size: 11.5px; }

/* Review dialog and delivery date warnings */
.rv-warn { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.rv-warn li { padding: 9px 12px 9px 34px; border-radius: 8px; background: #fdf0e6; color: #7a3412; font-size: 13.5px; line-height: 1.45; position: relative; }
.rv-warn li::before { content: "!"; position: absolute; left: 12px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: #c2410c; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.field-warn { margin: 6px 0 0; font-size: 13px; color: #9a3412; }

/* Clear order list */
.clear-cart { display: block; margin: 10px 0 0 auto; border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.clear-cart .zh, .clear-cart .en { display: inline; }
.clear-cart .en { margin-left: 4px; font-size: 12px; }
.clear-cart:hover { color: var(--err); }

/* First visit: three tips */
.ch-tips { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: -8px 0 24px; padding: 14px 18px; background: #fbf3e4; border: 1px solid #ecd9b4; border-radius: 12px; }
.ch-tips ol { margin: 0; padding: 0; list-style: none; counter-reset: tip; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; flex: 1; min-width: 260px; }
.ch-tips li { counter-increment: tip; font-size: 13.5px; line-height: 1.45; padding-left: 30px; position: relative; }
.ch-tips li::before { content: counter(tip); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.ch-tips li b { display: block; }
.ch-tips li b .en { display: inline; margin-left: 6px; font-size: 12px; font-weight: 500; }
.ch-tips li > .en { font-size: 12px; }

@media (max-width: 820px) {
  .ch-tips ol { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .catalogue-tools .quick-order-btn { order: 3; flex: 1; }
  .brand-filter { order: 4; flex: 1; min-width: 0; }
  .ch-search { flex-wrap: wrap; }
  .ch-search .quick-order-btn { flex-basis: 100%; }
  .case-add { padding: 3px 8px; font-size: 12px; }
}
/* Brand filter + quick order: one row under the search hint (the search bar itself is pinned). */
.tools-extra { order: 2; display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin: -4px 0 14px; }
.tools-extra .quick-order-btn { padding: 8px 16px; }
.tools-extra .brand-filter { height: 42px; }
@media (max-width: 560px) {
  .tools-extra { margin: 0 0 12px; }
  .tools-extra .brand-filter, .tools-extra .quick-order-btn { flex: 1; min-width: 0; }
}

/* ---- FAQ page (2026-11-19) ---- */
.faq-item { background: var(--card); border: 1px solid #e6e2db; border-radius: 12px; margin-bottom: 10px; }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; position: relative; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font-size: 20px; color: var(--accent-dark); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary .zh { font-size: 16px; }
.faq-item summary .en { font-size: 13px; font-weight: 500; }
.faq-a { padding: 0 20px 16px; }
.faq-a p { margin: 0; line-height: 1.65; }
.faq-a .en { margin-top: 6px; font-size: 13.5px; }
.ch-tips li b .zh { display: inline; }
@media (max-width: 560px) {
  .ch-tips { padding: 12px 14px; gap: 10px; }
  .ch-tips ol { gap: 8px; }
  .ch-tips li > .en { display: none; }
  .ch-tips .btn { width: 100%; }
}
.last-ordered .zh, .last-ordered .en { display: inline; }
.last-ordered .en { margin-left: 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
@media (max-width: 560px) { .last-ordered .en { display: none; } }

/* ---- Round-4 fixes (2026-11-19) ---- */
/* "+1 箱" sits at the end of the add row (cards and quick view), two short lines. */
.product .add .case-add, .qv-add .case-add {
  flex: none; margin: 0; min-height: 44px; min-width: 58px; padding: 2px 8px; border-radius: var(--r-ctl, 8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; gap: 1px;
}
.case-add b { font-size: 13px; }
.case-add small { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.product .add:has(.case-add) .case-hint { display: none; } /* the button shows the case count now */
.last-ordered::before { content: none; }
/* Quick view: same "加入 → − 数量 +" as the cards */
.qv-add { display: flex; gap: 8px; align-items: stretch; }
.qv-add .add-btn, .qv-add .stepper { flex: 1; min-height: 46px; }
.qv-add:not(.in-cart) .stepper { display: none; }
.qv-add.in-cart .add-btn { display: none; }
.qv-add.in-cart .stepper { border-color: var(--accent); }
.qv-add .stepper button { width: 46px; }
.qv-add .stepper input { font-weight: 700; font-size: 16px; }
.qv-incart { margin: 0; font-size: 13px; color: var(--accent-dark); font-weight: 600; }
@media (max-width: 560px) {
  .product .add .case-add { min-width: 48px; padding: 2px 4px; }
  .case-add b { font-size: 12px; }
  .case-add small { font-size: 11px; }
  .product .stepper button { width: 36px; }
}
@media (max-width: 560px) {
  /* Room for 3–4 digit quantities next to "+1 箱" on a 2-column phone grid. */
  .product .add:has(.case-add) .stepper button { width: 28px; }
  .product .add:has(.case-add) .stepper input { font-size: 15px; letter-spacing: -.02em; padding: 0; }
  .product .add .case-add { min-width: 44px; padding: 2px 3px; }
}

/* ---- Reduced motion (2026-11-19 audit fix) ----
   No sliding, lifting or scaling for people who ask the system for less motion, but keep a short
   fade so the order drawer, dialogs and toasts still visibly appear and disappear.
   (Replaces an old global "* { transition: none !important }" that removed that feedback too.) */
@media (prefers-reduced-motion: reduce) {
  .drawer { transform: none; opacity: 0; transition: opacity .15s ease-out, visibility 0s linear .15s; }
  .drawer.open { opacity: 1; transition: opacity .15s ease-out, visibility 0s; }
  .toast, .toast.show { transform: translate(-50%, 0); transition: opacity .15s ease-out; }
  dialog[open] { animation: rm-fade .15s ease-out; }
  dialog[open]::backdrop { animation: rm-fade .15s ease-out; }
  .ch-tile:hover { transform: none; }
  .cat-row-arrow, .product-img .zoom-hint { transform: none; }
  .product.just-added .add-btn { animation: none; }
}
@keyframes rm-fade { from { opacity: 0; } to { opacity: 1; } }

.sku-spec { display: none; }
/* ---- Phones: compact two-column cards (owner's choice 2026-11-19, after trying a list layout) ----
   Same two-column cards as before, only lower: shorter picture, "SKU · spec" on one line
   (p.sku-spec from app.js), no "上次订过". Once added, "− qty +" spans the whole card width
   (wide number box) and "+1 箱" sits at the right end of the price row. */
@media (max-width: 560px) {
  .product-grid > .product:not(.skeleton) { contain-intrinsic-size: auto 220px; }
  .product-grid .product { padding: 7px 8px 8px; gap: 1px; }
  .product-grid .product-img { margin: -7px -8px 4px; aspect-ratio: 1 / 0.46; }
  .product-grid .product-img img { padding: 2px; }
  .product-grid .product-img .zoom-hint { display: none; }
  .product-grid .product h3 { line-height: 1.2; }
  .product-grid .product h3 .zh { font-size: 13.5px; line-height: 1.25; }
  .product-grid .product h3 .en { font-size: 11px; line-height: 1.25; margin-top: 1px; }
  .product-grid .sku-line, .product-grid .product-meta, .product-grid .last-ordered { display: none; }
  .product-grid .sku-spec {
    display: block; margin: 1px 0 0; font-size: 11px; line-height: 1.25; color: var(--muted);
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  .product-grid .product-bottom { position: relative; margin-top: auto; padding-top: 4px; gap: 4px; }
  .product-grid .alcohol-label { margin: 2px 0 3px; justify-self: start; }
  .product-grid .price { height: 32px; min-height: 0; overflow: hidden; padding-right: 56px; align-content: center; gap: 0 3px; line-height: 1.15; }
  .product-grid .price strong { font-size: 15.5px; }
  .product-grid .product .add { position: static; gap: 0; min-width: 0; }
  .product-grid .product .add .stepper { min-width: 0; }
  .product-grid .product .add .add-btn { min-height: 46px; height: 46px; }
  .product-grid .product .add .stepper { height: 46px; box-sizing: border-box; }
  /* "+1 箱": right end of the price row (out of the add row, so the number box gets the room) */
  .product-grid .product .add .case-add {
    position: absolute; top: 6px; right: 0; min-width: 52px; min-height: 28px;
    padding: 1px 6px; font-size: 11.5px; line-height: 1.15;
  }
  .product-grid .product .add .stepper button,
  .product-grid .product .add:has(.case-add) .stepper button { width: 36px; min-height: 44px; font-size: 18px; }
  .product-grid .product .add .stepper input,
  .product-grid .product .add:has(.case-add) .stepper input {
    flex: 1 1 0; width: 0; min-width: 0; font-size: 17px; letter-spacing: 0; padding: 0 2px;
  }
  .product-grid .case-hint { display: none; }
}

/* ---- Phones: product names (owner's choice 2026-11-19) ----
   English follows the Chinese on the same line; at most 3 lines (English may be cut off);
   always 3 lines tall so the two cards in a row line up. */
@media (max-width: 560px) {
  .product-grid .product h3 {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
    overflow: hidden; line-height: 17px; height: 51px;
  }
  .product-grid .product h3 .zh {
    display: inline; font-size: 13.5px; line-height: 17px; -webkit-line-clamp: unset; overflow: visible;
  }
  .product-grid .product h3 .en {
    display: inline; font-size: 11px; line-height: 17px; margin: 0 0 0 4px;
    white-space: normal; overflow: visible; text-overflow: clip;
  }
}

/* ---- Quick view: same size for every product, centred, never scrolls (owner's choice 2026-11-19) ----
   The info block keeps its natural height; the picture fills whatever room is left.
   The close button stays in the top-right corner (the dialog itself never scrolls). */
.qv-pic { position: relative; min-height: 0; }
.qv-pic img {
  position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px);
  max-height: none; object-fit: contain;
}
.qv-inner { height: min(540px, calc(100vh - 48px)); min-height: 0; }
.qv-info { min-height: 0; overflow-y: auto; }
.quick-view .dialog-close {
  z-index: 2; background: rgba(255,255,255,.94); border-radius: 50%;
  box-shadow: 0 2px 10px rgba(19,40,59,.18);
}
@media (max-width: 700px) {
  .quick-view {
    width: calc(100vw - 24px); height: min(640px, calc(100vh - 32px)); height: min(640px, calc(100dvh - 32px));
    max-height: none; overflow: hidden;
  }
  .qv-inner { display: flex; flex-direction: column; height: 100%; }
  .qv-pic { flex: 1 1 auto; padding: 0; border-bottom: 1px solid #efece6; min-height: 110px; }
  .qv-pic img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .qv-info { flex: 0 1 auto; padding: 12px 16px 16px; gap: 7px; }
  .qv-info h3 { margin: 0; }
  .qv-info h3 .zh {
    font-size: 19px; line-height: 1.3;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
  .qv-info h3 .en {
    font-size: 13px; margin-top: 2px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  }
  .qv-meta { font-size: 13px; gap: 2px; }
  .qv-info .price { padding-top: 8px; margin-top: 2px; }
  .qv-info .price strong { font-size: 24px; }
  .qv-add .add-btn, .qv-add .stepper { min-height: 44px; }
}

/* ---- Phones: tighter card text (owner's request 2026-11-19) ----
   Name: at most 3 lines at a 15px line pitch (always 3 lines tall); then one line "SKU · spec".
   The spec is never cut: if the line is too long, the SKU part is shortened with "…". */
@media (max-width: 560px) {
  /* Chinese and English fonts on one line push the line box taller unless both sit at the top. */
  .product-grid .product h3 { font-size: 13px; line-height: 15px; height: 45px; margin: 1px 0 0; }
  .product-grid .product h3 .zh { font-size: 13px; line-height: 15px; vertical-align: top; }
  .product-grid .product h3 .en { font-size: 11.5px; line-height: 15px; margin-left: 3px; vertical-align: top; }
  .product-grid .sku-spec {
    display: flex; margin: 1px 0 0; font-size: 11px; line-height: 15px;
    white-space: nowrap; overflow: visible;
  }
  .product-grid .sku-spec .ss-sku { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .product-grid .sku-spec .ss-spec { flex: none; }
  .product-grid .sku-spec .ss-spec::before { content: " · "; white-space: pre; }
}

/* Order history: order status (2026-11-19) — 已收到 until the owner marks it 已确认 on /admin */
.ho-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.ho-status.is-received { background: var(--accent-tint); color: #765219; }
.ho-status.is-confirmed { background: #e6f1ea; color: #1f5a37; }
/* Review dialog: GST line under the total, confirmation promise above the buttons (2026-11-19) */
.rv-gst { margin: -6px 0 10px; text-align: right; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rv-gst[hidden] { display: none; }
.rv-promise { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-ctl); background: #e6f1ea; color: #1f5a37; font-size: 13.5px; line-height: 1.45; }
.rv-promise .en { color: #2b6a45; font-size: 12px; margin-top: 2px; }
