/* Reviews module (resources/views/reviews/_section.blade.php, public/js/reviews.js). Storefront tokens only. */
.pf-reviews {
    margin: 24px 0; padding: 24px; background: var(--pf-surface); color: var(--pf-ink);
    border: 1px solid var(--pf-line); border-radius: var(--pf-radius-lg, 16px); font-family: var(--pf-font, inherit);
}
.pf-reviews .pf-reviews__title { margin: 0 0 18px; font-size: 22px; font-weight: 700; color: var(--pf-ink); overflow-wrap: anywhere; }
.pf-reviews .pf-reviews__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; }
@media (max-width: 767px) { .pf-reviews { padding: 18px 16px; } .pf-reviews .pf-reviews__top { grid-template-columns: minmax(0, 1fr); gap: 22px; } }

.pf-reviews .pf-reviews__average { font-size: 44px; font-weight: 700; line-height: 1; color: var(--pf-ink); }
.pf-reviews .pf-reviews__stars, .pf-reviews .pf-review__stars { color: var(--pf-line-firm); letter-spacing: 2px; }
.pf-reviews .pf-reviews__stars { font-size: 22px; margin: 6px 0; }
.pf-reviews .pf-reviews__stars .is-on, .pf-reviews .pf-review__stars .is-on { color: var(--pf-terracotta); }
.pf-reviews .pf-reviews__count { margin: 0 0 12px; color: var(--pf-ink-soft); font-size: 14px; }
.pf-reviews .pf-reviews__bars { list-style: none; margin: 0; padding: 0; }
.pf-reviews .pf-reviews__bars li { display: grid; grid-template-columns: 36px 1fr 32px; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; color: var(--pf-ink-soft); }
.pf-reviews .pf-reviews__bar { height: 8px; background: var(--pf-surface-alt); border-radius: var(--pf-pill, 999px); overflow: hidden; }
.pf-reviews .pf-reviews__bar span { display: block; height: 100%; background: var(--pf-terracotta); }
.pf-reviews .pf-reviews__bar-count { text-align: right; }

.pf-reviews .pf-reviews__form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pf-reviews .pf-reviews__form-title { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.pf-reviews .pf-reviews__form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pf-reviews .pf-reviews__form legend { margin: 0 0 4px; padding: 0; border: 0; font-size: 14px; font-weight: 600; color: var(--pf-ink-label, var(--pf-ink)); width: auto; }
.pf-reviews .pf-reviews__rate-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.pf-reviews .pf-reviews__rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-reviews .pf-reviews__rate-stars label { font-size: 32px; line-height: 1; cursor: pointer; color: var(--pf-line-firm); margin: 0; padding: 2px; }
.pf-reviews .pf-reviews__rate-stars input:checked ~ label,
.pf-reviews .pf-reviews__rate-stars label:hover, .pf-reviews .pf-reviews__rate-stars label:hover ~ label { color: var(--pf-terracotta); }
.pf-reviews .pf-reviews__rate-stars input:focus-visible + label { outline: 2px solid var(--pf-focus-ring, var(--pf-ink)); outline-offset: 2px; border-radius: 4px; }
.pf-reviews .pf-reviews__used { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.pf-reviews .pf-reviews__used label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; cursor: pointer; }
.pf-reviews .pf-reviews__label { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.pf-reviews .pf-reviews__label span { font-weight: 400; color: var(--pf-ink-soft); }
.pf-reviews .pf-reviews__form textarea, .pf-reviews .pf-reviews__form input[type="text"] {
    width: 100%; max-width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--pf-ink);
    background: var(--pf-surface); border: 1px solid var(--pf-line-firm); border-radius: var(--pf-radius-sm, 8px);
}
.pf-reviews .pf-reviews__form textarea { resize: vertical; min-height: 96px; }
.pf-reviews .pf-reviews__form textarea:focus, .pf-reviews .pf-reviews__form input[type="text"]:focus { outline: 2px solid var(--pf-focus-ring, var(--pf-ink)); outline-offset: 1px; }
.pf-reviews .pf-reviews__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pf-reviews .pf-reviews__send {
    align-self: flex-start; padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer;
    color: var(--pf-on-accent); background: var(--pf-ink); border: 0; border-radius: var(--pf-pill, 999px);
}
.pf-reviews .pf-reviews__send[disabled] { opacity: .6; cursor: default; }
.pf-reviews .pf-reviews__note { margin: 0; min-height: 1em; font-size: 14px; }
.pf-reviews .pf-reviews__note.is-ok { color: var(--pf-forest-deep); }
.pf-reviews .pf-reviews__note.is-error { color: var(--pf-danger); }
.pf-reviews .pf-reviews__fine { margin: 0; font-size: 12px; color: var(--pf-ink-soft); }

.pf-reviews .pf-reviews__list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--pf-line); }
.pf-reviews .pf-review { padding: 16px 0; border-bottom: 1px solid var(--pf-line); }
.pf-reviews .pf-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.pf-reviews .pf-review__stars { font-size: 15px; }
.pf-reviews .pf-review__name { font-weight: 600; overflow-wrap: anywhere; }
.pf-reviews .pf-review__badge { padding: 2px 8px; font-size: 12px; color: var(--pf-forest-deep); background: var(--pf-forest-wash); border-radius: var(--pf-pill, 999px); }
.pf-reviews .pf-review__date { color: var(--pf-ink-soft); font-size: 13px; }
.pf-reviews .pf-review__body { margin: 8px 0 0; font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }

/* The "What do you think?" card that slides up after a few seconds. */
.pf-review-prompt {
    position: fixed; z-index: 1040; right: 16px; bottom: 16px; width: 340px; max-width: calc(100vw - 32px); box-sizing: border-box;
    padding: 16px 18px; color: var(--pf-ink); background: var(--pf-surface); border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius-lg, 16px); box-shadow: var(--pf-shadow); font-family: var(--pf-font, inherit);
    transform: translateY(20px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.pf-review-prompt.is-open { transform: none; opacity: 1; }
.pf-review-prompt .pf-review-prompt__title { margin: 0 28px 4px 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.pf-review-prompt .pf-review-prompt__text { margin: 0 0 8px; font-size: 14px; color: var(--pf-ink-soft); }
.pf-review-prompt .pf-review-prompt__stars { display: flex; gap: 4px; }
.pf-review-prompt .pf-review-prompt__stars button { padding: 0 2px; font-size: 30px; line-height: 1; color: var(--pf-line-firm); background: none; border: 0; cursor: pointer; }
.pf-review-prompt .pf-review-prompt__stars button:hover, .pf-review-prompt .pf-review-prompt__stars button:focus-visible, .pf-review-prompt .pf-review-prompt__stars button.is-on { color: var(--pf-terracotta); }
.pf-review-prompt .pf-review-prompt__close {
    position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; font-size: 22px; line-height: 1;
    color: var(--pf-ink-soft); background: none; border: 0; cursor: pointer; border-radius: 50%;
}
@media (max-width: 767px) { .pf-review-prompt { left: 16px; right: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .pf-review-prompt { transition: none; } }

/* Star summary at the top of an item page (reviews/_topStars). */
.pf-review-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 10px; padding: 4px 0; }
.pf-review-top .pf-review-top__stars { display: inline-flex; gap: 2px; }
.pf-review-top .pf-review-top__stars a { font-size: 24px; line-height: 1; color: var(--pf-line-firm); text-decoration: none; padding: 2px; border-radius: 4px; }
.pf-review-top .pf-review-top__stars a.is-on { color: var(--pf-terracotta); }
.pf-review-top .pf-review-top__stars:hover a { color: var(--pf-terracotta); }
.pf-review-top .pf-review-top__stars a:hover ~ a { color: var(--pf-line-firm); }
.pf-review-top .pf-review-top__stars a:focus-visible { outline: 2px solid var(--pf-focus-ring, var(--pf-ink)); outline-offset: 1px; }
.pf-review-top .pf-review-top__text { font-size: 14px; color: var(--pf-ink-soft); text-decoration: none; white-space: nowrap; }
.pf-review-top .pf-review-top__text strong { color: var(--pf-ink); }
.pf-review-top .pf-review-top__text:hover { text-decoration: underline; }
@media (max-width: 767px) { .pf-review-top { justify-content: flex-start; } }
