/* ================================================
   PetGifts Reviews – style.css
   ================================================ */

#pgr-section {
    max-width: 1100px;
    margin: 48px auto 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
}

.pgr-heading {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 32px;
    color: #1a1a1a;
}

/* ── Stars ── */
.pgr-stars { display: inline-flex; gap: 2px; }
.pgr-star  { font-size: 20px; line-height: 1; color: #1a1a1a; }
.pgr-star.filled { opacity: 1; }
.pgr-star.half   { opacity: .45; }
.pgr-star.empty  { opacity: 1; }

/* ── Summary ── */
.pgr-summary {
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 28px;
    gap: 24px;
    flex-wrap: wrap;
}
.pgr-summary-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.pgr-avg-num {
    font-size: 52px;
    font-weight: 800;
    line-height: 1;
    color: #1a1a1a;
}
.pgr-total-text {
    font-size: 14px;
    color: #6b7280;
    margin-left: 4px;
}
.pgr-summary-right { text-align: right; }
.pgr-summary-btns  { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.pgr-promo {
    font-size: 13px;
    color: #6b7280;
    margin: 10px 0 0;
}

/* ── Buttons ── */
.pgr-btn-outline {
    padding: 10px 22px;
    border: 1.5px solid #1a1a1a;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
    font-family: inherit;
}
.pgr-btn-outline:hover { background: #1a1a1a; color: #fff; }

.pgr-btn-dark {
    padding: 10px 22px;
    border: 1.5px solid #1a1a1a;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
}
.pgr-btn-dark:hover { background: #333; }

/* ── Write review form ── */
#pgr-form-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 28px;
    background: #f9fafb;
}
.pgr-form-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
}
.pgr-form-row.pgr-form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.pgr-form-group {
    margin-bottom: 16px;
}
.pgr-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}
.pgr-form-group label span { color: #e74c3c; }
.pgr-form-group input[type="text"],
.pgr-form-group input[type="email"],
.pgr-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
    box-sizing: border-box;
    transition: border-color .2s;
}
.pgr-form-group input:focus,
.pgr-form-group textarea:focus {
    border-color: #1a1a1a;
    outline: none;
}
.pgr-form-group textarea { resize: vertical; }

/* Star picker */
.pgr-star-picker { display: flex; gap: 4px; margin-top: 4px; }
.pgr-star-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #d1d5db;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color .15s, transform .15s;
}
.pgr-star-btn:hover,
.pgr-star-btn.active { color: #1a1a1a; transform: scale(1.1); }

.pgr-submit-btn { margin-top: 8px; }

#pgr-form-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    display: none;
}
#pgr-form-msg.success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; display: block; }
#pgr-form-msg.error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; display: block; }

/* ── Filters ── */
.pgr-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pgr-filters-left,
.pgr-filters-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.pgr-filters-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
/* ── Custom dropdowns ── */
.pgr-dropdown {
    position: relative;
    display: inline-block;
}
.pgr-dropdown-btn {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: #1a1a1a !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.pgr-dropdown-btn:hover,
.pgr-dropdown-btn:focus,
.pgr-dropdown-btn:active {
    background: none !important;
    color: #1a1a1a !important;
    outline: none !important;
    box-shadow: none !important;
}
.pgr-chevron {
    flex-shrink: 0;
    transition: transform .2s;
}
.pgr-dropdown.pgr-open .pgr-chevron { transform: rotate(180deg); }
.pgr-dropdown-menu { display: none; } /* always hidden in-DOM; portal clone shown instead */
.pgr-portal-menu {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 160px;
    overflow: hidden;
}
.pgr-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
}
.pgr-dropdown-item:hover { background: #f3f4f6; }
.pgr-dropdown-item.pgr-active { font-weight: 700; }
.pgr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}
.pgr-checkbox-label input { width: 16px; height: 16px; cursor: pointer; }

/* ── Review cards ── */
.pgr-card {
    background: white;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 12px;
}
.pgr-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.pgr-card-date {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pgr-verified {
    display: inline-block;
    font-size: 12px;
    color: #065f46;
    background: #ecfdf5;
    border-radius: 4px;
    padding: 2px 7px;
    margin-top: 8px;
}
.pgr-card-right .pgr-stars { margin-bottom: 8px; }
.pgr-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.pgr-card-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}

/* ── Empty / load more ── */
.pgr-empty {
    text-align: center;
    color: #6b7280;
    padding: 32px;
    font-size: 15px;
}
#pgr-load-more { margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .pgr-summary { flex-direction: column; align-items: flex-start; }
    .pgr-summary-right { text-align: left; }
    .pgr-summary-btns { justify-content: flex-start; }
    .pgr-card { grid-template-columns: 1fr; gap: 12px; }
    .pgr-form-row.pgr-form-two-col { grid-template-columns: 1fr; }
    .pgr-filters { flex-direction: row; align-items: center; justify-content: space-between; }
    .pgr-plp-star  { font-size: 10px; }
    .pgr-plp-avg   { font-size: 10px; }
    .pgr-plp-count { font-size: 10px !important; }
    .pgr-plp-rating { gap: 3px; }
}

/* ── PLP rating (sub butonul produsului) ── */
.azooga-product-actions:has(.pgr-plp-rating) {
    flex-wrap: wrap;
}
.pgr-plp-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 18px;
    width: 100%;
    flex-wrap: nowrap;
}
.pgr-plp-stars  { display: flex; gap: 1px; }
.pgr-plp-star   { font-size: 13px; color: #1a1a1a; line-height: 1; }
.pgr-plp-half   { opacity: .45; }
.pgr-plp-avg    { font-size: 13px; font-weight: 700; color: #1a1a1a; line-height: 1; }
.pgr-plp-count  { font-size: 12px; color: #6b7280; line-height: 1; }

/* ── Rating badge (sub wpil-customizer-wrapper) ── */
.pgr-rating-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: nowrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.pgr-rb-avg {
    font-size: 22px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
}
.pgr-rb-stars { display: flex; gap: 1px; }
.pgr-rb-star  { font-size: 15px; color: #1a1a1a; line-height: 1; }
.pgr-rb-half  { opacity: .45; }
.pgr-rb-count {
    font-size: 13px;
    color: #6b7280;
    line-height: 1;
}

/* ── Mini review slider (lângă wishlist) ── */
.pgr-ms-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}
.pgr-ms-slider {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 56px;
    overflow: hidden;
}
.pgr-ms-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity .45s ease, transform .45s ease;
    pointer-events: none;
}
.pgr-ms-slide.pgr-ms-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.pgr-ms-slide.pgr-ms-exit {
    opacity: 0;
    transform: translateX(-18px);
    transition: opacity .45s ease, transform .45s ease;
}
.pgr-ms-stars { display: flex; gap: 1px; }
.pgr-ms-star  { font-size: 13px; color: #1a1a1a; line-height: 1; }
.pgr-ms-half  { opacity: .45; }
.pgr-ms-content {
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pgr-ms-author {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ── Photo upload ── */
.pgr-optional { font-weight: 400; color: #6b7280; font-size: 12px; }
.pgr-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.pgr-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: border-color .2s, background .2s, color .2s;
    white-space: nowrap;
}
.pgr-upload-btn svg { flex-shrink: 0; }
.pgr-upload-btn:hover {
    border-color: #8B1538;
    background: #fdf2f5;
    color: #8B1538;
}
.pgr-upload-hint { font-size: 12px; color: #9ca3af; }
#pgr-photo-preview { margin-top: 10px; }
.pgr-photo-preview-img {
    max-width: 200px;
    max-height: 160px;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}
.pgr-photo-remove {
    display: inline-block;
    margin-top: 6px;
    background: none;
    border: none;
    color: #b91c1c;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}
.pgr-upload-error { color: #b91c1c; font-size: 13px; display: block; margin-top: 4px; }
.pgr-upload-name  { font-size: 13px; color: #374151; display: block; margin-top: 4px; }

/* ── Photo in review card ── */
.pgr-card-photo { margin-top: 12px; }
.pgr-card-photo img {
    max-width: 240px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
