/* Блок отзывов на странице товара */
.product-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.product-rating .stars {
    letter-spacing: 1px;
    color: #e8b000;
    font-size: 1.05rem;
}

.product-rating .stars--empty {
    color: #d0d0d0;
}

.product-rating-count {
    color: var(--text-light, #666);
    font-size: 0.95rem;
}

.btn-link.product-review-open-tab {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #585e92;
    text-decoration: underline;
    cursor: pointer;
}

.btn-link.product-review-open-tab:hover {
    color: var(--terracotta, #d94848);
}

.product-review-block {
    margin-bottom: 1.75rem;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(135deg, #faf8f5 0%, #fff 100%);
    border: 1px solid var(--border, #e8e8e8);
    border-radius: 14px;
}

.product-review-summary-line {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    color: #444;
}

.product-review-flow-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: #585e92;
}

.product-review-hint {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    color: var(--text-light, #666);
    line-height: 1.5;
}

.product-review-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 0.5rem;
}

.review-star-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e0dcd6;
    background: #fff;
    font-size: 1.45rem;
    line-height: 1;
    color: #d0d0d0;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s, background 0.12s, box-shadow 0.12s, transform 0.1s;
}

.review-star-btn:focus-visible {
    outline: 2px solid #585e92;
    outline-offset: 2px;
}

/* Подсветка «от первой до наведённой / выбранной» (ставит JS класс .is-lit) */
.review-star-btn.is-lit {
    color: #e8b000;
    border-color: #e8c44a;
    background: linear-gradient(180deg, #fffef8 0%, #fff9e6 100%);
    box-shadow: 0 2px 10px rgba(232, 176, 0, 0.22);
}

.review-star-btn.is-lit:hover {
    transform: scale(1.04);
}

.review-star-btn:not(.is-lit) {
    color: #d0d0d0;
    border-color: #e0dcd6;
    background: #fff;
    box-shadow: none;
}

/* Зафиксированный выбор чуть ярче, когда курсор ушёл с блока */
.product-review-stars:not(:hover) .review-star-btn.is-active.is-lit {
    border-color: #e8b000;
    box-shadow: 0 2px 12px rgba(232, 176, 0, 0.28);
}

.product-review-form {
    margin-top: 0.75rem;
}

.product-review-form .form-row {
    margin-bottom: 1rem;
}

.product-review-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.product-review-form input[type="text"],
.product-review-form input[type="tel"],
.product-review-form textarea {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e8e8e8);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.product-review-form textarea {
    max-width: 100%;
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    font-size: 0.82rem;
    color: var(--text-light, #777);
    margin-top: 0.35rem;
}

.product-review-form .hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.review-consent-row {
    margin: 0.75rem 0;
}

.review-consent-box {
    margin: 1.25rem 0 1rem;
    padding: 16px 18px;
    border: 2px solid #585E92;
    border-radius: 12px;
    background: #f7f8fc;
}

.review-consent-box__title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #585E92;
    font-family: Kudryashev Display Sans, sans-serif;
}

.review-consent-box__lead {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
}

.form-warning {
    margin: 0.5rem 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8e8;
    border: 1px solid #f0d9a0;
    color: #5a4a20;
    font-size: 0.85rem;
    line-height: 1.45;
    max-width: 100%;
}

.review-consent-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 400;
    color: #444;
    cursor: pointer;
}

.review-consent-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #585E92;
}

.review-consent-label a {
    color: #585E92;
    text-decoration: underline;
}

.product-review-selected-rating {
    font-size: 0.95rem;
    margin: 0 0 1rem;
    color: #333;
}

.form-msg {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.form-msg.is-error {
    color: #c0392b;
}

.form-msg.is-ok {
    color: #2e7d32;
}

/* ——— Модальное окно «Нам очень жаль» ——— */
.review-neg-overlay {
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(45, 45, 62, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.review-neg-dialog {
    position: relative;
    max-width: 440px;
    width: 100%;
    margin: 0;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 20px;
    border: 1px solid rgba(88, 94, 146, 0.18);
    background: linear-gradient(165deg, #fff 0%, #faf8ff 45%, #fff9f5 100%);
    box-shadow:
        0 24px 48px rgba(45, 45, 62, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    text-align: center;
}

.review-neg-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(88, 94, 146, 0.08);
    color: #585e92;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.review-neg-close:hover {
    background: rgba(217, 72, 72, 0.12);
    color: #c0392b;
}

.review-neg-visual {
    margin: 0 auto 1rem;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7ede2 0%, #fff 50%, #e8e6f5 100%);
    border: 2px solid rgba(88, 94, 146, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(88, 94, 146, 0.12);
}

.review-neg-emoji {
    font-size: 2rem;
    line-height: 1;
}

.review-neg-title {
    margin: 0 0 0.5rem;
    font-family: Kudryashev Display Sans, Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: #585e92;
    letter-spacing: 0.02em;
}

.review-neg-lead {
    margin: 0 0 0.65rem;
    font-size: 1.02rem;
    font-weight: 500;
    color: #3d3d5c;
    line-height: 1.45;
}

.product-review-neg-text {
    line-height: 1.6;
    color: #5a5a6e;
    font-size: 0.95rem;
    margin: 0 0 1.35rem;
}

.product-review-neg-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.review-neg-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #63699e 0%, #585e92 100%);
    color: #fff !important;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(88, 94, 146, 0.35);
    transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}

.review-neg-btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 18px rgba(88, 94, 146, 0.4);
    transform: translateY(-1px);
}

.review-neg-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: 2px solid #585e92;
    background: #fff;
    color: #585e92 !important;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.review-neg-btn-secondary:hover {
    background: rgba(88, 94, 146, 0.06);
}

.review-neg-btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.review-neg-btn-text {
    margin-top: 4px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #8888a0;
    font-size: 0.92rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.15s;
}

.review-neg-btn-text:hover {
    color: #585e92;
}

@media (min-width: 480px) {
    .product-review-neg-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .review-neg-btn-primary,
    .review-neg-btn-secondary {
        flex: 1 1 calc(50% - 6px);
        min-width: 160px;
    }

    .review-neg-btn-text {
        flex: 1 0 100%;
    }
}

.review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.review-photo-link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border, #e8e4e0);
    line-height: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.review-photo-link:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.review-photo-thumb {
    display: block;
    width: 140px;
    height: 140px;
    object-fit: cover;
}

.product-review-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 8px 0;
    font-size: 0.9rem;
}

.reviews-empty {
    margin-top: 1rem;
    color: var(--text-light, #666);
}

#reviewsTab .reviews-list {
    margin-top: 1.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border, #eee);
}
