:root {
  --ink: #171915;
  --paper: #f7f7f1;
  --muted: #6c6f66;
  --line: #dedfd6;
  --green: #15b65a;
  --yellow: #f2e918;
  --orange: #ff9d4d;
  --red: #ef4444;
  --card: #fffef8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 14px; outline: 2px solid var(--yellow); outline-offset: 2px; }

.page-shell { width: min(100%, 780px); margin: 0 auto; padding: 18px 20px 36px; }

/* 顶部紧凑 Hero：桌面端首屏直接露出商品 */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 16px;
}
.hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  overflow: hidden;
  background: var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--yellow);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-identity { min-width: 0; }
.eyebrow { margin: 0; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(22px, 4vw, 28px); letter-spacing: -.01em; line-height: 1.1; margin: 3px 0 3px; }
h2 { font-size: 21px; letter-spacing: -.01em; margin: 2px 0 0; }
.hero-copy { color: var(--muted); font-size: 12px; margin: 0; }
.hero-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.availability-chip { display: inline-flex; gap: 7px; align-items: center; padding: 5px 10px; color: #545850; background: #ecece4; border-radius: 999px; font-family: "DM Mono", monospace; font-size: 10px; white-space: nowrap; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(21, 182, 90, .14); flex: 0 0 auto; }

.bag-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}
.bag-trigger-btn:hover, .bag-trigger-btn:focus-visible { background: #2a2e27; transform: translateY(-1px); outline: 0; }
.bag-trigger-btn svg { width: 16px; height: 16px; }
.bag-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
.bag-count-badge[hidden] { display: none; }

/* 紧凑 Quick Access */
.quick-links, .inventory { border-top: 1px solid var(--line); padding-top: 14px; }
.section-heading, .inventory-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-heading > span { color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.link-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.quick-link {
  position: relative;
  min-height: 52px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 8px 26px 8px 9px;
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.quick-link:hover { transform: translateY(-1px); border-color: #a1a398; box-shadow: 0 5px 0 rgba(23,25,21,.06); }
.quick-link.is-placeholder { cursor: default; opacity: .72; }
.quick-link.is-placeholder:hover { transform: none; box-shadow: none; border-color: var(--line); }
.link-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; color: #fff; border-radius: 9px; background: var(--ink); font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.link-icon svg { width: 18px; height: 18px; overflow: visible; }
.link-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.link-icon svg path, .link-icon svg circle, .link-icon svg rect { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-link[data-icon="yupoo"] .link-icon { background: #fff; }
.quick-link[data-icon="whatsapp"] .link-icon { background: #25d366; }
.quick-link[data-icon="discord"] .link-icon { background: #5865f2; }
.quick-link[data-icon="creator"] .link-icon { background: linear-gradient(135deg, #171915, #6c50f5); }
.quick-link[data-icon="wechat"] .link-icon { background: #07c160; }
.quick-link[data-icon="stock"] .link-icon { background: #171915; }
.quick-link[data-icon="weidian"] .link-icon { background: #c92a2a; }
.quick-link[data-icon="tiktok"] .link-icon { background: #050505; }
.quick-link[data-icon="discord"] .link-icon svg path, .quick-link[data-icon="wechat"] .link-icon svg path { fill: currentColor; stroke: none; }
.quick-link[data-icon="discord"] .link-icon svg circle, .quick-link[data-icon="wechat"] .link-icon svg circle { fill: #5865f2; stroke: none; }
.quick-link[data-icon="wechat"] .link-icon svg circle { fill: #07c160; }
.quick-link[data-icon="tiktok"] .link-icon svg path { fill: currentColor; stroke: none; }
.quick-link[data-icon="tiktok"] .link-icon .tiktok-shadow-cyan { color: #25f4ee; transform: translate(-1px, 1px); }
.quick-link[data-icon="tiktok"] .link-icon .tiktok-shadow-red { color: #fe2c55; transform: translate(1px, -1px); }
.link-copy { flex: 1; min-width: 0; }
.link-copy strong, .link-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-copy strong { font-size: 12px; line-height: 1.25; letter-spacing: 0; }
.link-copy small { margin-top: 1px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.arrow { position: absolute; top: 50%; right: 9px; font-size: 14px; font-weight: 500; line-height: 1; color: var(--muted); transform: translateY(-50%); }

.inventory { margin-top: 16px; }
.inventory-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.inventory-count-pill {
  padding: 2px 8px;
  color: #4f554c;
  background: #eaece3;
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
}
.inventory-count-pill:empty { display: none; }
.refresh-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; color: #4e514a; font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
.refresh-button:hover { background: #ecece4; }
.refresh-button svg { width: 15px; height: 15px; }
.refresh-button.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 可折叠下单指引 */
.order-flow { margin-bottom: 12px; padding: 11px 13px; background: #edeee6; border: 1px solid var(--line); border-radius: 10px; }
.order-flow-collapsible summary { list-style: none; cursor: pointer; }
.order-flow-collapsible summary::-webkit-details-marker { display: none; }
.order-flow-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.order-flow-summary-left { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.order-flow-pill {
  padding: 3px 7px;
  color: #fff;
  background: var(--ink);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
}
.order-flow-summary-left strong { font-size: 12px; color: var(--ink); }
.order-flow-summary-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.order-flow-toggle {
  padding: 4px 8px;
  color: #454a42;
  background: var(--card);
  border: 1px solid #d5d8ce;
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 600;
}
.order-flow-collapsible[open] .order-flow-summary { margin-bottom: 11px; }
.payment-methods { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.payment-methods span { padding: 4px 6px; color: #4f544c; background: #fffefa; border: 1px solid #d5d8ce; border-radius: 4px; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.order-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #d5d8ce; }
.order-steps article { min-width: 0; padding: 12px 10px 2px; border-left: 1px solid #d5d8ce; }
.order-steps article:first-child { border-left: 0; padding-left: 0; }
.order-steps article:last-child { padding-right: 0; }
.order-steps strong, .order-steps small { display: block; }
.order-steps strong { margin-top: 7px; font-size: 11px; line-height: 1.35; }
.order-steps small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.step-number { display: grid; place-items: center; width: 25px; height: 25px; color: #fff; background: var(--ink); border-radius: 50%; font-family: "DM Mono", monospace; font-size: 9px; }

/* 搜索、排序（修复双箭头与文字贴顶）、状态筛选 */
.toolbar { display: flex; gap: 8px; margin-bottom: 11px; }
.search-box { display: flex; flex: 1; align-items: center; gap: 8px; padding: 0 11px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.search-box svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.search-box input { width: 100%; height: 40px; min-width: 0; color: var(--ink); outline: 0; border: 0; background: transparent; font-size: 13px; }
.search-box input::placeholder { color: #9a9d92; }

.sort-box { position: relative; flex: 0 0 146px; }
.sort-box::after { display: none !important; content: none !important; }
.sort-box select,
.select-wrap select,
.direct-order-grid select {
  display: block;
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 8px 34px 8px 11px;
  color: #363932;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  outline: 0;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c6f66' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  vertical-align: middle;
  cursor: pointer;
}
.sort-box select:focus,
.select-wrap select:focus,
.direct-order-grid select:focus { border-color: #8f9387; box-shadow: 0 0 0 3px rgba(23,25,21,.06); }
.select-wrap { position: relative; width: 100%; }

.filter-group { display: flex; gap: 4px; padding: 3px; background: #e8e9e0; border-radius: 10px; }
.filter { min-height: 34px; padding: 0 10px; color: #5f625a; background: transparent; border: 0; border-radius: 7px; font-size: 12px; font-weight: 600; }
.filter.active { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(23,25,21,.08); }

.category-panel { margin: 0 0 12px; padding: 10px; background: #edeee6; border: 1px solid var(--line); border-radius: 12px; }
.category-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.category-heading > span { color: var(--muted); font-size: 11px; }
.category-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.category-tab { min-height: 52px; padding: 8px; color: #555850; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.category-tab:hover { transform: translateY(-1px); border-color: #b7b9ad; }
.category-tab.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.category-tab[data-category="sale-b"] { color: #7b4315; background: #fff3dc; border-color: #e8c58d; }
.category-tab[data-category="sale-b"].active { color: #fff; background: #8a4a17; border-color: #8a4a17; }
.category-tab strong, .category-tab small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-tab strong { font-size: 12px; letter-spacing: 0; }
.category-tab small { margin-top: 3px; color: currentColor; opacity: .75; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .02em; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.dot.in-stock { background: var(--green); }
.dot.restocking { background: var(--yellow); border: 1px solid #c7bd02; }
.dot.incoming { background: var(--red); }

.product-grid { display: grid; gap: 10px; }
.product-card { display: grid; grid-template-columns: 156px minmax(0, 1fr); align-items: start; overflow: hidden; min-height: 162px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.product-visual { position: relative; display: grid; place-items: center; align-self: start; aspect-ratio: 1 / 1; overflow: hidden; background: var(--product-color, #cfd3c9); }
.product-visual::before { content: ""; position: absolute; width: 95px; height: 51px; background: rgba(255,255,255,.78); border: 2px solid rgba(23,25,21,.4); border-radius: 47% 35% 25% 21% / 63% 47% 31% 20%; transform: rotate(-13deg) translate(-2px, 4px); box-shadow: inset -16px -7px 0 rgba(23,25,21,.1); }
.product-visual::after { content: ""; position: absolute; width: 58px; height: 3px; background: rgba(23,25,21,.26); border-radius: 10px; transform: translate(-4px, -5px) rotate(-13deg); box-shadow: 0 7px 0 rgba(23,25,21,.26), 0 14px 0 rgba(23,25,21,.26); }
.product-visual.has-image::before, .product-visual.has-image::after { display: none; }
.product-image { position: absolute; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.product-initials { z-index: 1; position: absolute; bottom: 10px; left: 9px; color: rgba(23,25,21,.72); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .04em; }
.product-visual.has-image .product-initials { z-index: 3; padding: 3px 5px; color: #fff; background: rgba(23,25,21,.58); border-radius: 4px; }
.color-swatch { z-index: 1; position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; background: var(--swatch, #000); border: 1px solid rgba(255,255,255,.7); border-radius: 50%; }
.product-visual.has-image .color-swatch { z-index: 3; }

.product-content { padding: 13px 14px; min-width: 0; }
.product-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.product-heading > div:first-child { min-width: 0; }
.product-heading h3 { overflow: hidden; margin: 4px 0 0; font-size: 15px; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.product-heading-meta { display: grid; flex: 0 0 auto; justify-items: end; gap: 4px; }
.product-note { flex: 0 0 auto; color: #8c6000; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .03em; text-transform: uppercase; }
.product-price { display: inline-flex; align-items: center; min-height: 19px; padding: 0 6px; color: #1b4d2d; background: #e6f6e8; border: 1px solid #b5dbb9; border-radius: 4px; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.product-price.is-agent-only { color: #6b5320; background: #fbf3de; border-color: #e4cfa0; }
.product-badges { display: flex; flex-wrap: wrap; gap: 4px; min-height: 16px; }
.product-badges span { display: inline-flex; align-items: center; min-height: 16px; padding: 0 6px; border-radius: 4px; font-family: "DM Mono", monospace; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.badge-ready { color: #155b33; background: #dff4e4; border: 1px solid #b9dfc4; }
.badge-featured { color: #594a00; background: #fff4bd; border: 1px solid #eadb8a; }
.badge-promotion { color: #7b4315; background: #fff0d4; border: 1px solid #e8c58d; }
.badge-agent-only { color: #575b52; background: #efefe8; border: 1px solid #d5d7cd; }
.product-description { min-height: 0; overflow: hidden; margin: -2px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.product-description:empty { display: none; }

.fulfilment-strip { display: grid; grid-template-columns: minmax(105px, auto) minmax(0, 1fr); align-items: center; gap: 6px; margin: 0 0 9px; padding: 6px; color: #4f5b51; background: linear-gradient(135deg, #f6fbf5, #eef8ef); border: 1px solid #cfe7d2; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.72); font-family: "DM Mono", monospace; font-size: 9px; line-height: 1.25; }
.fulfilment-strip[hidden] { display: none; }
.stock-promise-lead { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; color: #0f5e33; background: #d8f6e2; border: 1px solid #a8dfb9; border-radius: 999px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.stock-promise-lead i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(18,183,90,.12); }
.stock-promise-step { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 0 7px; color: #566157; background: rgba(255,255,248,.72); border: 1px solid rgba(207,231,210,.76); border-radius: 8px; text-align: center; white-space: nowrap; }
.stock-promise-lead[hidden], .stock-promise-step[hidden] { display: none; }
.stock-promise-step b { margin-right: 4px; color: #20251f; font-weight: 600; text-transform: uppercase; }
.fulfilment-strip.has-product-info { display: block; padding: 5px; background: #eef4eb; border-color: #d8e2d5; }
.product-info-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.product-info-strip[hidden] { display: none; }
.product-info-status, .product-info-button { min-width: 0; min-height: 40px; border-radius: 8px; font-family: "DM Mono", monospace; }
.product-info-status { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 8px; color: #0f5e33; background: #d8f6e2; border: 1px solid #a8dfb9; }
.product-info-status > i { flex: 0 0 7px; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(18,183,90,.12); }
.product-info-status.is-restocking { color: #705b13; background: #fff4c9; border-color: #e8d78d; }
.product-info-status.is-restocking > i { background: #d49d13; box-shadow: 0 0 0 3px rgba(212,157,19,.12); }
.product-info-status.is-restocking small { color: #746c4a; }
.product-info-status.is-ended { color: #7b3535; background: #fbe4e1; border-color: #e8bbb6; }
.product-info-status.is-ended > i { background: #df4141; box-shadow: 0 0 0 3px rgba(223,65,65,.12); }
.product-info-status.is-ended small { color: #795d5d; }
.product-info-status span, .product-info-button span, .product-info-button strong { display: block; min-width: 0; }
.product-info-status strong, .product-info-button strong { font-size: 9px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; text-transform: uppercase; }
.product-info-status small { display: block; margin-top: 2px; color: #55705c; font-size: 8px; line-height: 1; }
.product-info-button { padding: 5px 8px; color: #333931; text-align: left; background: #fffef8; border: 1px solid #d8ddd4; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease; }
.product-info-button > span { margin-bottom: 2px; color: #757c71; font-size: 8px; line-height: 1; text-transform: uppercase; }
.product-info-button:hover, .product-info-button:focus-visible { color: #fff; background: #20241f; border-color: #20241f; outline: 0; transform: translateY(-1px); }
.product-info-button:hover > span, .product-info-button:focus-visible > span { color: #b9c6ba; }

/* 弹窗通用样式 */
.product-info-dialog { width: min(calc(100vw - 24px), 680px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; color: var(--ink); background: transparent; border: 0; overflow: visible; }
.product-info-dialog::backdrop { background: rgba(17, 21, 17, .62); backdrop-filter: blur(5px); }
.product-info-modal { width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; overflow-x: hidden; padding: 22px; background: #fffef8; border: 1px solid #cfd8cc; border-radius: 18px; box-shadow: 0 28px 90px rgba(16, 22, 17, .3); animation: product-info-enter .2s ease-out; }
.product-info-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid #e1e5dd; }
.product-info-modal-header p { margin: 0 0 5px; color: #286a40; font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; }
.product-info-modal-header h2 { margin: 0; font-size: 21px; line-height: 1.15; }
.product-info-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; color: #51584f; background: #eef1ea; border: 1px solid #d8ddd4; border-radius: 50%; font-size: 20px; line-height: 1; }
.product-info-close:hover, .product-info-close:focus-visible { color: #fff; background: var(--ink); border-color: var(--ink); outline: 0; }

.product-size-chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  margin-top: 16px;
  color: var(--muted);
  background: #f5f6ee;
  border: 1px dashed #d5dacd;
  border-radius: 13px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}
.product-size-chart-loading[hidden] { display: none; }
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cfd4c7;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.product-size-chart { margin: 16px 0 0; }
.product-size-chart[hidden] { display: none; }
.product-size-chart img { display: block; width: 100%; height: auto; background: #f7f7f1; border: 1px solid #dfe4da; border-radius: 13px; }
.product-size-chart figcaption { margin-top: 9px; color: #6c7267; font-size: 11px; text-align: center; line-height: 1.45; }

.batch-size-chart { margin-top: 14px; }
.batch-size-context { padding: 10px 12px; border: 1px solid #dce5d8; border-radius: 10px; background: #f0f5ee; }
.batch-size-kicker { margin: 0 0 3px; color: #386149; font: 500 9px/1.3 "DM Mono", monospace; letter-spacing: .09em; }
.batch-size-current { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.35; }
.batch-size-assignments { margin: 4px 0 0; color: #47574b; font-size: 11px; line-height: 1.5; }
.batch-size-table { width: 100%; overflow: hidden; table-layout: fixed; border: 1px solid #dce3d9; border-spacing: 0; border-radius: 10px; text-align: center; font: 500 13px/1.15 "DM Mono", monospace; font-variant-numeric: tabular-nums; }
.batch-size-table caption { padding: 10px 0 6px; color: #515a50; text-align: left; font: 700 11px/1.3 "Manrope", sans-serif; }
.batch-size-table :is(th,td) { height: 27px; padding: 4px 6px; }
.batch-size-table thead th { height: 29px; background: #eeefe8; }
.batch-size-table tbody tr + tr > * { border-top: 1px solid #e9ebe3; }
.batch-size-table tbody th { color: #455044; }
.batch-size-table .is-applicable { color: #205d39; background: #edf7ee; font-weight: 700; }
.batch-size-table thead .is-applicable { background: #d8efdf; }
.batch-size-table .is-selected-size { background: #f2f4ed; }
.batch-size-table .is-selected-measurement { color: #133e28; background: #bde7cd; box-shadow: inset 0 0 0 1px #65a981; }
.batch-size-note { margin: 8px 0 0; color: #50594f; font-size: 11px; line-height: 1.5; }

.product-description-panel { display: grid; gap: 15px; margin-top: 18px; }
.product-description-panel[hidden] { display: none; }
.product-description-section-label { margin: 0; color: #286a40; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.product-description-highlights { padding: 17px; background: #edf6ed; border: 1px solid #d2e3d1; border-radius: 14px; }
.product-description-highlights ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.product-description-highlights li { position: relative; min-height: 58px; padding: 11px 12px 11px 34px; color: #293229; background: rgba(255,255,255,.78); border: 1px solid #dce9da; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.45; }
.product-description-highlights li::before { position: absolute; top: 13px; left: 12px; display: grid; place-items: center; width: 15px; height: 15px; color: #fff; background: #2b7145; border-radius: 50%; content: "✓"; font-size: 9px; }
.product-description-highlights li:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }
.product-description-details { padding: 17px; background: #fffef8; border: 1px solid #dedfd6; border-radius: 14px; }
.product-description-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid #e4e5dd; }
.product-description-section-heading span { color: #7b8177; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.product-description-details ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: product-detail; }
.product-description-details li { position: relative; padding: 14px 0 14px 43px; color: #343a33; border-bottom: 1px solid #e8e9e1; font-size: 12px; line-height: 1.65; counter-increment: product-detail; }
.product-description-details li:last-child { padding-bottom: 2px; border-bottom: 0; }
.product-description-details li::before { position: absolute; top: 14px; left: 0; display: grid; place-items: center; width: 28px; height: 28px; color: #245f3a; background: #e1f1e3; border: 1px solid #c6dfca; border-radius: 8px; content: counter(product-detail, decimal-leading-zero); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 600; }
.product-description-fallback { margin: 0; padding: 18px; color: #2d332c; background: #f1f5ee; border: 1px solid #d9e3d6; border-radius: 13px; font-size: 13px; line-height: 1.65; }
.product-info-error { margin: 16px 0 0; padding: 18px; color: #7b5210; background: #fff6d8; border: 1px solid #ead697; border-radius: 13px; font-size: 12px; line-height: 1.5; text-align: center; }
.product-info-error[hidden] { display: none; }
.product-info-error p { margin: 0 0 10px; }
.product-info-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: #1f6d40;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.product-info-whatsapp-btn:hover { background: #175631; }
.product-info-modal-actions { display: flex; justify-content: flex-end; margin-top: 17px; }
.product-info-modal-actions button { min-height: 40px; padding: 0 16px; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 8px; font-size: 12px; font-weight: 700; }
@keyframes product-info-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* 尺码网格 */
.size-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.size { display: grid; place-items: center; min-height: 44px; padding: 4px 2px; border-radius: 6px; text-align: center; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease; }
.size:hover, .size:focus-visible { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(23,25,21,.22); outline: 0; }
.size.selected { box-shadow: inset 0 0 0 2px var(--ink), 0 4px 0 rgba(23,25,21,.08); transform: translateY(-1px); }
.size strong { display: block; font-family: "DM Mono", monospace; font-size: 11px; font-weight: 600; }
.size small { display: block; max-width: 100%; margin-top: 2px; overflow: hidden; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.size.in-stock { color: #0e4525; background: #c7f4d8; }
.size.restocking { color: #5b5600; background: #fff9a4; }
.size.incoming { color: #7f1d1d; background: #fecaca; }

/* 快捷尺码参考条（修复文字碰撞） */
.category-size-guide, .size-guide { margin: 0 0 12px; padding: 9px 10px; overflow-x: auto; background: #f6f7ef; border: 1px solid #d9ded0; border-radius: 12px; }
.category-size-guide[hidden], .size-guide[hidden] { display: none; }
.size-guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #30362e; font-family: "DM Mono", monospace; text-transform: uppercase; }
.size-guide-heading span { overflow: hidden; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.size-guide-heading small { flex: 0 0 auto; color: #697064; font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.size-guide-table { display: grid; gap: 4px; min-width: 440px; }
.size-guide-row { display: grid; grid-template-columns: minmax(112px, 1.45fr) repeat(8, minmax(36px, 1fr)); gap: 4px; align-items: center; }
.size-guide-row span { display: grid; place-items: center; min-height: 22px; padding: 0 4px; color: #30362e; background: #fffefa; border: 1px solid #dfe3d8; border-radius: 5px; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; white-space: nowrap; }
.size-guide-row .size-guide-label { justify-content: start; padding: 0 8px 0 4px; color: #575f52; background: transparent; border-color: transparent; text-align: left; text-transform: uppercase; }
.size-guide-note { display: inline-flex; align-items: center; min-height: 22px; margin: 7px 0 0; padding: 0 8px; color: #2f5d3b; background: #edf6ea; border: 1px solid #c9dfc5; border-radius: 999px; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.size-selection-hint { margin: 7px 0 0; color: #797d74; font-size: 10px; }
.has-selected-size .size-selection-hint { color: #215b36; font-weight: 700; }

/* 购买链接与 + Bag 按钮 */
.product-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.product-links.has-bag-action { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto; }
.product-link { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; color: #3f5f4c; background: #eef6ed; border: 1px solid #b7d7bc; border-radius: 8px; font-family: "DM Mono", monospace; font-size: 10px; font-weight: 600; gap: 5px; letter-spacing: 0; text-decoration: none; white-space: nowrap; transition: background .16s ease, transform .16s ease, border-color .16s ease; }
.product-link:hover { background: #d6f0d8; transform: translateY(-1px); }
.product-link.taobao { color: #a34d18; background: #fff0e7; border-color: #ffd0b5; }
.product-link.yupoo { color: #2f5385; background: #edf4ff; border-color: #bfd5f3; }
.product-link.direct { color: #0f3f2b; background: #cbf4df; border-color: #7bc99e; }
.product-link.direct:hover { background: #b6efcf; }
.product-link.direct.restock-inquire { color: #6e4e08; background: #fff4c9; border-color: #e2cb77; }
.product-link.direct.restock-inquire:hover { background: #ffebb0; }
.product-link.direct.is-disabled { color: #7f4040; background: #f8e4e4; border-color: #e4c0c0; cursor: not-allowed; opacity: .82; transform: none; }
.product-link.primary-purchase { justify-content: space-between; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 10px; }
.product-link.qc-link { justify-content: center; min-height: 36px; border-radius: 8px; }
.product-link.add-bag-btn { justify-content: center; min-height: 36px; padding: 0 10px; color: var(--ink); background: #f2f3eb; border-color: #cfd2c7; }
.product-link.add-bag-btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); }
.product-link.add-bag-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; color: var(--muted); background: #f2f3eb; border-color: #dfe1d8; }
.product-link.direct em { padding: 2px 6px; color: #0e5130; background: rgba(255,255,255,.72); border: 1px solid rgba(123,201,158,.5); border-radius: 999px; font-style: normal; font-weight: 700; font-size: 9px; }
.product-link.batch-update-link { position: relative; grid-column: 1 / -1; justify-content: center; min-height: 36px; padding: 0 38px; color: #fff; background: var(--ink); border-color: var(--ink); border-radius: 8px; font-size: 10px; }
.product-link.batch-update-link:hover { color: #fff; background: #2b2e28; }
.batch-update-label { color: var(--yellow); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-align: center; }
.batch-update-arrow { position: absolute; right: 12px; color: #fff; font-size: 11px; }
.needs-size-selection .size-grid { padding: 3px; background: #fff5d1; border-radius: 8px; box-shadow: 0 0 0 1px #e4c55f; }
.needs-size-selection .size-selection-hint { color: #87530d; font-weight: 800; }

.agent-purchase { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-column: 1 / -1; gap: 8px; align-items: center; padding-top: 7px; border-top: 1px solid #e6e7de; }
.agent-label { color: #666a61; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.agent-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.agent-links a { display: grid; place-items: center; min-height: 28px; padding: 0 6px; overflow: hidden; color: #4f534a; background: #f0f0e9; border: 1px solid #e0e1d8; border-radius: 6px; font-family: "DM Mono", monospace; font-size: 9px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.agent-links a:hover { color: var(--ink); background: #e4e6dc; }
.agent-links a.agent-link-promoted { grid-auto-flow: column; grid-auto-columns: max-content; gap: 4px; color: var(--ink); background: #fffef2; border-color: #d8d39d; }
.agent-links a.agent-link-promoted:hover { background: #fffbd9; border-color: #c8bf56; }
.agent-discount { padding: 2px 4px; color: #171914; background: var(--yellow); border-radius: 999px; font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .03em; }

.empty-state { margin: 26px 0 6px; color: var(--muted); text-align: center; font-size: 13px; }
.notice { display: flex; gap: 11px; margin-top: 22px; padding: 13px; background: #efeee5; border-radius: 13px; color: #5d6058; font-size: 12px; line-height: 1.55; }
.notice-icon { display: grid; place-items: center; flex: 0 0 22px; height: 22px; color: #fff; background: var(--ink); border-radius: 50%; font-family: "DM Mono", monospace; font-size: 12px; }
.notice p { margin: 0; }
.notice strong { color: var(--ink); }
.service-assurance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-assurance article { display: flex; gap: 9px; min-width: 0; padding: 0 13px; border-left: 1px solid var(--line); }
.service-assurance article:first-child { padding-left: 0; border-left: 0; }
.service-assurance article:last-child { padding-right: 0; }
.service-assurance article > span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; color: #fff; background: var(--ink); border-radius: 50%; font-family: "DM Mono", monospace; font-size: 9px; }
.service-assurance strong, .service-assurance small { display: block; }
.service-assurance strong { font-size: 12px; line-height: 1.3; }
.service-assurance small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.mobile-action-bar { display: none; }
footer { display: flex; justify-content: space-between; padding-top: 20px; color: #7e8178; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .03em; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }

/* 直邮 & 询价袋弹窗 */
.direct-order-dialog { width: min(calc(100vw - 24px), 620px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; color: var(--ink); background: transparent; border: 0; overflow: visible; }
.direct-order-dialog::backdrop { background: rgba(17,21,17,.66); backdrop-filter: blur(6px); }
.direct-order-modal { width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; overflow-x: hidden; padding: 22px; background: #fffef8; border: 1px solid #cbd8cc; border-radius: 18px; box-shadow: 0 28px 90px rgba(16,22,17,.34); animation: product-info-enter .2s ease-out; }
.direct-order-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.direct-order-header p { margin: 0 0 5px; color: #286a40; font-family: "DM Mono", monospace; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.direct-order-header h2 { margin: 0; font-size: 21px; line-height: 1.15; }
.direct-order-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 16px 0 12px; }
.direct-order-steps span { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 10px; color: #676d65; background: #f0f1eb; border: 1px solid #dfe2d9; border-radius: 9px; font-family: "DM Mono", monospace; font-size: 10px; font-weight: 600; }
.direct-order-steps span em { font-style: normal; }
.direct-order-steps span.active { color: #174f30; background: #dff4e4; border-color: #b4dabb; }
.direct-order-steps b { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; color: #fff; background: #858b83; border-radius: 50%; font-size: 9px; }
.direct-order-steps .active b { background: #2b7145; }
.direct-order-product { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; color: #effbf2; background: #1f2d22; border-radius: 12px; }
.direct-order-product div { min-width: 0; }
.direct-order-product small, .direct-order-product strong { display: block; }
.direct-order-product small { margin-bottom: 3px; color: #aebdaf; font-family: "DM Mono", monospace; font-size: 9px; text-transform: uppercase; }
.direct-order-product div strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.direct-order-product > strong { flex: 0 0 auto; padding: 6px 10px; color: #124a2b; background: #d8f6e2; border-radius: 999px; font-family: "DM Mono", monospace; font-size: 10px; }

#direct-order-form, #order-bag-form { margin-top: 14px; }
.direct-order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.direct-order-grid label, .direct-order-note { display: grid; gap: 5px; color: #4a5049; font-size: 11px; font-weight: 700; align-content: start; }
.direct-order-grid .direct-order-field-help { margin-top: 0; color: #757c73; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; line-height: 1.35; }
.direct-order-grid input, .direct-order-note textarea { width: 100%; min-height: 42px; padding: 0 11px; color: #20241f; background: #f8f8f2; border: 1px solid #d8ddd4; border-radius: 9px; outline: 0; font-size: 13px; }
.direct-order-grid select { height: 42px; min-height: 42px; padding: 9px 34px 9px 11px; background-color: #f8f8f2; border-color: #d8ddd4; border-radius: 9px; font-size: 13px; font-weight: 500; line-height: 22px; }
.direct-order-note { margin-top: 10px; }
.direct-order-note span small { color: #8b9088; font-weight: 500; }
.direct-order-note textarea { min-height: 62px; padding-top: 10px; resize: vertical; font: inherit; }
.direct-order-grid input:focus, .direct-order-grid select:focus, .direct-order-note textarea:focus { background: #fff; border-color: #5ca676; box-shadow: 0 0 0 3px rgba(43,113,69,.1); }

/* 可搜索国家下拉组件 */
.country-combobox { position: relative; width: 100%; }
.country-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fffef8;
  border: 1px solid #c5cdc2;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 22, 17, .16);
}
.country-dropdown[hidden] { display: none; }
.country-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.country-option:hover, .country-option.is-active { background: #e8f4ea; color: #124829; }
.country-option small { color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; }
.country-empty { padding: 9px 10px; color: var(--muted); font-size: 11px; }

.direct-order-assurance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.direct-order-assurance span { display: grid; place-items: center; min-height: 34px; padding: 5px; color: #31563c; background: #edf5eb; border: 1px solid #d3e3d0; border-radius: 8px; font-family: "DM Mono", monospace; font-size: 9px; text-align: center; }
.direct-order-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e0e3db; }
.direct-order-footer div small, .direct-order-footer div strong { display: block; }
.direct-order-footer div small { margin-bottom: 3px; color: #7e837b; font-size: 9px; text-transform: uppercase; }
.direct-order-footer div strong { font-family: "DM Mono", monospace; font-size: 11px; }
.direct-order-footer-actions { display: flex; align-items: center; gap: 8px; }
.direct-order-footer button[type="submit"] { min-height: 44px; padding: 0 16px; color: #fff; background: #1f6d40; border: 1px solid #1f6d40; border-radius: 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.direct-order-footer button[type="submit"]:hover, .direct-order-footer button[type="submit"]:focus-visible { background: #175631; border-color: #175631; outline: 0; transform: translateY(-1px); }
.secondary-action-btn {
  min-height: 44px;
  padding: 0 13px;
  color: var(--ink);
  background: #f0f1ea;
  border: 1px solid #d4d8cc;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.secondary-action-btn:hover { background: #e3e6dc; }
.direct-order-disclaimer { margin: 10px 0 0; color: #757a72; font-size: 10px; line-height: 1.45; text-align: right; }

/* 询价袋列表 */
.order-bag-empty {
  margin-top: 16px;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  background: #f4f5ed;
  border: 1px dashed #cfd4c7;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.order-bag-empty[hidden] { display: none; }
.order-bag-empty p { margin: 0 0 6px; }
.order-bag-empty p:last-child { margin-bottom: 0; }
.order-bag-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
}
.order-bag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f6f7ef;
  border: 1px solid #dfe3d7;
  border-radius: 10px;
}
.order-bag-item-info { min-width: 0; flex: 1; }
.order-bag-item-info strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-bag-item-info small { display: block; margin-top: 2px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.order-bag-item-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.order-bag-qty-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink);
  background: #fffef8;
  border: 1px solid #cfd4c8;
  border-radius: 7px;
  font-weight: 800;
}
.order-bag-qty-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.order-bag-qty-value { min-width: 20px; text-align: center; font-family: "DM Mono", monospace; font-size: 12px; font-weight: 700; }
.order-bag-remove-btn {
  padding: 0 8px;
  height: 30px;
  color: #8a2c2c;
  background: #fceaea;
  border: 1px solid #ebc3c3;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}
.order-bag-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 11px 14px;
  color: #effbf2;
  background: #1f2d22;
  border-radius: 10px;
  font-size: 12px;
}
.order-bag-summary strong { font-family: "DM Mono", monospace; font-size: 13px; color: #bdf4cf; }

/* 全局 Toast 通知 */
.site-toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(calc(100vw - 28px), 420px);
  padding: 11px 16px;
  color: #fff;
  background: rgba(23, 25, 21, .95);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.24);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
.site-toast[hidden] { display: none; }

/* 移动端重构（上图下文卡片 + >=44px 热区 + 保留文字标签） */
@media (max-width: 540px) {
  body { padding-bottom: 76px; }
  .page-shell { padding: 12px 12px 24px; }
  .hero { flex-direction: column; align-items: stretch; gap: 10px; padding: 6px 0 14px; }
  .hero-meta { flex-direction: row; align-items: center; justify-content: space-between; }
  .brand-mark { flex-basis: 44px; width: 44px; height: 44px; border-radius: 11px; }
  h1 { font-size: 22px; }
  .availability-chip { font-size: 9px; padding: 5px 8px; }
  .bag-trigger-btn { min-height: 36px; padding: 0 10px; font-size: 11px; }

  .quick-links, .inventory { padding-top: 13px; }
  .section-heading { margin-bottom: 8px; }
  .link-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .quick-link { min-height: 48px; padding: 7px 9px; gap: 8px; }
  .link-icon { flex-basis: 30px; width: 30px; height: 30px; border-radius: 8px; }
  .link-icon svg { width: 17px; height: 17px; }
  .link-copy strong { font-size: 11px; }
  .link-copy small, .quick-link .arrow { display: none; }

  .order-flow-summary { flex-direction: column; align-items: flex-start; gap: 8px; }
  .order-flow-summary-right { width: 100%; justify-content: space-between; }
  .order-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-steps article { min-height: 104px; padding: 10px 8px; }
  .order-steps article:nth-child(odd) { padding-left: 0; border-left: 0; }
  .order-steps article:nth-child(n+3) { border-top: 1px solid #d5d8ce; }

  .toolbar { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .sort-box { flex: none; width: 100%; }
  .filter-group { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .filter { min-height: 38px; font-size: 12px; }
  .category-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-tab { min-height: 50px; }

  /* 移动端卡片：上图下文，彻底释放横向空间 */
  .product-card { grid-template-columns: 1fr; }
  .product-visual { width: 100%; aspect-ratio: 16 / 10; max-height: 230px; }
  .product-content { padding: 13px 12px 14px; }
  .product-heading h3 { font-size: 16px; white-space: normal; }
  .product-note { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .product-price { font-size: 10px; min-height: 22px; padding: 0 7px; }
  .product-description { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; }

  .fulfilment-strip { grid-template-columns: 1fr; gap: 5px; padding: 6px; font-size: 9px; }
  .fulfilment-strip.has-product-info { padding: 5px; }
  .product-info-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .product-info-status, .product-info-button { min-height: 44px; padding: 5px 6px; }
  .product-info-status strong, .product-info-button strong { font-size: 9px; }
  .product-info-status small, .product-info-button > span { font-size: 8px; }

  /* 移动端尺码网格：4 列宽大热区 + 保留库存文字标签（WCAG 合规） */
  .size-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .size { min-height: 46px; padding: 5px 3px; }
  .size strong { font-size: 12px; }
  .size small { display: block; font-size: 9px; }

  .category-size-guide, .size-guide { padding: 8px; }
  .size-guide-heading small { display: none; }
  .size-guide-table { min-width: 430px; }
  .size-guide-row { grid-template-columns: minmax(112px, auto) repeat(8, minmax(34px, 1fr)); gap: 4px; }
  .size-guide-row span { min-height: 22px; font-size: 9px; }

  .product-links, .product-links.has-bag-action { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .product-link.primary-purchase { grid-column: 1 / -1; min-height: 44px; font-size: 12px; padding: 0 12px; }
  .product-link.qc-link, .product-link.add-bag-btn { min-height: 44px; font-size: 11px; }
  .product-link.batch-update-link { min-height: 44px; }
  .agent-purchase { grid-template-columns: 1fr; gap: 6px; }
  .agent-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .agent-links a { min-height: 36px; font-size: 10px; }

  .product-info-dialog, .direct-order-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .product-info-modal { max-height: calc(100dvh - 16px); padding: 17px; border-radius: 14px; }
  .product-info-modal-header h2 { font-size: 18px; }
  .direct-order-modal { max-height: calc(100dvh - 16px); padding: 16px; border-radius: 14px; }
  .direct-order-header h2 { font-size: 18px; }
  .direct-order-steps { margin-top: 14px; }
  .direct-order-steps span { justify-content: center; min-height: 36px; padding: 0 6px; font-size: 10px; gap: 5px; }
  .direct-order-product { padding: 12px; }
  .direct-order-product div strong { font-size: 13px; }
  .direct-order-product > strong { font-size: 10px; }
  .direct-order-grid { grid-template-columns: 1fr; gap: 9px; }
  .direct-order-grid input, .direct-order-grid select { min-height: 42px; }
  .direct-order-assurance { grid-template-columns: 1fr; gap: 5px; }
  .direct-order-assurance span { min-height: 32px; }
  .direct-order-footer { align-items: stretch; flex-direction: column; }
  .direct-order-footer-actions { display: grid; grid-template-columns: auto 1fr; width: 100%; }
  .direct-order-footer button[type="submit"] { width: 100%; }
  .direct-order-disclaimer { text-align: left; }
  .product-description-highlights ul { grid-template-columns: 1fr; }
  .product-description-highlights li:last-child:nth-child(odd) { grid-column: auto; }

  .service-assurance { grid-template-columns: 1fr; gap: 0; }
  .service-assurance article { padding: 12px 0; border-top: 1px solid var(--line); border-left: 0; }
  .service-assurance article:first-child { padding-top: 0; border-top: 0; }
  .service-assurance article:last-child { padding-bottom: 0; }

  .site-toast { bottom: 78px; }

  .mobile-action-bar {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 7px;
    padding: 9px 12px max(9px, env(safe-area-inset-bottom));
    background: rgba(247,247,241,.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .mobile-action-bar a,
  .mobile-action-bar .mobile-bag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink);
    background: #fffefa;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }
  .mobile-action-bar a.primary { color: #fff; background: var(--ink); border-color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .product-info-modal, .direct-order-modal { animation: none; }
}

/* Keep version labels separate from green/yellow/red inventory states. */
.size .size-with-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.size-version-badge {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  color: #fff4c4;
  background: #262921;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
}
