.ps-product-reviews-widget {
    display: grid;
    gap: 24px;
}

.ps-product-reviews-widget.ps-columns-1 {
    grid-template-columns: 1fr;
}

.ps-product-reviews-widget.ps-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ps-product-reviews-widget.ps-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ps-product-reviews-widget.ps-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ps-review-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 24px;
    height: 100%;
}

.ps-review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.ps-review-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: block;
}

.ps-review-author {
    font-weight: 700;
    line-height: 1.2;
}

.ps-review-date,
.ps-review-verified,
.ps-review-product {
    font-size: 13px;
    opacity: 0.75;
}

.ps-review-verified {
    margin-top: 2px;
}

.ps-review-stars {
    display: block;
    font-size: 18px;
    letter-spacing: 2px;
    color: #f5a623;
    margin-bottom: 12px;
    line-height: 1;
}

.ps-review-content {
    line-height: 1.6;
}

.ps-review-content p:last-child {
    margin-bottom: 0;
}

.ps-review-product {
    margin-top: 16px;
}

.ps-review-product a {
    text-decoration: underline;
}

.ps-reviews-empty {
    padding: 16px;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

@media (max-width: 1024px) {
    .ps-product-reviews-widget.ps-columns-4,
    .ps-product-reviews-widget.ps-columns-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ps-product-reviews-widget.ps-columns-4,
    .ps-product-reviews-widget.ps-columns-3,
    .ps-product-reviews-widget.ps-columns-2 {
        grid-template-columns: 1fr;
    }
}

.ps-review-form-wrap {
    margin-top: 28px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
}

.ps-review-form-wrap .comment-reply-title {
    display: block;
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
}

.ps-review-form-wrap label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.ps-review-form-wrap input[type="text"],
.ps-review-form-wrap input[type="email"],
.ps-review-form-wrap select,
.ps-review-form-wrap textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    background: #ffffff;
}

.ps-review-form-wrap .form-submit input[type="submit"] {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 12px 22px;
    background: #111111;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.ps-review-form-wrap .form-submit input[type="submit"]:hover {
    opacity: 0.9;
}

.ps-review-form-notice {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}


/* Rating field inside the independent review form.
   This avoids depending on WooCommerce single-product star CSS/JS,
   which may not load when the widget is used outside the native product tabs. */
.ps-review-form-wrap .ps-comment-form-rating {
    margin: 0 0 18px;
}

.ps-review-form-wrap .ps-rating-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.ps-review-form-wrap .ps-rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}

.ps-review-form-wrap .ps-rating-stars input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.ps-review-form-wrap .ps-rating-stars label {
    display: inline-block;
    margin: 0;
    font-size: 24px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.ps-review-form-wrap .ps-rating-stars label:hover,
.ps-review-form-wrap .ps-rating-stars label:hover ~ label,
.ps-review-form-wrap .ps-rating-stars input[type="radio"]:checked ~ label {
    color: #f5a623;
}

.ps-review-form-wrap .ps-rating-stars label:hover {
    transform: scale(1.06);
}

.ps-review-form-wrap .ps-rating-stars input[type="radio"]:focus-visible + label {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}
