﻿/* 自定义选项卡 */
.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;
}

.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;
}
/* 加载遮罩 */
.hero-img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

    .hero-img-wrapper > img {
        display: block;
        width: 100%;
        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%;
    }
/* 效果图弹窗 */
.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: 950px;
    width: 90vw;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .brand-popup-box img {
        width: 100%;
        max-height: calc(80vh - 100px);
        object-fit: contain;
        display: block;
        border-radius: 8px;
    }

.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: 100%;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
}

    .compare-container > img {
        display: block;
        width: 100%;
        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;
}
/* 标签选择组 */
.tag-select-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tag-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.tag-item:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.tag-item.active {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #fff;
}

/* 移动端H5：参考图尺寸 80x80 */
@media (max-width: 639px) {
    .sr-ref-img {
        width: 80px;
        height: 80px;
    }
}
