/*
 * Aerosupply_Reviews — 全部评价页 + 撰写评价弹窗
 * 卡片本身沿用主题已有的 .rcard / .rev-* 样式，这里只补新出现的部分。
 */

/* ---------------- 全部评价页 ---------------- */
.rev-page {
    padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 6vw, 96px);
}

.rpage-head {
    max-width: 780px;
    margin-bottom: clamp(22px, 3vw, 36px);
}

.rpage-head .h-lg {
    margin: 18px 0 14px;
    max-width: 30ch;
}

.rpage-sub {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-2, #4a4c49);
    margin: 0 0 22px;
}

.rpage-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(22px, 4vw, 60px);
    padding: 22px 0;
    border-top: 1px solid var(--line, #e2e1dc);
    border-bottom: 1px solid var(--line, #e2e1dc);
    margin-bottom: clamp(24px, 3vw, 40px);
}

.rpage-score {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 auto;
}

.rpage-score b {
    font-size: 44px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.rpage-score-stars {
    display: flex;
    gap: 3px;
    color: #FFBB29;
}

.rpage-score-stars svg {
    width: 14px;
    height: 14px;
}

.rpage-score-stars .is-off {
    color: #d9d6cf;
}

.rpage-score-cnt {
    font-size: 14px;
    color: var(--muted-2, #8b8d88);
}

.rpage-dist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1 1 300px;
    max-width: 420px;
}

.rpage-dist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted-2, #8b8d88);
}

.rpage-dist-star {
    width: 26px;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.rpage-dist-bar {
    flex: 1 1 auto;
    height: 5px;
    background: #edede8;
    border-radius: 99px;
    overflow: hidden;
}

.rpage-dist-bar i {
    display: block;
    height: 100%;
    background: var(--ink, #0e0f10);
    border-radius: 99px;
}

.rpage-dist-cnt {
    width: 26px;
    text-align: right;
    flex: 0 0 auto;
}

.rlist-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* 列表页里卡片不参与轮播，按网格排；正文完整显示 */
.rlist-grid .rcard {
    flex: none;
    width: auto;
}

.rlist-grid .rcard-txt {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.rlist-empty {
    font-size: 15px;
    color: var(--muted, #8b8d88);
    grid-column: 1 / -1;
}

.rpager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: clamp(28px, 4vw, 48px);
}

.rpager-step,
.rpager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--ink-2, #4a4c49);
    border: 1px solid var(--line, #e2e1dc);
    background: #fff;
    transition: background .25s, color .25s, border-color .25s;
}

.rpager-step:hover,
.rpager-num:hover {
    border-color: var(--ink, #0e0f10);
    color: var(--ink, #0e0f10);
}

.rpager-num.is-on {
    background: var(--ink, #0e0f10);
    border-color: var(--ink, #0e0f10);
    color: #fff;
}

.rpager-step.is-off {
    opacity: .32;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .rlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .rlist-grid {
        grid-template-columns: 1fr;
    }

    .rpage-score b {
        font-size: 36px;
    }
}

/* 首页卡片不再有「展开全文」按钮：文案完整展示，不做 4 行截断 */
.rev-rail .rcard-txt {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

/* ---------------- 撰写评价弹窗 ---------------- */
.rw {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rw[hidden] {
    display: none;
}

.rw-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 15, 16, .52);
}

.rw-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    padding: clamp(22px, 3vw, 34px);
    box-shadow: 0 24px 60px rgba(14, 15, 16, .28);
    animation: rw-in .26s var(--ease, ease);
}

@keyframes rw-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.rw-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--muted, #8b8d88);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color .25s, transform .25s;
}

.rw-close:hover {
    color: var(--ink, #0e0f10);
    transform: rotate(90deg);
}

.rw-close svg {
    width: 13px;
    height: 13px;
}

.rw-title {
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 600;
    letter-spacing: -.01em;
    margin: 0 0 8px;
}

.rw-hint {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted-2, #8b8d88);
    margin: 0 0 18px;
}

.rw-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .rw-grid {
        grid-template-columns: 1fr;
    }
}

.rw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rw-label {
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--muted, #8b8d88);
}

.rw-label em {
    font-style: normal;
    text-transform: none;
    letter-spacing: 0;
    color: #b4b4ae;
}

/* 必填标记（所有字段都必填） */
.rw-req {
    color: #c0392b;
    margin-left: 3px;
    font-weight: 700;
}

.rw-field.is-error input,
.rw-field.is-error textarea {
    border-color: #c0392b;
    background: #fdf6f5;
}

.rw-error {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #fdf3f2;
    border: 1px solid #f0c9c4;
    border-left: 3px solid #c0392b;
    color: #a02d1f;
    font-size: 13px;
    line-height: 1.5;
}

.rw-field input,
.rw-field textarea {
    width: 100%;
    border: 1px solid var(--line, #e2e1dc);
    background: #fafaf8;
    padding: 11px 13px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink, #0e0f10);
    transition: border-color .25s, background .25s;
}

.rw-field input:focus,
.rw-field textarea:focus {
    outline: none;
    border-color: var(--ink, #0e0f10);
    background: #fff;
}

.rw-field textarea {
    resize: vertical;
    min-height: 112px;
    line-height: 1.65;
}

.rw-count {
    align-self: flex-end;
    font-size: 11px;
    color: #b4b4ae;
    font-variant-numeric: tabular-nums;
}

.rw-stars {
    display: flex;
    gap: 6px;
}

.rw-star {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d9d6cf;
    cursor: pointer;
    transition: transform .2s, color .2s;
}

.rw-star.is-on {
    color: #FFBB29;
}

.rw-star:hover {
    transform: scale(1.12);
}

.rw-star svg {
    width: 26px;
    height: 26px;
}

.rw-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.rw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--line, #e2e1dc);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2, #4a4c49);
    box-sizing: border-box;
    cursor: pointer;
    transition: background .28s, color .28s, border-color .28s;
}

.rw-btn:hover {
    border-color: var(--ink, #0e0f10);
    color: var(--ink, #0e0f10);
}

.rw-btn--primary {
    background: var(--ink, #0e0f10);
    border-color: var(--ink, #0e0f10);
    color: #fff;
}

.rw-btn--primary:hover {
    background: var(--accent, #c4301c);
    border-color: var(--accent, #c4301c);
    color: #fff;
}

.rw-btn[disabled],
.rw-btn[aria-busy] {
    opacity: .65;
    cursor: progress;
}

/* 提交成功面板（AJAX 提交后替换表单） */
.rw-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 26px 0 8px;
}

.rw-done-ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eef3ec;
    color: #2f6b3a;
}

.rw-done-ico svg {
    width: 26px;
    height: 26px;
}

.rw-done-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink, #0e0f10);
}

.rw-done-text {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted, #6f726d);
    max-width: 34em;
}

.rw-btn--block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.rw-open {
    overflow: hidden;
}
