/**
 * Multi-Step Component Styles
 * Base styles for the step-based UI components
 */

.nestoryai-design-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--nestoryai-text-color, #2f1b12);
}

/* Step Indicators - 更紧凑的设计 */
.step-indicators {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
  padding: 0;
  list-style: none;
  gap: 0.75rem;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0;
  cursor: pointer;
  border: 1.5px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  background: var(--nestoryai-bg-color, #dbd2be);
  transition: all 0.25s ease;
  min-width: 145px;
  text-align: center;
}

.step-indicator:hover {
  border-color: var(--nestoryai-primary-color, #a56239);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(165, 98, 57, 0.1);
}

.step-indicator.active {
  border-color: var(--nestoryai-primary-color, #a56239);
  background: var(--nestoryai-primary-light, rgba(165, 98, 57, 0.18));
  color: var(--nestoryai-primary-color, #a56239);
}

.step-indicator.completed {
  border-color: var(--nestoryai-success-color, #00a32a);
  background: var(--nestoryai-success-light, #e8f5e8);
  color: var(--nestoryai-success-color, #00a32a);
}

.step-number,
.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: currentColor;
  color: white;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

/* Step number specific styling */
.step-number {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
  border: 1.5px solid currentColor;
  background: transparent;
  color: currentColor;
}

/* Active step number styling */
.step-indicator.active .step-number {
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border-color: var(--nestoryai-primary-color, #a56239);
}

/* Completed step number styling */
.step-indicator.completed .step-number {
  background: var(--nestoryai-success-color, #00a32a);
  color: white;
  border-color: var(--nestoryai-success-color, #00a32a);
}

.step-icon .icon-content {
  font-size: 1.25rem;
  line-height: 1;
}

.step-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: white;
}

.step-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.step-description {
  font-size: 0.75rem;
  opacity: 0.75;
  line-height: 1.1;
}

/* Step Content - 减小内边距和最小高度 */
.step-content-wrapper {
  background: var(--nestoryai-bg-color, #dbd2be);
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  min-height: 420px;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.step-content h2 {
  margin-top: 0;
  color: var(--nestoryai-primary-color, #a56239);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Upload Area Styles - 更紧凑 */
.upload-area {
  border: 2px dashed var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--nestoryai-primary-color, #a56239);
  background: var(--nestoryai-primary-light, rgba(165, 98, 57, 0.18));
}

.upload-icon {
  margin-bottom: 0.75rem;
  color: var(--nestoryai-primary-color, #a56239);
}

.upload-instructions {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--nestoryai-text-color, #2f1b12);
  font-weight: 500;
}

.upload-support {
  font-size: 0.8125rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  margin-bottom: 0.75rem;
}

.select-file-btn {
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease;
  font-weight: 500;
}

.select-file-btn:hover {
  background: var(--nestoryai-primary-dark, #683220);
}

/* Image Preview - 更紧凑 */
.image-preview-container {
  margin-top: 1.25rem;
  padding: 0.875rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  background: var(--nestoryai-bg-color, #dbd2be);
}

.image-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.file-details {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
}

.file-details p {
  margin: 0.2rem 0;
}

/* Two-column layout - 优化间距 */
.design-furniture-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.design-area-column,
.selected-furniture-column {
  display: flex;
  flex-direction: column;
}

/* Mask Preview Section - 优化尺寸 */
.mask-preview-section {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
  border-radius: 6px;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
}

.mask-preview-section h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--nestoryai-primary-color, #a56239);
  font-size: 1.0625rem;
  font-weight: 600;
}

.mask-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mask-preview-canvas {
  max-width: 100%;
  border: 1.5px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.mask-preview-description {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  font-style: italic;
}

/* Selected Furniture Section - 优化尺寸 */
.selected-furniture-section {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
  border-radius: 6px;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  height: fit-content;
}

.selected-furniture-section h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--nestoryai-primary-color, #a56239);
  font-size: 1.0625rem;
  font-weight: 600;
}

.selected-furniture-display {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 240px;
  border: 2px dashed var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  background: var(--nestoryai-bg-color, #dbd2be);
}

.selected-furniture-image {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.selected-furniture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.selected-furniture-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 8px;
  background: var(--nestoryai-bg-color, #dbd2be);
  transition: all 0.2s ease;
  position: relative;
}

.selected-furniture-item:hover {
  border-color: var(--nestoryai-primary-color, #a56239);
  box-shadow: 0 2px 8px rgba(165, 98, 57, 0.1);
}

.selected-furniture-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.selected-furniture-name {
  font-size: 0.75rem;
  text-align: center;
  margin-bottom: 0.5rem;
  word-break: break-word;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.selected-furniture-remove {
  background: #dc2626;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background-color 0.2s ease;
}

.selected-furniture-remove:hover {
  background: #b91c1c;
}

.no-furniture-selected {
  text-align: center;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  font-style: italic;
  padding: 2rem;
}

/* Drawing Tools - 更紧凑的布局 */
.drawing-tools {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  padding: 0.875rem;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
  border-radius: 6px;
}

.tool-btn {
  padding: 0.4rem 0.875rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  background: var(--nestoryai-bg-color, #dbd2be);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.tool-btn:hover {
  border-color: var(--nestoryai-primary-color, #a56239);
}

.tool-btn.active {
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border-color: var(--nestoryai-primary-color, #a56239);
}

/* Brush Size Control */
.brush-size-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brush-size-control label {
  font-weight: 600;
  color: var(--nestoryai-text-color, #2f1b12);
  min-width: 80px;
}

.brush-size-slider {
  flex: 1;
  min-width: 150px;
  height: 6px;
  background: var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.brush-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--nestoryai-primary-color, #a56239);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(165, 98, 57, 0.3);
}

.brush-size-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--nestoryai-primary-color, #a56239);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(165, 98, 57, 0.3);
}

.brush-size-value {
  font-weight: 600;
  color: var(--nestoryai-primary-color, #a56239);
  min-width: 40px;
  text-align: center;
}

.drawing-tools-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Canvas Container - 优化尺寸 */
.canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.875rem;
  min-height: 350px;
  background: #f8f9fa;
  position: relative;
}

.placement-canvas {
  max-width: 100%;
  max-height: 450px;
  border: none;
  background: transparent;
}

/* Area List - 更紧凑 */
.area-list {
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
  padding: 0.875rem;
  border-radius: 6px;
}

.area-list h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.areas-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.area-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--nestoryai-bg-color, #dbd2be);
  border-radius: 4px;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
}

/* Furniture Selection - 优化标签 */
.furniture-tabs {
  display: flex;
  margin-bottom: 0.875rem;
  border-bottom: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.tab-btn:hover {
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
}

.tab-btn.active {
  border-bottom-color: var(--nestoryai-primary-color, #a56239);
  color: var(--nestoryai-primary-color, #a56239);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Enhanced Product Search Section - 更紧凑 */
.product-search-section {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
  border-radius: 6px;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.search-input {
  flex: 1;
  padding: 0.625rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 4px;
  font-size: 0.9375rem;
}

.search-btn {
  padding: 0.625rem 1.25rem;
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease;
  font-weight: 500;
}

.search-btn:hover {
  background: var(--nestoryai-primary-dark, #683220);
}

.search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: var(--nestoryai-text-color, #2f1b12);
  font-size: 0.875rem;
}

.category-filter,
.sort-filter {
  padding: 0.5rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 4px;
  font-size: 0.875rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-min,
.price-max {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 4px;
  font-size: 0.875rem;
  width: 80px;
}

.apply-price-filter {
  padding: 0.5rem 1rem;
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  white-space: nowrap;
}

.apply-price-filter:hover {
  background: var(--nestoryai-primary-dark, #683220);
}

/* Loading State */
.products-loading {
  text-align: center;
  padding: 2rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  font-style: italic;
}

/* Enhanced Products Grid - 更紧凑的网格 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.product-item {
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s ease;
  background: var(--nestoryai-bg-color, #dbd2be);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-item:hover {
  border-color: var(--nestoryai-primary-color, #a56239);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(165, 98, 57, 0.12);
}

.product-item.selected {
  border-color: var(--nestoryai-primary-color, #a56239);
  background: var(--nestoryai-primary-light, rgba(165, 98, 57, 0.18));
  box-shadow: 0 3px 8px rgba(165, 98, 57, 0.15);
}

.product-image {
  position: relative;
  overflow: hidden;
}

.product-image-container {
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.product-item:hover .product-image img {
  transform: scale(1.05);
}

/* Product title tooltip styles */
.product-title-tooltip {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  line-height: 1.3;
  max-height: none;
  overflow: visible;
  display: block;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.product-image-container:hover .product-title-tooltip {
  opacity: 1;
  pointer-events: auto;
}

.product-title-link {
  color: white;
  text-decoration: none;
  pointer-events: auto;
  display: block;
  font-weight: 600;
}

.product-title-link:hover {
  text-decoration: underline;
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

.selected-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--nestoryai-success-color, #00a32a);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-info {
  padding: 0.75rem;
}

.product-name {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
  color: var(--nestoryai-text-color, #2f1b12);
}

.product-price {
  font-weight: 600;
  color: var(--nestoryai-primary-color, #a56239);
  margin: 0 0 0.4rem 0;
  font-size: 1.0625rem;
}

.product-description {
  font-size: 0.8125rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-category {
  display: inline-block;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  margin-bottom: 0.4rem;
}

.out-of-stock {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.product-actions {
  padding: 0 0.75rem 0.75rem;
}

.select-product-btn {
  width: 100%;
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border: none;
  padding: 0.625rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.select-product-btn:hover:not(:disabled) {
  background: var(--nestoryai-primary-dark, #683220);
}

.select-product-btn.selected {
  background: var(--nestoryai-success-color, #00a32a);
}

.select-product-btn.selected:hover {
  background: #dc2626;
}

.select-product-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
}

.no-products {
  text-align: center;
  padding: 3rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  font-style: italic;
}

/* Enhanced Custom Upload Section - 更紧凑 */
.custom-upload-section {
  padding: 1rem;
}

.custom-upload-section h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--nestoryai-primary-color, #a56239);
  font-size: 1.0625rem;
  font-weight: 600;
}

.custom-upload-section > p {
  margin-bottom: 1rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
  line-height: 1.4;
  font-size: 0.9375rem;
}

.upload-dropzone {
  border: 2px dashed var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  background: var(--nestoryai-bg-light, rgba(219, 210, 190, 0.7));
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--nestoryai-primary-color, #a56239);
  background: var(--nestoryai-primary-light, rgba(165, 98, 57, 0.18));
}

.upload-text {
  font-size: 1rem;
  margin: 0.75rem 0 0.4rem;
  color: var(--nestoryai-text-color, #2f1b12);
  font-weight: 500;
}

.upload-furniture-btn {
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease;
  margin-top: 0.75rem;
  font-weight: 500;
}

.upload-furniture-btn:hover {
  background: var(--nestoryai-primary-dark, #683220);
}

.custom-uploads-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.custom-upload-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  border-radius: 8px;
  background: var(--nestoryai-bg-color, #dbd2be);
  transition: all 0.2s ease;
}

.custom-upload-item:hover {
  border-color: var(--nestoryai-primary-color, #a56239);
  box-shadow: 0 2px 8px rgba(165, 98, 57, 0.1);
}

.custom-upload-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.custom-upload-item span {
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.custom-upload-item button {
  background: #dc2626;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
}

.custom-upload-item button:hover {
  background: #b91c1c;
}

/* Enhanced Pagination - 更紧凑 */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pagination-btn {
  padding: 0.4rem 0.875rem;
  border: 1px solid var(--nestoryai-border-color, rgba(104, 50, 32, 0.28));
  background: var(--nestoryai-bg-color, #dbd2be);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8125rem;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--nestoryai-primary-light, rgba(165, 98, 57, 0.18));
  border-color: var(--nestoryai-primary-color, #a56239);
  color: var(--nestoryai-primary-color, #a56239);
}

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

.pagination-info {
  font-size: 0.8125rem;
  color: var(--nestoryai-text-muted, rgba(47, 27, 18, 0.7));
}

/* Navigation - 更紧凑的按钮 */
.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
}

.nav-btn {
  padding: 0.625rem 1.5rem;
  border: 1px solid var(--nestoryai-primary-color, #a56239);
  background: var(--nestoryai-bg-color, #dbd2be);
  color: var(--nestoryai-primary-color, #a56239);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-btn:hover:not(:disabled) {
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
}

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

.submit-btn {
  background: var(--nestoryai-success-color, #00a32a);
  color: white;
  border-color: var(--nestoryai-success-color, #00a32a);
}

.submit-btn:hover:not(:disabled) {
  background: var(--nestoryai-success-dark, #007a1f);
  border-color: var(--nestoryai-success-dark, #007a1f);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Validation Errors */
.validation-errors {
  display: none;
  margin-top: 1rem;
}

.validation-error {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.error-icon {
  margin-right: 0.5rem;
  font-weight: bold;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 2rem;
}

.success-message h3 {
  color: var(--nestoryai-success-color, #00a32a);
  margin-bottom: 1rem;
}

.btn-primary {
  background: var(--nestoryai-primary-color, #a56239);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;
}

.btn-primary:hover {
  background: var(--nestoryai-primary-dark, #683220);
}

/* WooCommerce Fallback */
.woocommerce-fallback {
  text-align: center;
  padding: 2rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
}

/* Responsive Design - 优化移动端 */
@media (max-width: 768px) {
  .nestoryai-design-container {
    padding: 0.875rem;
  }

  .step-indicators {
    flex-direction: column;
    gap: 0.625rem;
  }

  .step-indicator {
    margin: 0;
    min-width: auto;
  }

  .step-content-wrapper {
    padding: 1rem;
    min-height: 360px;
  }

  .step-content h2 {
    font-size: 1.125rem;
  }

  /* Make two-column layout single column on mobile */
  .design-furniture-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .search-filters {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.875rem;
  }

  .product-image img {
    height: 140px;
  }

  .pagination-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .canvas-container {
    min-height: 300px;
  }

  .placement-canvas {
    max-height: 380px;
  }
}

@media (max-width: 480px) {
  .nestoryai-design-container {
    padding: 0.75rem;
  }

  .step-content-wrapper {
    padding: 0.875rem;
  }

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

  .custom-uploads-list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}