/* ==========================================================================
   Simple Product Reviews – Modern Design
   ========================================================================== */

/* ---- Page Header ---- */
.spr-page-header {
    text-align: center;
    padding: 48px 0 32px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 32px;
}

.spr-page-title {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.spr-page-subtitle {
    font-size: 15px;
    color: #777;
    margin: 0 0 24px;
    font-weight: 400;
}

/* ---- Stats Summary ---- */
.spr-stats {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 16px 28px;
}

.spr-stats__avg {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.spr-stats__number {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    line-height: 1;
}

.spr-stats__of {
    font-size: 16px;
    color: #aaa;
    font-weight: 500;
}

.spr-stats__detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spr-stats__stars .spr-stars {
    display: flex;
    gap: 1px;
}

.spr-stats__stars .spr-star {
    font-size: 18px;
    color: #f5a623;
}

.spr-stats__stars .spr-star-empty {
    color: #ddd;
}

.spr-stats__count {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

/* ---- Success Notice ---- */
.spr-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.spr-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.spr-notice--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.spr-notice--success svg {
    color: #43a047;
}

/* ---- Reviews List ---- */
.spr-reviews-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

/* ---- Review Card ---- */
.spr-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 20px 24px;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.spr-card:hover {
    border-color: #ddd;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

/* Card header */
.spr-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.spr-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5a623 0%, #e67e00 100%);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spr-card__meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.spr-card__author {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.spr-card__date {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
}

.spr-card__rating {
    flex-shrink: 0;
}

.spr-card__rating .spr-stars {
    display: flex;
    gap: 1px;
}

.spr-card__rating .spr-star {
    font-size: 16px;
    color: #f5a623;
}

.spr-card__rating .spr-star-empty {
    color: #ddd;
}

/* Product link */
.spr-card__product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    margin-bottom: 10px;
    transition: background 150ms, border-color 150ms;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.spr-card__product:hover {
    background: #f0f0f0;
    border-color: #ddd;
    color: #333;
}

.spr-card__product-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.spr-card__product span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Review text */
.spr-card__text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* Review image */
.spr-card__image {
    margin-top: 12px;
}

.spr-card__image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #eee;
    display: block;
    cursor: pointer;
    transition: opacity 150ms;
}

.spr-card__image img:active {
    opacity: 0.7;
}

/* ---- Lightbox ---- */
.spr-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.spr-lightbox.open {
    display: flex;
}

.spr-lightbox.visible {
    opacity: 1;
}

.spr-lightbox__img-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spr-lightbox__img-wrap img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-select: none;
}

.spr-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 150ms;
}

.spr-lightbox__close:hover,
.spr-lightbox__close:active {
    background: rgba(255,255,255,0.3);
}

.spr-lightbox__close svg {
    width: 20px;
    height: 20px;
}

.spr-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 150ms;
}

.spr-lightbox__nav:hover,
.spr-lightbox__nav:active {
    background: rgba(255,255,255,0.3);
}

.spr-lightbox__nav svg {
    width: 20px;
    height: 20px;
}

.spr-lightbox__prev {
    left: 12px;
}

.spr-lightbox__next {
    right: 12px;
}

.spr-lightbox__counter {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-top: 14px;
    font-weight: 500;
}

/* ---- Pagination ---- */
.spr-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.spr-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 200ms ease;
}

.spr-pagination .page-numbers:hover {
    border-color: #111;
    color: #111;
    background: #f5f5f5;
}

.spr-pagination .page-numbers.current {
    background: #111;
    border-color: #111;
    color: #fff;
}

.spr-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0 4px;
}

.spr-pagination .prev,
.spr-pagination .next {
    font-size: 13px;
}

/* ---- Empty state ---- */
.spr-empty {
    text-align: center;
    padding: 48px 20px;
    color: #999;
}

.spr-empty svg {
    color: #ddd;
    margin-bottom: 12px;
}

.spr-empty p {
    font-size: 15px;
    margin: 0;
}

/* ---- Form Section ---- */
.spr-form-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.spr-form-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
}

.spr-form-product {
    font-size: 14px;
    color: #777;
    margin: 0 0 24px;
}

.spr-form-product strong {
    color: #333;
}

/* Form */
.spr-form {
    max-width: 560px;
}

.spr-form__group {
    margin-bottom: 20px;
}

.spr-form__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.spr-form__optional {
    font-weight: 400;
    color: #aaa;
}

.spr-form__input,
.spr-form__textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: #222;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 200ms, background 200ms;
    box-sizing: border-box;
}

.spr-form__input:focus,
.spr-form__textarea:focus {
    outline: none;
    border-color: #f5a623;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245,166,35,0.1);
}

.spr-form__textarea {
    resize: vertical;
    min-height: 100px;
}

/* Star selector */
.spr-star-select {
    display: flex;
    gap: 4px;
}

.spr-star-select__star {
    background: none;
    border: none;
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    padding: 0 2px;
    transition: color 150ms, transform 150ms;
    line-height: 1;
}

.spr-star-select__star:hover {
    transform: scale(1.15);
}

.spr-star-select__star.active {
    color: #f5a623;
}

.spr-star-select__star.hover {
    color: #ffc107;
}

/* File upload */
.spr-form__file-wrap {
    position: relative;
}

.spr-form__file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.spr-form__file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 10px;
    color: #888;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 200ms, color 200ms;
    cursor: pointer;
}

.spr-form__file-wrap:hover .spr-form__file-label,
.spr-form__file-label.has-file {
    border-color: #f5a623;
    color: #f5a623;
}

/* Submit button */
.spr-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: #111;
    background: #f5a623;
    border: 2px solid #f5a623;
    border-radius: 10px;
    cursor: pointer;
    transition: all 200ms ease;
}

.spr-form__submit:hover {
    background: #ffc107;
    border-color: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,166,35,0.3);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .spr-page-header {
        padding: 24px 0 20px;
    }

    .spr-page-title {
        font-size: 22px;
    }

    .spr-stats {
        padding: 12px 18px;
        gap: 12px;
    }

    .spr-stats__number {
        font-size: 28px;
    }

    .spr-reviews-list {
        gap: 12px;
    }

    .spr-card {
        padding: 14px;
        border-radius: 12px;
    }

    .spr-card__header {
        gap: 10px;
    }

    .spr-card__avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .spr-card__author {
        font-size: 14px;
    }

    .spr-card__rating .spr-star {
        font-size: 14px;
    }

    .spr-card__product {
        font-size: 12px;
        padding: 5px 10px;
    }

    .spr-card__text {
        font-size: 14px;
        word-break: break-word;
    }

    .spr-card__image img {
        width: 110px;
        height: 110px;
    }

    .spr-pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0 8px;
    }

    .spr-form {
        max-width: 100%;
    }

    .spr-form__submit {
        width: 100%;
    }

    .spr-star-select__star {
        font-size: 32px;
    }
}
