:root {
    --page-bg: #fffaf5;
    --surface: #ffffff;
    --card-bg: #f3f1ef;
    --text: #161616;
    --muted: #757575;
    --brand: #ff6a00;
    --star: #ffb400;
    --shadow: 0 24px 60px rgba(53, 34, 17, 0.08);
    --radius-xl: 30px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background: transparent;
}

button {
    font: inherit;
}

/* ── Shell ── */
.page-shell {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    padding: 56px 0 72px;
}

.reviews-widget {
    background: transparent;
    padding: 28px;
}

/* ── Header ── */
.widget-header {
    text-align: center;
    margin-bottom: 34px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
}

.widget-header h1 {
    margin: 0;
    color: var(--brand);
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 0.98;
    font-weight: 500;
}

/* ── Layout ── */
.widget-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 22px;
    align-items: center;
}

/* ── Score panel ── */
.score-panel {
    background: linear-gradient(180deg, #fff 0%, #fff5ea 100%);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    min-height: 348px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.08);
}

.score-title {
    margin: 0 0 12px;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.star-row,
.review-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star {
    font-size: 2.4rem;
    line-height: 1;
    color: #d9d9d9;
}

.star.filled,
.mini-star.filled {
    color: var(--star);
}

.score-value {
    margin: 10px 0 18px;
    font-size: 1.25rem;
    color: #2f2f2f;
}

.google-wordmark {
    margin: 0;
    font-size: 3.1rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.06em;
    background: linear-gradient(90deg, #4285f4 0 26%, #db4437 26% 50%, #f4b400 50% 74%, #0f9d58 74% 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Source status ── */
.source-status {
    margin-top: 18px;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    margin: 0 0 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.source-pill-google_places,
.source-pill-places_api,
.source-pill-lobstr,
.source-pill-business_profile {
    background: #e7f6ed;
    color: #177245;
}

.source-pill-fallback {
    background: #fff0e2;
    color: #b85a00;
}

.source-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.source-rule {
    margin: 10px 0 0;
    color: var(--brand);
    font-size: 0.92rem;
    font-weight: 700;
}

/* ── Carousel ── */
.carousel-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.carousel-viewport {
    overflow: hidden;
    padding: 12px 0;
    width: 100%;
}

.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(290px, 1fr);
    gap: 18px;
    transition: transform 320ms ease;
    will-change: transform;
}

/* ── Review card ── */
.review-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 26px 28px 24px;
    min-height: 348px;
    display: flex;
    flex-direction: column;
}

.review-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.review-author-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #ff7e1d, #b23900);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.85rem;
    overflow: hidden;
}

.avatar.has-image { background: #ddd; }

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.review-meta {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.google-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.35rem;
    background: #fff;
    color: #4285f4;
    box-shadow: inset 0 0 0 1px rgba(66, 133, 244, 0.15);
}

.review-rating {
    margin-bottom: 16px;
}

.mini-star {
    font-size: 1.5rem;
    color: #dadada;
    line-height: 1;
}

.verified-badge {
    margin-left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 0.78rem;
    color: #fff;
    background: #3d7cff;
}

.review-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.48;
    color: #1e1e1e;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: auto;
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8c8c8c;
    cursor: pointer;
    font-size: 1rem;
}

/* ── Carousel controls ── */
.carousel-control {
    border: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(57, 39, 23, 0.12);
    color: #535353;
    cursor: pointer;
    flex: 0 0 auto;
}

.carousel-control span {
    display: block;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-1px);
}

.carousel-control:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Bootstrap Modal overrides (widget) ── */
.review-dialog-card {
    border-radius: 28px !important;
    border: 0 !important;
    box-shadow: var(--shadow);
    font-family: 'Outfit', sans-serif;
}

.review-dialog-head {
    padding: 20px 24px 8px !important;
    border-bottom: 0 !important;
}

.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* ── Responsive ── */
@media (max-width: 1120px) {
    .widget-layout {
        grid-template-columns: 1fr;
    }

    .score-panel {
        min-height: auto;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 24px, 1400px);
        padding: 24px 0 40px;
    }

    .reviews-widget {
        padding: 18px;
        border-radius: 28px;
    }

    .widget-header {
        margin-bottom: 22px;
    }

    .carousel-shell {
        gap: 8px;
    }

    .carousel-track {
        grid-auto-columns: calc(100vw - 84px);
    }

    .review-card {
        min-height: 320px;
        padding: 22px 20px;
    }

    .carousel-control {
        width: 44px;
        height: 44px;
    }
}
