/* 基础样式 */
.template {
  height: 100vh; /* 使用视口高度 */
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-card {
  width: 90%;
  max-width: 1200px; /* 最大宽度限制 */
  height: 90vh;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  transition: all 0.3s ease;
}

.config-box {
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  overflow-y: auto;
}

/* 商品项响应式调整 */
.goods-change-box {
  width: 100%;
}

.goods-change-box .goods-item-box {
  max-height: 65vh; /* 动态高度 */
}

.goods-group-item .goods-group-info {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* 自动填充列 */
}

/* 加载动画 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  border-radius: 12px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 88, 255, 0.2);
  border-top: 5px solid #0058FF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 992px) {
  .goods-group-item .goods-group-info {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-card {
    width: 95%;
    height: 95vh;
  }
  
  .goods-group-item .goods-group-info {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 576px) {
  .config-box {
    padding: 12px;
  }
  
  .goods-group-item .goods-group-info {
    grid-template-columns: 1fr 1fr; /* 小屏幕两列布局 */
  }
}

/* 交互优化 */
.goods-item-name {
  transition: all 0.2s ease;
}

.goods-item-name:hover {
  background: #0058FF;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 88, 255, 0.3);
}

.option-name {
  transition: color 0.2s ease;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}