

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: #f5f5f5;
  padding: 0px 20px 20px 20px;
  min-width: 1100px;
}

.container {
  width: 1260px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #0066cc;
  font-size: 28px;
  margin-bottom: 10px;
}
.subtitle {
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
}

.step-title {
  color: #0066cc;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 15px;
}

.units-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #666;
}
select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

/* ===== 步骤切换 ===== */
.step1-wrapper {
  display: block;
}
.step2-wrapper {
  display: none;
}
.step2-wrapper.active {
  display: block;
}

/* ===== 第一步：气弹簧配置区域 ===== */
.gas-spring-wrapper {
  position: relative;
  width: 980px;
  height: 260px;
  margin: 0 auto;
  padding: 50px 0 0;
}

.gas-spring {
  position: relative;
  width: 980px;
  height: 90px;
}

.fitting {
  position: absolute;
  top: 0;
  width: 120px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
  z-index: 5;
  overflow: visible;
}
.fitting:hover {
  transform: scale(1.03);
}
.fitting img {
  width: 180px;
  height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.fitting-left {
  left: -18px;
}
.fitting-right {
  right: -18px;
}

.choose-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 3px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.choose-btn-left {
  transform: translate(5%, -50%);
}
.choose-btn-right {
  transform: translate(-105%, -50%);
}
.choose-btn::after {
  content: "▼";
  font-size: 8px;
}

.spring-body {
  position: absolute;
  left: 120px;
  top: 5px;
  width: 400px;
  height: 80px;
  z-index: 3;
}
.piston-rod {
  position: absolute;
  left: 520px;
  top: 32px;
  width: 340px;
  height: 28px;
  z-index: 2;
}

.controls-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 980px;
  height: 90px;
  pointer-events: none;
  z-index: 20;
}
.controls-layer > * {
  pointer-events: auto;
}

.control-group {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
}
.control-group .unit-label {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 13px;
  white-space: nowrap;
}
.control-group input {
  width: 60px;
  padding: 5px 6px;
  border: 1px solid #999;
  border-radius: 3px;
  text-align: center;
  font-size: 13px;
  background: white;
}
.control-group select {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 8px;
  font-size: 13px;
  border-radius: 3px;
  cursor: pointer;
}
.control-group select option {
  background: #333;
  color: white;
}

.help-icon {
  position: absolute;
  top: -20px;
  right: -12px;
  width: 18px;
  height: 18px;
  background: #aaa;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s;
  pointer-events: auto;
}
.help-icon-1 {
  top: 10px;
  right: -12px;
  width: 18px;
  height: 18px;
}
.help-icon-2 {
  top: 10px;
  left: -12px;
  width: 18px;
  height: 18px;
}
.help-icon:hover {
  background: #0066cc;
}

/* 总长度尺寸区域 */
.dimension-area {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 980px;
  height: 40px;
}
.dim-line {
  position: absolute;
  top: 15px;
  left: 40px;
  width: 900px;
  height: 1px;
  background: #0066cc;
}
.dim-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -8px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 12px solid #0066cc;
}
.dim-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: -8px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 12px solid #0066cc;
}
.dim-end {
  position: absolute;
  top: -125px;
  width: 1px;
  height: 143px;
  background: transparent;
  border-left: 1px dashed #0066cc;
}
.dim-end-left {
  left: 40px;
}
.dim-end-right {
  right: 40px;
}
.dim-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0066cc;
  font-size: 14px;
}
.dim-label input {
  width: 80px;
  padding: 6px;
  border: 1px solid #0066cc;
  border-radius: 4px;
  text-align: center;
  color: #0066cc;
  font-weight: bold;
  font-size: 14px;
}

/* 活塞杆长度尺寸区域 */
.rod-dimension-area {
  position: absolute;
  top: 165px;
  left: 520px;
  width: 340px;
  height: 60px;
}
.rod-dim-line {
  position: absolute;
  top: 15px;
  left: 0;
  width: 340px;
  height: 1px;
  background: #0066cc;
}
.rod-dim-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -8px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 12px solid #0066cc;
}
.rod-dim-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: -8px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 12px solid #0066cc;
}
.rod-dim-end {
  position: absolute;
  top: -58px;
  width: 1px;
  height: 72px;
  background: transparent;
  border-left: 1px dashed #0066cc;
}
.rod-dim-end-left {
  left: 0;
}
.rod-dim-end-right {
  right: 0;
}
.rod-dim-label {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0066cc;
  font-size: 13px;
  white-space: nowrap;
}
.rod-dim-label input {
  width: 65px;
  padding: 5px;
  border: 1px solid #0066cc;
  border-radius: 4px;
  text-align: center;
  color: #0066cc;
  font-weight: bold;
  font-size: 13px;
}

.search-btn {
  display: block;
  margin: 80px auto 0;
  padding: 12px 50px;
  background: #5aadf5;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-btn:hover {
  background: #4a9de5;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 102, 204, 0.25);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 10px;
  width: 630px;
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-auto {
  overflow-y: auto;
  scrollbar-width: none;
}
.modal-auto::-webkit-scrollbar {
  display: none;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
}
.modal-title {
  color: #0066cc;
  font-size: 20px;
  font-weight: 600;
}
.modal-close {
  width: 34px;
  height: 34px;
  background: #ff9933;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover {
  background: #e88a2a;
}
.modal-body {
  padding: 0 25px 20px;
}
.current-selection {
  border: 2px solid #ff9933;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  margin-bottom: 20px;
}
.current-selection img {
  width: 200px;
  height: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.current-selection.zoomed img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  object-position: center;
}
.current-selection-name {
  color: #333;
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
}
.current-label {
  color: #bbb;
  margin-top: 6px;
  font-size: 14px;
}
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
}
.option-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.option-card:hover {
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
  transform: translateY(-2px);
}
.option-card.selected {
  border-color: #ff9933;
  background: #fffaf5;
}
.option-card.zoomed img {
  width: 100%;
  height: 55px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 6px;
}
.option-card:not(.zoomed) img {
  width: 100%;
  height: 55px;
  object-fit: contain;
  object-position: center;
  margin-bottom: 6px;
}
.option-name {
  font-size: 11px;
  color: #666;
}
.modal-footer {
  padding: 15px 25px;
  background: #f8f8f8;
  color: #888;
  font-size: 13px;
  line-height: 1.6;
}

.info-modal .modal-body {
  padding: 0 25px 25px;
}
.info-image {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 15px;
}
.info-text {
  color: #333;
  font-size: 15px;
  line-height: 1.7;
  text-align: justify;
}

.toolbar {
  position: fixed;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-btn {
  width: 38px;
  height: 38px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: all 0.2s;
}
.tool-btn:hover {
  border-color: #0066cc;
  color: #0066cc;
}

/* ===== 第二步：产品详情展示 ===== */
.product-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  position: relative;
}
.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.product-info {
  color: #333;
  font-size: 15px;
  line-height: 1.5;
  font-weight: bold;
}

.canvas-area {
  position: relative;
  width: 100%;
  height: 360px;
  margin-bottom: 10px;
  user-select: none;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  border-radius: 4px;
}

.gas-spring-2d {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  height: 220px;
  display: flex;
  align-items: center;
}

.fitting-left-2d {
  width: 120px;
  height: 220px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
.fitting-left-2d img {
  width: 120px;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.tube-2d {
  height: 65px;
  width: 440px;
  flex-shrink: 0;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.15);
}
.tube-diameter-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  white-space: nowrap;
}

.rod-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.rod-2d {
  height: 25px;
  width: 440px;
  border-radius: 17px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: col-resize;
}
.rod-2d.dragging {
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2), 0 0 8px rgba(0, 126, 255, 0.4);
}
.rod-handle {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 42px;
  background: linear-gradient(to bottom, #666, #333, #666);
  border-radius: 3px;
  cursor: col-resize;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  z-index: 10;
}
.rod-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  width: 2px;
  height: 60%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3) 0px,
    rgba(255, 255, 255, 0.3) 2px,
    transparent 2px,
    transparent 4px
  );
}

.rod-seal {
  width: 14px;
  height: 38px;
  border-radius: 2px;
  margin-left: -7px;
  margin-right: -7px;
  z-index: 5;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.fitting-right-2d {
  width: 120px;
  height: 220px;
  flex-shrink: 0;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
.fitting-right-2d img {
  width: 120px;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dimension-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}
.dim-line-blue {
  stroke: #007eff;
  stroke-width: 1.5;
  fill: none;
}
.dim-arrow-blue {
  fill: #007eff;
}
.dim-text-bg {
  fill: white;
}
.dim-text {
  fill: #007eff;
  font-size: 14px;
  font-family: sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
}

.bottom-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 10px;
}
.dim-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  font-weight: bold;
}
.dim-btn:hover {
  border-color: #0066cc;
  color: #0066cc;
}
.dim-btn.active {
  background: #0066cc;
  color: white;
  border-color: #0066cc;
}

.deviation-bar {
  margin-top: 15px;
  padding: 15px 20px;
  background: #e6f2ff;
  border: 1px solid #b3d9ff;
  border-radius: 4px;
  text-align: center;
  color: #0066cc;
  font-size: 14px;
  line-height: 1.8;
}

.back-link {
  color: #ebd700;
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
  cursor: pointer;
}
.back-link:hover {
  text-decoration: underline;
}

.config-summary {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 15px 20px;
  margin-bottom: 20px;
}
.config-summary h3 {
  color: #0066cc;
  font-size: 16px;
  margin-bottom: 10px;
}
.config-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.config-item {
  display: flex;
  flex-direction: column;
}
.config-item-label {
  color: #888;
  font-size: 12px;
  margin-bottom: 2px;
}
.config-item-value {
  color: #333;
  font-size: 14px;
  font-weight: 600;
}
.back-bar {
  background: #f5f5f5;
  padding: 12px 30px 0px 30px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0078d4;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 8px 16px 0 16px;
  border-radius: 6px;
}
.back-btn:hover {
  background: #f0f7ff;
}

/* 管径/杆径折线箭头标注 */
.dim-marker {
  position: absolute;
  z-index: 20;
  pointer-events: none;
}
.dim-marker-line-v {
  position: absolute;
  width: 2px;
  background: #e74c3c;
}
.dim-marker-line-v::after {
  content: "";
  position: absolute;
  left: -3.5px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.dim-marker-line-v.arrow-down::after {
  bottom: -8px;
  border-top: 8px solid #e74c3c;
}
.dim-marker-line-v.arrow-up::after {
  top: -8px;
  border-bottom: 8px solid #e74c3c;
}
.dim-marker-line-h {
  position: absolute;
  height: 2px;
  background: #e74c3c;
}
.diameter-select-box {
  position: absolute;
  z-index: 20;
}
.diameter-select-box select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  font-size: 13px;
  width: 140px;
  cursor: pointer;
}

/* ===== 三列选择器卡片 ===== */
.refine-section {
  margin-top: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.refine-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 15px;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.refine-header .icon {
  font-size: 18px;
}
.refine-columns {
  display: flex;
  min-height: 220px;
}
.refine-column {
  flex: 1;
  padding: 15px;
  padding-bottom: 35px;
  border-right: 1px solid #ddd;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}
.refine-column:last-child {
  border-right: none;
}
.refine-column:hover {
  background: #f5f9ff;
}
.refine-column.selected {
  background: #e6f2ff;
}
.refine-column.disabled {
  cursor: default;
}
.refine-column.disabled:hover {
  background: transparent;
}

.column-stock {
  color: #28a745;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  text-align: center;
}
.column-stock.none {
  color: #888;
}

/* 双图布局 */
.column-img-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}
.column-img-group .column-img {
  width: 48%;
  height: 120px;
  margin: 0;
  object-fit: contain;
}

.colSpringImg-class {
  margin: auto;
  width: 220px !important;
  height: 180px !important;
}

.column-info {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  text-align: center;
  flex: 1;
}

.colRightInfo-class {
  float: bottom;
}
.column-info-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.column-info-label {
  color: #666;
}
.column-info-value {
  color: #333;
  font-weight: 500;
}
.column-price {
  color: #888;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}
.column-btns {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  display: none;
}
.column-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #666;
  cursor: pointer;
}
.column-btn:hover {
  border-color: #0066cc;
  color: #0066cc;
}
.column-arrow {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: #999;
  font-size: 12px;
}

/* M规格独立行 */
.m-size-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.m-size-row .m-size-label {
  text-align: center;
  margin-bottom: 6px;
}

/* ===== 下拉弹窗（选择列表） ===== */
.dropdown-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.dropdown-overlay.active {
  display: flex;
}
.dropdown-modal {
  background: white;
  border-radius: 8px;
  width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}
.dropdown-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.dropdown-close {
  width: 28px;
  height: 28px;
  background: #ff9933;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropdown-body {
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.15s;
}
.dropdown-item:hover {
  background: #f5f9ff;
}
.dropdown-item.selected {
  background: #e6f2ff;
  border-left: 3px solid #0066cc;
}
.dropdown-item-img {
  width: 120px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
.dropdown-item-info {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 15px;
  font-size: 13px;
}
.dropdown-item-row {
  display: flex;
  justify-content: space-between;
}
.dropdown-item-label {
  color: #888;
}
.dropdown-item-value {
  color: #333;
  font-weight: 500;
}
.dropdown-item-stock {
  font-size: 12px;
  font-weight: 600;
  min-width: 70px;
  text-align: right;
}
.dropdown-item-stock.in {
  color: #28a745;
}
.dropdown-item-stock.out {
  color: #dc3545;
}
.dropdown-item-price {
  color: #666;
  font-size: 13px;
  min-width: 50px;
  text-align: right;
}
.dropdown-item-btns {
  display: flex;
  gap: 3px;
  display: none;
}

/* ===== 预览弹窗 ===== */
.preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
.preview-overlay.active {
  display: flex;
}
.preview-modal {
  background: white;
  border-radius: 12px;
  width: 800px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
}
.preview-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
.preview-close {
  width: 32px;
  height: 32px;
  background: #ff9933;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-body {
  padding: 25px;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch; /* 关键：让两个图片容器高度一致 */
}

.preview-img-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.preview-img-box img {
  flex: 1;
  width: 100%;
  min-height: 320px;
  max-height: 400px;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 6px;
}

.preview-img-label {
  margin-top: 12px;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
  min-height: 20px; /* 固定最小高度，保证两侧标签对齐 */
  flex-shrink: 0;
}
.preview-btn {
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}
.preview-btn:hover {
  background: #0055aa;
}

/* ===== M规格选择器 ===== */
.m-size-selector {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ddd;
}
.m-size-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.m-size-options {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.m-size-tag {
  padding: 3px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}
.m-size-tag:hover {
  border-color: #0066cc;
  color: #0066cc;
}
.m-size-tag.active {
  background: #0066cc;
  color: white;
  border-color: #0066cc;
}
