/* Storefront product ratings */

.product-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: 650;
    line-height: 1.2;
    color: #1f2937;
    white-space: nowrap;
}

.product-rating-badge--sm { font-size: 0.78rem; }
.product-rating-badge--md { font-size: 0.88rem; }
.product-rating-badge--lg { font-size: 1rem; }

.product-rating-badge__star {
    color: #f5a524;
}

.product-rating-badge__count,
.product-rating-badge__empty {
    color: #6b7280;
    font-weight: 550;
}

.product-rating-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    margin: 0.65rem 0 0.85rem;
}

.product-rating-actions__btns {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.product-rating-actions__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    font-size: 0.8125rem;
    font-weight: 650;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-rating-actions__btn:hover {
    border-color: #9ca3af;
    color: #111827;
    text-decoration: none;
}

.product-rating-actions__btn--primary {
    border-color: transparent;
    background: #111827;
    color: #fff;
}

.product-rating-actions__btn--primary:hover {
    background: #000;
    color: #fff;
}

.store-reviews-page {
    padding: 1.25rem 1rem 2.5rem;
}

.store-reviews {
    max-width: 720px;
    margin: 0 auto;
}

.store-reviews__back {
    display: inline-block;
    margin-bottom: 1rem;
    color: inherit;
    opacity: 0.7;
    font-size: 0.9rem;
    text-decoration: none;
}

.store-reviews__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.store-reviews__product {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    min-width: 0;
}

.store-reviews__thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #f3f4f6;
}

.store-reviews__title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    line-height: 1.25;
    color: inherit;
}

.store-reviews__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.store-reviews__avg {
    font-size: 1.4rem;
    font-weight: 750;
    color: inherit;
}

.store-reviews__stars span,
.store-review-card__stars span {
    color: #d1d5db;
}

.store-reviews__stars .is-on,
.store-review-card__stars .is-on {
    color: #f5a524;
}

.store-reviews__count {
    color: inherit;
    opacity: 0.7;
    font-size: 0.9rem;
}

.store-reviews__rate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    background: #111827;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.store-reviews__rate-btn--block {
    width: 100%;
}

.store-reviews__flash {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
}

.store-review-card {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.store-review-card__top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.store-review-card__name {
    display: block;
    margin-bottom: 0.15rem;
    color: inherit;
}

.store-review-card__date {
    color: inherit;
    opacity: 0.55;
    font-size: 0.8rem;
    white-space: nowrap;
}

.store-review-card__comment {
    margin: 0.35rem 0 0.55rem;
    color: inherit;
    opacity: 0.9;
    line-height: 1.45;
    word-break: break-word;
}

.store-review-card__reply {
    margin: 0.55rem 0;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    background: color-mix(in srgb, currentColor 8%, transparent);
    border: 1px solid var(--border-color, #e5e7eb);
}

.store-review-card__reply strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: inherit;
    opacity: 0.75;
}

.store-review-card__reply p {
    margin: 0;
    color: inherit;
    opacity: 0.9;
}

.store-review-card__votes {
    display: flex;
    gap: 0.45rem;
}

.store-review-vote {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 32px;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 0.8rem;
    cursor: pointer;
}

.store-review-vote:hover {
    border-color: #d1d5db;
}

.store-reviews__empty {
    color: inherit;
    opacity: 0.7;
    padding: 1rem 0;
}

.store-reviews__lede {
    color: inherit;
    opacity: 0.75;
    margin: 0 0 1.25rem;
}

.store-review-form__group {
    margin-bottom: 1rem;
}

.store-review-form__group label,
.store-review-form__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 650;
    color: inherit;
}

.store-review-form__optional {
    color: #9ca3af;
    font-weight: 500;
}

.store-review-form__group input,
.store-review-form__group textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    background: #fff;
}

.store-review-form__group input:focus,
.store-review-form__group textarea:focus {
    outline: none;
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.store-review-form__counter {
    margin-top: 0.3rem;
    text-align: right;
    font-size: 0.75rem;
    color: #9ca3af;
}

.store-review-form__error {
    display: block;
    margin-top: 0.3rem;
    color: #dc2626;
    font-size: 0.8rem;
}

.store-review-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.store-review-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.15rem;
}

.store-review-stars input {
    display: none;
}

.store-review-stars label {
    font-size: 1.75rem;
    color: #d1d5db;
    cursor: pointer;
    line-height: 1;
}

.store-review-stars label:hover,
.store-review-stars label:hover ~ label,
.store-review-stars input:checked ~ label {
    color: #f5a524;
}

@media (max-width: 640px) {
    .store-reviews__header {
        flex-direction: column;
    }

    .store-reviews__rate-btn {
        width: 100%;
    }
}
