/* AI 电商白底图页 */
.pi-card {
    min-height: 560px;
    overflow: hidden;
}

.pi-card.is-complete {
    box-shadow: 0 8px 32px rgba(255, 106, 0, .1);
}

.pi-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fff8f0 0%, #fffcf8 50%, #fff 100%);
    border-bottom: 1px solid rgba(255, 106, 0, .08);
}

.pi-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid #e8ecf0;
    color: #888;
    font-size: 12px;
    transition: all .3s;
}

.pi-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8ecf0;
    color: #666;
    font-size: 11px;
    font-weight: 700;
}

.pi-step.is-active {
    background: #fff;
    border-color: #ff6a00;
    color: #ff6a00;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 106, 0, .12);
}

.pi-step.is-active .pi-step-num {
    background: linear-gradient(135deg, #ff6a00, #ff9a44);
    color: #fff;
}

.pi-step.is-done {
    background: #f0faf2;
    border-color: #b8e6c1;
    color: #2e7d32;
}

.pi-step.is-done .pi-step-num {
    background: #43a047;
    color: #fff;
}

.pi-step-arrow {
    width: 18px;
    height: 2px;
    background: linear-gradient(90deg, #d0d7de, #ff6a00);
    border-radius: 1px;
    opacity: .45;
}

.pi-hero {
    padding: 24px 28px 28px;
}

.pi-hero-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.pi-upload-inner {
    min-height: 320px;
}

.pi-demo-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.pi-demo {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid #e0e6ed;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ecf0 0%, #d0d7de 100%);
}

.pi-demo--white {
    background: #ffffff;
    border-color: #ff6a00;
}

.pi-demo-product {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 56px;
    border-radius: 8px;
    background: linear-gradient(145deg, #ff8c42 0%, #ff6a00 100%);
    box-shadow: 0 4px 12px rgba(255, 106, 0, .35);
}

.pi-demo--raw .pi-demo-product {
    background: linear-gradient(145deg, #6eb5ff 0%, #438edb 100%);
    box-shadow: 0 4px 12px rgba(67, 142, 219, .35);
}

.pi-demo-label {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: #666;
}

.pi-demo-arrow {
    font-size: 22px;
    color: #ff6a00;
    font-weight: 700;
}

.pi-upload-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.pi-upload-desc {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.pi-upload-hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: #999;
}

.pi-quick-settings {
    background: linear-gradient(160deg, #fffaf5 0%, #fff 100%);
    border: 1px solid #ffe8d6;
    border-radius: 14px;
    padding: 18px 16px;
}

.pi-settings-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.pi-settings-tip {
    margin: 0 0 14px;
    font-size: 12px;
    color: #888;
}

.pi-setting-block {
    margin-bottom: 14px;
}

.pi-setting-block:last-child {
    margin-bottom: 0;
}

.pi-setting-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.pi-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pi-color-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.pi-color-btn span {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ddd;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
    transition: transform .2s, box-shadow .2s;
}

.pi-color-btn em {
    font-style: normal;
    font-size: 10px;
    color: #888;
}

.pi-color-btn.is-active span {
    border-color: #ff6a00;
    box-shadow: 0 0 0 2px rgba(255, 106, 0, .25);
    transform: scale(1.08);
}

.pi-color-btn.is-active em {
    color: #ff6a00;
    font-weight: 600;
}

.pi-color-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.pi-color-custom input[type="color"] {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #ddd;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.pi-color-custom em {
    font-style: normal;
    font-size: 10px;
    color: #888;
}

.pi-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.pi-features li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: #fffaf5;
    border: 1px solid #ffe8d6;
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}

.pi-features li:hover {
    border-color: #ffc899;
    box-shadow: 0 4px 16px rgba(255, 106, 0, .08);
}

.pi-feature-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.pi-features strong {
    font-size: 13px;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.pi-features li span:last-child {
    font-size: 11px;
    color: #888;
}

.pi-scenes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ffe8d6;
}

.pi-scenes-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-right: 4px;
}

.pi-scene-tag {
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff3e8;
    color: #ff6a00;
    font-size: 12px;
    border: 1px solid rgba(255, 106, 0, .15);
}

.pi-workspace {
    padding: 0 28px 28px;
}

.pi-success-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #fff3e8, #fffaf5);
    border: 1px solid #ffd4a8;
    border-radius: 10px;
    color: #e65100;
    font-size: 14px;
}

.pi-workspace-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.pi-controls {
    background: #fffaf5;
    border: 1px solid #ffe8d6;
    border-radius: 14px;
    padding: 16px;
    position: sticky;
    top: 16px;
}

.pi-control-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #ffe8d6;
}

.pi-control-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pi-control-section h4 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.pi-size-detail {
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 8px;
    font-size: 11px;
    color: #666;
    border: 1px solid #ffe8d6;
}

.pi-control-row {
    margin-bottom: 12px;
}

.pi-control-row > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #666;
}

.pi-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    user-select: none;
}

.pi-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pi-toggle-ui {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    transition: background .2s;
    flex-shrink: 0;
}

.pi-toggle-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.pi-toggle input:checked + .pi-toggle-ui {
    background: #ff6a00;
}

.pi-toggle input:checked + .pi-toggle-ui::after {
    transform: translateX(18px);
}

.pi-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pi-panel-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
}

.pi-panel-tag--ok {
    background: #fff3e8;
    color: #e65100;
}

.pi-result-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: #f5f5f5;
}

.pi-result-wrap canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
    border-radius: 4px;
}

.pi-loading-sub {
    margin: 8px 0 0;
    font-size: 13px;
    color: #888;
}

.pi-platform-group {
    flex-wrap: wrap;
    gap: 6px;
}

.pi-platform-group .ai-tool-chip {
    font-size: 12px;
    padding: 6px 10px;
}

.pi-card .ai-tool-btn-primary {
    background: linear-gradient(135deg, #ff6a00, #ff9a44);
    border-color: #ff6a00;
}

.pi-card .ai-tool-btn-primary:hover {
    background: linear-gradient(135deg, #e55d00, #ff8c2a);
}

@media (max-width: 960px) {
    .pi-hero-grid {
        grid-template-columns: 1fr;
    }

    .pi-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .pi-workspace-layout {
        grid-template-columns: 1fr;
    }

    .pi-controls {
        position: static;
    }

    .pi-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .pi-hero,
    .pi-workspace {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pi-step-text {
        display: none;
    }
}
