﻿/* ============ tokens ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --surface: #ffffff;
  --text: #131417;
  --text-2: #5f636b;
  --text-3: #727884;
  --line: #e7e8ec;
  --line-2: #f0f1f4;
  --accent: #14151a;
  --accent-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 18, 22, .05), 0 1px 3px rgba(16, 18, 22, .04);
  --shadow-md: 0 6px 22px -6px rgba(16, 18, 22, .16), 0 2px 6px rgba(16, 18, 22, .05);
  --shadow-lg: 0 32px 64px -20px rgba(0, 0, 0, .4);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --wrap: 1240px;
  --header-h: 62px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --bg: #0c0d0f;
  --bg-soft: #111316;
  --surface: #15171b;
  --text: #eef0f3;
  --text-2: #a2a8b1;
  --text-3: #8b929c;
  --line: #24272d;
  --line-2: #1b1e22;
  --accent: #f2f4f7;
  --accent-fg: #101114;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 8px 26px -8px rgba(0, 0, 0, .7);
  --shadow-lg: 0 32px 64px -18px rgba(0, 0, 0, .85);
}

/* ============ base ============ */
* { box-sizing: border-box; }

/* Author display rules override the UA [hidden] rule, so force it here */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

body.lb-open { overflow: hidden; }

img { display: block; max-width: 100%; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; text-decoration: none; }

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: fixed;
  top: -60px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-sm);
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ============ topbar ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-2);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  font-weight: 620;
  letter-spacing: -.01em;
}

.brand__mark {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: var(--accent);
  position: relative;
  flex: 0 0 auto;
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 6px 6px 10px;
  border: 1.8px solid var(--accent-fg);
  border-radius: 50%;
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 7px; right: 7px; bottom: 5px;
  height: 1.8px;
  background: var(--accent-fg);
  border-radius: 1px;
}

.brand__name { font-size: 15px; }

.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 380px;
  margin-left: auto;
}

.search__icon {
  position: absolute;
  left: 12px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 36px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .18s, background-color .18s;
  -webkit-appearance: none;
  appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--text-3); }
.search input:focus {
  background: var(--bg);
  border-color: var(--text);
}

.search__clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  color: var(--text-2);
  font-size: 17px;
  line-height: 1;
}

.iconbtn {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  transition: color .18s, border-color .18s, transform .18s;
}
.iconbtn:hover { color: var(--text); border-color: var(--text-3); }
.iconbtn:active { transform: scale(.95); }
.iconbtn svg { width: 18px; height: 18px; }

.i-moon { display: none; }
html[data-theme="dark"] .i-sun { display: none; }
html[data-theme="dark"] .i-moon { display: block; }

/* ============ hero ============ */
.hero {
  padding-top: clamp(34px, 6vw, 68px);
  padding-bottom: clamp(22px, 3vw, 34px);
}

.hero__title {
  font-size: clamp(27px, 5.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 660;
  margin: 0 0 10px;
  max-width: 20ch;
}

.hero__sub {
  color: var(--text-2);
  font-size: clamp(14px, 1.6vw, 16px);
  max-width: 46ch;
}

.hero__meta {
  margin-top: 16px;
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

/* ============ filters ============ */
.filterbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--bg);
}

/* Right-edge fade: only shown while there is more to scroll */
.filterbar::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 72px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s var(--ease);
  background: linear-gradient(to right, transparent, var(--bg) 78%);
}
.filterbar.is-scrollable::after { opacity: 1; }

/* Left-edge fade: appears once the row has been scrolled */
.filterbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 56px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s var(--ease);
  background: linear-gradient(to left, transparent, var(--bg) 78%);
}
.filterbar.is-scrolled::before { opacity: 1; }

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 4px;
  padding-bottom: 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  white-space: nowrap;
  transition: background-color .16s, color .16s, border-color .16s;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }

.chip--active,
.chip--active:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.chip__n {
  font-size: 11.5px;
  opacity: .62;
  font-variant-numeric: tabular-nums;
}

.chip--active .chip__n { opacity: .7; }

/* ============ grid ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
  padding-bottom: 24px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  transition: border-color .2s var(--ease), box-shadow .24s var(--ease), transform .24s var(--ease);
  animation: rise .34s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  overflow: hidden;
}

.card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .55s var(--ease), opacity .4s;
  opacity: 0;
}
.card__img.is-loaded { opacity: 1; }
.card:hover .card__img { transform: scale(1.045); }

/* 相册里的图片张数 */
.card__count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(12, 13, 15, .6);
  color: #fff;
  font-size: 11px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

.card__tags {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  max-width: calc(100% - 16px);
}

.tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: .02em;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.card__body {
  padding: 10px 12px 2px;
}

.card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 520;
  line-height: 1.42;
  letter-spacing: -.005em;
  min-height: 2.84em;
  word-break: break-word;
}

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 29px;             /* Fixed height: cards stay equal whether or not a price exists */
  padding: 0 12px;
  font-size: 11.5px;
  color: var(--text-3);
}

.card__cat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__price {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 580;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

/* ============ empty ============ */
.empty {
  padding: 60px 0 90px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

.linkbtn {
  border: 0;
  background: none;
  padding: 0 0 0 4px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkbtn:hover { opacity: .7; }

/* ============ footer ============ */
.footer {
  padding-top: 34px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line-2);
  margin-top: 26px;
  color: var(--text-3);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}

.footer__contact { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__contact a,
.footer__contact span { color: var(--text-2); }
.footer__contact a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ============ lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  background: rgba(8, 9, 11, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .2s var(--ease);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb__bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: rgba(255, 255, 255, .62);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.iconbtn--dark {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .14);
  color: #fff;
}
.iconbtn--dark:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}

.lb__stage {
  grid-column: 2;
  margin: 0;
  height: 100%;
  max-height: 100vh;
  padding: 58px 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}

.lb__stage img {
  max-width: 100%;
  max-height: calc(100vh - 248px);
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  animation: zoom .26s var(--ease);
}

@keyframes zoom {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: none; }
}

.lb__cap {
  text-align: center;
  color: #fff;
  max-width: 620px;
  padding: 0 8px;
  flex: 0 0 auto;
}

.lb__cap h2 {
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -.005em;
}

.lb__cap p {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .58);
}

.lb__price { color: rgba(255, 255, 255, .82) !important; font-weight: 560; }

.lb__nav {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transition: background-color .18s, border-color .18s, transform .18s;
}
.lb__nav:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .32); }
.lb__nav:active { transform: scale(.94); }
.lb__nav svg { width: 20px; height: 20px; }
.lb__nav--prev { grid-column: 1; justify-self: center; }
.lb__nav--next { grid-column: 3; justify-self: center; }
.lb__nav[disabled] { opacity: .28; pointer-events: none; }

/* 底部缩略图条 */
.lb__thumbs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 8px;
  padding: 14px 20px 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: linear-gradient(to top, rgba(8, 9, 11, .92) 40%, transparent);
}
.lb__thumbs::-webkit-scrollbar { display: none; }

/* 内容少时居中、内容多时不裁边 */
.lb__thumbs::before,
.lb__thumbs::after { content: ""; margin: auto; }

.lb__thumb {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  padding: 0;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, .07);
  opacity: .5;
  transition: opacity .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.lb__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.lb__thumb:hover { opacity: .85; transform: translateY(-1px); }
.lb__thumb.is-active {
  opacity: 1;
  border-color: #fff;
  transform: translateY(-2px);
}

/* ============ responsive ============ */
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
  .card__body { padding: 9px 10px 2px; }
  .card__title { font-size: 12.5px; line-height: 1.4; min-height: 2.8em; }
  .card__meta { padding: 0 10px; height: 27px; font-size: 11px; }
  .card__price { font-size: 12px; }
  .hero__meta { margin-top: 12px; }

  .lightbox { grid-template-columns: 1fr; }
  .lb__stage { grid-column: 1; padding: 54px 0 176px; }
  .lb__stage img { max-height: calc(100vh - 320px); }
  .lb__nav {
    position: absolute;
    bottom: 88px;
    width: 44px; height: 44px;
  }
  .lb__thumbs { padding: 10px 12px 12px; }
  .lb__thumb { width: 46px; height: 46px; }
  .lb__nav--prev { left: calc(50% - 58px); }
  .lb__nav--next { right: calc(50% - 58px); }
  .brand__name { display: none; }
  .search { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .topbar, .filters, .footer, .lightbox { display: none !important; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============ buttons ============ */
.btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  transition: background-color .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), transform .14s var(--ease), opacity .16s var(--ease);
}
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { border-color: var(--accent); opacity: .9; }
.btn--ghost { background: transparent; }
.btn--block { display: block; width: 100%; }

/* 卡片上的加入购物车 */
.card__add {
  margin: 0 12px 12px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 550;
  transition: background-color .16s var(--ease), border-color .16s var(--ease),
              color .16s var(--ease), transform .14s var(--ease);
}
.card__add:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.card__add:active { transform: scale(.98); }
.card__add.is-added {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

/* ============ cart ============ */
.cartbtn { position: relative; }

.cartbtn__n {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(8, 9, 11, .48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade .18s var(--ease);
}

.cart {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 120;
  width: min(402px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .35);
  animation: slidein .24s var(--ease);
}

@keyframes slidein {
  from { transform: translateX(28px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.cart__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.cart__title {
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -.01em;
}

.cart__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2px 18px 8px;
  -webkit-overflow-scrolling: touch;
}

.cart__empty {
  padding: 56px 8px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.75;
}

.cart__item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
}
.cart__item:last-child { border-bottom: 0; }

.cart__thumb {
  width: 54px; height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-soft);
}

.cart__main { min-width: 0; }

.cart__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.42;
  font-weight: 520;
}

.cart__cat {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-3);
}

.cart__controls {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.qty button {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1;
  background: transparent;
  transition: background-color .14s var(--ease), color .14s var(--ease);
}
.qty button:hover { background: var(--bg-soft); color: var(--text); }
.qty button[disabled] { opacity: .35; pointer-events: none; }
.qty span {
  min-width: 28px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.cart__del {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 0;
}
.cart__del:hover { color: #c0392b; }

.cart__foot {
  flex: 0 0 auto;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
}

.cart__sum {
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.cart__hint {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-3);
}

/* 只读的分享购物车 */
.cart--shared .cart__foot { display: none; }

.cart__note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ============ toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 300;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 10px;
  background: #14151a;
  color: #fff;
  font-size: 12.8px;
  line-height: 1.5;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fade .2s var(--ease);
}

@media (max-width: 760px) {
  .card__add { margin: 0 10px 10px; height: 31px; font-size: 12px; }
  .cart { width: 100vw; border-left: 0; }
  .toast { bottom: 18px; }
}

/* ============ cart wiring ============ */
.card__link {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.lb__add {
  margin-top: 12px;
  height: 34px;
  padding: 0 20px;
  background: #fff;
  border-color: #fff;
  color: #131417;
}
.lb__add:hover {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(255, 255, 255, .88);
  color: #131417;
}
.lb__add.is-added {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .36);
  color: #fff;
}

.cart__qtybadge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

/* 购物车打开时禁掉背景滚动 */
body.lb-open { overflow: hidden; }
