/* ═══════════════════════════════════════════════════════════
   QOL Reviews — Frontend Styles
   Design System: Inter font, Teal/Green palette
   Matching: quantumorbitlabs.com HTML components
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
    --qol-teal: #0f766e;
    --qol-teal-mid: #14b8a6;
    --qol-teal-bg: #f0fdfa;
    --qol-teal-line: #99f6e4;
    --qol-ink: #0d1117;
    --qol-ink-soft: #374151;
    --qol-muted: #6b7280;
    --qol-border: #e5e7eb;
    --qol-bg: #ffffff;
    --qol-surface: #f9fafb;
    --qol-star: #f59e0b;
    --qol-star-empty: #d1d5db;
    --qol-radius-xl: 24px;
    --qol-radius-lg: 18px;
    --qol-radius-md: 12px;
    --qol-radius-sm: 8px;
    --qol-shadow: 0 4px 24px rgba(0,0,0,.08);
    --qol-shadow-lg: 0 20px 60px rgba(0,0,0,.15);
}

/* ── Reset scoped to plugin ── */
.qol-reviews-section,
.qol-reviews-section *,
.qol-reviews-section *::before,
.qol-reviews-section *::after,
.qol-review-popup,
.qol-review-popup *,
.qol-review-form-page,
.qol-review-form-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.qol-reviews-section,
.qol-review-popup,
.qol-review-form-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--qol-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════
   SECTION: Reviews Summary Header
═══════════════════════════════════════════ */
.qol-reviews-section {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 32px 0;
}

.qol-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    text-align: center;
    color: var(--qol-ink);
    letter-spacing: -.03em;
    margin-bottom: 40px;
}

/* ── Summary Row ── */
.qol-summary {
    display: flex;
    gap: 48px;
    padding: 32px;
    background: var(--qol-surface);
    border: 1px solid var(--qol-border);
    border-radius: var(--qol-radius-xl);
    margin-bottom: 32px;
}

/* Left: Rating overview */
.qol-summary__rating {
    flex: 0 0 280px;
}
.qol-summary__avg {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}
.qol-summary__avg-num {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--qol-ink);
    line-height: 1;
    letter-spacing: -.03em;
}
.qol-summary__avg-stars {
    display: flex;
    gap: 2px;
}
.qol-summary__avg-stars .qol-star-icon {
    width: 18px;
    height: 18px;
}
.qol-summary__count {
    font-size: .82rem;
    color: var(--qol-muted);
    font-weight: 500;
    margin-bottom: 20px;
}

/* Star bars */
.qol-star-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.qol-star-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 2px 0;
    transition: opacity .2s;
}
.qol-star-bar:hover {
    opacity: 1;
}
.qol-star-bar__label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
    min-width: 28px;
}
.qol-star-bar__label .qol-star-icon {
    width: 12px;
    height: 12px;
}
.qol-star-bar__track {
    flex: 1;
    height: 8px;
    background: var(--qol-border);
    border-radius: 100px;
    overflow: hidden;
}
.qol-star-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--qol-teal), var(--qol-teal-mid));
    border-radius: 100px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
}
.qol-star-bar__count {
    font-size: .72rem;
    color: var(--qol-muted);
    font-weight: 600;
    min-width: 32px;
    text-align: right;
}

/* Right: Image gallery */
.qol-summary__gallery {
    flex: 1;
    min-width: 0;
}
.qol-summary__gallery-label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
    margin-bottom: 14px;
}
.qol-summary__gallery-label strong {
    color: var(--qol-teal);
    font-weight: 800;
}
.qol-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.qol-gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--qol-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    position: relative;
}
.qol-gallery-thumb:hover {
    border-color: var(--qol-teal);
}
.qol-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.qol-gallery-thumb__label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 0;
    text-align: center;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
}
.qol-gallery-thumb__label--before { background: rgba(13,17,23,.8); }
.qol-gallery-thumb__label--after  { background: rgba(15,118,110,.85); }

/* ═══════════════════════════════════════════
   SECTION: Toolbar (filter + write + sort)
═══════════════════════════════════════════ */
.qol-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.qol-toolbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qol-toolbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Filter button */
.qol-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--qol-teal);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.qol-filter-btn:hover {
    background: #0d6b63;
}
.qol-filter-btn svg {
    width: 14px;
    height: 14px;
}

/* Write review button */
.qol-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--qol-teal);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}
.qol-write-btn:hover {
    background: #0d6b63;
    color: #fff;
}
.qol-write-btn svg {
    width: 14px;
    height: 14px;
}

/* Review count */
.qol-review-count {
    font-size: .88rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
}

/* Sort */
.qol-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.qol-sort-label {
    font-size: .82rem;
    font-weight: 500;
    color: var(--qol-muted);
}
.qol-sort-select {
    padding: 8px 32px 8px 14px;
    border: 1px solid var(--qol-border);
    border-radius: var(--qol-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    transition: border-color .2s;
}
.qol-sort-select:focus {
    outline: none;
    border-color: var(--qol-teal);
}

/* Filter dropdown */
.qol-filter-dropdown {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 16px;
}
.qol-filter-dropdown.is-open {
    display: flex;
}
.qol-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border: 1px solid var(--qol-border);
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
    background: #fff;
    cursor: pointer;
    transition: all .2s;
}
.qol-filter-chip:hover,
.qol-filter-chip.is-active {
    background: var(--qol-teal-bg);
    border-color: var(--qol-teal);
    color: var(--qol-teal);
}
.qol-filter-chip .qol-star-icon {
    width: 12px;
    height: 12px;
}

/* ═══════════════════════════════════════════
   SECTION: Review Cards
═══════════════════════════════════════════ */
.qol-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qol-review-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: var(--qol-bg);
    border: 1px solid var(--qol-border);
    border-radius: var(--qol-radius-lg);
    transition: box-shadow .3s, border-color .3s;
}


/* Left: user info */
.qol-review-card__user {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding-top: 4px;
}

.qol-review-card__name {
    font-size: .85rem;
    font-weight: 700;
    color: var(--qol-ink);
}
.qol-review-card__verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--qol-muted);
}
.qol-review-card__verified svg {
    width: 16px;
    height: 16px;
    color: #1da1f2;
}

/* Center: content */
.qol-review-card__body {
    flex: 1;
    min-width: 0;
}
.qol-review-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.qol-review-card__stars {
    display: flex;
    gap: 2px;
}
.qol-review-card__stars .qol-star-icon {
    width: 16px;
    height: 16px;
}
.qol-review-card__date {
    font-size: .78rem;
    color: var(--qol-muted);
    font-weight: 500;
}
.qol-review-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--qol-ink);
    margin-bottom: 8px;
    letter-spacing: -.01em;
}
.qol-review-card__text {
    font-size: .88rem;
    color: var(--qol-ink-soft);
    line-height: 1.7;
}

/* Right: before/after images */
.qol-review-card__images {
    flex: 0 0 200px;
    display: flex;
    gap: 8px;
}
.qol-review-card__img-wrap {
    flex: 1;
    position: relative;
    border-radius: var(--qol-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s;
}

.qol-review-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 3/4;
}
.qol-review-card__img-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 0;
    text-align: center;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}
.qol-review-card__img-label--before {
    background: rgba(13,17,23,.85);
}
.qol-review-card__img-label--after {
    background: rgba(15,118,110,.85);
}

/* ═══════════════════════════════════════════
   POPUP / LIGHTBOX
═══════════════════════════════════════════ */
.qol-review-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: qolFadeIn .3s ease;
}
.qol-review-popup.is-open {
    display: flex;
}

@keyframes qolFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.qol-popup-container {
    display: flex;
    background: var(--qol-bg);
    border-radius: var(--qol-radius-xl);
    overflow: hidden;
    max-width: 960px;
    width: 100%;
    max-height: 90vh;
    box-shadow: var(--qol-shadow-lg);
    position: relative;
    animation: qolSlideUp .35s cubic-bezier(.4,0,.2,1);
}

@keyframes qolSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* Close button */
.qol-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background .2s;
}
.qol-popup-close:hover {
    background: rgba(0,0,0,.85);
}

/* Left: image area */
.qol-popup__image-area {
    flex: 0 0 50%;
    background: #000;
    display: flex;
    flex-direction: column;
}
.qol-popup__main-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
}
.qol-popup__main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Thumbnail carousel */
.qol-popup__thumbs {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px;
    background: rgba(0,0,0,.9);
}
.qol-popup__thumb-nav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
.qol-popup__thumb-nav:hover {
    background: rgba(255,255,255,.3);
}
.qol-popup__thumb-track {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 8px;
    scrollbar-width: none;
}
.qol-popup__thumb-track::-webkit-scrollbar {
    display: none;
}
.qol-popup__thumb-item {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color .2s, opacity .2s;
    opacity: .6;
}
.qol-popup__thumb-item.is-active {
    border-color: var(--qol-teal-mid);
    opacity: 1;
}
.qol-popup__thumb-item:hover {
    opacity: 1;
}
.qol-popup__thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right: review info */
.qol-popup__info {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.qol-popup__user {
    display: flex;
    align-items: center;
    gap: 14px;
}
.qol-popup__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--qol-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.qol-popup__user-details {
    display: flex;
    flex-direction: column;
}
.qol-popup__user-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--qol-ink);
}
.qol-popup__user-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--qol-muted);
}
.qol-popup__user-verified svg {
    width: 16px;
    height: 16px;
    color: #1da1f2;
}
.qol-popup__date {
    font-size: .78rem;
    color: var(--qol-muted);
}
.qol-popup__stars {
    display: flex;
    gap: 2px;
}
.qol-popup__stars .qol-star-icon {
    width: 18px;
    height: 18px;
}
.qol-popup__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--qol-ink);
    letter-spacing: -.01em;
}
.qol-popup__text {
    font-size: .88rem;
    color: var(--qol-ink-soft);
    line-height: 1.75;
}

/* ═══════════════════════════════════════════
   STAR SVG HELPER
═══════════════════════════════════════════ */
.qol-star-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.qol-star-icon--filled {
    color: var(--qol-star);
}
.qol-star-icon--empty {
    color: var(--qol-star-empty);
}

/* ═══════════════════════════════════════════
   REVIEW FORM PAGE (full page, _blank)
═══════════════════════════════════════════ */
.qol-review-form-page {
    min-height: 100vh;
    background: var(--qol-surface);
    font-family: 'Inter', system-ui, sans-serif;
}

.qol-form-header {
    background: var(--qol-bg);
    border-bottom: 1px solid var(--qol-border);
    padding: 20px 0;
    text-align: center;
}
.qol-form-header img {
    height: 40px;
    width: auto;
}

.qol-form-container {
    max-width: 640px;
    margin: 40px auto;
    padding: 0 24px;
}

.qol-form-card {
    background: var(--qol-bg);
    border: 1px solid var(--qol-border);
    border-radius: var(--qol-radius-xl);
    padding: 40px;
    box-shadow: var(--qol-shadow);
}

.qol-form-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--qol-ink);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -.02em;
}

/* Star selector */
.qol-star-selector {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 32px;
}
.qol-star-selector__star {
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: transform .15s;
    color: var(--qol-star-empty);
}
.qol-star-selector__star:hover {
    transform: scale(1.15);
}
.qol-star-selector__star.is-selected {
    color: var(--qol-star);
}

/* Form group */
.qol-form-group {
    margin-bottom: 20px;
}
.qol-form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
    margin-bottom: 6px;
}
.qol-form-group input,
.qol-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--qol-border);
    border-radius: var(--qol-radius-md);
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    color: var(--qol-ink);
    background: var(--qol-bg);
    transition: border-color .2s, box-shadow .2s;
}
.qol-form-group input:focus,
.qol-form-group textarea:focus {
    outline: none;
    border-color: var(--qol-teal);
    box-shadow: 0 0 0 3px rgba(15,118,110,.1);
}
.qol-form-group input::placeholder,
.qol-form-group textarea::placeholder {
    color: var(--qol-muted);
}
.qol-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Image upload */
.qol-upload-row {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}
.qol-upload-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.qol-upload-box__label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 14px;
    border-radius: 100px;
    color: #fff;
}
.qol-upload-box__label--before {
    background: var(--qol-ink);
}
.qol-upload-box__label--after {
    background: var(--qol-teal);
}
.qol-upload-area {
    width: 100%;
    height: 160px;
    border: 2px dashed var(--qol-border);
    border-radius: var(--qol-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
    background: var(--qol-surface);
}
.qol-upload-area:hover {
    border-color: var(--qol-teal);
    background: var(--qol-teal-bg);
}
.qol-upload-area.has-preview {
    border-style: solid;
    border-color: var(--qol-teal);
}
.qol-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.qol-upload-area__icon {
    width: 32px;
    height: 32px;
    color: var(--qol-muted);
}
.qol-upload-area__text {
    font-size: .78rem;
    color: var(--qol-muted);
    font-weight: 500;
    text-align: center;
}
.qol-upload-area__text strong {
    color: var(--qol-teal);
}
.qol-upload-area__preview {
    position: absolute;
    inset: 0;
    display: none;
}
.qol-upload-area__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qol-upload-area.has-preview .qol-upload-area__preview {
    display: block;
}
.qol-upload-area.has-preview .qol-upload-area__icon,
.qol-upload-area.has-preview .qol-upload-area__text {
    display: none;
}

/* Submit button */
.qol-submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--qol-teal), var(--qol-teal-mid));
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s;
    letter-spacing: -.01em;
}
.qol-submit-btn:hover {
    opacity: .9;
}
.qol-submit-btn:active {
    transform: translateY(0);
}
.qol-submit-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success message */
.qol-form-success {
    display: none;
    text-align: center;
    padding: 48px 24px;
}
.qol-form-success.is-visible {
    display: block;
}
.qol-form-success__icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.qol-form-success__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--qol-ink);
    margin-bottom: 8px;
}
.qol-form-success__desc {
    font-size: .88rem;
    color: var(--qol-muted);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.qol-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--qol-border);
}
.qol-pagination__btn {
    padding: 8px 14px;
    border: 1px solid var(--qol-border);
    border-radius: var(--qol-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: var(--qol-ink-soft);
    background: #fff;
    cursor: pointer;
    transition: all .2s;
}
.qol-pagination__btn:hover {
    border-color: var(--qol-teal);
    color: var(--qol-teal);
}
.qol-pagination__btn.is-active {
    background: var(--qol-teal);
    color: #fff;
    border-color: var(--qol-teal);
}

/* ═══════════════════════════════════════════
   NO REVIEWS
═══════════════════════════════════════════ */
.qol-no-reviews {
    text-align: center;
    padding: 64px 24px;
    color: var(--qol-muted);
}
.qol-no-reviews__icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.qol-no-reviews__text {
    font-size: .95rem;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 960px) {
    .qol-reviews-section {
        padding: 32px 24px;
    }
    .qol-summary {
        flex-direction: column;
        gap: 28px;
        padding: 24px;
    }
    .qol-summary__rating {
        flex: none;
    }
    .qol-review-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    .qol-review-card__user {
        flex: none;
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }
    .qol-review-card__images {
        flex: none;
        width: 100%;
    }
    .qol-review-card__img-wrap img {
        aspect-ratio: 1;
    }
    .qol-popup-container {
        flex-direction: column;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    /* Image area: fill top, no max-height restriction */
    .qol-popup__image-area {
        flex: 0 0 auto;
        max-height: none;
    }
    .qol-popup__main-img {
        min-height: 200px;
        max-height: 40vh;
    }
    .qol-popup__main-img img {
        object-fit: cover;
    }
    /* Thumbnails row */
    .qol-popup__thumbs {
        padding: 10px 8px;
    }
    .qol-popup__thumb-item {
        width: 56px;
        height: 56px;
    }
    /* Info section: scrollable, fills remaining space */
    .qol-popup__info {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Close button */
    .qol-popup-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    /* Popup overlay: no padding on mobile */
    .qol-review-popup {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .qol-reviews-section {
        padding: 20px 16px;
    }
    .qol-section-title {
        font-size: 1.3rem;
        margin-bottom: 24px;
    }
    .qol-summary {
        padding: 16px;
        border-radius: var(--qol-radius-lg);
    }
    .qol-summary__avg-num {
        font-size: 2.2rem;
    }
    .qol-gallery-thumb {
        width: 56px;
        height: 56px;
    }
    .qol-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .qol-toolbar__left,
    .qol-toolbar__right {
        justify-content: space-between;
    }
    .qol-review-card {
        padding: 16px;
        border-radius: var(--qol-radius-md);
    }
    .qol-review-card__images {
        gap: 6px;
    }
    /* Mobile popup fine-tuning */
    .qol-popup__main-img {
        max-height: 35vh;
    }
    .qol-popup__thumb-item {
        width: 48px;
        height: 48px;
    }
    .qol-popup__thumb-nav {
        width: 28px;
        height: 28px;
        font-size: .85rem;
    }
    .qol-popup__info {
        padding: 16px;
        gap: 12px;
    }
    .qol-popup__avatar {
        width: 40px;
        height: 40px;
        font-size: .75rem;
    }
    .qol-popup__user-name {
        font-size: .85rem;
    }
    .qol-popup__stars .qol-star-icon {
        width: 16px;
        height: 16px;
    }
    .qol-popup__title {
        font-size: 1rem;
    }
    .qol-popup__text {
        font-size: .82rem;
        line-height: 1.65;
    }

    /* Form page mobile */
    .qol-form-container {
        padding: 0 16px;
        margin: 24px auto;
    }
    .qol-form-card {
        padding: 24px;
        border-radius: var(--qol-radius-lg);
    }
    .qol-upload-row {
        flex-direction: column;
    }
    .qol-upload-area {
        height: 140px;
    }
    .qol-star-selector__star {
        width: 32px;
        height: 32px;
    }
}
