/* 牟老五商品库 · 客户页
   2026-11-06 re16 改版：全面学 regrocery.co 的设计语言——
   只借风格（配色、字体、布局、按钮、动效），图和文案全是咱们自己的，
   不搬对方的图片、文案和代码。
   奶油底 #f7f6f2 + 橙红 #f74c25 + 浅灰图块 #efede7；大衬线标题 + 干净无衬线正文；
   卡片去掉边框阴影圆角，图直接贴灰块；分类改成大衬线通栏；按钮全是全圆角药丸；
   动效统一 ease-out-quint（cubic-bezier(.22,1,.36,1)），.3-.4s。
   类名、DOM 钩子、接口一律不动，pytest / e2e 照旧。 */

/* ---- 设计变量 ---- */
body {
  --cream: #f7f6f2;
  --orange: #f74c25;
  --orange-translucent: rgba(247, 76, 37, .55);
  --orange-faint: rgba(247, 76, 37, .25);
  --gray: #efede7;
  --serif: Georgia, 'Songti SC', 'STSong', 'Noto Serif SC', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
  --ease-out-quint: cubic-bezier(.22, 1, .36, 1);
  --header-height: 68px;
  --canvas: var(--cream);
  --paper: var(--cream);
  --ink: var(--orange);
  --muted: var(--orange-translucent);
  --line: var(--orange-faint);
  background: var(--cream);
  color: var(--orange);
  font-family: var(--sans);
  letter-spacing: -.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
a { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange-faint); outline-offset: 2px; }

/* ---- 通用药丸按钮（学 re 的 .button） ---- */
.btn, .btn-secondary {
  min-height: calc(2rem + 2px);
  padding: .25rem 1rem;
  border: 1px solid var(--orange);
  border-radius: 100vw;
  font-size: 1rem;
  line-height: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
}
.btn { background: var(--orange); color: var(--cream); font-weight: 700; }
.btn:hover { background: transparent; color: var(--orange); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--orange); font-weight: 650; }
.btn-secondary:hover { background: var(--orange); color: var(--cream); }
.btn-danger { background: var(--orange); color: var(--cream); border: 1px solid var(--orange); border-radius: 100vw; }
.btn-ghost { background: transparent; color: var(--orange); }
.btn-ghost:hover { background: var(--orange-faint); }
.icon-btn { background: transparent; color: var(--orange); }
.icon-btn:hover { background: var(--orange-faint); }
.link-btn { border: 0; background: transparent; color: var(--orange); font-size: 13px; padding: 6px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .125em; }
.underline { text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .125em; }

/* ---- 顶栏：透明盖在 hero 上，滚过后变奶油底 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0;
  color: var(--orange);
  background: transparent;
}
.site-header.scrolled { background: var(--cream); }
.site-header.scrolled .header-inner { background: var(--cream); }
.header-inner {
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "left center right";
  align-items: center;
  gap: 1rem;
  background: transparent;
  transition: background-color .4s var(--ease-out-quint);
}
.header-left { grid-area: left; justify-self: start; }
.header-center { grid-area: center; justify-self: center; }
.header-right {
  grid-area: right;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.menu-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  padding: .5rem 0;
}
.menu-btn:hover { opacity: .6; }
.brand {
  display: inline-block;
  text-decoration: none;
  color: var(--orange);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  line-height: 1;
  opacity: 0;
  transform: translateY(calc(var(--header-height) * -1));
  transition: opacity .3s var(--ease-out-quint), transform .3s var(--ease-out-quint);
}
.site-header.scrolled .brand { opacity: 1; transform: translateY(0); }
.brand span { font-family: var(--serif); }
.search-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}
.search-btn:hover { background: var(--orange-faint); }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: calc(2rem + 2px);
  padding: .25rem 1rem;
  border: 1px solid var(--orange);
  border-radius: 100vw;
  background: var(--cream);
  color: var(--orange);
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
}
.header-cta:hover { background: var(--orange); color: var(--cream); }
.site-header.scrolled .header-cta { background: var(--orange); color: var(--cream); }
.site-header.scrolled .header-cta:hover { background: transparent; color: var(--orange); }

/* ---- Hero 滚动剧场：机制不变，换 re 的皮 ---- */
.hero-stage { height: 260vh; background: #e8d9c3; margin-top: calc(var(--header-height) * -1); }
.hero {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
  max-width: none;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 60px 6% 52px;
  background: #e8d9c3;
  overflow: hidden;
}
.hero > .hero-bg {
  position: absolute;
  top: -15%;
  bottom: -15%;
  left: 0;
  right: 0;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.09); }
}
.hero > .hero-bottles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.bottle {
  position: absolute;
  bottom: calc(var(--bb, 0) * 1%);
  left: calc(var(--bx, 50) * 1%);
  height: calc(var(--bh, 92) * 1%);
  width: auto;
  --rise: 48px;
  opacity: var(--b, 0);
  transform: translate(-50%, calc(var(--rise) * (1 - var(--b, 0)))) scale(calc(.94 + .06 * var(--b, 0))) rotate(calc(var(--br, 0) * 1deg));
  filter: blur(calc(8px * (1 - var(--b, 0))));
  will-change: transform, opacity, filter;
}
.bottle-0 { --bx: var(--x0, 85); --bh: var(--h0, 105); --bb: var(--y0, -4); --br: var(--r0, 5); --b: var(--b0, 1); }
.bottle-2 { --bx: 65.5; --bh: 92; --bb: 0; --br: 0; --b: var(--b2, 0); }
.bottle-3 { --bx: var(--x3, 68); --bh: var(--h3, 120); --bb: var(--y3, -10); --br: var(--r3, 4); --b: var(--b3, 1); }
.hero-kicker, .hero h1, .hero-copy, .hero-button {
  transform: translateY(var(--hero-drift, 0px));
  opacity: calc(1 - var(--hero-fade, 0));
  will-change: transform, opacity;
}
.hero > * { position: relative; z-index: 3; }
.hero-kicker { color: var(--orange); font-size: 13px; font-weight: 650; letter-spacing: .08em; }
.hero h1 {
  color: var(--orange);
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 168px);
  letter-spacing: -.05em;
  line-height: .8;
  margin: 22px 0;
  font-weight: 400;
}
.hero h1 span { color: var(--orange); }
.hero-copy { color: var(--orange); font-size: 19px; line-height: 1.25; }
.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  min-height: calc(3rem + 2px);
  padding: .5rem 1.5rem;
  border: 1px solid var(--orange);
  border-radius: 100vw;
  background: var(--orange);
  color: var(--cream);
  text-decoration: none;
  font-size: 1rem;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
}
.hero-button:hover { background: var(--cream); color: var(--orange); }
@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; }
  .hero-stage { height: auto; margin-top: 0; }
  .hero { position: relative; top: 0; }
  .bottle { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0deg); filter: none; }
  .bottle-0 { --bx: 79; --bh: 92; --bb: 0; --br: 0; }
  .bottle-3 { --bx: 52; --bh: 92; --bb: 0; --br: 0; }
}

/* ---- 跑马灯：大衬线分类词，无限横滚 ---- */
.marquee { overflow: hidden; background: var(--cream); padding: 1rem 0; }
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
  font-family: var(--sans);
  font-size: 4rem;
  line-height: .8;
  letter-spacing: -.05em;
  color: var(--orange);
  white-space: nowrap;
}
.marquee-track span { padding-right: .8ch; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- 商品区标题 ---- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px calc(116px + var(--safe-bottom)); }
.catalog-heading { padding: 52px 0 20px; scroll-margin-top: 12px; }
.catalog-heading p { color: var(--orange); font-size: 11px; letter-spacing: .16em; font-weight: 700; }
.catalog-heading h2 {
  margin: 10px 0 7px;
  color: var(--orange);
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -.05em;
  line-height: .8;
  font-weight: 400;
}
.catalog-heading span { color: var(--orange-translucent); font-size: 14px; }

/* ---- 搜索 + 分类大衬线通栏 ---- */
.search-block {
  position: sticky;
  top: var(--header-height);
  z-index: 20;
  padding: 10px 0 12px;
  background: var(--cream);
}
.search-shell {
  display: flex; align-items: center; gap: 9px;
  background: transparent;
  border: 1px solid var(--orange);
  border-radius: 100vw;
  padding: 0 18px;
  color: var(--orange);
}
.search-shell svg { flex: none; color: var(--orange); }
.search-shell input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  background: transparent;
  padding: 13px 0;
  font-size: 16px;
  color: var(--orange);
}
.search-shell input::placeholder { opacity: .5; color: var(--orange); }
.search-shell input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear {
  flex: none;
  width: 28px; height: 28px;
  border: 0; border-radius: 50%;
  background: var(--orange-faint);
  color: var(--orange);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
}
.search-clear:hover { background: var(--orange); color: var(--cream); }
.search-clear[hidden] { display: none; }

.chips {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 14px 0 4px;
  scrollbar-width: none;
  align-items: baseline;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--orange);
  border-radius: 0;
  padding: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: .8;
  letter-spacing: -.025em;
  font-weight: 400;
  white-space: nowrap;
  opacity: .25;
}
.chip:hover { opacity: .6; }
.chip.active { opacity: 1; }
.chip-count {
  margin-left: .25rem;
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: 0;
  opacity: .8;
  vertical-align: top;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--orange-faint);
}
.count { color: var(--orange-translucent); font-size: 13px; }

/* ---- 商品网格 ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* 全部分类时，按分类分段的组标题：大衬线 */
.grid-group-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2rem 0 .75rem;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: .9;
}
.grid-group-title:first-child { margin-top: .5rem; }
.grid-group-title .grid-group-count {
  color: var(--orange);
  background: transparent;
  border: 1px solid var(--orange);
  padding: .1rem .6rem;
  border-radius: 100vw;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 400;
  white-space: nowrap;
}

/* ---- 商品卡片：无边框无阴影无圆角，图贴暖米块（货架底子） ---- */
.card {
  position: relative;
  display: grid;
  grid-row-gap: .5rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  font-size: .75rem;
}
@media (min-width: 600px) { .card { font-size: 1rem; } }

.card-media {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  background: #efe6d3;
  cursor: pointer;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  opacity: 0;
  transition: opacity .5s var(--ease-out-quint);
}
.card-media img.img-in { opacity: 1; }
/* 无图：统一暖米块 + 橙红衬线首字，不再按分类换底色 */
.card-media .blank {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 0;
  background: #efe6d3;
  color: var(--orange);
}
.blank-glyph {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
}
.blank-label { font-size: 11px; letter-spacing: .12em; color: var(--orange-translucent); }

.card-badge {
  position: absolute; left: .5rem; top: .5rem;
  background: var(--cream);
  color: var(--orange);
  font-size: 11px;
  padding: .25rem .5rem;
  border-radius: 0;
  z-index: 1;
}
/* ＋ 钮：贴在图右下角，奶油圆钮，悬停反色 */
.add-btn {
  position: absolute;
  right: .75rem; bottom: .75rem;
  width: 36px; height: 36px; flex: none;
  border: 1px solid var(--orange);
  border-radius: 50%;
  background: var(--cream);
  color: var(--orange);
  font-size: 21px;
  line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
  z-index: 1;
}
.add-btn:hover { background: var(--orange); color: var(--cream); }
.card.in-cart .add-btn { background: var(--orange); color: var(--cream); }

.card-body {
  display: grid;
  grid-row-gap: .4rem;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
}
.card-name {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--orange);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.card-cat {
  color: var(--orange);
  background: transparent;
  border: 1px solid var(--orange);
  font-size: .75rem;
  font-weight: 400;
  padding: .15rem .6rem;
  border-radius: 100vw;
  white-space: nowrap;
}
.card-qty {
  color: var(--cream);
  background: var(--orange);
  font-size: .75rem;
  font-weight: 400;
  padding: .15rem .6rem;
  border-radius: 100vw;
  white-space: nowrap;
}

/* 骨架屏 */
.skeleton { background: transparent; border-radius: 0; overflow: hidden; border: 0; }
.skeleton .sk-img { aspect-ratio: 1 / 1; background: var(--gray); animation: shimmer 1.4s infinite; }
.skeleton .sk-line { height: 14px; margin: 12px 0; border-radius: 0; background: var(--gray); }
.skeleton .sk-line.short { width: 55%; }
@keyframes shimmer { 0% { opacity: .6; } 50% { opacity: 1; } 100% { opacity: .6; } }

.empty {
  text-align: center;
  color: var(--orange-translucent);
  padding: 52px 20px;
  background: transparent;
  border: 1px dashed var(--orange-faint);
  border-radius: 0;
}
.empty strong { display: block; color: var(--orange); margin-bottom: 6px; }

.site-footer {
  margin-top: 48px;
  padding: 22px 4px;
  border-top: 1px solid var(--orange-faint);
  color: var(--orange-translucent);
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}
.site-footer .footer-brand {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: .8;
  letter-spacing: -.05em;
  color: var(--orange);
  margin-bottom: 1rem;
}

/* ---- 清单条 ---- */
.cart-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: var(--cream);
  border-top: 1px solid var(--orange);
  color: var(--orange);
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 35;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: var(--cream);
  border-radius: 100vw;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(247, 76, 37, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .3s var(--ease-out-quint), transform .3s var(--ease-out-quint), background .3s var(--ease-out-quint), color .3s var(--ease-out-quint), bottom .3s var(--ease-out-quint), visibility 0s linear .3s;
}
.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity .3s var(--ease-out-quint), transform .3s var(--ease-out-quint), background .3s var(--ease-out-quint), color .3s var(--ease-out-quint), bottom .3s var(--ease-out-quint), visibility 0s;
}
.to-top:hover { background: var(--cream); color: var(--orange); }
body.has-cart .to-top { bottom: 88px; }
.cart-bar[hidden] { display: none; }
.cart-bar-inner { max-width: 1280px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.cart-summary { flex: 1; min-width: 0; }
.cart-summary strong { display: block; font-size: 15px; }
.cart-names { color: var(--orange-translucent); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-bar .btn { flex: none; padding: 12px 20px; }

/* ---- 数量弹窗 / 清单弹窗：奶油底 + 橙字 + 直角 + 药丸钮 ---- */
.overlay {
  background: rgba(247, 246, 242, .7);
}
.sheet {
  background: var(--cream);
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 0;
  box-shadow: none;
}
.sheet-head h2 { font-family: var(--serif); font-size: 2rem; line-height: .9; font-weight: 400; letter-spacing: -.025em; }
.field-label { color: var(--orange); }
.hint { color: var(--orange-translucent); }
.form-error { color: var(--orange); }

.qty-product {
  display: flex; gap: 12px; align-items: center;
  background: transparent;
  border: 1px solid var(--orange-faint);
  border-radius: 0;
  padding: 10px;
}
.qty-product img, .qty-product .blank { width: 72px; height: 72px; flex: none; border-radius: 0; object-fit: contain; }
.qty-product img { background: #fff; }
.qty-product .blank { background: var(--gray); }
.qty-product .blank { display: grid; place-items: center; color: var(--orange-translucent); font-size: 12px; }
.qty-product p { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.qty-hint { font-weight: 400 !important; font-size: 13px !important; color: var(--orange-translucent); margin-top: 4px !important; }

.qty-input-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.qty-input-row button {
  height: 48px;
  border: 1px solid var(--orange);
  background: transparent;
  color: var(--orange);
  border-radius: 50%;
  font-size: 24px;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
}
.qty-input-row button:hover { background: var(--orange); color: var(--cream); }
.qty-input-row input {
  height: 48px;
  border: 1px solid var(--orange);
  border-radius: 100vw;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  background: transparent;
  color: var(--orange);
  min-width: 0;
}
.qty-input-row input::placeholder { opacity: .5; color: var(--orange); }
.quick-qty { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quick-qty button {
  border: 1px solid var(--orange);
  background: transparent;
  color: var(--orange);
  border-radius: 100vw;
  padding: 8px 15px;
  font-size: 14px;
  transition: background .3s var(--ease-out-quint), color .3s var(--ease-out-quint);
}
.quick-qty button:hover { background: var(--orange); color: var(--cream); }

.cart-list { display: flex; flex-direction: column; gap: 2px; }
.cart-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--orange-faint);
}
.cart-item img, .cart-item .blank { width: 48px; height: 48px; border-radius: 0; object-fit: contain; }
.cart-item img { background: #fff; }
.cart-item .blank { background: var(--gray); }
.cart-item .blank { display: grid; place-items: center; color: var(--orange-translucent); font-size: 11px; }
.cart-item-name { font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.cart-item-sub { color: var(--orange-translucent); font-size: 12px; margin-top: 2px; }
.cart-item-sub.missing { color: var(--orange); }
.cart-item-controls { display: flex; align-items: center; gap: 6px; }
.cart-qty {
  width: 72px;
  border: 1px solid var(--orange);
  border-radius: 100vw;
  padding: 9px 8px;
  text-align: center;
  font-size: 16px;
  background: transparent;
  color: var(--orange);
}
.remove-btn {
  border: 1px solid var(--orange);
  background: transparent;
  color: var(--orange);
  border-radius: 100vw;
  padding: 9px 10px;
  font-size: 13px;
}
.remove-btn:hover { background: var(--orange); color: var(--cream); }
.cart-actions { display: flex; gap: 8px; margin-top: 14px; }
.cart-actions .btn { flex: 1; }
.cart-note { margin-top: 10px; }

.copy-preview { margin-top: 14px; }
.copy-text {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--orange);
  border-radius: 0;
  padding: 12px;
  font: 16px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: transparent;
  color: var(--orange);
  resize: vertical;
}
.copy-actions { display: flex; gap: 8px; margin-top: 8px; }
.copy-actions .btn { flex: 1; }

.offline-banner {
  position: sticky; top: 0; z-index: 25;
  background: var(--cream);
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
  padding: 9px 16px;
  font-size: 13px;
  text-align: center;
}
.offline-banner[hidden] { display: none; }

.notice {
  border-radius: 0;
  padding: 12px 14px;
  background: var(--cream);
  color: var(--orange);
  font-size: 14px;
  border: 1px solid var(--orange);
  margin: 12px 0;
}
.notice.error { background: var(--cream); color: var(--orange); border-color: var(--orange); }
.notice.ok { background: var(--cream); color: var(--orange); border-color: var(--orange); }

.toast {
  background: var(--orange);
  color: var(--cream);
  box-shadow: none;
}

/* ---- 桌面端清单抽屉：右侧滑入；数量弹窗仍居中 ---- */
@media (min-width: 720px) {
  #cartOverlay.overlay { align-items: stretch; justify-content: flex-end; padding: 0; }
  #qtyOverlay.overlay { align-items: center; justify-content: center; padding: 24px; }
  #cartOverlay .sheet {
    width: 25rem;
    max-width: 25rem;
    height: 100%;
    max-height: 100%;
    border: 0;
    border-left: 1px solid var(--orange);
    border-radius: 0;
    padding: 0 1rem 2rem;
    animation: drawerIn .4s var(--ease-out-quint);
  }
  /* 清单抽屉用 re 的反色：橙底 + 奶油字 */
  #cartOverlay .sheet { background: var(--orange); color: var(--cream); border-left-color: var(--cream); }
  #cartOverlay .sheet .icon-btn { color: var(--cream); }
  #cartOverlay .sheet .icon-btn:hover { background: rgba(247, 246, 242, .2); }
  #cartOverlay .cart-item { border-bottom-color: rgba(247, 246, 242, .4); }
  #cartOverlay .cart-item img, #cartOverlay .cart-item .blank { background: rgba(247, 246, 242, .2); }
  #cartOverlay .cart-item .blank { color: rgba(247, 246, 242, .7); }
  #cartOverlay .cart-item-sub { color: rgba(247, 246, 242, .7); }
  #cartOverlay .cart-item-sub.missing { color: var(--cream); }
  #cartOverlay .cart-qty { border-color: var(--cream); color: var(--cream); }
  #cartOverlay .remove-btn { border-color: var(--cream); color: var(--cream); }
  #cartOverlay .remove-btn:hover { background: var(--cream); color: var(--orange); }
  #cartOverlay .cart-note { color: rgba(247, 246, 242, .7); }
  #cartOverlay .sheet .btn-secondary { border-color: var(--cream); color: var(--cream); }
  #cartOverlay .sheet .btn-secondary:hover { background: var(--cream); color: var(--orange); }
  #cartOverlay .sheet .btn { background: var(--cream); color: var(--orange); border-color: var(--cream); }
  #cartOverlay .sheet .btn:hover { background: transparent; color: var(--cream); }
  #cartOverlay .copy-text { border-color: var(--cream); color: var(--cream); }
  #cartOverlay .copy-preview .field-label { color: var(--cream); }
  #cartOverlay .hint { color: rgba(247, 246, 242, .7); }
  #qtyOverlay .sheet { animation: sheetUp .35s var(--ease-out-quint); }
  @keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
}

/* ---- 全屏菜单 ---- */
.menu-overlay {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  z-index: 45;
  background: var(--cream);
  color: var(--orange);
  overflow-y: auto;
  animation: menuIn .35s var(--ease-out-quint);
}
.menu-overlay[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }
.menu-panel { padding: 1rem; min-height: 100%; display: grid; align-items: start; grid-row-gap: 2rem; }
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
}
.menu-brand { font-family: var(--serif); font-size: 2rem; line-height: .8; letter-spacing: -.05em; }
.menu-cats { display: grid; grid-row-gap: .15em; }
.menu-cat {
  border: 0; background: transparent; color: var(--orange);
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: .8;
  letter-spacing: -.025em;
  text-align: left;
  padding: .25rem 0;
  white-space: nowrap;
  transition: opacity .3s var(--ease-out-quint);
}
.menu-cat:hover { opacity: .6; }
.menu-cat sup { font-family: var(--sans); font-size: .75rem; vertical-align: top; margin-left: .25rem; }
.menu-foot { color: var(--orange-translucent); font-size: 13px; line-height: 1.8; }

/* ---- 平板 ---- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .wrap { padding-left: 24px; padding-right: 24px; }
  .hero { min-height: 520px; }
  .chip { font-size: 2rem; }
  .grid-group-title { font-size: 1.75rem; }
  .marquee-track { font-size: 5rem; }
}

/* ---- 桌面 ---- */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
  .chip { font-size: 2.5rem; letter-spacing: -.05em; }
  .marquee-track { font-size: 6rem; }
}

@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---- 手机 ---- */
@media (max-width: 639px) {
  body { --header-height: 60px; }
  .header-inner { padding: 0 1rem; }
  .brand { font-size: 1.25rem; }
  .header-cta { font-size: .8rem; padding: .25rem .75rem; }
  .hero-stage { height: 230vh; }
  .hero { min-height: 520px; padding: 48px 22px 42px; justify-content: flex-start; }
  .bottle { --rise: 32px; }
  .bottle-0 { --bx: var(--x0, 85); --bh: var(--h0, 56); --bb: var(--y0, -4); --br: var(--r0, 7); }
  .bottle-2 { --bx: 50; --bh: 46; --bb: 0; --br: 0; }
  .bottle-3 { --bx: var(--x3, 58); --bh: var(--h3, 62); --bb: var(--y3, -6); --br: var(--r3, 4); }
  .hero h1 { font-size: clamp(64px, 19vw, 96px); }
  .hero-copy { font-size: 17px; }
  .catalog-heading { padding-top: 40px; }
  .card-name { font-size: 14px; }
  .blank-glyph { font-size: 44px; }
  .add-btn { width: 32px; height: 32px; font-size: 19px; }
  .menu-cat { font-size: 2rem; }
}

/* ---- 手机 + 减弱动效：直接显示三瓶阵 ---- */
@media (max-width: 639px) and (prefers-reduced-motion: reduce) {
  .bottle-0 { --bx: 78; --bh: 46; --bb: 0; --br: 0; }
  .bottle-3 { --bx: 22; --bh: 46; --bb: 0; --br: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .menu-overlay { animation: none; }
  .to-top { transition: none; }
}
