/* ===== 评论小部件 ===== */
.pr-widget {
    font-family: inherit;
    color: #333;
}

/* ===== 统计区 ===== */
.pr-stats {
    display: flex;
    gap: 40px;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.pr-stats-left {
    flex: 0 0 340px;
}

.pr-avg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.pr-avg-number {
    font-size: 36px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}

.pr-stars-inline {
    display: inline-flex;
    gap: 1px;
}

.pr-star {
    font-size: 16px;
    color: #ccc;
}

.pr-star.filled {
    color: #f5a623;
}

.pr-avg-based {
    font-size: 13px;
    color: #888;
}

/* 星级分布条 */
.pr-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pr-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pr-bar-label {
    font-size: 13px;
    color: #f5a623;
    width: 32px;
    flex-shrink: 0;
}

.pr-bar-track {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.pr-bar-fill {
    height: 100%;
    background: #f5a623;
    border-radius: 4px;
    transition: width 0.3s;
}

.pr-bar-count {
    font-size: 13px;
    color: #555;
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* 推荐 + 照片 */
.pr-stats-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pr-recommend {
    font-size: 14px;
    color: #333;
}

.pr-recommend-pct {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-right: 6px;
}

.pr-review-photos {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pr-review-photos::-webkit-scrollbar {
    display: none;
}

.pr-review-photo-thumb {
    width: 120px;
    height: 120px;
    min-width: 120px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
    transition: border-color 0.2s;
}

.pr-review-photo-thumb:hover {
    border-color: #333;
}

.pr-review-photo-thumb img,
.pr-review-photo-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 操作栏 ===== */
.pr-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.pr-total-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.pr-actions-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pr-sort-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pr-sort-label {
    font-size: 13px;
    color: #888;
}

.pr-sort-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 0;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    outline: none;
}

.pr-write-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #111;
    background: transparent;
    color: #111;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.pr-write-btn:hover {
    background: #111;
    color: #fff;
}

/* ===== 评论列表 ===== */
.pr-list {
    padding-top: 10px;
}

.pr-review-item {
    display: flex;
    gap: 24px;
    padding: 28px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* 左侧用户信息 */
.pr-review-left {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pr-review-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pr-review-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pr-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.pr-review-author {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.pr-review-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #1a73e8;
}

.pr-verified-icon svg {
    display: block;
}

.pr-review-recommend {
    font-size: 12px;
    color: #4caf50;
    margin-top: 4px;
}

/* 中间内容 */
.pr-review-center {
    flex: 1;
    min-width: 0;
}

.pr-review-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pr-review-stars .pr-stars-inline {
    font-size: 18px;
}

.pr-review-time {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.pr-review-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.pr-review-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 14px;
}

.pr-review-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.pr-helpful-text {
    font-size: 12px;
    color: #999;
}

.pr-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.pr-helpful-btn:hover {
    background: #f0f0f0;
}

.pr-helpful-count {
    font-size: 12px;
}

/* 右侧媒体 */
.pr-review-right {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pr-review-media {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
}

.pr-review-media img,
.pr-review-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 加载更多 ===== */
.pr-load-more-wrap {
    text-align: center;
    padding: 24px 0;
}

.pr-load-more {
    padding: 12px 40px;
    border: 1px solid #ccc;
    background: transparent;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}

.pr-load-more:hover {
    border-color: #111;
}

/* ===== 弹窗通用 ===== */
.pr-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
}

.pr-modal-overlay.active {
    display: block;
}

.pr-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    background: #fff;
}

.pr-modal.active {
    display: flex;
}

.pr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 50%;
    transition: background 0.2s;
}

.pr-modal-close:hover {
    background: #f0f0f0;
    color: #111;
}

/* ===== 写评论弹窗 ===== */
.pr-write-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 36px;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.pr-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 28px;
}

.pr-form-group {
    margin-bottom: 20px;
}

.pr-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.pr-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.pr-form-input:focus {
    border-color: #111;
}

.pr-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.pr-form-textarea:focus {
    border-color: #111;
}

/* 星级选择 */
.pr-star-select {
    display: flex;
    gap: 6px;
    font-size: 28px;
    cursor: pointer;
}

.pr-star-pick {
    color: #ccc;
    transition: color 0.15s;
    user-select: none;
}

.pr-star-pick.active {
    color: #f5a623;
}

.pr-star-pick:hover {
    color: #f5a623;
}

/* 上传区 */
.pr-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 80px;
}

.pr-upload-area:hover {
    border-color: #999;
}

/* 隐藏file input但保持可访问 */
.pr-file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.pr-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
}

.pr-upload-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    margin-top: 10px;
    background: none;
    border: 1px dashed #bbb;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.pr-upload-more:hover {
    border-color: #333;
    color: #333;
}

.pr-upload-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.pr-upload-preview-item {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.pr-upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pr-upload-preview-item .pr-remove-img {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pr-submit-btn {
    width: 100%;
    padding: 14px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.pr-submit-btn:hover {
    background: #333;
}

.pr-submit-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.pr-form-msg {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
}

.pr-form-msg.success {
    color: #4caf50;
}

.pr-form-msg.error {
    color: #e53935;
}

/* ===== 图片查看弹窗 ===== */
.pr-photo-modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 940px;
    max-width: 96vw;
    max-height: 92vh;
    border-radius: 12px;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.pr-photo-modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.pr-photo-main {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 520px;
    overflow: hidden;
}

.pr-photo-main-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.pr-photo-info {
    flex: 0 0 320px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.pr-photo-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pr-photo-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.pr-photo-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.pr-photo-badge .pr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #1a73e8;
}

.pr-photo-badge .pr-verified-badge::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #1a73e8;
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
}

.pr-photo-stars .pr-star {
    font-size: 20px;
}

.pr-photo-date {
    font-size: 12px;
    color: #999;
}

.pr-photo-title-text {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.pr-photo-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.pr-photo-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

/* 底部缩略图条 */
.pr-photo-thumbs-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-top: 1px solid #eee;
    overflow-x: auto;
}

.pr-photo-thumbs-strip .pr-strip-thumb {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.pr-photo-thumbs-strip .pr-strip-thumb.active {
    border-color: #111;
}

.pr-photo-thumbs-strip .pr-strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .pr-stats {
        flex-direction: column;
        gap: 20px;
    }

    .pr-stats-left {
        flex: none;
    }

    .pr-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pr-actions-right {
        width: 100%;
        justify-content: space-between;
    }

    .pr-review-item {
        flex-direction: column;
        gap: 12px;
    }

    .pr-review-left {
        flex: none;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .pr-review-right {
        flex: none;
        flex-direction: row;
    }

    .pr-review-media {
        width: 80px;
    }

    .pr-photo-modal-body {
        flex-direction: column;
    }

    .pr-photo-info {
        flex: none;
        padding: 16px;
    }

    .pr-photo-main {
        min-height: 240px;
        max-height: 320px;
    }

    .pr-write-modal {
        padding: 24px;
    }
}
