/* 商品搜索 · brand_goods */
#bdLiveCategorySearch {
  width: 100%;
  min-height: calc(100vh - var(--bd-topbar-h, 56px));
}

.bd-main:has(> #bdLiveCategorySearch:not([hidden])) {
  padding: 12px 16px 24px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.lcs-root {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
}

.lcs-head {
  margin-bottom: 12px;
}

.lcs-head h1 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lcs-head p {
  margin-top: 4px;
  color: var(--bd-text-secondary);
}

.lcs-filters {
  background: var(--bd-card);
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.lcs-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.lcs-filter-search {
  flex-wrap: wrap;
}

.lcs-filter-search .lcs-view-toggle {
  margin-left: 0;
}

.lcs-filter-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.lcs-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.lcs-mode-btn {
  padding: 0 12px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--bd-text-secondary);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.lcs-mode-btn + .lcs-mode-btn {
  border-left: 1px solid var(--bd-border);
}

.lcs-mode-btn.is-active {
  background: var(--bd-primary-light);
  color: var(--bd-accent-text, #2952e6);
  font-weight: 600;
}

.lcs-filter-goods-cat {
  position: relative;
}

.lcs-cat-group-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.lcs-cat-find {
  padding: 0 10px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--bd-primary, #2952e6);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lcs-cat-find:hover {
  color: var(--bd-primary-dark, #1d4ed8);
}

.lcs-filter-goods-cat,
.lcs-filter-selection-cat {
  align-items: flex-start;
}

.lcs-filter-goods-cat .lcs-mode-toggle,
.lcs-filter-selection-cat .lcs-mode-toggle {
  flex-shrink: 0;
  margin-left: auto;
  align-self: flex-start;
}

.lcs-cat-picker {
  display: none;
  position: fixed;
  z-index: 1200;
  min-width: 520px;
  max-width: min(720px, 100vw - 24px);
}

.lcs-cat-picker.is-open {
  display: block;
}

.lcs-cat-picker-panel {
  background: #fff;
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.lcs-cat-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bd-border);
  background: #fafafa;
}

.lcs-cat-picker-title {
  font-weight: 600;
  font-size: 12px;
}

.lcs-cat-picker-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--bd-text-secondary);
  padding: 0 4px;
}

.lcs-cat-picker-body {
  display: flex;
  min-height: 240px;
  max-height: 320px;
}

.lcs-cat-picker-col {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.lcs-cat-picker-l2 {
  flex: 0 0 42%;
  border-right: 1px solid var(--bd-border);
  background: #fcfcfd;
}

.lcs-cat-picker-l3 {
  flex: 1;
  background: #fff;
}

.lcs-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--bd-text, #1f2937);
  line-height: 1.4;
}

.lcs-picker-item:hover,
.lcs-picker-item.is-active {
  background: var(--bd-primary-light, #eef2ff);
  color: var(--bd-accent-text, #2952e6);
}

.lcs-picker-item-l3.is-active {
  font-weight: 600;
}

.lcs-picker-arrow {
  margin-left: 8px;
  opacity: 0.5;
  font-size: 14px;
}

.lcs-picker-empty {
  padding: 16px 12px;
  color: var(--bd-text-secondary);
  font-size: 12px;
}

.lcs-cat-picker-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--bd-border);
  background: #fafafa;
  text-align: right;
}

.lcs-cat-picker-only-l2 {
  border: none;
  background: transparent;
  color: var(--bd-primary, #2952e6);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lcs-filter-row .lcs-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
  color: var(--bd-text-secondary);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.lcs-view-toggle {
  display: inline-flex;
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.lcs-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--bd-text-secondary);
  cursor: pointer;
  font-size: 12px;
}

.lcs-view-btn + .lcs-view-btn {
  border-left: 1px solid var(--bd-border);
}

.lcs-view-btn.is-active {
  background: var(--bd-primary-light);
  color: var(--bd-accent-text, #2952e6);
  font-weight: 600;
}

.lcs-view-ico {
  font-size: 14px;
  line-height: 1;
}

.lcs-filter-row:last-child {
  margin-bottom: 0;
}

.lcs-filter-label {
  flex: 0 0 64px;
  color: var(--bd-text-secondary);
  padding-top: 4px;
}

.lcs-search-box {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 560px;
}

.lcs-search-input {
  flex: 1;
  padding: 0 12px;
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  font-size: 13px;
  height: 36px;
}

.lcs-search-btn {
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: var(--bd-primary);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  height: 36px;
}

.lcs-sort-select {
  padding: 4px 8px;
  border: 1px solid var(--bd-border);
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}

.lcs-cat-group,
.lcs-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.lcs-cat-chip,
.lcs-chip {
  padding: 0 10px;
  border: 1px solid var(--bd-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  height: 28px;
}

.lcs-cat-chip.is-active,
.lcs-chip.is-active {
  border-color: var(--bd-accent-border, #a5b4fc);
  color: var(--bd-accent-text, #2952e6);
  background: var(--bd-primary-light);
  font-weight: 600;
}

.lcs-cat-chip-sub {
  font-size: 11px;
}

.lcs-hint {
  color: var(--bd-text-secondary);
}

.lcs-summary {
  background: var(--bd-card);
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}

.lcs-summary-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.lcs-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lcs-summary-card {
  text-align: center;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
}

.lcs-summary-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--bd-primary);
  line-height: 1.35;
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcs-summary-card:last-child .lcs-summary-val {
  font-size: 12px;
  font-weight: 500;
}

.lcs-summary-label {
  margin-top: 4px;
  color: var(--bd-text-secondary);
  font-size: 11px;
}

.lcs-results {
  background: var(--bd-card);
  border: 1px solid var(--bd-border);
  border-radius: 8px;
  padding: 14px;
  min-width: 0;
  overflow: hidden;
}

.lcs-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.lcs-results-head .lcs-view-toggle {
  margin-left: auto;
}

.lcs-results-cards .lcs-results-head h3 {
  color: var(--bd-primary);
}
.lcs-results-head h3 {
  font-size: 14px;
  font-weight: 600;
}

.lcs-results-meta {
  color: var(--bd-text-secondary);
}

.lcs-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border: 1px solid var(--bd-border);
  border-radius: 6px;
}

.lcs-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.lcs-table th:nth-child(1),
.lcs-table td:nth-child(1) { width: 52px; min-width: 52px; }
.lcs-table th:nth-child(2),
.lcs-table td:nth-child(2) { min-width: 200px; max-width: 280px; }
.lcs-table th:nth-child(3),
.lcs-table td:nth-child(3),
.lcs-table th:nth-child(4),
.lcs-table td:nth-child(4),
.lcs-table th:nth-child(5),
.lcs-table td:nth-child(5),
.lcs-table th:nth-child(9),
.lcs-table td:nth-child(9),
.lcs-table th:nth-child(10),
.lcs-table td:nth-child(10),
.lcs-table th:nth-child(11),
.lcs-table td:nth-child(11) { min-width: 72px; white-space: nowrap; }
.lcs-table th:nth-child(6),
.lcs-table td:nth-child(6) { min-width: 88px; max-width: 120px; }
.lcs-table th:nth-child(7),
.lcs-table td:nth-child(7) { min-width: 96px; max-width: 140px; }
.lcs-table th:nth-child(8),
.lcs-table td:nth-child(8) { min-width: 96px; }
.lcs-table th:nth-child(12),
.lcs-table td:nth-child(12) { min-width: 64px; white-space: nowrap; }
.lcs-table th:nth-child(13),
.lcs-table td:nth-child(13) { min-width: 128px; white-space: nowrap; }

.lcs-table th,
.lcs-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--bd-border);
  vertical-align: middle;
}

.lcs-table th {
  background: #fafafa;
  font-weight: 500;
  color: var(--bd-text-secondary);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--bd-border);
}

.lcs-td-num {
  white-space: nowrap;
}

.lcs-td-thumb {
  width: 52px;
}

.lcs-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.lcs-thumb-empty {
  background: #e2e8f0;
}

.lcs-title {
  font-weight: 600;
  max-width: 260px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lcs-sub {
  color: var(--bd-muted, #64748b);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 2px;
  word-break: break-all;
}

.lcs-spec-badge {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 10px;
  line-height: 18px;
}

.lcs-card-spec {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  z-index: 2;
}

.lcs-td-cat {
  min-width: 88px;
  font-size: 11px;
  color: var(--bd-text-secondary);
  line-height: 1.45;
  word-break: keep-all;
}

.lcs-cat-l1 {
  display: block;
  font-weight: 500;
  color: var(--bd-text, #1f2937);
}

.lcs-cat-l2 {
  display: block;
  margin-top: 2px;
  color: var(--bd-text-secondary);
}

.lcs-cat-l3 {
  display: block;
  margin-top: 2px;
  color: var(--bd-text-secondary);
  font-size: 10px;
}

.lcs-cat-muted {
  color: var(--bd-text-secondary);
}

.lcs-feed-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  background: #eef2ff;
  color: #4338ca;
  white-space: nowrap;
}

.lcs-cat-group-sub {
  padding-left: 2px;
}

.lcs-breadcrumb-row {
  align-items: center;
}

.lcs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  flex: 1;
}

.lcs-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bd-primary-light, #eef2ff);
  color: var(--bd-accent-text, #2952e6);
  font-size: 12px;
}

.lcs-breadcrumb-sep {
  margin-right: 4px;
  color: var(--bd-text-secondary);
}

.lcs-breadcrumb-clear {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.75;
}

.lcs-breadcrumb-clear:hover {
  opacity: 1;
}

.lcs-breadcrumb-reset {
  border: none;
  background: transparent;
  color: var(--bd-text-secondary);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  padding: 2px 4px;
}

.lcs-td-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.lcs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 16px;
}

.lcs-page-btn {
  padding: 6px 14px;
  border: 1px solid var(--bd-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.lcs-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lcs-page-info {
  color: var(--bd-text-secondary);
}

.lcs-status,
.lcs-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--bd-text-secondary);
}

.lcs-status-error {
  color: var(--bd-down, #f53f3f);
}

@media (max-width: 900px) {
  .lcs-summary-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .lcs-summary-cards {
    grid-template-columns: 1fr;
  }

  .lcs-search-box {
    max-width: none;
    flex-direction: column;
  }
}


.lcs-search-btn:hover {
  background: var(--bd-primary-dark, #2952e6);
}

.lcs-search-btn:active {
  background: var(--bd-primary-dark, #2952e6);
}

.lcs-row-click {
  cursor: pointer;
}

.lcs-row-click:hover {
  background: rgba(59, 130, 246, 0.06);
}

.lcs-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
}

.lcs-badge-ok {
  background: #dcfce7;
  color: #166534;
}

.lcs-badge-warn {
  background: #ffedd5;
  color: #9a3412;
}

.lcs-badge-muted {
  background: #f1f5f9;
  color: #64748b;
}

.lcs-ext-link {
  color: var(--bd-primary);
  text-decoration: none;
}

.lcs-ext-link:hover {
  text-decoration: underline;
}

.lcs-td-link {
  white-space: nowrap;
}

/* 选品封面网格 */
.lcs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.lcs-card {
  border: 1px solid var(--bd-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lcs-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.lcs-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f1f5f9;
  overflow: hidden;
}

.lcs-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lcs-card-cover-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.lcs-cos-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.lcs-cos-badge.lcs-cos-empty {
  background: rgba(15, 23, 42, 0.55);
  box-shadow: none;
  font-size: 10px;
}

.lcs-cos-rate {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.lcs-cos-est {
  margin-top: 2px;
  font-size: 10px;
  opacity: 0.92;
  line-height: 1.2;
}

.lcs-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lcs-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.lcs-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
}

.lcs-card-shop {
  font-size: 11px;
  color: var(--bd-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lcs-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 10px;
  color: var(--bd-text-secondary);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .lcs-filter-search .lcs-view-toggle {
    margin-left: 0;
    width: 100%;
  }

  .lcs-filter-toolbar {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .lcs-mode-toggle,
  .lcs-view-toggle {
    flex: 1;
  }

  .lcs-mode-btn,
  .lcs-view-btn {
    flex: 1;
    justify-content: center;
  }

  .lcs-cat-picker {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    min-width: 0;
    max-width: none;
  }

  .lcs-cat-picker-body {
    max-height: 50vh;
  }

  .lcs-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lcs-filter-row .lcs-check-label {
    margin-left: 0;
    margin-top: 6px;
  }
}
