/* reviews.css — Customer reviews page styles.
   BoundaryFinder UK — boundaryfinder.co.uk
*/


/* ── Hero ────────────────────────────────── */

.reviews-hero {
    background: url('/static/images/reviews-hero.webp') center center / cover no-repeat;
    color: #fff;
    padding: 5rem 0 4rem;
    text-align: center;
    min-height: 320px;
    display: flex;
    align-items: center;
}
.reviews-hero .container {
    width: 100%;
}

.reviews-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.reviews-hero__lead {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}


/* ── Content ─────────────────────────────── */

.reviews-content {
    padding: var(--spacing-xl, 2rem) 0 var(--spacing-2xl, 3rem);
}


/* ── Rating summary ──────────────────────── */

.reviews-summary {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--border-radius-lg, 12px);
    padding: 1.5rem 2rem;
    margin-bottom: var(--spacing-lg, 1.5rem);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
}

.reviews-summary__rating {
    text-align: center;
    flex-shrink: 0;
    min-width: 140px;
}

.reviews-summary__score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-text, #1a1a2e);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.reviews-summary__stars {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.reviews-summary__stars .star {
    color: #d0d0d0;
}

.reviews-summary__stars .star.filled {
    color: var(--color-accent, #e8a838);
}

.reviews-summary__stars .star.half {
    background: linear-gradient(90deg, var(--color-accent, #e8a838) 50%, #d0d0d0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reviews-summary__count {
    font-size: 0.85rem;
    color: var(--color-text-light, #666);
}

.reviews-summary__breakdown {
    flex: 1;
}

.reviews-summary__breakdown h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light, #666);
    margin-bottom: 0.6rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.bar-label {
    font-size: 0.8rem;
    color: var(--color-text-light, #666);
    min-width: 48px;
    text-align: right;
}

.bar-track {
    flex: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--color-accent, #e8a838);
    border-radius: 5px;
    transition: width 0.6s ease;
}

.bar-count {
    font-size: 0.8rem;
    color: var(--color-text-light, #666);
    min-width: 20px;
    text-align: right;
}


/* ── Info box ────────────────────────────── */

.reviews-info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: var(--border-radius, 8px);
    padding: 1rem 1.2rem;
    margin-bottom: var(--spacing-lg, 1.5rem);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1b5e20;
}

.reviews-info-box svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #2e7d32;
}


/* ── Reviews list ────────────────────────── */

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* ── Review card ─────────────────────────── */

.review-card {
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--border-radius-lg, 12px);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
    transition: box-shadow 0.2s;
}

.review-card:hover {
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.1));
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-primary, #1a5632);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.reviewer-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text, #1a1a2e);
}

.reviewer-location {
    font-size: 0.8rem;
    color: var(--color-text-light, #666);
    margin-top: 1px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    white-space: nowrap;
}

.verified-badge svg {
    flex-shrink: 0;
}

.review-meta {
    text-align: right;
    flex-shrink: 0;
}

.review-stars {
    font-size: 1rem;
    margin-bottom: 2px;
}

.review-stars .star {
    color: #d0d0d0;
}

.review-stars .star.filled {
    color: var(--color-accent, #e8a838);
}

.review-stars .star.empty {
    color: #d0d0d0;
}

.review-date {
    font-size: 0.75rem;
    color: var(--color-text-light, #666);
}

.review-body {
    margin-top: 0.3rem;
}

.review-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--color-text, #1a1a2e);
}

.review-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text, #333);
    margin-bottom: 0.6rem;
}

.product-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-primary, #1a5632);
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
}


/* ── CTA section ─────────────────────────── */

.reviews-cta {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--border-radius-lg, 12px);
    padding: 2.5rem 2rem;
    margin-top: var(--spacing-xl, 2rem);
}

.reviews-cta h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-text, #1a1a2e);
}

.reviews-cta p {
    font-size: 1rem;
    color: var(--color-text-light, #666);
    margin-bottom: 1.25rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.reviews-cta__btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: var(--color-accent, #e8a838);
    color: #fff;
    border-radius: var(--border-radius, 8px);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background 0.2s;
}

.reviews-cta__btn:hover {
    background: var(--color-accent-dark, #d4922c);
    color: #fff;
}


/* ── Responsive ──────────────────────────── */

@media (max-width: 700px) {
    .reviews-summary {
        flex-direction: column;
        gap: 1.2rem;
        padding: 1.2rem;
    }

    .reviews-summary__rating {
        min-width: unset;
    }

    .review-header {
        flex-direction: column;
        gap: 0.4rem;
    }

    .review-meta {
        text-align: left;
    }

    .reviews-hero h1 {
        font-size: 1.5rem;
    }

    .review-card {
        padding: 1rem;
    }
}

/* ── Admin response on review cards ── */
.review-response {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: #f0fdf4;
    border-left: 3px solid #1a5632;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
}
.review-response .response-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    color: #1a5632;
    font-size: 0.85rem;
}
.review-response .response-date {
    color: #888;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}
.review-response .response-text {
    margin: 0;
    color: #333;
    line-height: 1.5;
}
