/* 自定义选项卡 */
.custom-section {
    margin-bottom: 12px;
}
.custom-row {
    display: flex;
    gap: 12px;
}
.custom-half {
    flex: 1;
    min-width: 0;
}
.custom-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin: 0 0 6px;
}
.custom-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--sr-color-text);
    box-sizing: border-box;
    outline: none;
    background: #fafbfc;
    transition: border-color 0.2s;
}
.custom-input:focus {
    border-color: var(--sr-color-primary);
    background: #fff;
}
.custom-input::placeholder {
    color: var(--sr-color-text-muted);
}
.custom-textarea {
    min-height: 180px;
    resize: vertical;
}
.bg-ref-upload-box {
    width: 100%;
    max-height: 180px;
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--sr-color-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    background: #fafbfc;
    position: relative;
    box-sizing: border-box;
}
.bg-ref-upload-box:hover {
    border-color: var(--sr-color-primary);
    background: #f5f3ff;
}
.bg-ref-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--sr-color-text-muted);
    font-size: 12px;
    user-select: none;
}
.bg-ref-upload-placeholder svg {
    width: 28px;
    height: 28px;
}
.bg-ref-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}
/* 加载进度条 */
.loading-progress-wrapper {
    padding: 0 20px;
    margin-top: 20px;
    text-align: center;
}
.loading-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 10px;
    transition: width 0.3s ease;
}
.loading-progress-text {
    font-size: 13px;
    color: var(--sr-color-text-secondary);
    margin-top: 8px;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-base);
    font-family: inherit;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

    .form-select:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .form-select:hover {
        border-color: var(--color-primary);
    }

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-base);
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

    .form-textarea:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .form-textarea::placeholder {
        color: var(--color-text-muted);
    }
/* 加载遮罩 */
.hero-img-wrapper { position: relative; border-radius: 12px; overflow: hidden; line-height: 0; width: min(100%, calc((100vh - 220px) * 3 / 4)); aspect-ratio: 3 / 4; max-height: calc(100vh - 220px); margin: 0 auto; }
.hero-img-wrapper > img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.hero-loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; z-index: 10; }
.hero-loading-overlay .loading-text { color: #fff; font-size: 15px; margin-bottom: 18px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.hero-loading-overlay .loading-bar { width: 65%; max-width: 320px; height: 8px; background: rgba(255,255,255,0.3); border-radius: 4px; overflow: hidden; }
.hero-loading-overlay .loading-bar-fill { height: 100%; background: #fff; border-radius: 4px; transition: width 0.3s ease; width: 0%; }
/* 允许预览区内容溢出时滚动，防止对比图和下载按钮被截断 */
.inspiration-hero {
    overflow-y: auto;
}

/* 效果图弹窗 */
.brand-popup-overlay { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0.65); justify-content: center; align-items: center; }
.brand-popup-overlay.active { display: flex; }
.brand-popup-box { position: relative; max-width: min(90vw, calc(90vh * 3 / 4)); max-height: 85vh; width: auto; aspect-ratio: 3 / 4; background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.brand-popup-box img { width: 100%; height: 100%; display: block; border-radius: 8px; object-fit: contain; }
.brand-popup-close { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; background: #fff; border: none; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; color: #555; font-size: 16px; line-height: 1; z-index: 2; transition: all 0.15s; }
.brand-popup-close:hover { background: #f0f0f0; color: #000; }
.brand-download-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 10px 28px; background: var(--sr-color-primary); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.brand-download-btn:hover { background: var(--sr-color-primary-hover); }
/* 滑块对比容器 */
.compare-container { position: relative; width: min(100%, calc((100vh - 220px) * 3 / 4)); aspect-ratio: 3 / 4; max-height: calc(100vh - 220px); margin: 0 auto; line-height: 0; border-radius: 12px; overflow: hidden; background: #f0f0f0; }
.compare-container > img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.img-label { position: absolute; height:20px;line-height:12px;top: 12px; padding: 4px 12px; background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; border-radius: 4px; z-index: 5; pointer-events: none; }
.label-left { left: 12px; }
.label-right { right: 12px; }

/* 移动端H5：参考图尺寸80px */
@media (max-width: 639px) {
    .sr-ref-img {
        width: 80px;
        height: 80px;
    }
}
