body {
  --paper: #FFFFFF;
  --ink: #171717;
  --line: #e5e5e5;
  --surface-soft: #faf8f6;
  --surface-active: #f2ede9;
  --line-soft: #e9e3de;
  --mini-tabbar-row-height: max(calc(84 * var(--rpx)), 44px);
  --mini-tabbar-height: calc(var(--mini-tabbar-row-height) + env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100%;
  background: #FFFFFF;
  color: #171717;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", "Source Han Sans SC", "HarmonyOS Sans SC", "MiSans",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: calc(28 * var(--rpx));
}

button {
  font-family: inherit;
}

.inline-copy {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px !important;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 calc(8 * var(--rpx));
  border: 0;
  background: transparent;
  color: #424242;
  font-size: calc(24 * var(--rpx));
  font-weight: 400;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.inline-copy::after { border: 0; }
.inline-copy--pressed { opacity: 0.6; }

.image-badges {
  position: absolute;
  z-index: 2;
  top: calc(8 * var(--rpx));
  left: calc(8 * var(--rpx));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(3 * var(--rpx));
  pointer-events: none;
}
.image-badges--dense { display: grid; grid-template-columns: repeat(2, calc(44 * var(--rpx))); }
.image-badges__circle { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: calc(44 * var(--rpx)); height: calc(44 * var(--rpx)); border: calc(1 * var(--rpx)) solid #c7dcd0; border-radius: 50%; background: #e4f0e9; color: #28513b; font-size: calc(26 * var(--rpx)); font-weight: 600; line-height: 1; white-space: nowrap; }
.image-badges__circle--compact { font-size: calc(16 * var(--rpx)); }
.image-badges__circle--caution { border-color: #b52d40; background: #b52d40; color: #fff; }
.image-badges__circle--finish { border-color: #ebd27a; background: #fff0ae; color: #6c4d00; }
.image-badges__circle--formula { border-color: #d5dbe3; background: #edf0f4; color: #414856; }
.featured-media .image-badges__circle { width: calc(52 * var(--rpx)); height: calc(52 * var(--rpx)); font-size: calc(31 * var(--rpx)); }
.featured-media .image-badges__circle--compact { font-size: calc(18 * var(--rpx)); }
.featured-media .image-badges--dense { grid-template-columns: repeat(2, calc(52 * var(--rpx))); }
.image-badges--detail { top: calc(12 * var(--rpx)); left: calc(12 * var(--rpx)); gap: 0; pointer-events: auto; }
.image-badges--detail.image-badges--dense { grid-template-columns: repeat(2, calc(88 * var(--rpx))); }
.image-badges__button { display: flex; align-items: center; justify-content: center; box-sizing: border-box; flex: none; width: calc(88 * var(--rpx)) !important; min-width: calc(88 * var(--rpx)); max-width: calc(88 * var(--rpx)); height: calc(88 * var(--rpx)); margin: 0 !important; padding: 0; border: 0; background: transparent; line-height: 1; }
.image-badges__button::after { border: 0; }
.image-badges__button .image-badges__circle { width: calc(72 * var(--rpx)); height: calc(72 * var(--rpx)); font-size: calc(42 * var(--rpx)); }
.image-badges__button .image-badges__circle--compact { font-size: calc(25 * var(--rpx)); }

.bottom-sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 11000; }
.bottom-sheet__mask { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .5); }
.bottom-sheet__panel { position: absolute; right: 0; bottom: 0; left: 0; max-height: 85vh; overflow-y: auto; background: #fff; }
.bottom-sheet__close { position: absolute; z-index: 1; top: calc(20 * var(--rpx)); right: calc(32 * var(--rpx)); display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: calc(64 * var(--rpx)) !important; min-width: calc(64 * var(--rpx)); max-width: calc(64 * var(--rpx)); height: calc(64 * var(--rpx)); margin: 0 !important; padding: 0; border: 0; border-radius: 0; background: transparent; color: #444; font-size: calc(48 * var(--rpx)); font-weight: 300; line-height: 1; }
.bottom-sheet__close::after { border: 0; }

.bottom-sheet__mask { background: rgba(0, 0, 0, .42); }
.bottom-sheet__panel { border-radius: calc(24 * var(--rpx)) calc(24 * var(--rpx)) 0 0; }

:root {
  --rpx: .536px;
  --web-width: 1200px;
  --catalog-card-name-size: clamp(15px, 4vw, 16px);
}
html { background: #f6f6f6; min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { --mini-tabbar-row-height: 49px; max-width: var(--web-width); margin: 0 auto; background: #fff; min-height: 100dvh; }
* { box-sizing: border-box; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
button, input { font-family: inherit; }
button[aria-label*="关闭"] { color: #171717; -webkit-appearance: none; appearance: none; }
.address-input { display: block; width: 100%; min-width: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #8a6b35; outline-offset: 2px; }
button { -webkit-tap-highlight-color: transparent; }
img { display: inline-block; object-fit: contain; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: pointer; }
web-fragment { display: contents; }
web-privacy { display: none; }
web-scroll { display: block; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
web-scroll::-webkit-scrollbar { display: none; }

.skip-initial-home #app > .home-featured { display: none; }
#app > .home-featured { margin: 12px clamp(12px, 3.2vw, 24px); }
.home-featured, .product-grid--home {
  --catalog-card-name-size: clamp(12px, 3.4vw, 14px);
}
.home-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 8px;
  margin-bottom: 12px;
}
.home-campaign {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  overflow: hidden;
  padding-bottom: 28px;
}
.home-campaign__track { display: flex; touch-action: pan-y pinch-zoom; transition: transform 360ms ease; }
.home-campaign__track > a { flex: 0 0 100%; }
.home-campaign__controls {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
}
.home-campaign__controls > button,
.home-campaign__pause {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #242424;
}
.home-campaign__controls > [data-campaign-slide]::before {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: #6d625b;
  content: '';
}
.home-campaign__controls > [aria-pressed="true"]::before { width: 14px; background: #171717; }
.home-campaign__pause {
  position: absolute;
  right: 9px;
  bottom: 0;
  font-size: 11px;
}
@media (prefers-reduced-motion: reduce) { .home-campaign__track { transition: none; } }
.home-featured__card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  color: #171717;
}
.home-featured__card--wide {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  background: transparent;
}
.home-featured__image { aspect-ratio: 1; background: #fff; }
.home-featured__image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-featured__card--wide .home-featured__image {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  background: transparent;
}
.home-featured__card--wide .home-featured__image img {
  padding: 8px 0 8px 48%;
}
.home-featured__card--editorial .home-featured__image img {
  padding: 0 0 0 40%;
  object-fit: cover;
}
.home-featured__card--poster .home-featured__image img {
  position: absolute;
  top: -43%;
  right: 0;
  width: 50%;
  height: auto;
  padding: 0;
}
.home-featured__card--editorial .home-featured__image::after,
.home-featured__card--poster .home-featured__image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff 0 43%, #fffe 45%, #fff0 57%);
  content: '';
}
.home-featured__copy { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 8px 0 3px; }
.home-featured__card--wide .home-featured__copy {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 50%;
  gap: 6px;
  padding: 12px 4px 12px clamp(12px, 4vw, 24px);
}
.home-featured__brand { font-size: 11px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-featured__name { font-size: var(--catalog-card-name-size); font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.home-featured > .home-featured__card .home-featured__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.home-featured__card--wide .home-featured__brand { max-width: 100%; color: #45403d; font-size: 12px; font-weight: 600; }
.home-featured__card--wide .home-featured__name { font-size: clamp(16px, 5vw, 28px); line-height: 1.18; }
.home-featured__price { font-size: 15px; font-weight: 700; }
.home-featured > .home-featured__card .home-featured__price { font-size: 14px; }
.home-featured__card--wide .home-featured__price { font-size: 19px; }
.home-featured__price small { margin-left: 2px; font-size: 10px; font-weight: 400; }
.home-featured__reason { color: #504943; font-size: 12px; line-height: 1.45; }
.home-featured__details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  background: #171717;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.home-featured__card--banner { color: #fff; background: #000; }
.home-featured__card--banner .home-featured__image img {
  padding: 0;
  object-fit: cover;
  object-position: 62% center;
}
.home-featured__card--banner .home-featured__image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #000 0 32%, #000d 42%, transparent 61%);
  content: '';
}
.home-featured__card--banner :is(.home-featured__brand, .home-featured__reason) { color: #eee; }
.home-featured__card--banner .home-featured__details { background: #fff; color: #171717; }
web-contact { display: flex; align-items: center; min-height: 48px; cursor: pointer; }
#app { min-height: 100dvh; }
#web-header { position: fixed; top: 0; right: 0; left: 0; z-index: 100; height: calc(48px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); max-width: var(--web-width); margin: auto; background: #fff; border-bottom: 1px solid #f1f1f1; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; }
#web-header[hidden] { display: none; }
#web-header button { position: absolute; right: 8px; width: 44px; height: 44px; border: 0; background: none; color: #171717; -webkit-appearance: none; appearance: none; font-size: 30px; font-weight: 300; line-height: 1; pointer-events: auto; }
body.has-web-header #app { padding-top: calc(48px + env(safe-area-inset-top)); }
body.is-wechat.product-open.has-web-header #app { padding-top: 0; }
body.is-wechat #web-header { justify-content: flex-end; background: transparent; border: 0; pointer-events: none; }
body.is-wechat #web-title { display: none; }
body.is-wechat #web-back { border-radius: 50%; background: #ffffffd9; }
#web-tabs { position: fixed; bottom: 0; right: 0; left: 0; z-index: 90; max-width: var(--web-width); margin: auto; display: flex; padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid #eee; }
#web-tabs[hidden] { display: none; }
#web-tabs a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: #6a6561;
  font-size: calc(26 * var(--rpx));
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
}
#web-tabs a[aria-current="page"] { color: #171717; font-size: calc(40 * var(--rpx)); font-weight: 600; }
#web-tabs a > span {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
}
#web-tabs a[aria-current="page"] > span::after {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 20px;
  height: 2px;
  transform: translateX(-50%);
  background: currentColor;
  content: '';
}
.shop-header, .product-bar, .cart-bar, .checkout-bar { max-width: var(--web-width); margin-right: auto; margin-left: auto; }
.shop-header { width: 100%; padding-top: env(safe-area-inset-top) !important; }
.bottom-sheet__panel { max-width: 650px; margin: auto; }
.bottom-sheet__panel, .bottom-sheet__mask { touch-action: pan-y; }
.order-sheet-background { pointer-events: none; }
.order-sheet { display: flex; align-items: flex-end; justify-content: center; }
.order-sheet__panel { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 650px; max-height: calc(100vh - 24px - env(safe-area-inset-top)); max-height: calc(100dvh - 24px - env(safe-area-inset-top)); overflow: hidden; border-radius: 16px 16px 0 0; background: #fff; }
.order-sheet__header { position: relative; display: flex; flex: none; align-items: center; justify-content: center; height: 48px; padding: 0 52px; border-bottom: 1px solid #f1f1f1; }
.order-sheet__header h2 { margin: 0; color: #171717; font-size: 17px; font-weight: 600; line-height: 1.4; }
.order-sheet__close { position: absolute; top: 2px; right: 8px; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #171717; font-size: 0; }
.order-sheet__close::before, .order-sheet__close::after { position: absolute; top: 50%; left: 50%; width: 16px; height: 1px; border: 0; background: #171717; content: ''; }
.order-sheet__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.order-sheet__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.order-sheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
#web-toast { position: fixed; z-index: 16000; left: 50%; bottom: 100px; transform: translateX(-50%); max-width: min(85vw,420px); border-radius: 8px; padding: 12px 18px; background: #171717e8; color: #fff; font-size: 14px; text-align: center; }
#web-dialog { max-width: min(88vw,400px); border: 0; border-radius: 12px; padding: 24px; font-family: inherit; }
#web-dialog::backdrop { background: #0006; }
#web-dialog h2 { margin: 0 0 12px; font-size: 18px; }
#web-dialog p { white-space: pre-wrap; line-height: 1.6; color: #555; font-size: 14px; }
#web-dialog form > div { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
#web-dialog button { border: 1px solid #ddd; border-radius: 5px; background: #fff; padding: 8px 14px; font-size: 14px; }
#web-dialog button[value="confirm"] { background: #171717; color: #fff; border-color: #171717; }
.product__hero { object-fit: contain; }
@media (min-width: 760px) {
  .product-grid:not(.product-grid--home) { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .product { max-width: 760px; margin: 0 auto; }
  .product-bar { max-width: 760px; }
  .cart-page, .checkout-page, .orders-page, .order-detail-page, .mine-page { max-width: 900px; margin: auto; }
  .directory-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width: 1100px) { .product-grid:not(.product-grid--home) { grid-template-columns: repeat(4,minmax(0,1fr)) !important; } }
