/* Customer reviews on the product page and the "See all reviews" page.
   Plain CSS, no nesting (older phones): see layout/head.blade.php. */

.pdp-rating-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
}

.pdp-rating-link__avg {
    font-weight: 700;
}

.pdp-rating-link__count {
    color: #5c18e4;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pdp-reviews {
    margin-top: 32px;
    padding: 20px;
    border: 1px solid #ececf1;
    border-radius: 12px;
    background: #fff;
}

.pdp-reviews__header {
    margin: 0 0 16px;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
}

.pk-rsum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
}

.pk-rsum__score {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 140px;
}

.pk-rsum__avg {
    margin: 0;
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
    color: #1f2430;
}

.pk-rsum__count {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.pk-rsum__bars {
    flex: 1 1 260px;
    max-width: 420px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pk-rsum__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    padding: 2px 6px;
    margin: 0 -6px;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
}

.pk-rsum__bar:hover,
.pk-rsum__bar.is-active {
    background: #f3effd;
}

.pk-rsum__bar.is-active {
    font-weight: 700;
}

.pk-rsum__bar-star {
    flex: 0 0 34px;
    white-space: nowrap;
}

.pk-rsum__bar-track {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #ececf1;
    overflow: hidden;
}

.pk-rsum__bar-track span {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    border-radius: 4px;
    background: #f59e0b;
}

.pk-rsum__bar-n {
    flex: 0 0 28px;
    text-align: end;
    color: #6b7280;
}

.pdp-reviews__list,
.pk-reviews-page__list {
    margin-top: 20px;
    border-top: 1px solid #ececf1;
}

.pk-review {
    padding: 16px 0;
    border-bottom: 1px solid #ececf1;
}

.pk-review__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
}

.pk-review__author {
    font-weight: 700;
    color: #1f2430;
}

.pk-review__verified {
    font-size: 12px;
    font-weight: 600;
    color: #1e7b45; /* 5.3:1 on white */
}

.pk-review__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.pk-review__date {
    font-size: 12px;
    color: #6b7280;
}

.pk-review__comment {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.pk-review__comment--empty {
    color: #6b7280;
    font-style: italic;
}

.pk-review__reply {
    margin-top: 12px;
    padding: 10px 12px;
    border-inline-start: 3px solid #5c18e4;
    border-radius: 6px;
    background: #f7f5fe;
}

.pk-review__reply-head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #5c18e4;
}

.pk-review__reply-head time {
    font-weight: 400;
    color: #6b7280;
}

.pk-review__reply-text {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.pdp-reviews__all {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 0 18px;
    border: 1px solid #5c18e4;
    border-radius: 999px;
    font-weight: 600;
    color: #5c18e4;
    text-decoration: none;
}

.pdp-reviews__all:hover {
    background: #f3effd;
}

/* "See all reviews" page */
.pk-reviews-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.pk-reviews-page__back {
    display: inline-block;
    padding-block: 6px;
    font-size: 14px;
    color: #5c18e4;
}

.pk-reviews-page__product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 20px;
}

.pk-reviews-page__product img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    background: #f7f7fa;
}

.pk-reviews-page__title {
    margin: 0;
    font-size: 1.375rem;
    line-height: 1.4;
    font-weight: 700;
}

.pk-reviews-page__brand {
    font-size: 13px;
    color: #6b7280;
}

.pk-reviews-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.pk-reviews-filter a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d9d9e3;
    border-radius: 999px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    background: #fff;
}

.pk-reviews-filter a[aria-current="true"] {
    border-color: #5c18e4;
    background: #5c18e4;
    color: #fff;
}

.pk-reviews-page__empty {
    padding: 24px 0;
    color: #6b7280;
}

.pk-reviews-page__pagination {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .pdp-reviews {
        margin-top: 8px;
        padding: 13px 14px;
    }

    .pdp-reviews__header {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .pk-rsum {
        gap: 12px 20px;
    }

    .pk-rsum__score {
        min-width: 0;
    }

    .pk-rsum__avg {
        font-size: 32px;
    }

    .pdp-reviews__all {
        width: 100%;
        justify-content: center;
    }

    .pk-reviews-page {
        padding-top: 12px;
    }

    .pk-reviews-page__title {
        font-size: 1.125rem;
    }
}

.pk-reviews-page .pdp-reviews {
    margin-top: 0;
}
