/* ============================================
   SHENPAI Product Finder - Styles
   Matches existing theme: dark blue #2c4170,
   accent gold #DFB163, orange #f95e00, dark #353535
   ============================================ */

/* --- Page Header Banner --- */
.sp-finder-banner {
  background: url('../static/image/banner_nei3.jpg') no-repeat center center;
  background-size: cover;
  padding: 60px 0;
  text-align: center;
  color: #fff;
  position: relative;
}
.sp-finder-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(27, 99, 181, 0.7);
}
.sp-finder-banner h1 {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}
.sp-finder-banner p {
  position: relative;
  z-index: 1;
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* --- Breadcrumb --- */
.sp-breadcrumb {
  padding: 12px 0;
  background: #f8f8f8;
  border-bottom: 1px solid #e8e8e8;
  font-size: 14px;
}
.sp-breadcrumb a {
  color: #1b63b5;
  text-decoration: none;
}
.sp-breadcrumb a:hover {
  color: #f95e00;
}
.sp-breadcrumb span {
  color: #999;
  margin: 0 6px;
}

/* --- Tab Navigation --- */
.sp-tabs {
  background: #fff;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 0;
}
.sp-tabs .sp-tab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.sp-tabs .sp-tab-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
  padding: 20px 15px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}
.sp-tabs .sp-tab-item:hover {
  background: #f8f9fa;
}
.sp-tabs .sp-tab-item.active {
  border-bottom-color: #1b63b5;
  background: #fff;
}
.sp-tabs .sp-tab-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 4px;
}
.sp-tabs .sp-tab-item.active .sp-tab-title {
  color: #1b63b5;
}
.sp-tabs .sp-tab-desc {
  font-size: 12px;
  color: #999;
  display: block;
}

/* --- Tab Content Panels --- */
.sp-tab-panels {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.sp-tab-panel {
  display: none;
  padding: 25px 30px;
}
.sp-tab-panel.active {
  display: block;
}

/* Product Type Panel */
.sp-type-group {
  margin-bottom: 20px;
}
.sp-type-group h4 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-type-group h4 i {
  color: #1b63b5;
}
.sp-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp-type-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  transition: all 0.2s;
  background: #fff;
}
.sp-type-options label:hover {
  border-color: #1b63b5;
  color: #1b63b5;
}
.sp-type-options input[type="radio"]:checked + span,
.sp-type-options label.selected {
  background: #1b63b5;
  color: #fff;
  border-color: #1b63b5;
}
.sp-type-options input[type="radio"] {
  display: none;
}
.sp-type-options label.selected {
  background: #1b63b5;
  color: #fff;
  border-color: #1b63b5;
}

/* Series Panel */
.sp-series-select {
  max-width: 500px;
}
.sp-series-select select {
  width: 100%;
  padding: 10px 15px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

/* Application Conditions Panel */
.sp-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.sp-conditions-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  transition: all 0.2s;
}
.sp-conditions-grid label:hover {
  border-color: #1b63b5;
  background: #f0f5ff;
}
.sp-conditions-grid input[type="checkbox"]:checked + span {
  color: #1b63b5;
  font-weight: 600;
}

/* --- Main Content Layout --- */
.sp-finder-body {
  display: flex;
  gap: 0;
  background: #f5f5f5;
  min-height: 600px;
}

/* --- Filter Sidebar --- */
.sp-filter-sidebar {
  width: 320px;
  min-width: 320px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  padding: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  position: sticky;
  top: 80px;
}
.sp-filter-section {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f0;
}
.sp-filter-section:last-child {
  border-bottom: none;
}
.sp-filter-section h5 {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Unit Toggle */
.sp-unit-toggle {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 3px;
  margin-bottom: 20px;
}
.sp-unit-toggle button {
  flex: 1;
  padding: 6px 12px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
}
.sp-unit-toggle button.active {
  background: #1b63b5;
  color: #fff;
}

/* Range Slider */
.sp-range-filter {
  margin-bottom: 16px;
}
.sp-range-filter label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}
.sp-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-range-inputs input {
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 12px;
  text-align: center;
  color: #333;
}
.sp-range-inputs .sp-range-sep {
  color: #999;
  font-size: 12px;
}
.sp-range-slider {
  margin-top: 8px;
  position: relative;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
}
.sp-range-slider .sp-range-track {
  position: absolute;
  height: 100%;
  background: #1b63b5;
  border-radius: 3px;
}
.sp-range-slider .sp-range-thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #1b63b5;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 2;
  transition: box-shadow 0.2s;
}
.sp-range-slider .sp-range-thumb:hover,
.sp-range-slider .sp-range-thumb.dragging {
  box-shadow: 0 0 0 4px rgba(27, 99, 181, 0.2);
}

/* Dropdown Filter */
.sp-dropdown-filter select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 12px;
  color: #333;
  background: #fff;
  cursor: pointer;
  margin-bottom: 6px;
}

/* Checkbox Group */
.sp-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sp-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  padding: 3px 0;
}
.sp-checkbox-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #1b63b5;
}

/* --- Results Area --- */
.sp-results-area {
  flex: 1;
  padding: 20px 25px;
  min-width: 0;
}

/* Results Header */
.sp-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sp-results-count {
  font-size: 14px;
  color: #555;
}
.sp-results-count strong {
  color: #1b63b5;
  font-size: 18px;
}
.sp-results-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}
.sp-results-sort select {
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 12px;
  background: #fff;
  cursor: pointer;
}

/* Mobile Filter Toggle */
.sp-filter-toggle {
  display: none;
  padding: 10px 16px;
  background: #1b63b5;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 15px;
  width: 100%;
}
.sp-filter-toggle i {
  margin-right: 6px;
}

/* --- Product Cards Grid --- */
.sp-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Product Card */
.sp-product-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}
.sp-product-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Card Header */
.sp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 15px 0;
}
.sp-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin: 0;
}
.sp-card-bookmark {
  color: #ccc;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}
.sp-card-bookmark:hover {
  color: #f95e00;
}

/* Card Image */
.sp-card-image {
  padding: 15px;
  text-align: center;
  background: #fafafa;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-card-image img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}
.sp-card-placeholder {
  width: 120px;
  height: 120px;
  background: #e8e8e8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 40px;
}
.sp-card-badges {
  display: flex;
  gap: 4px;
  position: absolute;
  top: 8px;
  left: 8px;
}
.sp-card-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e3f2fd;
  color: #1565c0;
  font-weight: 600;
}

/* Card Info */
.sp-card-info {
  padding: 0 15px;
  font-size: 12px;
  color: #888;
}
.sp-card-info span {
  margin-right: 12px;
}

/* Card Specs - Icon Row */
.sp-card-specs {
  display: flex;
  justify-content: space-around;
  padding: 12px 10px;
  border-top: 1px solid #f0f0f0;
  margin-top: auto;
}
.sp-spec-item {
  text-align: center;
  font-size: 11px;
  color: #666;
}
.sp-spec-item .sp-spec-icon {
  display: block;
  font-size: 16px;
  color: #1b63b5;
  margin-bottom: 2px;
}
.sp-spec-item .sp-spec-value {
  display: block;
  font-weight: 700;
  color: #333;
  font-size: 13px;
}
.sp-spec-item .sp-spec-label {
  display: block;
  font-size: 10px;
  color: #999;
}

/* Card Actions */
.sp-card-actions {
  display: flex;
  border-top: 1px solid #f0f0f0;
}
.sp-card-actions a {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: #1b63b5;
  text-decoration: none;
  transition: all 0.2s;
  border-right: 1px solid #f0f0f0;
}
.sp-card-actions a:last-child {
  border-right: none;
}
.sp-card-actions a:hover {
  background: #1b63b5;
  color: #fff;
}
.sp-card-actions a.sp-btn-detail {
  flex: 2;
  font-weight: 600;
}

/* --- Pagination --- */
.sp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 30px;
  padding: 20px 0;
}
.sp-pagination button {
  min-width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-pagination button:hover {
  border-color: #1b63b5;
  color: #1b63b5;
}
.sp-pagination button.active {
  background: #1b63b5;
  color: #fff;
  border-color: #1b63b5;
}
.sp-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sp-pagination .sp-page-info {
  font-size: 13px;
  color: #888;
  margin: 0 12px;
}

/* --- No Results --- */
.sp-no-results {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.sp-no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: #ddd;
}
.sp-no-results h3 {
  font-size: 18px;
  color: #666;
  margin-bottom: 8px;
}
.sp-no-results p {
  font-size: 14px;
}
.sp-no-results button {
  margin-top: 16px;
  padding: 8px 24px;
  background: #1b63b5;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* --- Loading --- */
.sp-loading {
  text-align: center;
  padding: 40px;
}
.sp-loading .sp-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8e8e8;
  border-top-color: #1b63b5;
  border-radius: 50%;
  animation: sp-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes sp-spin {
  to { transform: rotate(360deg); }
}

/* --- Reset Filters Button --- */
.sp-reset-filters {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 15px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.sp-reset-filters:hover {
  border-color: #f95e00;
  color: #f95e00;
}

/* --- Active Filter Tags --- */
.sp-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}
.sp-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 12px;
  font-size: 11px;
}
.sp-filter-tag .sp-tag-remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0.7;
}
.sp-filter-tag .sp-tag-remove:hover {
  opacity: 1;
}

/* --- Filter Contact Section --- */
.sp-filter-contact {
  margin-top: 20px;
  padding: 16px;
  background: #f0f5ff;
  border-radius: 6px;
  border: 1px solid #d0e0f5;
}
.sp-filter-contact h5 {
  font-size: 14px;
  font-weight: 700;
  color: #1b63b5;
  margin-bottom: 6px;
}
.sp-filter-contact p {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}
.sp-filter-contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #1b63b5;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}
.sp-filter-contact a:hover {
  background: #154e91;
}

/* --- Availability Indicator --- */
.sp-avail-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}
.sp-avail-instock { background: #4caf50; }
.sp-avail-limited { background: #ff9800; }
.sp-avail-outofstock { background: #ccc; }

/* --- Product Detail Modal --- */
.sp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.sp-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.sp-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
.sp-modal-close:hover {
  color: #333;
}
.sp-modal-body {
  padding: 30px;
}
.sp-modal-image {
  text-align: center;
  padding: 20px;
  background: #f8f8f8;
  border-radius: 6px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-modal-badges {
  margin: 8px 0;
}
.sp-modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sp-modal-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.sp-btn-inquiry {
  background: #1b63b5;
  color: #fff !important;
}
.sp-btn-inquiry:hover {
  background: #154e91;
}
.sp-btn-pdf {
  background: #e74c3c;
  color: #fff !important;
}
.sp-btn-pdf:hover {
  background: #c0392b;
}
.sp-modal-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.sp-modal-section h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #333;
}

/* Rating Bars */
.sp-rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.sp-rating-label {
  width: 160px;
  font-size: 13px;
  color: #555;
  flex-shrink: 0;
}
.sp-rating-bar {
  flex: 1;
  height: 8px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
}
.sp-rating-fill {
  height: 100%;
  background: #1b63b5;
  border-radius: 4px;
  transition: width 0.5s;
}
.sp-rating-value {
  width: 70px;
  font-size: 12px;
  color: #888;
  text-align: right;
  flex-shrink: 0;
}

/* Specs Table */
.sp-specs-table {
  width: 100%;
  border-collapse: collapse;
}
.sp-specs-table td {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
}
.sp-specs-table td:first-child {
  color: #666;
  width: 40%;
  font-weight: 500;
}
.sp-specs-table td:last-child {
  color: #333;
  font-weight: 600;
}
.sp-specs-table tr:hover {
  background: #f8f9fa;
}

/* Related Products */
.sp-modal-related {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/* ============================================================
   按系列浏览：分组 → 系列码 → 轮片区块矩阵 → 型号原地展开
   矩阵方向与产品册一致：行 = 轮径，列 = 结构
   ============================================================ */
.sp-viewbar { display: flex; gap: 8px; margin-bottom: 16px; }
.sp-vbtn {
  border: 1px solid #d9e0e6; background: #fff; color: #5a6b7a;
  padding: 8px 16px; cursor: pointer; font-size: 14px; font-family: inherit;
  display: flex; align-items: baseline; gap: 7px; transition: all .15s;
}
.sp-vbtn span { font-size: 11px; opacity: .7; }
.sp-vbtn:hover { border-color: #1b63b5; color: #1b63b5; }
.sp-vbtn.on { background: #1b63b5; border-color: #1b63b5; color: #fff; }
.sp-vbtn.on span { opacity: .8; }

#sp-browse { display: none; }
.sp-results-area.sp-browsing #sp-browse { display: block; }
.sp-results-area.sp-browsing .sp-results-header,
.sp-results-area.sp-browsing #sp-products-grid,
.sp-results-area.sp-browsing #sp-pagination { display: none; }

.sp-bhead h3 { margin: 0 0 4px; font-size: 19px; }
.sp-bhead h3 span { font-size: 13px; color: #8a949c; font-weight: 400; margin-left: 6px; }
.sp-bhead p { margin: 0 0 18px; color: #7b858d; font-size: 13.5px; }

.sp-gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.sp-gcard {
  border: 1px solid #e2e8ed; background: #fff; padding: 15px 16px; cursor: pointer;
  text-align: left; font-family: inherit; display: flex; flex-direction: column; gap: 2px;
  transition: all .15s;
}
.sp-gcard:hover { border-color: #1b63b5; box-shadow: 0 2px 10px rgba(27,99,181,.09); }
.sp-gcard b { font-size: 15.5px; color: #23303a; }
.sp-gcard em { font-style: normal; font-size: 11.5px; color: #98a2aa; }
.sp-gcard .sp-gcodes { font-family: Consolas, Menlo, monospace; font-size: 11.5px; color: #7b858d; margin-top: 6px; }
.sp-gcard .sp-gnum { font-size: 12px; color: #1b63b5; margin-top: 2px; }
.sp-scard b { font-family: Consolas, Menlo, monospace; font-size: 20px; }

.sp-gcard.sp-pending {
  cursor: default; background: #fafbfc; border-style: dashed; color: #a8b2ba;
}
.sp-gcard.sp-pending b { color: #a8b2ba; }
.sp-gcard.sp-pending .sp-gnum { color: #b8a06a; }
.sp-gcard.sp-pending:hover { border-color: #e2e8ed; box-shadow: none; }

.sp-empty { border: 1px dashed #d9e0e6; background: #fafbfc; padding: 34px 24px; text-align: center; }
.sp-empty b { display: block; font-family: Consolas, Menlo, monospace; font-size: 26px; color: #8a949c; margin-bottom: 8px; }
.sp-empty p { margin: 0 0 4px; color: #7b858d; font-size: 14px; }
.sp-empty .sp-empty-hint { font-size: 13px; color: #a8b2ba; }

.sp-bcrumb { font-size: 13.5px; color: #8a949c; margin-bottom: 14px; }
.sp-bcrumb button { border: 0; background: none; color: #1b63b5; cursor: pointer; font: inherit; padding: 0; }
.sp-bcrumb button:hover { text-decoration: underline; }
.sp-bcrumb b { color: #23303a; }

.sp-shead { display: flex; align-items: flex-end; gap: 26px; padding-bottom: 14px; border-bottom: 2px solid #23303a; margin-bottom: 12px; }
.sp-scode { font-family: Consolas, Menlo, monospace; font-size: 40px; font-weight: 600; line-height: 1; }
.sp-sstat { text-align: right; margin-left: auto; }
.sp-sstat + .sp-sstat { margin-left: 0; }
.sp-sstat span { display: block; font-family: Consolas, Menlo, monospace; font-size: 19px; font-weight: 600; }
.sp-sstat em { font-style: normal; font-size: 11px; color: #8a949c; text-transform: uppercase; letter-spacing: .04em; }

.sp-bidx { display: flex; gap: 7px; overflow-x: auto; padding: 10px 0 14px; }
.sp-bidx a {
  flex: none; font-family: Consolas, Menlo, monospace; font-size: 11.5px; padding: 4px 10px;
  border: 1px solid #d9e0e6; color: #7b858d; text-decoration: none; white-space: nowrap; background: #fff;
}
.sp-bidx a:hover { border-color: #1b63b5; color: #1b63b5; }

.sp-blk { border: 1px solid #e2e8ed; background: #fff; margin-bottom: 22px; scroll-margin-top: 12px; }
.sp-blk-h { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eef2f5; flex-wrap: wrap; }
.sp-blk-n {
  font-family: Consolas, Menlo, monospace; font-size: 12.5px; font-weight: 600; color: #fff;
  background: #d9760f; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex: none;
}
.sp-blk-t b { font-size: 15.5px; }
.sp-blk-code { font-family: Consolas, Menlo, monospace; font-size: 12px; color: #98a2aa; margin-left: 8px; }
.sp-blk-meta { font-size: 12px; color: #8a949c; margin-top: 1px; }
.sp-blk-load { margin-left: auto; font-family: Consolas, Menlo, monospace; font-size: 12.5px; color: #7b858d; white-space: nowrap; }

.sp-mxw { overflow-x: auto; }
table.sp-mx { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13px; }
table.sp-mx thead th {
  background: #1b63b5; color: #fff; padding: 6px 9px; font-weight: 500; font-size: 11.5px;
  line-height: 1.35; text-align: center; border-right: 1px solid rgba(255,255,255,.18); vertical-align: bottom;
}
table.sp-mx thead th:last-child { border-right: 0; }
table.sp-mx thead th span { display: block; font-size: 10px; opacity: .8; font-weight: 400; }
table.sp-mx thead th.sp-rowh { background: #2c76c8; text-align: left; width: 92px; }
table.sp-mx tbody th {
  background: #eef4fa; font-family: Consolas, Menlo, monospace; font-weight: 600; font-size: 13.5px;
  padding: 7px 9px; text-align: left; border-bottom: 1px solid #eef2f5; white-space: nowrap;
}
table.sp-mx tbody td { border-bottom: 1px solid #eef2f5; border-right: 1px solid #eef2f5; padding: 0; text-align: center; }
table.sp-mx tbody td:last-child { border-right: 0; }
table.sp-mx tbody tr:last-child th, table.sp-mx tbody tr:last-child td { border-bottom: 0; }
.sp-mx-cell {
  display: block; width: 100%; border: 0; background: none; font-family: Consolas, Menlo, monospace;
  color: inherit; padding: 6px 5px; cursor: pointer; font-size: 12px; line-height: 1.4;
}
.sp-mx-cell b { display: block; font-weight: 600; }
.sp-mx-cell span { color: #8a949c; font-size: 10.5px; }
.sp-mx-cell:hover { background: #eef4fa; }
.sp-mx-cell.on { background: #fff4e2; box-shadow: inset 0 0 0 2px #d9760f; }
.sp-mx-none { display: block; padding: 6px 5px; color: #ccd4da; font-family: Consolas, Menlo, monospace; font-size: 12px; }

/* 窄屏矩阵：尺寸分段 + 结构卡片。
   74% 的区块表宽超过手机视口（最宽 1886px vs 390px），横向拖表是可用性陷阱。
   尺寸轴最多 6 个所以做分段控件，结构轴最多 23 个所以做卡片列表 —— 每格一卡，不吞 SKU。 */
.sp-mxm { display: none; padding: 10px 12px 12px; }
.sp-mxm-sizes { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; }
.sp-mxm-sz {
  flex: none; font-family: Consolas, Menlo, monospace; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border: 1px solid #d9e0e6; background: #fff; color: #5a6b7a; cursor: pointer;
}
.sp-mxm-sz.on { background: #1b63b5; border-color: #1b63b5; color: #fff; }
.sp-mxm-list { display: flex; flex-direction: column; gap: 7px; }
.sp-mxm-card {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; align-items: baseline;
  border: 1px solid #e2e8ed; background: #fff; padding: 9px 12px; cursor: pointer;
  text-align: left; font-family: inherit; width: 100%;
}
.sp-mxm-card.off { display: none; }
.sp-mxm-card.on { background: #fff4e2; border-color: #d9760f; }
.sp-mxm-col { font-size: 13px; color: #23303a; font-weight: 500; }
.sp-mxm-card b { grid-row: 2; font-family: Consolas, Menlo, monospace; font-size: 13px; font-weight: 600; }
.sp-mxm-spec { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; color: #8a949c; font-family: Consolas, Menlo, monospace; white-space: nowrap; }

@media (max-width: 720px) {
  .sp-mxw { display: none; }
  .sp-mxm { display: block; }
}

/* 原地展开：点矩阵格子后在本区块内打开，不跳转、不弹窗 */
.sp-det { max-height: 0; overflow: hidden; transition: max-height .22s ease; border-top: 0 solid #d9760f; }
.sp-det.on { max-height: 560px; border-top-width: 2px; }
@media (prefers-reduced-motion: reduce) { .sp-det { transition: none; } }
.sp-det-in { padding: 16px 18px; background: #fdf6ec; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 30px; }
.sp-det-hd { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #e6d9c4; }
.sp-det-sku { font-family: Consolas, Menlo, monospace; font-size: 19px; font-weight: 600; user-select: all; }
.sp-det-nm { font-size: 13.5px; color: #7b858d; }
.sp-det-act { margin-left: auto; display: flex; gap: 7px; }
.sp-det-b { border: 1px solid #d9760f; background: #fff; color: #d9760f; font: inherit; font-size: 12px; padding: 4px 11px; cursor: pointer; }
.sp-det-b:hover { background: #d9760f; color: #fff; }
.sp-det dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; align-content: start; }
.sp-det dt { color: #8a949c; }
.sp-det dd { margin: 0; font-family: Consolas, Menlo, monospace; }
.sp-det-files { grid-column: 1 / -1; display: flex; gap: 9px; padding-top: 9px; border-top: 1px solid #e6d9c4; }
.sp-det-files a, .sp-det-files span { font-size: 12px; padding: 4px 11px; border: 1px solid #e0d5c2; background: #fff; text-decoration: none; }
.sp-det-files a { color: #1b63b5; border-color: #1b63b5; }
.sp-det-files span { color: #b3aa9c; }
@media (max-width: 720px) { .sp-det-in { grid-template-columns: 1fr; } .sp-shead { gap: 16px; } }

/* --- 卡片上的零件号 --- */
/* 买家唯一能复制进询价邮件的唯一标识，等宽以便逐字核对 */
.sp-card-sku {
  padding: 0 12px 6px;
  margin-top: -4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #7b858d;
  user-select: all;
}

.sp-card-lead {
  font-size: 11.5px;
  color: #2e7d5b;
  background: #e6f2ec;
  padding: 2px 8px;
  white-space: nowrap;
}
.sp-card-sib {
  font-size: 11.5px;
  color: #1b63b5;
  background: #eef4fa;
  padding: 2px 8px;
  white-space: nowrap;
}

/* --- Facet 计数与置灰 --- */
/* 命中 0 的选项保留可见但不可点：用户看得见产品线的形状，也不会点出空列表 */
.sp-facet-count {
  margin-left: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #9aa3ab;
  font-weight: 400;
}
.sp-facet-empty {
  opacity: 0.42;
  cursor: not-allowed;
}
.sp-facet-empty .sp-facet-count {
  color: #b9c0c6;
}
.sp-type-options label.sp-facet-empty {
  pointer-events: none;
}
.sp-checkbox-group label.sp-facet-empty,
.sp-conditions-grid label.sp-facet-empty {
  pointer-events: none;
}
select[data-filter] option:disabled {
  color: #b9c0c6;
}

/* 语义分组：同轮径的其它配置 / 同配置的其它轮径 */
.sp-related-group {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sp-related-group h5 {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.sp-related-item img {
  border-radius: 4px;
  background: #fff;
}
.sp-related-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  color: #555;
  text-align: center;
  width: 120px;
}
.sp-related-item:hover {
  border-color: #1b63b5;
  background: #f0f5ff;
}

/* --- Compare Tray --- */
.sp-compare-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #353535;
  color: #fff;
  padding: 12px 0;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.sp-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}
.sp-compare-clear {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 4px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
.sp-compare-clear:hover {
  border-color: #f95e00;
  color: #f95e00;
}
.sp-compare-items {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sp-compare-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
}
.sp-compare-item button {
  background: none;
  border: none;
  color: #f95e00;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.sp-compare-now {
  background: #1b63b5;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin-left: 12px;
  transition: background 0.2s;
}
.sp-compare-now:hover {
  background: #f95e00;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .sp-filter-sidebar {
    width: 280px;
    min-width: 280px;
  }
}

@media (max-width: 991px) {
  .sp-finder-body {
    flex-direction: column;
  }
  .sp-filter-sidebar {
    width: 100%;
    min-width: auto;
    max-height: none;
    position: static;
    display: none;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
  }
  .sp-filter-sidebar.show {
    display: block;
  }
  .sp-filter-toggle {
    display: block;
  }
  .sp-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sp-filter-sidebar {
    width: 260px;
    min-width: 260px;
  }
  .sp-tabs .sp-tab-list {
    flex-direction: column;
  }
  .sp-tabs .sp-tab-item {
    border-bottom: none;
    border-left: 3px solid transparent;
    text-align: left;
    padding: 12px 15px;
  }
  .sp-tabs .sp-tab-item.active {
    border-left-color: #1b63b5;
    border-bottom: none;
  }
}

@media (max-width: 767px) {
  .sp-products-grid {
    grid-template-columns: 1fr;
  }
  .sp-finder-banner {
    padding: 30px 0;
  }
  .sp-finder-banner h1 {
    font-size: 24px;
  }
  .sp-results-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .sp-card-specs {
    flex-wrap: wrap;
    gap: 8px;
  }
  .sp-spec-item {
    width: calc(33% - 8px);
  }
  .sp-conditions-grid {
    grid-template-columns: 1fr;
  }
  .sp-type-options {
    flex-direction: column;
  }
  .sp-type-options label {
    width: 100%;
  }
}
