/* ═══════════════════════════════════════════════════════════════════════
   REVIEW WIDGET  —  Premium luxury storefront
   Tokens from site.css: --gold, --charcoal, --border, --serif, --sans,
   --charcoal-soft, --charcoal-mid, --cream
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ───────────────────────────────────────────────────── */
.rv-section { padding: 40px 0 60px; }

/* ── Header ────────────────────────────────────────────────────────────── */
.rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 22px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.rv-heading {
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--charcoal);
    margin: 0;
}

.rv-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--charcoal);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 10px 20px;
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background .18s;
}
.rv-write-btn:hover { background: #2d2d2d; color: #fff; }

.rv-already-reviewed {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--sans);
    font-size: .78rem;
    color: #2d7a3d;
    font-weight: 500;
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.rv-empty { text-align: center; padding: 56px 20px; }
.rv-empty-icon { font-size: 2.2rem; color: #D9CFC3; margin-bottom: 16px; }
.rv-empty-title {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 8px;
}
.rv-empty-text {
    font-family: var(--sans);
    font-size: .85rem;
    color: var(--charcoal-soft);
    margin: 0;
}

/* ── Summary grid ──────────────────────────────────────────────────────── */
.rv-summary {
    display: grid;
    grid-template-columns: 176px 1fr;
    gap: 36px;
    align-items: start;
    margin-bottom: 32px;
}
@media (max-width: 560px) { .rv-summary { grid-template-columns: 1fr; gap: 20px; } }

.rv-score { text-align: center; }
.rv-score-num {
    font-family: var(--serif);
    font-size: 3.8rem;
    font-weight: 600;
    line-height: 1;
    color: var(--charcoal);
    letter-spacing: -.02em;
}
.rv-stars-display {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin: 6px 0 5px;
}
.rv-star-icon { color: var(--gold); font-size: 14px; }
.rv-star-icon.empty { color: #E8E0D0; }
.rv-score-count {
    font-family: var(--sans);
    font-size: .72rem;
    color: var(--charcoal-soft);
    letter-spacing: .04em;
}

/* Distribution bars */
.rv-dist-rows { display: flex; flex-direction: column; gap: 7px; }
.rv-dist-row {
    display: grid;
    grid-template-columns: 34px 1fr 50px;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    border-radius: 3px;
    padding: 3px 4px;
    transition: background .13s;
}
.rv-dist-row:hover { background: #FBF6EE; }
.rv-dist-row.active .rv-dist-label { color: var(--charcoal); font-weight: 700; }
.rv-dist-row.active .rv-dist-fill  { background: var(--charcoal); }
.rv-dist-label {
    font-family: var(--sans);
    font-size: .76rem;
    color: var(--charcoal-soft);
    text-align: right;
    white-space: nowrap;
    transition: color .13s;
}
.rv-dist-track {
    height: 6px;
    background: #F0EBE1;
    border-radius: 3px;
    overflow: hidden;
}
.rv-dist-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    transition: width .5s cubic-bezier(.4,0,.2,1), background .13s;
}
.rv-dist-count {
    font-family: var(--sans);
    font-size: .7rem;
    color: var(--charcoal-soft);
    text-align: right;
}

/* ── Attribute bars ─────────────────────────────────────────────────────── */
.rv-attrs {
    border-top: 1px solid var(--border);
    padding-top: 26px;
    margin-bottom: 28px;
}
.rv-attrs-heading {
    font-family: var(--sans);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
    margin-bottom: 14px;
}
.rv-attr-row {
    display: grid;
    grid-template-columns: 160px 1fr 38px;
    gap: 14px;
    align-items: center;
    margin-bottom: 9px;
}
@media (max-width: 480px) { .rv-attr-row { grid-template-columns: 130px 1fr 34px; } }
.rv-attr-name {
    font-family: var(--sans);
    font-size: .78rem;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rv-attr-track {
    height: 4px;
    background: #F0EBE1;
    border-radius: 2px;
    overflow: hidden;
}
.rv-attr-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}
.rv-attr-score {
    font-family: var(--sans);
    font-size: .76rem;
    font-weight: 600;
    color: var(--charcoal);
    text-align: right;
}

/* ── Gallery strip ──────────────────────────────────────────────────────── */
.rv-gallery {
    border-top: 1px solid var(--border);
    padding-top: 26px;
    margin-bottom: 28px;
}
.rv-gallery-heading {
    font-family: var(--sans);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
    margin-bottom: 12px;
}
.rv-gallery-strip {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.rv-gallery-strip::-webkit-scrollbar { display: none; }
.rv-gallery-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    transition: border-color .16s;
}
.rv-gallery-thumb:hover { border-color: var(--gold); }
.rv-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Toolbar ────────────────────────────────────────────────────────────── */
.rv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 22px;
    margin-bottom: 24px;
}
.rv-tags-filter { display: flex; flex-wrap: wrap; gap: 7px; }
.rv-tag-pill {
    padding: 5px 13px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 500;
    color: var(--charcoal-soft);
    background: transparent;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
}
.rv-tag-pill:hover { border-color: var(--gold); color: var(--charcoal); }
.rv-tag-pill.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    font-weight: 600;
}
.rv-tag-count { font-size: .65em; opacity: .75; margin-left: 2px; }
.rv-sort-wrap { display: flex; align-items: center; gap: 8px; }
.rv-sort-label {
    font-family: var(--sans);
    font-size: .74rem;
    color: var(--charcoal-soft);
    white-space: nowrap;
}
.rv-sort-select {
    font-family: var(--sans);
    font-size: .78rem;
    color: var(--charcoal);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 5px 10px;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.rv-sort-select:focus { border-color: var(--gold); }

/* ── Review cards ───────────────────────────────────────────────────────── */
.rv-list { display: flex; flex-direction: column; }
.rv-card {
    padding: 26px 0;
    border-bottom: 1px solid var(--border);
    transition: opacity .2s;
}
.rv-list > .rv-card:first-child { border-top: 1px solid var(--border); }

.rv-card-top { margin-bottom: 10px; }
.rv-card-stars { display: flex; gap: 2px; margin-bottom: 5px; }
.rv-card-star { color: var(--gold); font-size: 13px; }
.rv-card-star.empty { color: #E8E0D0; }
.rv-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.rv-author {
    font-family: var(--sans);
    font-size: .85rem;
    font-weight: 600;
    color: var(--charcoal);
}
.rv-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #2d7a3d;
}
.rv-date {
    font-family: var(--sans);
    font-size: .72rem;
    color: var(--charcoal-soft);
}
.rv-featured-badge {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid #E8D9BE;
    background: #FBF6EE;
    border-radius: 2px;
    padding: 2px 7px;
}
.rv-card-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 10px 0 7px;
}
.rv-card-body {
    font-family: var(--sans);
    font-size: .875rem;
    color: #3d3d3d;
    line-height: 1.65;
    margin: 0 0 14px;
    white-space: pre-line;
}
/* Attribute sub-ratings */
.rv-card-attrs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.rv-card-attr {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--sans);
    font-size: .72rem;
    color: var(--charcoal-soft);
}
.rv-card-attr-stars { display: flex; gap: 1px; }
.rv-card-attr-star { color: var(--gold); font-size: 10px; }
.rv-card-attr-star.empty { color: #E8E0D0; }
/* Card photo strip */
.rv-card-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-card-photo {
    width: 60px;
    height: 60px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    transition: border-color .15s;
}
.rv-card-photo:hover { border-color: var(--gold); }
.rv-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Card tags */
.rv-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.rv-card-tag {
    font-family: var(--sans);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: #8B6914;
    background: #F8F2E6;
    border: 1px solid #E8D9BE;
    border-radius: 2px;
    padding: 2px 8px;
}
/* Vote row */
.rv-card-votes { display: flex; align-items: center; gap: 10px; }
.rv-vote-label {
    font-family: var(--sans);
    font-size: .72rem;
    color: var(--charcoal-soft);
}
.rv-vote-btns { display: flex; gap: 5px; }
.rv-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--sans);
    font-size: .72rem;
    font-weight: 500;
    color: var(--charcoal-soft);
    background: transparent;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    line-height: 1;
}
.rv-vote-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--charcoal); }
.rv-vote-btn.voted {
    border-color: var(--gold);
    background: #FBF6EE;
    color: var(--charcoal);
    font-weight: 600;
}
.rv-vote-btn:disabled { opacity: .5; cursor: default; }
/* Seller response */
.rv-seller-response {
    margin-top: 16px;
    padding: 13px 16px;
    background: #FAFAFA;
    border-left: 3px solid var(--gold);
    border-radius: 0 3px 3px 0;
}
.rv-seller-response-head {
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}
.rv-seller-response-date { font-weight: 400; letter-spacing: 0; text-transform: none; opacity: .8; }
.rv-seller-response-body {
    font-family: var(--sans);
    font-size: .82rem;
    color: #3d3d3d;
    line-height: 1.6;
}

/* ── Load more ──────────────────────────────────────────────────────────── */
.rv-load-more-wrap { text-align: center; padding: 28px 0 4px; }
.rv-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--charcoal);
    font-family: var(--sans);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .03em;
    padding: 11px 28px;
    border-radius: 3px;
    cursor: pointer;
    transition: border-color .18s, color .18s;
}
.rv-load-more-btn:hover:not(:disabled) { border-color: var(--gold); color: #8B6914; }
.rv-load-more-btn:disabled { opacity: .45; cursor: default; }
.rv-load-more-remaining { font-size: .72rem; opacity: .65; }
.rv-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(0,0,0,.15);
    border-top-color: var(--charcoal);
    border-radius: 50%;
    animation: rv-spin .65s linear infinite;
}
@keyframes rv-spin { to { transform: rotate(360deg); } }

/* ── Write Review modal ─────────────────────────────────────────────────── */
.rv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.52);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.rv-modal {
    background: #fff;
    border-radius: 6px;
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    display: flex;
    flex-direction: column;
}
.rv-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.rv-modal-title {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin: 0;
}
.rv-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--charcoal-soft);
    cursor: pointer;
    padding: 4px 6px;
    transition: color .14s;
}
.rv-modal-close:hover { color: var(--charcoal); }
.rv-modal-body { padding: 22px 22px 4px; flex: 1; }
.rv-modal-error {
    display: none;
    padding: 10px 13px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 3px;
    color: #b91c1c;
    font-family: var(--sans);
    font-size: .82rem;
    margin-bottom: 18px;
}
.rv-modal-error.show { display: block; }
.rv-form-group { margin-bottom: 18px; }
.rv-form-label {
    display: block;
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 8px;
}
/* Overall star picker */
.rv-star-picker { display: flex; gap: 6px; }
.rv-star-pick-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    line-height: 1;
    transition: transform .1s;
}
.rv-star-pick-btn:hover { transform: scale(1.12); }
.rv-star-pick-icon {
    font-size: 28px;
    color: #E8E0D0;
    transition: color .1s;
}
.rv-star-pick-icon.lit { color: var(--gold); }
.rv-rating-hint {
    font-family: var(--sans);
    font-size: .74rem;
    color: var(--charcoal-soft);
    margin-top: 4px;
    min-height: 18px;
}
/* Attribute pickers */
.rv-attr-pickers { display: flex; flex-direction: column; gap: 11px; }
.rv-attr-pick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.rv-attr-pick-name {
    font-family: var(--sans);
    font-size: .8rem;
    color: var(--charcoal);
    flex: 1;
    min-width: 0;
}
.rv-attr-pick-stars { display: flex; gap: 4px; }
.rv-attr-pick-star { background: none; border: none; padding: 1px; cursor: pointer; line-height: 1; }
.rv-attr-pick-icon { font-size: 18px; color: #E8E0D0; transition: color .1s; }
.rv-attr-pick-icon.lit { color: var(--gold); }
/* Tag toggles */
.rv-tag-toggles { display: flex; flex-wrap: wrap; gap: 7px; }
.rv-tag-toggle {
    padding: 5px 13px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--sans);
    font-size: .74rem;
    font-weight: 500;
    color: var(--charcoal-soft);
    background: transparent;
    cursor: pointer;
    transition: all .14s;
    user-select: none;
}
.rv-tag-toggle:hover { border-color: var(--gold); color: var(--charcoal); }
.rv-tag-toggle.selected { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; }
/* Inputs */
.rv-form-input,
.rv-form-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 9px 12px;
    font-family: var(--sans);
    font-size: .875rem;
    color: var(--charcoal);
    background: #fff;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}
.rv-form-input:focus,
.rv-form-textarea:focus { border-color: var(--gold); }
.rv-form-textarea { resize: vertical; min-height: 96px; }
.rv-form-hint { font-family: var(--sans); font-size: .72rem; color: var(--charcoal-soft); margin-top: 4px; }
.rv-char-count { font-family: var(--sans); font-size: .7rem; color: var(--charcoal-soft); text-align: right; margin-top: 4px; }
/* Modal footer */
.rv-modal-actions {
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    padding: 16px 22px 18px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: #fff;
}
.rv-modal-cancel {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 9px 18px;
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 600;
    color: var(--charcoal-soft);
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.rv-modal-cancel:hover { border-color: var(--charcoal); color: var(--charcoal); }
.rv-modal-submit {
    background: var(--charcoal);
    border: none;
    border-radius: 3px;
    padding: 9px 22px;
    font-family: var(--sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: #fff;
    cursor: pointer;
    transition: background .18s;
}
.rv-modal-submit:hover { background: #2d2d2d; }
.rv-modal-submit:disabled { opacity: .5; cursor: default; }

/* ── Photo lightbox ──────────────────────────────────────────────────────── */
.rv-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
    object-fit: contain;
    user-select: none;
}
.rv-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: rgba(255,255,255,.75);
    font-size: 1.7rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color .14s;
}
.rv-lightbox-close:hover { color: #fff; }
.rv-lightbox-prev,
.rv-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    padding: 14px 16px;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1;
    transition: background .14s;
}
.rv-lightbox-prev { left: 14px; }
.rv-lightbox-next { right: 14px; }
.rv-lightbox-prev:hover,
.rv-lightbox-next:hover { background: rgba(255,255,255,.2); }

/* ── Toast notification ──────────────────────────────────────────────────── */
.rv-toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--charcoal, #1a1a1a);
    color: #fff;
    font-family: var(--sans);
    font-size: .82rem;
    padding: 11px 22px;
    border-radius: 4px;
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s, transform .26s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.rv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
