/* ── Rating breakdown widget ─────────────────────────────────────────── */

/* Full widget */
.rating-widget {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.rating-widget__header {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.rating-widget__score {
    display: flex;
    align-items: baseline;
    gap: .35rem;
}

.rating-widget__avg {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #f59e0b;
}

.rating-widget__label {
    font-size: .8rem;
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 500;
}

.rating-widget__stars {
    display: flex;
    gap: 1px;
    font-size: 1.15rem;
    line-height: 1;
}

.rating-star--full {
    color: #f59e0b;
}

.rating-star--empty {
    color: #d1d5db;
}

/* Half-star using clip-path */
.rating-star--half {
    position: relative;
    display: inline-block;
    color: #f59e0b;
}
.rating-star--half::after {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    color: #d1d5db;
    clip-path: inset(0 0 0 50%);
}

.rating-widget__total {
    font-size: .78rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* Bar rows */
.rating-widget__bars {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
}

.rating-bar__label {
    width: 2.8rem;
    flex-shrink: 0;
    color: var(--bs-body-color);
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.rating-bar__track {
    flex: 1;
    height: .55rem;
    background: var(--bs-border-color, #dee2e6);
    border-radius: 99px;
    overflow: hidden;
}

.rating-bar__fill {
    height: 100%;
    border-radius: 99px;
    transition: width .3s ease;
    min-width: 2px;
    background: #f59e0b;
}

.rating-bar__pct {
    width: 2.4rem;
    flex-shrink: 0;
    color: var(--bs-secondary-color, #6c757d);
    text-align: right;
}

/* ── Compact inline pill ─────────────────────────────────────────────── */
.rating-pill {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
}

.rating-pill__star {
    color: #f59e0b;
    font-size: 1em;
}

.rating-pill__avg {
    color: #f59e0b;
}

.rating-pill__sep,
.rating-pill__count {
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 400;
}

/* ── Seller-line pattern: ★★★★★ 4.8 (2 reviews) • 7 sales ──────────── */
.srl {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
    font-size: .82rem;
    line-height: 1.4;
}

/* Star row */
.srl__stars {
    display: inline-flex;
    gap: 1px;
    font-size: .9rem;
}

.srl__star--full {
    color: #f59e0b;
}

.srl__star--empty {
    color: #d1d5db;
}

/* Half-star: filled left, empty right */
.srl__star--half {
    position: relative;
    display: inline-block;
    color: #f59e0b;
}
.srl__star--half::after {
    content: '★';
    position: absolute;
    inset: 0;
    color: #d1d5db;
    clip-path: inset(0 0 0 50%);
}

/* Bold amber number */
.srl__avg {
    font-weight: 700;
    font-size: .88rem;
    color: #f59e0b;
}

/* Clickable review count */
.srl__reviews {
    color: var(--bs-link-color, #0d6efd);
    text-decoration: none;
    font-size: .8rem;
}
.srl__reviews:hover {
    text-decoration: underline;
}
.srl__reviews--plain {
    color: var(--bs-secondary-color, #6c757d);
}

/* No-reviews text */
.srl__no-reviews {
    color: var(--bs-secondary-color, #6c757d);
    font-size: .8rem;
}

/* Separator dot */
.srl__sep {
    color: var(--bs-secondary-color, #6c757d);
    font-size: .7rem;
}

/* Lighter sales text */
.srl__sales {
    color: var(--bs-secondary-color, #6c757d);
    font-size: .8rem;
}

/* New Seller badge */
.srl__new-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 99px;
    font-size: .7rem;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    letter-spacing: .01em;
}
