/* 现货选款页。通用部分（顶栏、按钮、页脚）在 pages.css。 */

.stock-hero { padding: clamp(36px, 6vw, 72px) 16px clamp(28px, 4vw, 44px); color: var(--white); background: radial-gradient(circle at 12% 10%, rgba(226, 171, 47, .22), transparent 32%), radial-gradient(circle at 92% 90%, rgba(25, 78, 145, .25), transparent 32%), #111; }
.stock-hero h1 { max-width: 760px; margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 6vw, 64px); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.stock-hero p { max-width: 620px; margin-bottom: 22px; color: rgba(255, 255, 255, .72); font-size: 16px; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rule-chips li { padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; color: rgba(255, 255, 255, .88); font-size: 13px; }
.rule-chips li b { color: var(--gold); }
.stock-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: rgba(255, 255, 255, .7); font-size: 13px; }
.stock-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5bd17a; box-shadow: 0 0 0 4px rgba(91, 209, 122, .18); }
.stock-status.is-stale::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(226, 171, 47, .2); }
.stock-status.is-error::before { background: #e5534b; box-shadow: 0 0 0 4px rgba(229, 83, 75, .2); }
.stock-hero .sample-note { max-width: 620px; margin: 12px 0 0; padding: 10px 14px; border: 1px solid rgba(226, 171, 47, .45); border-radius: 10px; color: rgba(255, 255, 255, .85); background: rgba(226, 171, 47, .12); font-size: 13px; }

/* 工具栏 */
.toolbar { position: sticky; z-index: 30; top: var(--header-h); padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(247, 242, 235, .96); backdrop-filter: blur(14px); }
.toolbar .inner { display: grid; grid-template-columns: minmax(160px, 260px) 1fr auto; gap: 12px; align-items: center; }
.search { position: relative; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: inherit; font-size: 14px; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.color-filter { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.color-filter::-webkit-scrollbar { display: none; }
.color-filter button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.color-filter button[aria-pressed="true"] { color: var(--white); background: var(--ink); border-color: var(--ink); }
.color-filter i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.sort select { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: inherit; font-size: 13px; }
.result-count { margin: 18px 0 14px; color: var(--muted); font-size: 13px; }

/* 款式网格 */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.style-card { position: relative; display: flex; width: 100%; padding: 0; border: 0; color: inherit; font: inherit; text-align: left; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--white); box-shadow: 0 10px 30px rgba(26, 19, 10, .08); cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.style-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(26, 19, 10, .14); }
.style-card .photo { position: relative; display: block; aspect-ratio: 46 / 100; overflow: hidden; background: #efe6da; }
.style-card .photo img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }  /* 模特图按原比例完整显示，不裁剪 */
.style-card:hover .photo img { transform: scale(1.02); }
.badge { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; color: var(--ink); background: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.badge--low { color: var(--white); background: #c2410c; }
.in-list { position: absolute; right: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; color: var(--white); background: rgba(23, 22, 21, .82); font-size: 11px; font-weight: 800; }
.style-card .info { display: grid; gap: 6px; padding: 12px 14px 14px; }
.style-card .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.style-card .code { font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.price { color: var(--gold-deep); font-weight: 800; white-space: nowrap; }
.price small { color: var(--muted); font-size: 11px; font-weight: 400; }
.dots { display: flex; align-items: center; gap: 4px; min-height: 16px; }
.dot { width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); }
.dots span { margin-left: 2px; color: var(--muted); font-size: 11px; }
.meta { display: block; color: var(--muted); font-size: 12px; }
.card-button { justify-self: start; margin-top: 2px; padding: 0; border: 0; color: var(--ink); background: none; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-decoration: underline; text-underline-offset: 3px; text-transform: uppercase; cursor: pointer; }
.empty { padding: 60px 0; color: var(--muted); text-align: center; }
.disclaimer { margin: 28px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

/* 款式详情 */
dialog.sheet { width: min(1060px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 22px; background: var(--paper); box-shadow: 0 40px 120px rgba(0, 0, 0, .35); }
dialog.sheet::backdrop { background: rgba(10, 9, 8, .62); backdrop-filter: blur(3px); }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); max-height: calc(100vh - 24px); }
.gallery { position: relative; display: flex; flex-direction: column; min-height: 0; background: #e9e0d3; }
.gallery-track { display: flex; flex: 1; min-height: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 100%; max-height: calc(100vh - 24px); object-fit: contain; scroll-snap-align: center; }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.gallery-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(23, 22, 21, .3); cursor: pointer; }
.gallery-dots button[aria-current="true"] { width: 22px; border-radius: 99px; background: var(--ink); }
.sheet-panel { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 26px 24px 0; }
.sheet-close { position: absolute; z-index: 2; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--white); background: rgba(23, 22, 21, .75); font-size: 18px; cursor: pointer; }
.sheet-panel h2 { margin-bottom: 4px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; }
.sheet-panel .price { font-size: 20px; }
.sheet-note { margin: 10px 0 16px; color: var(--muted); font-size: 13px; }
.variant-list { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.variant { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.variant.is-picked { border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(226, 171, 47, .25); }
.swatch-thumb { width: 56px; height: 80px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #eeeae4; cursor: zoom-in; }
.swatch-thumb img { width: 100%; height: 100%; object-fit: contain; }
.swatch-empty { width: 56px; }
.variant .name { font-size: 14px; font-weight: 800; }
.variant .sub { color: var(--muted); font-size: 12px; }
.variant .sub b { color: #2d6b36; }
.variant .sub b.low { color: #c2410c; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: var(--paper); font-size: 18px; font-weight: 800; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-weight: 800; }
.sheet-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: auto -24px 0; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--paper); box-shadow: 0 -10px 24px rgba(26, 19, 10, .06); }
.sheet-footer .sum { font-size: 13px; color: var(--muted); }
.sheet-footer .sum b { display: block; color: var(--ink); font-size: 16px; }

/* 底部选款清单条 */
.list-bar { position: fixed; z-index: 40; left: 50%; bottom: 16px; display: flex; align-items: center; gap: 16px; width: min(640px, calc(100% - 24px)); padding: 10px 10px 10px 20px; border-radius: 999px; color: var(--white); background: rgba(17, 17, 17, .94); box-shadow: 0 18px 50px rgba(0, 0, 0, .3); transform: translate(-50%, 150%); transition: transform .35s ease; }
.list-bar.show { transform: translate(-50%, 0); }
.list-bar .sum { flex: 1; font-size: 13px; color: rgba(255, 255, 255, .72); }
.list-bar .sum b { color: var(--white); font-size: 15px; }

/* 清单抽屉 */
dialog.drawer { width: min(520px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--paper); }
dialog.drawer::backdrop { background: rgba(10, 9, 8, .55); }
.drawer-body { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 12px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; }
.drawer-head button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); font-size: 16px; cursor: pointer; }
.drawer-items { flex: 1; overflow-y: auto; margin: 0; padding: 12px 20px; list-style: none; }
.drawer-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer-item img { width: 64px; height: 120px; border-radius: 10px; object-fit: contain; background: #efe6da; cursor: pointer; }
.drawer-item .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.drawer-item ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.drawer-item li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.drawer-item li span { display: inline-flex; align-items: center; gap: 6px; }
.drawer-item .stepper button { width: 30px; height: 30px; font-size: 16px; }
.drawer-item .stepper output { min-width: 26px; font-size: 13px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--white); }
.totals { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.totals b { font-size: 18px; }
.buyer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.buyer input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; }
.drawer-foot .button { width: 100%; }
.drawer-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.drawer-message { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; color: #7c2d12; background: #ffedd5; font-size: 13px; }
.drawer-empty { padding: 40px 0; color: var(--muted); text-align: center; }
.link-button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 88px; padding: 10px 16px; border-radius: 999px; color: var(--white); background: rgba(17, 17, 17, .92); font-size: 13px; transform: translate(-50%, 20px); opacity: 0; transition: .25s ease; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 860px) {
  .toolbar .inner { grid-template-columns: 1fr auto; }
  .color-filter { grid-column: 1 / -1; grid-row: 2; }
  .sheet-body { grid-template-columns: 1fr; max-height: none; }
  dialog.sheet { width: 100%; max-width: 100%; max-height: 100%; height: 100%; margin: 0; border-radius: 0; }
  .sheet-body { height: 100%; overflow-y: auto; display: block; }
  .gallery-track img { max-height: 72vh; }
  .sheet-panel { overflow: visible; padding: 20px 16px 0; }
  .sheet-footer { margin: 16px -16px 0; padding: 12px 16px; }
}
@media (max-width: 560px) {
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .style-card .info { padding: 10px 10px 12px; }
  .style-card .code { font-size: 13px; }
  .price { font-size: 13px; }
  .buyer { grid-template-columns: 1fr; }
  .list-bar { padding-left: 16px; }
}

/* 颜色实拍图放大 */
dialog.zoom { width: min(560px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 18px; background: var(--white); overflow: hidden; }
dialog.zoom::backdrop { background: rgba(10, 9, 8, .75); }
dialog.zoom img { display: block; width: 100%; max-height: calc(100vh - 110px); object-fit: contain; background: #eeeae4; }
dialog.zoom p { margin: 0; padding: 12px 16px; font-weight: 800; }
dialog.zoom .sheet-close { right: 10px; top: 10px; }
