/* ================================================
   PRODUCT REVIEWS SECTION
   ================================================ */

.pg-reviews-section {
    width: 100%;
    margin-top: 56px;
    padding: 48px 0;
    border-top: 1px solid var(--pg-border-light);
}

.pg-reviews-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Header --- */

.pg-reviews-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.pg-reviews-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pg-reviews-subtitle {
    font-size: 13px;
    color: var(--pg-grey-light);
    margin: 0;
    line-height: 1.5;
}

.pg-reviews-subtitle a {
    color: var(--pg-galaxy);
    text-decoration: none;
    font-weight: 600;
}

.pg-reviews-subtitle a:hover {
    text-decoration: underline;
}

.pg-reviews-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--pg-dark);
    margin: 0;
    letter-spacing: -0.02em;
}

.pg-reviews-count {
    font-weight: 400;
    color: var(--pg-grey-light);
    font-size: 22px;
}

.pg-reviews-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--pg-dark);
    color: var(--pg-white);
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.pg-reviews-write-btn:hover {
    opacity: 0.85;
}

/* --- Rating Summary Card --- */

.pg-reviews-container .pg-reviews-summary {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    padding: 32px;
    margin-bottom: 12px;
    background: var(--pg-bg-light);
    border-radius: 2px;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-bottom: none;
}

.pg-reviews-summary-score {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 90px;
}

.pg-reviews-avg {
    font-size: 48px;
    font-weight: 800;
    color: var(--pg-dark);
    line-height: 1;
    letter-spacing: -0.03em;
}

.pg-reviews-avg-stars {
    display: flex;
}

.pg-reviews-avg-count {
    font-size: 13px;
    color: var(--pg-grey-light);
    margin-top: 4px;
}

.pg-reviews-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.pg-reviews-dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pg-reviews-dist-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pg-dark);
    width: 12px;
    text-align: right;
}

.pg-reviews-dist-star {
    flex-shrink: 0;
}

.pg-reviews-dist-bar {
    flex: 1;
    height: 6px;
    background: var(--pg-border-light);
    border-radius: 2px;
    overflow: hidden;
}

.pg-reviews-dist-bar-fill {
    height: 100%;
    background: #F59E0B;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.pg-reviews-dist-count {
    font-size: 12px;
    color: var(--pg-grey-light);
    width: 24px;
    text-align: right;
}

/* --- Review Form --- */

.pg-review-form-wrapper {
    padding: 32px 0 36px;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--pg-border-light);
}

.pg-review-form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pg-dark);
    margin: 0 0 24px 0;
}

.pg-review-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pg-grey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.pg-star-input {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.pg-star-input-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    transition: transform 0.15s;
}

.pg-star-input-btn:hover {
    transform: scale(1.2);
}

.pg-star-input-btn.active svg,
.pg-star-input-btn.hover svg {
    fill: #F59E0B;
    stroke: #F59E0B;
}

.pg-review-form-content {
    margin-bottom: 20px;
    position: relative;
}

.pg-review-form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--pg-border-light);
    border-radius: 2px;
    font-size: 15px;
    color: var(--pg-dark);
    background: var(--pg-white);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.pg-review-form-textarea:focus {
    outline: none;
    border-color: var(--pg-galaxy);
    box-shadow: 0 0 0 3px var(--pg-galaxy-shadow);
}

.pg-review-form-charcount {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--pg-grey-light);
    margin-top: 4px;
}

.pg-review-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.pg-review-form-cancel {
    padding: 10px 24px;
    background: none;
    border: 1px solid var(--pg-border-light);
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pg-grey);
    cursor: pointer;
    transition: all 0.2s;
}

.pg-review-form-cancel:hover {
    border-color: var(--pg-border-dark);
    color: var(--pg-dark);
}

.pg-review-form-submit {
    padding: 10px 28px;
    background: var(--pg-dark);
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pg-white);
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pg-review-form-submit:hover {
    opacity: 0.85;
}

.pg-review-form-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--pg-white);
    border-radius: 50%;
    animation: pgSpin 0.6s linear infinite;
}

.pg-review-form-submit.is-loading .pg-review-form-submit-text {
    opacity: 0.5;
}

.pg-review-form-submit.is-loading .pg-review-form-spinner {
    display: block;
}

.pg-review-form-note {
    font-size: 12px;
    color: var(--pg-grey-light);
    margin: 12px 0 0 0;
    text-align: right;
}

/* --- Review Cards --- */

.pg-reviews-list {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
}

.pg-review-card {
    padding: 28px 0;
    border-bottom: 1px solid var(--pg-border-light);
}

.pg-review-card:first-child {
    border-top: 1px solid var(--pg-border-light);
}

.pg-review-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.pg-review-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pg-white);
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.pg-review-card-info {
    flex: 1;
    min-width: 0;
}

.pg-review-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pg-review-card-author {
    font-size: 15px;
    font-weight: 600;
    color: var(--pg-dark);
}

.pg-review-card-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pg-success);
    background: rgba(5, 150, 105, 0.08);
    padding: 2px 8px;
    border-radius: 2px;
}

.pg-review-card-date {
    font-size: 13px;
    color: var(--pg-grey-light);
}

.pg-review-card-rating {
    margin-bottom: 2px;
}

.pg-review-card-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--pg-grey);
    padding-left: 54px;
}

/* Shared Stars */
.pg-stars {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

/* --- Empty / Login Prompt --- */

.pg-reviews-empty,
.pg-review-login-prompt {
    padding: 24px 0;
    text-align: left;
    margin-bottom: 0;
}

.pg-reviews-empty p,
.pg-review-login-prompt p {
    margin: 0;
    font-size: 15px;
    color: var(--pg-grey);
    line-height: 1.6;
}

.pg-review-login-prompt a {
    color: var(--pg-galaxy);
    text-decoration: none;
    font-weight: 600;
}

.pg-review-login-prompt a:hover {
    text-decoration: underline;
}

/* --- Load More --- */

.pg-reviews-load-more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    background: none;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pg-galaxy);
    cursor: pointer;
    transition: background 0.2s;
}

.pg-reviews-load-more:hover {
    background: var(--pg-galaxy-light);
}

/* --- Reviews Responsive --- */

@media (max-width: 768px) {
    .pg-reviews-section {
        margin-top: 40px;
        padding: 36px 0;
    }

    .pg-reviews-container {
        padding: 0 20px;
    }

    .pg-reviews-header {
        margin-bottom: 24px;
    }

    .pg-reviews-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pg-reviews-title {
        font-size: 22px;
    }

    .pg-reviews-container .pg-reviews-summary {
        flex-direction: column;
        gap: 24px;
        padding: 24px 20px;
    }

    .pg-reviews-summary-score {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        min-width: auto;
    }

    .pg-reviews-avg {
        font-size: 40px;
    }

    .pg-reviews-distribution {
        width: 100%;
    }

    .pg-review-card {
        padding: 22px 0;
    }

    .pg-review-card-content {
        padding-left: 0;
        margin-top: 8px;
    }

    .pg-review-form-wrapper {
        padding: 24px 0 28px;
    }

    .pg-review-form-actions {
        flex-direction: column;
    }

    .pg-review-form-cancel,
    .pg-review-form-submit {
        width: 100%;
        justify-content: center;
    }
}


