.detail-sku-picker { display: none; margin: 22px 0; }
.detail-sku-picker.is-ready { display: block; }
.detail-sku-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; font: 600 16px/24px "Segoe UI", "Microsoft YaHei", Arial, sans-serif; color: #333; }
.detail-sku-more { display: flex; align-items: center; justify-content: center; flex: 0 0 26px; width: 26px; height: 26px; box-sizing: border-box; padding: 0; border: 1px solid #5145b5; background: #f3f0ff; color: #5145b5; cursor: pointer; border-radius: 50%; }
.detail-sku-more svg > path:first-child { fill: transparent; }
.detail-sku-more svg { display: block; width: 24px; height: 24px; }
.detail-sku-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 64px)); justify-content: space-between; gap: 10px; align-items: center; padding: 2px; }
.detail-sku-grid.has-overflow { grid-template-columns: repeat(8, minmax(0, 64px)) 44px; }
.detail-sku-grid > .detail-sku-card:nth-child(n+9) { display: none; }
.detail-sku-overflow { align-self: stretch; min-width: 0; padding: 0; border: 1px solid #5145b5; border-radius: 6px; background: #f3f0ff; color: #5145b5; font: 500 14px/1 "Segoe UI", Arial, sans-serif; cursor: pointer; }
.detail-sku-overflow:hover { box-shadow: inset 0 0 0 1px #5145b5; }
.detail-sku-card { display: flex; align-items: center; justify-content: center; min-width: 0; width: 100%; aspect-ratio: 1; box-sizing: border-box; padding: 0; border: 2px solid transparent; border-radius: 7px; background: #fff; cursor: pointer; color: #242236; }
.detail-product-page #detailSkuPicker .detail-sku-thumb { width: 100%; height: auto; aspect-ratio: 1; flex: 0 1 auto; }
.detail-product-page #detailSkuPicker .detail-sku-thumb img { width: 100% !important; height: 100% !important; }
.detail-sku-card:hover, .detail-sku-card.is-selected { border-color: #5145b5; background: #f3f0ff; }
.detail-sku-thumb { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; flex-shrink: 0; overflow: hidden; background: #f1f3f4; border-radius: 6px; color: #777; font-size: 11px; }
.detail-sku-card .detail-sku-thumb { margin: 0; }
.detail-sku-thumb img { width: 100%; height: 100%; object-fit: contain; }
.detail-sku-row-preview { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.detail-sku-modal[hidden], .detail-sku-modal [hidden] { display: none !important; }
.detail-sku-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: stretch; font-family: Arial, sans-serif; color: #222; }
.detail-sku-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.detail-sku-preview { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 40px; pointer-events: none; }
.detail-sku-preview button, .detail-sku-preview figure { pointer-events: auto; }
.detail-sku-preview figure { margin: 0; width: min(100%, 720px); text-align: center; }
.detail-sku-preview figure img { max-width: 100%; width: auto; height: auto; max-height: 76vh; object-fit: contain; border-radius: 4px; }
.detail-sku-preview figcaption { display: flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; max-width: 100%; box-sizing: border-box; margin: 8px auto 0; padding: 14px 24px; border-radius: 999px; background: rgba(35, 35, 35, .65); color: #fff; font: 500 14px/22px "Segoe UI", "Microsoft YaHei", Arial, sans-serif; }
.detail-sku-caption-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.detail-sku-empty { display: flex; align-items: center; justify-content: center; min-height: 260px; background: #f1f3f4; color: #666; border-radius: 6px; }
.detail-sku-preview button { border: 0; border-radius: 50%; background: #fff; width: 40px; height: 40px; flex-shrink: 0; font-size: 28px; cursor: pointer; }
.detail-sku-panel { position: relative; width: min(580px, 48vw); background: #fff; display: flex; flex-direction: column; box-shadow: -4px 0 24px #0002; }
.detail-sku-panel .detail-sku-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px; border-bottom: 1px solid #eee; }
.detail-sku-panel .detail-sku-panel-head { position: relative; flex-shrink: 0; width: 100%; min-width: 0; box-sizing: border-box; padding-right: 66px; }
.detail-sku-panel h2 { margin: 0; min-width: 0; font-size: 18px; font-weight: 600; }
.detail-sku-panel .detail-sku-panel-head .detail-sku-close { position: absolute; top: 50%; right: 20px; transform: translateY(-50%); display: inline-flex; visibility: visible; opacity: 1; z-index: 1; }
.detail-sku-close svg { display: block; flex-shrink: 0; width: 20px; height: 20px; pointer-events: none; }
.detail-sku-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: #f4f4f6; color: #747481; cursor: pointer; font: 24px/1 Arial, sans-serif; }
.detail-sku-close:hover { background: #e9e9ee; color: #242236; }
.detail-sku-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px; }
.detail-sku-modal .specifications { height: auto; width: 100%; margin: 0; padding: 0; }
.detail-sku-modal .detail-pdp-spec-wrap, .detail-sku-modal .detail-pdp-spec-scroll { max-height: none; overflow: visible; border: 0; }
.detail-sku-modal .detail-pdp-spec-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: auto; }
.detail-sku-modal .detail-pdp-spec-table th { padding: 8px 4px; font-size: 11px; text-align: left; }
.detail-sku-modal .detail-pdp-spec-table td { padding: 12px 4px; border-bottom: 1px solid #eee; font-size: 12px; overflow-wrap: anywhere; }
.detail-sku-modal .detail-pdp-spec-col-name { width: 45%; }
.detail-sku-modal .detail-pdp-spec-col-stock { display: none; }
.detail-sku-modal tr.is-selected .detail-sku-thumb { outline: 2px solid #153f70; outline-offset: 2px; }
.detail-sku-modal .detail-pdp-qty { display: flex; align-items: center; border: 1px solid #d9dce0; border-radius: 20px; overflow: hidden; width: 100px; }
.detail-sku-modal .detail-pdp-qty-btn { width: 28px; height: 28px; padding: 0; border: 0; background: #f4f5f6; cursor: pointer; }
.detail-sku-modal .detail-pdp-qty-input { width: 42px; min-width: 0; padding: 0; border: 0; text-align: center; }
.detail-sku-panel footer { display: flex; gap: 10px; padding: 18px 20px; border-top: 1px solid #eee; background: #fff; }
.detail-sku-panel footer button { flex: 1; border: 1px solid #e64a19; border-radius: 24px; min-height: 44px; background: #e64a19; color: #fff; font-weight: 600; cursor: pointer; }
.detail-sku-panel footer button + button { background: #fff; color: #333; border-color: #333; }
.detail-sku-picker button:focus-visible, .detail-sku-modal button:focus-visible { outline: 2px solid #153f70; outline-offset: 3px; }
@media (max-width: 760px) {
  .detail-sku-modal { flex-direction: column; }
  .detail-sku-preview { flex: 0 0 30vh; padding: 16px 48px; gap: 12px; box-sizing: border-box; }
  .detail-sku-preview figure img { max-height: 22vh; }
  .detail-sku-preview figcaption { margin-top: 6px; font-size: 12px; }
  .detail-sku-empty { min-height: 20vh; }
  .detail-sku-panel { width: 100%; flex: 1; min-height: 0; }
  .detail-sku-panel .detail-sku-panel-head { padding: 12px 16px; }
  .detail-sku-panel h2 { font-size: 16px; }
  .detail-sku-list { padding: 6px 12px; }
  .detail-sku-modal .detail-sku-thumb { width: 44px; height: 44px; }
  .detail-sku-modal .detail-pdp-qty { width: 84px; }
  .detail-sku-modal .detail-pdp-qty-input { width: 30px; }
  .detail-sku-modal .detail-pdp-qty-btn { width: 26px; }
  .detail-sku-panel footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
