/* ══════════════════════════════════════════════════════
   高级瀑布流排版 (rv-layout-pro) — 纯原生瀑布流评价组件
   ══════════════════════════════════════════════════════ */
.b2b-product-review-section {
    width: 100%;
    margin: 56px 0 0;
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid #dce5ec;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}
.b2b-product-review-section *,
.b2b-product-review-section *::before,
.b2b-product-review-section *::after { box-sizing: inherit; }
.b2b-product-review-section .woocommerce-Reviews-title {
    margin: 0 0 24px;
    color: #0b1f33;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    line-height: 1.2;
}
.b2b-product-review-section .rv-empty {
    margin: 0;
    padding: 24px;
    border-radius: 8px;
    background: #f4f7f9;
}
@media (max-width: 680px) {
    .b2b-product-review-section { margin-top: 38px; padding: 20px 16px; }
}

.my-b2b-reviews-wrap {
    --rv-color: #2563eb;
    --rv-bg-card: #ffffff;
    --rv-radius: 8px;
    --rv-shadow: 0 2px 8px rgba(0,0,0,.08);
    --rv-shadow-hover: 0 6px 20px rgba(0,0,0,.12);
    --rv-text: #1a1a1a;
    --rv-text-muted: #666;
    --rv-star-off: #ddd;
    --rv-gap: 16px;
    box-sizing: border-box;
    width: 100%;
}
.my-b2b-reviews-wrap *, .my-b2b-reviews-wrap *::before, .my-b2b-reviews-wrap *::after { box-sizing: inherit; }
.my-b2b-reviews-wrap .rv-empty { text-align: center; color: var(--rv-text-muted); padding: 48px 0; font-size: 14px; }
.my-b2b-reviews-wrap .rv-grid { column-gap: var(--rv-gap); margin-bottom: 24px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.my-b2b-reviews-wrap .rv-grid-2-col { column-count: 2; }
.my-b2b-reviews-wrap .rv-grid-3-col { column-count: 3; }
.my-b2b-reviews-wrap .rv-grid-4-col { column-count: 4; }
.my-b2b-reviews-wrap .rv-grid-5-col { column-count: 5; }
.my-b2b-reviews-wrap .rv-card { break-inside: avoid; background-color: var(--rv-bg-card); border-radius: var(--rv-radius); box-shadow: var(--rv-shadow); margin-bottom: var(--rv-gap); overflow: hidden; color: var(--rv-text); font-size: 14px; line-height: 1.6; transition: box-shadow .25s ease, transform .25s ease; cursor: default; }
.my-b2b-reviews-wrap .rv-card:hover { box-shadow: var(--rv-shadow-hover); transform: translateY(-2px); }
.my-b2b-reviews-wrap .rv-img-zone { position: relative; width: 100%; overflow: hidden; background: #e8e8e8; }
.my-b2b-reviews-wrap .rv-img-main { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 0; transition: transform .4s ease; }
.my-b2b-reviews-wrap .rv-card:hover .rv-img-main { transform: scale(1.04); }
.my-b2b-reviews-wrap .rv-img-strip { display: flex; gap: 4px; padding: 5px 6px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; background: rgba(0,0,0,.30); scrollbar-width: none; -ms-overflow-style: none; }
.my-b2b-reviews-wrap .rv-img-strip::-webkit-scrollbar { display: none; }
.my-b2b-reviews-wrap .rv-img-thumb { flex: 0 0 36px; width: 36px; height: 36px; scroll-snap-align: start; border: 2px solid transparent; border-radius: 4px; padding: 0; cursor: pointer; overflow: hidden; background: none; transition: border-color .2s ease; display: block; }
.my-b2b-reviews-wrap .rv-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.my-b2b-reviews-wrap .rv-img-thumb--active, .my-b2b-reviews-wrap .rv-img-thumb:hover { border-color: var(--rv-color); }
.my-b2b-reviews-wrap .rv-img-badge { position: absolute; bottom: 50px; right: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; pointer-events: none; line-height: 20px; }
.my-b2b-reviews-wrap .rv-body { padding: 12px 14px 14px; }
.my-b2b-reviews-wrap .rv-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.my-b2b-reviews-wrap .rv-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--rv-color); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; user-select: none; }
.my-b2b-reviews-wrap .rv-meta-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.my-b2b-reviews-wrap .rv-author { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--rv-text); }
.my-b2b-reviews-wrap .rv-date { font-size: 11px; color: var(--rv-text-muted); font-style: italic; }
.my-b2b-reviews-wrap .rv-stars { margin-bottom: 8px; line-height: 1; display: flex; align-items: center; gap: 1px; }
.my-b2b-reviews-wrap .rv-star { font-size: 17px; letter-spacing: 1px; color: var(--rv-star-off); transition: color .15s; }
.my-b2b-reviews-wrap .rv-star--on { color: var(--rv-color); }
.my-b2b-reviews-wrap .rv-content { font-size: 13px; font-weight: 300; line-height: 1.6; color: var(--rv-text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; text-align: justify; margin-bottom: 10px; }
.my-b2b-reviews-wrap .rv-dims { border-top: 1px solid rgba(0,0,0,.08); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.my-b2b-reviews-wrap .rv-dim-row { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; }
.my-b2b-reviews-wrap .rv-dim-label { flex: 0 0 45%; min-width: 60px; max-width: 100px; color: var(--rv-text-muted); white-space: normal; word-break: break-word; padding-top: 1px; }
.my-b2b-reviews-wrap .rv-dim-bar-wrap { flex: 1; height: 5px; background: rgba(0,0,0,.10); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.my-b2b-reviews-wrap .rv-dim-bar { height: 100%; background: var(--rv-color); border-radius: 3px; transition: width .45s ease; }
.my-b2b-reviews-wrap .rv-dim-score { flex-shrink: 0; color: var(--rv-text-muted); min-width: 2.2em; text-align: right; padding-top: 1px; }
@media (max-width: 1080px) { .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 4; } }
@media (max-width: 880px) { .my-b2b-reviews-wrap .rv-grid, .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 3; } }
@media (max-width: 680px) { .my-b2b-reviews-wrap .rv-grid, .my-b2b-reviews-wrap .rv-grid-3-col, .my-b2b-reviews-wrap .rv-grid-4-col, .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 2; } .my-b2b-reviews-wrap .rv-img-main { height: 160px; } .my-b2b-reviews-wrap .rv-img-badge { bottom: 46px; } }
@media (max-width: 400px) { .my-b2b-reviews-wrap .rv-grid, .my-b2b-reviews-wrap .rv-grid-2-col, .my-b2b-reviews-wrap .rv-grid-3-col, .my-b2b-reviews-wrap .rv-grid-4-col, .my-b2b-reviews-wrap .rv-grid-5-col { column-count: 1; } }

/* ══════════════════════════════════════════════════════
   评价表单区 (rv-form-area) — 命名空间样式接管
   所有选择器严格限定在 .my-b2b-reviews-wrap.rv-form-area 之下，
   通过高 Specificity 覆盖主题默认样式，不污染外部 DOM。
   ══════════════════════════════════════════════════════ */

/* ── 局部 CSS 变量 + 分割线 ─────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area {
    --rv-input-border:  #e2e8f0;
    --rv-input-radius:  6px;
    --rv-input-bg:      #f8fafc;
    --rv-label-color:   #374151;
    --rv-focus-ring:    rgba(37, 99, 235, .14);
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    box-sizing: border-box;
    width: 100%;
}
.my-b2b-reviews-wrap.rv-form-area *,
.my-b2b-reviews-wrap.rv-form-area *::before,
.my-b2b-reviews-wrap.rv-form-area *::after { box-sizing: inherit; }

/* ── 表单标题 ────────────────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area #respond .comment-reply-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    line-height: 1.3;
}

/* ── 标签 ───────────────────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rv-label-color);
    margin-bottom: 5px;
}
.my-b2b-reviews-wrap.rv-form-area .comment-form .required {
    color: var(--rv-color);
    font-weight: 700;
}

/* ── 文本 / 邮件输入框 ──────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="text"],
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="email"] {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--rv-input-border);
    border-radius: var(--rv-input-radius);
    background: var(--rv-input-bg);
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="text"]:focus,
.my-b2b-reviews-wrap.rv-form-area .comment-form input[type="email"]:focus {
    border-color: var(--rv-color);
    box-shadow: 0 0 0 3px var(--rv-focus-ring);
}

/* ── 评价正文 Textarea ──────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form textarea#comment {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--rv-input-border);
    border-radius: var(--rv-input-radius);
    background: var(--rv-input-bg);
    font-size: 14px;
    color: #1a1a1a;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.my-b2b-reviews-wrap.rv-form-area .comment-form textarea#comment:focus {
    border-color: var(--rv-color);
    box-shadow: 0 0 0 3px var(--rv-focus-ring);
}

/* ── 星级评分 <select> ──────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form-rating select#rating {
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--rv-input-border);
    border-radius: var(--rv-input-radius);
    background-color: var(--rv-input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    min-width: 160px;
    outline: none;
}

/* ── 提交按钮（主题色驱动，高 Specificity 覆盖 .woocommerce #respond input#submit）── */
.my-b2b-reviews-wrap.rv-form-area #respond input#submit,
.my-b2b-reviews-wrap.rv-form-area .comment-form .submit {
    background-color: var(--rv-color);
    color: #fff;
    border: none;
    border-radius: var(--rv-input-radius);
    padding: 11px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .3px;
    transition: opacity .2s ease, transform .15s ease;
}
.my-b2b-reviews-wrap.rv-form-area #respond input#submit:hover,
.my-b2b-reviews-wrap.rv-form-area .comment-form .submit:hover {
    opacity: .86;
    transform: translateY(-1px);
}
.my-b2b-reviews-wrap.rv-form-area #respond input#submit:active,
.my-b2b-reviews-wrap.rv-form-area .comment-form .submit:active {
    opacity: 1;
    transform: translateY(0);
}

/* ── 段落间距 ────────────────────────────────────────────── */
.my-b2b-reviews-wrap.rv-form-area .comment-form p { margin-bottom: 16px; }

/* ══════════════════════════════════════════════════════
   排版差异化 — 4 种 Layout 的表单 DOM 变体
   ══════════════════════════════════════════════════════ */

/* ── Pro：卡片浮起，阴影包裹整个表单 ──────────────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-pro #respond {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
    padding: 28px 32px;
}

/* ── Ecommerce：居中宽幅，浅灰背景凸显转化区域 ────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-ecommerce #respond {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    background: #f9fafb;
    border-radius: 8px;
    padding: 24px 28px;
    border: 1px solid #e5e7eb;
}

/* ── Masonry：左侧品牌色描边，紧凑型 ───────────────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry #respond {
    border-left: 3px solid var(--rv-color);
    padding-left: 20px;
}
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form p { margin-bottom: 10px; }
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form input[type="text"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form input[type="email"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-masonry .comment-form textarea#comment {
    padding: 7px 10px;
    font-size: 13px;
}

/* ── Minimal：极简无框，只留底部细线 ──────────────────────── */
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form input[type="text"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form input[type="email"],
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form textarea#comment {
    background: #fff;
    border-radius: 4px;
}
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal #respond input#submit,
.my-b2b-reviews-wrap.rv-form-area.rv-layout-minimal .comment-form .submit {
    border-radius: 4px;
    padding: 9px 24px;
}

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .my-b2b-reviews-wrap.rv-form-area.rv-layout-pro #respond { padding: 20px 16px; }
    .my-b2b-reviews-wrap.rv-form-area.rv-layout-ecommerce #respond { padding: 16px; }
    /* 防 iOS 双击缩放：表单输入框字号不低于 16px */
    .my-b2b-reviews-wrap.rv-form-area .comment-form input[type="text"],
    .my-b2b-reviews-wrap.rv-form-area .comment-form input[type="email"],
    .my-b2b-reviews-wrap.rv-form-area .comment-form textarea#comment { font-size: 16px; }
}

/* ══════════════════════════════════════════════════════
   评价增强 — 多维度打分区
   ══════════════════════════════════════════════════════ */

.my-b2b-reviews-wrap.rv-form-area .rv-dim-inputs {
    --rv-color: #6366f1;
    margin-bottom: 20px;
    padding: 16px 18px;
    background: #f8f9ff;
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px 24px;
    align-items: start;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-inputs__title {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: .2px;
}

/* 收编后的原生星级：与滑块行视觉对齐，不破坏 WC 的 #rating / .stars JS */
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row {
    grid-column: 1 / -1;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating {
    margin: 0;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating label {
    display: inline !important;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin: 0 !important;
    white-space: nowrap !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating p.stars {
    margin: 0 !important;
}
.my-b2b-reviews-wrap.rv-form-area .rv-dim-overall-row .comment-form-rating select#rating {
    max-width: 220px;
    margin-top: 4px;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    min-width: 0;
}

/* 表单维度标签：解除全局 .rv-dim-label 的宽度与省略号限制，允许折行防溢出 */
.my-b2b-reviews-wrap.rv-form-area .rv-dim-label {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    width: auto !important;
    min-width: 0 !important;
    word-break: break-word !important;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-input-label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/* 浏览器默认 range 样式重置 + 品牌色主题 */
.my-b2b-reviews-wrap.rv-form-area .rv-dim-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        var(--rv-color) 0%,
        var(--rv-color) 40%,
        #e5e7eb 40%,
        #e5e7eb 100%
    );
    outline: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: background .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rv-color);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rv-color);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: transform .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .3);
}

.my-b2b-reviews-wrap.rv-form-area .rv-dim-input-val {
    display: inline-block;
    min-width: 1.8em;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--rv-color);
    background: none;
    border: none;
    padding: 0;
}

/* ══════════════════════════════════════════════════════
   评价增强 — 前端媒体上传区
   ══════════════════════════════════════════════════════ */

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload {
    --rv-color: #6366f1;
    margin-bottom: 20px;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    letter-spacing: .2px;
}

/* 隐藏原生 file input，使用自定义按钮触发 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px dashed var(--rv-color);
    border-radius: 6px;
    color: var(--rv-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: rgba(99, 102, 241, .04);
    transition: background .2s ease, border-color .2s ease;
    user-select: none;
    line-height: 1.4;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn:hover {
    background: rgba(99, 102, 241, .10);
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn-icon {
    font-size: 16px;
    line-height: 1;
    font-style: normal;
}

/* 预览缩略图网格 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb {
    position: relative;
    width: 72px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 4px 4px 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb img {
    width: 64px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__icon {
    width: 64px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 4px;
    background: #e5e7eb;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__name {
    font-size: 10px;
    color: #6b7280;
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease;
}

.my-b2b-reviews-wrap.rv-form-area .rv-media-thumb__remove:hover {
    background: rgba(239, 68, 68, .85);
}

/* 双按钮行 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

/* 视频按钮专属色调 */
.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn--video {
    border-color: #7c3aed;
    color: #7c3aed;
    background: rgba(124, 58, 237, .04);
}
.my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn--video:hover {
    background: rgba(124, 58, 237, .10);
}

/* 视频已添加反馈条 */
.my-b2b-reviews-wrap.rv-form-area .rv-video-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #15803d;
}
.my-b2b-reviews-wrap.rv-form-area .rv-video-feedback__remove {
    margin-left: auto;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

/* ── 视频 Modal ── */
.rv-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    cursor: pointer;
}
.rv-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 460px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    overflow: hidden;
    z-index: 1;
}
.rv-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.rv-modal__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.rv-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
}
.rv-modal__close:hover { color: #374151; }

.rv-modal__tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
}
.rv-modal__tabs--single { padding: 12px 20px 0; border-bottom: none; }
.rv-modal__tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.rv-modal__tab.is-active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}
.rv-modal__body {
    padding: 20px;
    min-height: 120px;
}
.rv-modal__file-label {
    display: flex !important;
    justify-content: center;
    width: 100%;
}
.rv-modal__file-name {
    margin: 10px 0 0;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    word-break: break-all;
}
.rv-modal__url-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}
.rv-modal__url-input:focus { border-color: #6366f1; }
.rv-modal__url-error {
    color: #ef4444;
    font-size: 12px;
    margin: 6px 0 0;
}
.rv-modal__confirm-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.rv-modal__confirm-btn:hover { background: #4f46e5; }

/* 响应式：小屏时上传按钮全宽 */
@media (max-width: 480px) {
    .my-b2b-reviews-wrap.rv-form-area .rv-media-upload__btn { width: 100%; justify-content: center; }
    .my-b2b-reviews-wrap.rv-form-area .rv-media-btn-row { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════
   评价表单 — 原生 WooCommerce 星级微调（样式由主题接管）
   ══════════════════════════════════════════════════════ */

.rv-native-stars-wrapper p.stars {
    margin: 0 !important;
    line-height: 1;
    white-space: nowrap;
}

/* 1. 强制清空原生主题色，设定默认灰色（覆盖自定义维度 + 综合评分两种容器） */
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars a,
.my-b2b-reviews-wrap .comment-form-rating p.stars a::before {
    color: #e5e7eb !important;
}

/* 2. 当 Hover 整个 p 标签，或者处于 selected 状态时，全部变为主题色 */
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a::before,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars.selected a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars.selected a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars.selected a,
.my-b2b-reviews-wrap .comment-form-rating p.stars.selected a::before {
    color: var(--rv-color) !important;
}

/* 3. 核心逻辑：利用后置兄弟选择器 ~，把鼠标悬停位置之后，以及被选中位置之后的星星，强行打回灰色 */
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a.active ~ a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars a.active ~ a::before,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a:hover ~ a,
.my-b2b-reviews-wrap .rv-native-stars-wrapper p.stars:hover a:hover ~ a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars a.active ~ a,
.my-b2b-reviews-wrap .comment-form-rating p.stars a.active ~ a::before,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a:hover ~ a,
.my-b2b-reviews-wrap .comment-form-rating p.stars:hover a:hover ~ a::before {
    color: #e5e7eb !important;
}

/* ==============================================
   灯箱预览 / Lightbox  (rv-lightbox)
   纯原生 CSS — 零依赖、零冲突
   v3：支持放大缩小 + 拖拽平移
   ============================================== */
#rv-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#rv-lightbox-overlay.rv-lb-active {
    opacity: 1;
    visibility: visible;
}

/* 缩放画布：transform 施加在这里 */
#rv-lightbox-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    will-change: transform;
    touch-action: none;
}

#rv-lightbox-canvas.rv-lb-zoomed {
    cursor: grab;
}

#rv-lightbox-canvas.rv-lb-dragging {
    cursor: grabbing;
    transition: none !important;
}

#rv-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    /* pointer-events 保持默认，右键/长按保存功能正常 */
}

#rv-lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    font-size: 36px;
    line-height: 1;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.15s;
    z-index: 1000000;
}

#rv-lightbox-close:hover {
    opacity: 1;
}

#rv-lightbox-prev,
#rv-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    padding: 12px 18px;
    opacity: 0.75;
    transition: opacity 0.15s, background 0.15s;
    z-index: 1000000;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
}

#rv-lightbox-prev {
    left: 12px;
}

#rv-lightbox-next {
    right: 12px;
}

#rv-lightbox-prev:hover,
#rv-lightbox-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

#rv-lightbox-prev.rv-lb-hidden,
#rv-lightbox-next.rv-lb-hidden {
    display: none;
}

/* 鼠标悬停到评价主图时给出「可点击」提示 */
.rv-img-main {
    cursor: zoom-in;
}

/* =============================================
   外部视频区域 / rv-video-zone
   响应式 16:9 iframe 容器，适配瀑布流窄列
   ============================================= */
.rv-video-zone {
    width: 100%;
}

.rv-video-responsive-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.rv-video-responsive-wrap iframe,
.rv-video-responsive-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ── 视频封面覆盖层（YouTube 外链 + 本地视频共用） ── */
.rv-embed-lazy,
.rv-local-lazy { cursor: pointer; }

.rv-embed-cover {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.rv-local-lazy video {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.rv-embed-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    border: none; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    z-index: 1;
    transition: transform 0.2s ease, background 0.2s ease;
    padding: 0;
}

.rv-embed-play::after {
    content: '';
    display: block;
    width: 0; height: 0;
    border-style: solid;
    border-width: 11px 0 11px 22px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.92);
    position: absolute;
    top: 50%; left: 54%;
    transform: translate(-50%, -50%);
}

.rv-embed-lazy:hover .rv-embed-play,
.rv-local-lazy:hover .rv-embed-play {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(0, 0, 0, 0.72);
}

/* ── 封面图播放按钮标识 ── */
.rv-img-zone--video-cover {
    position: relative;
    cursor: pointer;
}

.rv-img-zone--video-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    /* 三角形播放图标用 border trick */
    box-shadow: inset 18px 0 0 6px rgba(255, 255, 255, 0.9);
    clip-path: polygon(30% 15%, 85% 50%, 30% 85%);
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

.rv-img-zone--video-cover:hover::after {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 0.85;
}

/* 播放按钮圆形背景 */
.rv-img-zone--video-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease;
    pointer-events: none;
}

.rv-img-zone--video-cover:hover::before {
    background: rgba(0, 0, 0, 0.62);
}

/* 封面图区域内的封面图，cursor 提示可点击播放 */
.rv-cover-zone {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
}

.rv-cover-zone__label {
    font-size: 13px;
    color: #374151;
    margin: 0 0 8px;
    font-weight: 500;
}

.rv-cover-zone__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s;
}

.rv-cover-zone__btn:hover {
    border-color: #6b7280;
}

.rv-cover-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
