/* ===== 左侧面板样式 ===== */
.dp-section {
    margin-bottom: 18px;
}
.dp-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dp-section-title .dp-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--sr-color-text-muted);
}

/* 商品原图上传 */
.dp-upload-area {
    border: 2px dashed var(--sr-color-border);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    background: #fafbfc;
    transition: all 0.2s;
}
.dp-upload-area:hover {
    border-color: var(--sr-color-primary);
    background: #f5f3ff;
}
.dp-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1.5px solid var(--sr-color-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--sr-color-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.dp-upload-btn:hover {
    background: var(--sr-color-primary);
    color: #fff;
}
.dp-upload-btn svg {
    width: 16px;
    height: 16px;
}
.dp-upload-hint {
    font-size: 12px;
    color: var(--sr-color-text-muted);
    margin-top: 8px;
}
.dp-image-list {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.dp-image-item {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--sr-color-border);
    position: relative;
}
.dp-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dp-image-item .dp-img-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
/* 文本框 */
.dp-textarea {
    width: 100%;
    min-height: 160px;
    padding: 10px 12px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 8px;
    font-size: 15px;
    line-height: 28px;
    font-family: inherit;
    color: var(--sr-color-text);
    box-sizing: border-box;
    outline: none;
    background: #fafbfc;
    resize: vertical;
    transition: border-color 0.2s;
}
.dp-textarea:focus {
    border-color: var(--sr-color-primary);
    background: #fff;
}
.dp-textarea::placeholder {
    color: #b0b7c3;
}
.dp-textarea-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.dp-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1.5px solid var(--sr-color-primary);
    border-radius: 16px;
    background: #fff;
    color: var(--sr-color-primary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.dp-ai-btn:hover {
    background: var(--sr-color-primary);
    color: #fff;
}
.dp-ai-btn svg {
    width: 14px;
    height: 14px;
}

/* AI 浮层 */
.dp-ai-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.dp-ai-overlay.show {
    display: flex;
}
.dp-ai-panel {
    background: #fff;
    border-radius: 16px;
    width: 520px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.dp-ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--sr-color-border);
}
.dp-ai-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin: 0;
}
.dp-ai-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}
.dp-ai-close:hover {
    background: #e5e7eb;
    color: #333;
}
.dp-ai-panel-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.dp-ai-panel-body .dp-textarea {
    min-height: 180px;
}
.dp-ai-panel-footer {
    padding: 12px 20px 18px;
    border-top: 1px solid var(--sr-color-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.dp-ai-generate-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: var(--sr-color-primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.dp-ai-generate-btn:hover {
    opacity: 0.9;
}
.dp-ai-result {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--sr-color-text);
    white-space: pre-wrap;
    display: none;
}
.dp-ai-result.show {
    display: block;
}

/* 主体选择 */
.dp-subject-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.dp-subject-btn {
    padding: 6px 16px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--sr-color-text);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.dp-subject-btn:hover {
    border-color: var(--sr-color-primary);
    color: var(--sr-color-primary);
}
.dp-subject-btn.active {
    border-color: var(--sr-color-primary);
    background: var(--sr-color-primary);
    color: #fff;
}

/* 动作设计 */
.dp-action-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dp-action-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dp-action-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--sr-color-text);
}
.dp-action-textarea {
    width: 100%;
    min-height: 65px;
    height: 65px;
    padding: 8px 10px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    font-family: inherit;
    color: var(--sr-color-text);
    box-sizing: border-box;
    outline: none;
    background: #fafbfc;
    resize: vertical;
    transition: border-color 0.2s;
}
.dp-action-textarea:focus {
    border-color: var(--sr-color-primary);
    background: #fff;
}
.dp-action-textarea::placeholder {
    color: #b0b7c3;
}

/* 生成结果网格 */
.result-grid {
    width:100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.result-box {
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #f3f4f6;
    min-height: 400px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.box-pending {
    font-size: 16px;
    color: #9ca3af;
    font-weight: 500;
}
/* 进度条 */
.box-loading {
    width: 100%;
    padding: 20px;
    text-align: center;
}
.box-loading-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.box-loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 10px;
    transition: width 0.3s ease;
}
.box-loading-text {
    font-size: 13px;
    color: var(--sr-color-text-secondary);
    margin: 0;
}
/* 完成状态 */
.box-done {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}
.box-done img {
    display: block;
    width: 100%;
    height: 100%;
    max-height:600px;
    object-fit: contain;
}
/* ===== 图片预览浮层 ===== */
.fp-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}
.fp-overlay.show {
    display: flex;
}
.fp-container {
    position: relative;
    max-width: 800px;
    width: 90vw;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.fp-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: #666;
    z-index: 1;
}
.fp-close:hover {
    color: #333;
}
.fp-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.fp-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: var(--sr-color-primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.fp-download:hover {
    opacity: 0.9;
}
.fp-download svg {
    width: 16px;
    height: 16px;
}
.fp-download-wrap {
    text-align: center;
}
.inspiration-note{font-size:12px;color:rgb(153, 153, 153);}

@media (max-width: 639px) {
  .inspiration-area {
    display: none;
  }
  .inspiration-header {
    display: none;
  }
  .inspiration-hero {
    max-height: none;
  }
  .result-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  .result-box {
    height: auto !important;
    min-height: 400px;
  }
}
