.ai-container  {
    padding: 20px 15px;
    background: #fff;
}
.ai-title  {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: left;
    letter-spacing: -0.5px;
    border-left:3px solid red;
    padding: 0 10px;
}
/* 업로드 버튼 */
.ai-drop-zone  {
    width: 100%;
    border: 2px dashed #99B2CA;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    background: #f8fbff;
    margin-bottom: 20px;
    position: relative;
    box-sizing: border-box;
}
.ai-drop-zone i  {
    font-size: 20px;
    color: #556879;
    margin-bottom: 10px;
    display: block;
}
.ai-drop-zone p  {
    font-size: 15px;
    font-weight: 600;
    color: #556879;
    margin: 0;
}
.ai-file-input  {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    opacity:0;
}
/* [핵심] 원본 이미지 프리뷰 영역 */
.source-preview-container  {
    display: flex;
    align-items: center;
    justify-content:
    center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 10px;
}
.source-img-wrap  {
    width: 45%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    flex-shrink: 0;
}
.source-img-wrap img  {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.source-info  {
    font-size: 15px;
    font-weight: 700;
    color: #555;
}
.btn-reset  {
    display: inline-block;
    margin-top: 5px;
    font-size: 13px;
    color: #e61e10;
    text-decoration: underline;
    font-weight: 500;
}
/* 공통: 정사각형 프레임 고정 */
.img-square-wrap  {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ededed;
}
.img-square-wrap img  {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ededed;
    overflow: hidden;
}
/* Top 3 UI */
.top3-section  {
    background: #f4f8ff;
    border-radius: 15px;
    padding: 18px 15px;
    margin-bottom: 25px;
    border: 1px solid #ddecff;
}
.top3-header  {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #222;
}
.top3-grid  {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.top3-card  {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    background: transparent;
    min-width:0;
}
.top3-info  {
    padding: 10px 2px;
}
.top3-name  {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
    margin-bottom: 5px;
}
.top3-price  {
    font-size: 14px;
    font-weight: 800;
    color: #000;
}
.top3-sim  {
    font-size: 11px;
    color: #007bff;
    font-weight: 600;
    margin-top: 2px;
}
/* 추천 태그 */
.ai-recommend-section  {
    margin-bottom: 25px;
    width: 100%;
}
.ai-recommend-section h3  {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}
.tag-wrapper  {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cate-pill  {
    background: #f5f5f5;
    color: #444;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 400;
}
/* 일반 결과 그리드 */
.ai-result-grid  {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.ai-card  {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
}
.sim-badge  {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 5px;
    z-index: 1;
}

.ai-info  {
    padding: 10px 2px;
}
.ai-info .name  {
    font-size: 14px;
    font-weight: 500;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    color: #333;
}
.ai-info .price  {
    font-size: 16px;
    font-weight: 800;
    color: #e61e10;
    margin-top: 6px;
}
#ai-loading  {
    display: none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.spinner  {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin  {
    0%  {
        transform: rotate(0deg);
    }
    100%  {
        transform: rotate(360deg);
    }
}
.ai-upload-view  {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
    width: fit-content;
}