/* 价格核算页面样式 */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      margin-top: 80px;
}

.wrap h1 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  text-align: center;
}

.sub {
  text-align: center;
  color: #7f8c8d;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

/* 计算卡片样式 */
.cal-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid #e8f4fd;
}

.cal-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

/* 行样式 */
.row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.row label {
  min-width: 200px;
  font-weight: 500;
  color: #34495e;
  font-size: 0.95rem;
}

.row input,
.row select {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #e8f4fd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.row input:focus,
.row select:focus {
  outline: none;
  border-color: #3498db;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.row input[type="number"] {
  text-align: right;
}

/* 模式相关样式 */
.mode-cost,
.mode-price {
  display: none;
}

.mode-cost.show,
.mode-price.show {
  display: flex;
}

/* 按钮样式 */
.btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* 表格样式 */
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tbl th,
.tbl td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.tbl th {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #495057;
  font-weight: 600;
  font-size: 0.9rem;
}

.tbl td {
  color: #2c3e50;
  font-size: 0.9rem;
}

.tbl tbody tr:hover {
  background: #f8f9fa;
}

/* 标签样式 */
.tags {
  margin-top: 15px;
}

.tagline {
  margin-top: 15px;
}

.tag {
  display: inline-block;
  background: #e8f4fd;
  color: #2980b9;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 500;
  margin-right: 8px;
  margin-bottom: 8px;
}

/* 小字体样式 */
.small {
  font-size: 0.85rem;
  color: #7f8c8d;
  line-height: 1.4;
}

/* 帮助文本 */
.help {
  margin-top: 15px;
  padding: 12px 15px;
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #5a6c7d;
  line-height: 1.4;
}

/* 输出区域样式 */
.out {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.out h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
}

/* 分隔线 */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8f4fd, transparent);
  margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .wrap {
    padding: 15px;
  }
  
  .wrap h1 {
    font-size: 1.8rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .row label {
    min-width: auto;
  }
  
  .row input,
  .row select {
    width: 100%;
  }
  
  .cal-card {
    padding: 20px;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .wrap h1 {
    font-size: 1.5rem;
  }
  
  .cal-card {
    padding: 15px;
  }
  
  .tbl th,
  .tbl td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  
  .row label {
    font-size: 0.9rem;
  }
  
  .row input,
  .row select {
    font-size: 0.9rem;
    padding: 8px 10px;
  }
}

/* 特殊输入框样式 */
input[type="radio"] {
  margin-right: 5px;
}

input[type="radio"] + span {
  margin-left: 5px;
}

/* 数字输入框特殊样式 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 20px;
}

/* 选择框样式 */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

/* 动画效果 */
.cal-card {
  transition: all 0.3s ease;
}

.cal-card:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

/* 高亮显示重要数值 */
.tbl td:last-child {
  font-weight: 600;
  color: #27ae60;
}

/* 错误状态 */
.row input.error {
  border-color: #e74c3c;
  background: #fdf2f2;
}

.row input.error:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* 成功状态 */
.row input.success {
  border-color: #27ae60;
  background: #f0f9f4;
}

.row input.success:focus {
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* 拼柜测算相关样式 */
.product-spec {
  border: 1px solid #e8f4fd;
  padding: 15px;
  margin: 10px 0;
  border-radius: 8px;
  background: #fafbfc;
}

.product-spec h5 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 1rem;
}

.loading-summary,
.loading-details,
.efficiency-metrics {
  margin-bottom: 20px;
}

.loading-summary h4,
.loading-details h4,
.efficiency-metrics h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  border-bottom: 2px solid #e8f4fd;
  padding-bottom: 6px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.metric-item {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.metric-label {
  display: block;
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.metric-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: #27ae60;
}

.product-list {
  max-height: 300px;
  overflow-y: auto;
}

.product-item {
  background: #f8f9fa;
  padding: 12px;
  margin: 8px 0;
  border-radius: 6px;
  border-left: 4px solid #3498db;
}

.product-item:hover {
  background: #e8f4fd;
  transition: background 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .product-spec .row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .product-spec .row input,
  .product-spec .row select {
    width: 100%;
  }
}