/* 库存商品详情：一张总卡（分区用细线，不再多张嵌套卡） */
.product-card.product-card-one,
.lookup-card.product-card.product-card-one{
  box-sizing:border-box;min-width:0;width:100%;
  padding:12px 12px 10px!important;
  border:1px solid #dce7f0;border-radius:12px;background:#fff;
  overflow:hidden;
}
.product-card-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:0 0 6px;min-width:0}
.product-card-hero-main{flex:1;min-width:0}
.product-card-hero .module-product-title{display:block;margin:0;font-size:16px;line-height:1.35;font-weight:750;overflow-wrap:anywhere}
.product-card-hero-meta{display:block;margin-top:3px;font-size:12px;line-height:1.3;color:var(--muted,#64748b);font-variant-numeric:tabular-nums}
.product-card-hero-oh{flex:0 0 auto;text-align:right;padding-top:1px;min-width:52px}
.product-card-hero-oh>span{display:block;font-size:11px;line-height:1.2;color:var(--muted,#64748b)}
.product-card-hero-oh>b,
.product-card-hero-oh .stock-value{display:block;font-size:28px;line-height:1.1;color:#cf2834;font-variant-numeric:tabular-nums;font-weight:800}

/* 分区：细分割线 + 小标题，无独立边框卡 */
.product-card-one>.product-module{
  box-sizing:border-box;min-width:0;
  margin:0;padding:7px 0 5px;
  border:0;border-top:1px solid #dce7f0;border-radius:0;background:transparent;
}
.product-card-one>.product-module+.product-module{margin-top:0}
.module-label{margin:0 0 4px;font-size:12px;line-height:1.3;font-weight:700;color:#005daa;letter-spacing:.02em}
.module-product-title{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.product-card .lookup-grid{margin-top:0;gap:3px 10px}
.product-card .module-stock-line{display:flex;align-items:baseline;gap:10px;font-size:13px}
.product-card .module-stock-line>b{font-size:20px;font-variant-numeric:tabular-nums;color:#cf2834}
.product-card-one .module-stock .module-stock-line{display:none} /* OH 已在顶栏 */
.product-card .sales-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 8px;padding:8px;background:#f3f6f9;border-radius:8px}
.product-card .sales-preview>span{display:flex;flex-direction:column;gap:2px;align-items:center;text-align:center;font-size:11px;color:var(--muted,#64748b);min-width:0}
.product-card .sales-preview>span>b{font-size:15px;color:var(--text,#1a2b3c);font-variant-numeric:tabular-nums}
.product-card .sales-preview>span:first-child>b{color:#cf2834}
.product-card .sales-preview .sales-amount{font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.product-card .sales-preview>span:first-child>.sales-amount{color:#cf2834}
.product-card .sales-detail{margin-top:0;padding-top:0}
.product-card .module-orders p{margin:0 0 6px;line-height:1.5}
.product-card .module-orders .future-order{margin:0}
.product-card .module-orders p:last-child{margin-bottom:0}

/* 操作按钮等宽 */
.module-action-buttons{display:flex;flex-wrap:nowrap;align-items:stretch;gap:8px;min-width:0;width:100%;box-sizing:border-box;margin:0 0 8px}
.module-action-buttons>.quick-watch,
.module-action-buttons>.quick-shortage{flex:1 1 0;min-width:0;margin:0!important;padding:0!important;border:0!important;border-top:0!important;display:block;background:transparent}
.panel .module-action-buttons>.quick-watch>button,
.panel .module-action-buttons>.quick-shortage>button,
.panel .module-action-buttons>button{width:100%;min-width:0;min-height:40px!important;height:auto!important;padding:9px 8px!important;font-size:13px!important;box-sizing:border-box;white-space:normal}
.module-action-buttons .quick-watch-feedback,
.module-action-buttons .quick-shortage-feedback{display:block;margin-top:4px;font-size:12px}
.module-action-buttons .quick-watch-feedback:empty,
.module-action-buttons .quick-shortage-feedback:empty{display:none}

/* 品名搜索展开时：外层 summary 已有品名+OH，隐藏内卡顶栏避免重复 */
.product-card-one .module-basic .lookup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.product-card-one .module-stock .sales-preview{padding:6px 8px;margin-bottom:0}
.product-card-one .module-orders p{margin:0 0 3px}
.product-card-one .module-orders .replenishment-preview{border:0;margin:5px 0 0;padding:0;font-size:13px;line-height:1.45}
.product-card-one .module-orders .replenishment-preview>div{margin-top:2px;gap:8px}
.product-card-one .module-orders .replenishment-preview>div>b{text-align:right}
.product-card-one .module-action-buttons{margin:0 0 4px}
.panel .product-card-one .module-action-buttons button{min-height:36px!important;padding:6px 8px!important}
.product-card-one .module-actions>p{margin:4px 0 0}
.product-card-one>.module-details{padding:2px 0 0}
.product-card-one .module-details>details{border:0;margin:0;padding:0}
.product-card-one .module-details>details>summary{min-height:32px;font-size:13px;cursor:pointer;align-content:center}
.product-card-one .module-details .sales-detail>summary{color:inherit}

.name-search-item .product-card-hero{display:none}
.name-search-item .product-card.product-card-one{border:0;border-radius:0;padding:0!important;background:transparent;box-shadow:none}
.name-search-item .product-card-one>.product-module:first-of-type{border-top:0;padding-top:4px}

/* 关注页等仍可能用独立 product-module */
.product-module{box-sizing:border-box;min-width:0;padding:10px;border:1px solid #dce7f0;border-radius:9px;background:#fff}
.product-module+.product-module{margin-top:8px}
.watch-row .watch-star-slot{flex-basis:80px}
.panel .watch-row button.watch-pin{position:absolute;top:-5px;right:64px;z-index:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px!important;min-height:44px!important;max-height:44px!important;margin:0;padding:0!important;border:0!important;border-radius:8px;background:transparent!important;color:#005daa;font-size:11px!important;font-weight:650;line-height:1;touch-action:manipulation}
.panel .watch-row button.watch-pin[aria-pressed="true"]{color:#e31837}
.panel .watch-row button.watch-pin:focus-visible{outline:2px solid #005daa;outline-offset:-3px}
.watch-row.is-pinned{border-left:3px solid #005daa}
.watch-row-name .watch-row-flag{display:inline-block;margin-left:5px;font-weight:500}
.watch-row-detail .product-module{padding:8px;margin-bottom:8px}
.watch-row-detail .watch-metrics{border:0;padding:0}

@media(prefers-color-scheme:dark){
  .product-card.product-card-one,
  .lookup-card.product-card.product-card-one{background:#111;border-color:#293846}
  .product-card-hero-oh>b,
  .product-card-hero-oh .stock-value{color:#ff6d78}
  .product-card-one>.product-module{border-top-color:#293846}
  .product-card .sales-preview{background:#0a1620}
  .product-card .sales-preview>span>b{color:#e6edf5}
  .product-card .sales-preview>span:first-child>b,
  .product-card .sales-preview>span:first-child>.sales-amount{color:#ff6d78}
  .module-label,.panel .watch-row button.watch-pin{color:#9dcfff}
  .panel .watch-row button.watch-pin[aria-pressed="true"]{color:#ff7188}
  .watch-row.is-pinned{border-left-color:#65aeec}
  .product-module{background:#000;border-color:#293846}
  .name-search-item .product-card.product-card-one{background:transparent}
}


/* Keep expandable sales details directly below the sales summary. */
.product-card-one .module-stock>.sales-detail{border:0;margin:4px 0 0;padding:0}
.product-card-one .module-stock>.sales-detail>summary{min-height:32px;font-size:13px;cursor:pointer;align-content:center;color:inherit}

/* Emphasize SKU while retaining the department label. */
.product-card-hero-meta .product-sku-highlight,
.name-result-meta .product-sku-highlight{font-size:16px;line-height:1.4;font-weight:800;color:#005daa;letter-spacing:.02em;font-variant-numeric:tabular-nums}
@media(prefers-color-scheme:dark){.product-card-hero-meta .product-sku-highlight,.name-result-meta .product-sku-highlight{color:#9dcfff}}
