/* 리뷰 상세 팝업 스타일 */

.review-detail-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Noto Sans KR', sans-serif;
    background: #fff;
}

/* 오버레이 - iframe에서 사용 시 display:none */
.rv-detail-overlay {
    display: none; /* iframe 모드에서는 불필요 */
}

/* 모달 - iframe에서는 전체 화면 */
.rv-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1;
    overflow: hidden;
}

/* 닫기 버튼 */
.rv-detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rv-detail-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 컨테이너 */
.rv-detail-container {
    display: flex;
    height: 100%;
}

/* 왼쪽: 이미지 */
.rv-detail-image {
    flex: 0 0 50%;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rv-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rv-detail-image .no-image {
    color: #999;
    font-size: 18px;
}

/* 오른쪽: 내용 */
.rv-detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.rv-detail-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 40px 40px 30px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* 상품 정보 */
.rv-detail-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.rv-product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

.rv-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

/* 제목 */
.rv-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
    line-height: 1.4;
}

.rv-detail-badge {
    display: none;
}

/* 별점 */
.rv-detail-stars {
    margin-bottom: 12px;
}

.rv-detail-stars .rv-star {
    font-size: 20px;
    color: #ddd;
}

.rv-detail-stars .rv-star.active {
    color: #ffa800;
}

/* 메타 */
.rv-detail-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.rv-meta-author {
    color: #333;
    font-weight: 600;
}

.rv-meta-sep {
    margin: 0 6px;
    color: #ddd;
}

/* 본문 */
.rv-detail-body {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
    word-break: break-word;
}

.rv-detail-body img {
    max-width: 100%;
    height: auto;
}

/* 댓글 섹션 */
.rv-detail-comments-section {
    margin-top: 32px;
}

.rv-comment-title-bar {
    background: #f5f5f5;
    padding: 12px 16px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

.rv-comment-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.rv-detail-comments {
    background: #fafafa;
    padding: 16px;
    margin-bottom: 0;
}

.rv-comment-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 10px;
}

.rv-comment-item:last-child {
    margin-bottom: 0;
}

.rv-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rv-comment-header strong {
    font-size: 14px;
    color: #333;
}

.rv-comment-header span {
    font-size: 13px;
    color: #999;
}

.rv-comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* 페이지네이션 */
.rv-detail-pagination {
    text-align: center;
    margin: 20px 0;
}

.rv-pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    margin: 0 4px;
    transition: all 0.2s;
}

.rv-pg-btn:hover {
    border-color: #9f4ff0;
    color: #9f4ff0;
}

.rv-pg-btn.disabled {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
    pointer-events: none;
}

.rv-pg-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #9f4ff0;
    border-radius: 4px;
    color: #9f4ff0;
    font-weight: 700;
    margin: 0 4px;
}

/* 이 상품의 다른 리뷰 */
.rv-detail-related {
    margin-top: auto;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.rv-detail-related h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
}

.rv-related-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 80px;
}

.rv-related-empty {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 14px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.rv-related-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.rv-related-item:hover {
    border-color: #9f4ff0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(159, 79, 240, 0.2);
}

.rv-related-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rv-related-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 11px;
}

.rv-related-empty {
    width: 100%;
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 14px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* 스크롤바 스타일 */
.rv-detail-scroll::-webkit-scrollbar {
    width: 8px;
}

.rv-detail-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.rv-detail-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.rv-detail-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 모바일 반응형 */
@media (max-width: 900px) {
    .rv-detail-modal {
        width: 95%;
        height: 95%;
        max-height: none;
    }
    
    .rv-detail-container {
        flex-direction: column;
    }
    
    .rv-detail-image {
        flex: 0 0 40%;
    }
    
    .rv-detail-content {
        flex: 1;
    }
    
    .rv-detail-scroll {
        padding: 24px 20px;
    }
    
    .rv-detail-title {
        font-size: 18px;
    }
    
    .rv-detail-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .rv-detail-image {
        flex: 0 0 30%;
    }
    
    .rv-detail-title {
        font-size: 16px;
    }
    
    .rv-detail-stars .rv-star {
        font-size: 16px;
    }
    
    .rv-detail-meta {
        font-size: 12px;
    }
    
    .rv-detail-body {
        font-size: 14px;
    }
    
    .rv-related-item {
        width: 60px;
        height: 60px;
    }
    
    .rv-comment-meta-wrap {
        flex-direction: column;
        gap: 10px;
    }
    
    .rv-comment-submit-btn {
        padding: 10px 40px;
        font-size: 14px;
    }
}

/* 댓글 입력 폼 */
.rv-comment-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 4px 4px;
    padding: 20px;
}

.rv-comment-input-wrap {
    margin-bottom: 16px;
}

.rv-comment-input-wrap textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.rv-comment-input-wrap textarea:focus {
    outline: none;
    border-color: #9f4ff0;
}

.rv-comment-meta-wrap {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.rv-comment-author-wrap,
.rv-comment-password-wrap {
    flex: 1;
}

.rv-comment-author-wrap label,
.rv-comment-password-wrap label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.rv-comment-author-wrap input,
.rv-comment-password-wrap input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.rv-comment-author-wrap input:focus,
.rv-comment-password-wrap input:focus {
    outline: none;
    border-color: #9f4ff0;
}

.rv-comment-author-wrap input[readonly] {
    background: #f5f5f5;
    color: #888;
}

.rv-comment-submit-wrap {
    text-align: center;
}

.rv-comment-submit-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 60px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.rv-comment-submit-btn:hover {
    background: #555;
}
