/* General */
.custom-rev-histogram {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}
.avg-num {font-size: 36px; color: #ffb100; font-weight: bold;}
.avg-stars i {font-size: 22px; color: #ddd;}
.avg-stars i.fill {color: #ffb100;}
.bar-row {display: flex; align-items: center; gap: 8px; margin: 8px 0;}
.bar-label {width: 60px;}
.bar-bg {flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden;}
.bar-fill {height: 100%; background: #ffb100;}

/* Submit Form */
.custom-rev-form {margin-bottom: 30px;}
.rev-login-tip {padding: 16px; background: #f0f6ff; border-radius: 6px;}
.form-row {margin-bottom: 16px;}
.two-col {display: grid; grid-template-columns: 1fr 1fr; gap: 12px;}
.form-row label {display: block; margin-bottom: 6px; font-weight: 500;}
.form-row input, .form-row textarea {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;
}
.star-select .star-item {font-size: 28px; color: #ddd; cursor: pointer; margin: 0 2px;}
.star-select .star-item.active {color: #ffb100;}
.upload-wrap {display: flex; align-items: center; gap: 10px; flex-wrap: wrap;}
.upload-btn {
    padding: 8px 16px; background: #2563eb; color: #fff; border-radius: 4px; cursor: pointer;
}
.upload-btn input {display: none;}
.upload-desc {font-size: 13px; color: #666;}
.upload-preview {display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px;}
.upload-preview img, .upload-preview video {width: 100px; height: 100px; object-fit: cover; border-radius: 4px;}
.upload-error {color: #e74c3c; font-size: 13px; margin-top: 4px;}
.form-message {margin-top: 8px; font-size: 14px;}
.rev-submit-btn {
    padding: 10px 24px; background: #2563eb; color: #fff; border: none; border-radius: 4px; cursor: pointer;
}
.rev-submit-btn:disabled {background: #8ab4f8; cursor: not-allowed;}

/* Review List */
.custom-rev-list {margin-top: 30px;}
.list-head {display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;}
.review-item {border: 1px solid #eee; padding: 18px; border-radius: 8px; margin-bottom: 14px;}
.review-head {display: flex; justify-content: space-between; color: #666; font-size: 14px; margin-bottom: 8px;}
.review-star i {font-size: 16px; color: #ddd;}
.review-star i.fill {color: #ffb100;}
.review-content {margin: 10px 0; line-height: 1.7;}
.review-media {display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0;}
.review-media img, .review-media video {width: 120px; height: 120px; object-fit: cover; border-radius: 4px;}
/* Merchant Reply */
.shop-reply {margin-top: 14px; padding: 12px 16px; background: #f0f7ff; border-left: 3px solid #2563eb; border-radius: 4px;}
.reply-title {font-weight: 600; color: #2563eb; margin-bottom: 4px;}
/* Vote Buttons */
.vote-box {margin-top: 12px; display: flex; gap: 10px;}
.vote-up, .vote-down {
    padding: 6px 12px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer;
}
.vote-up.voted, .vote-down.voted {background: #eef6ff; border-color: #2563eb; color: #2563eb;}
/* Pagination */
.rev-pagination {margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;}
.rev-pagination a {
    padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #333;
}
.rev-pagination a.active {background: #2563eb; color: #fff; border-color: #2563eb;}
/* Empty & Loading */
.rev-loading {text-align: center; padding: 20px; color: #666;}
.no-review {text-align: center; padding: 40px; color: #999; font-size: 15px;}
/* 媒体预览缩略图 */
.review-media {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top:10px;
}
.media-item {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-item .play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 30px;
    height:30px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
}

/* 弹窗遮罩 */
.media-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.media-lightbox.show {
    display: flex;
}
.lightbox-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-close {
    position: absolute;
    right: -30px;
    top: -30px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    width:30px;
    height:30px;
    text-align:center;
    line-height:30px;
}
.lightbox-content img,
.lightbox-content video {
    max-width: 90vw;
    max-height: 90vh;
    display: block;
}