:root {
    --wcre-text: #242424;
    --wcre-muted: #6c655f;
    --wcre-border: rgba(169, 152, 132, 0.35);
    --wcre-border-strong: rgba(169, 152, 132, 0.55);
    --wcre-soft: rgba(169, 152, 132, 0.09);
    --wcre-soft-strong: rgba(169, 152, 132, 0.14);
    --wcre-bg: #ffffff;
    --wcre-accent: #242424;
    --wcre-star: #ffa534;
    --wcre-success: #5f7d4d;
}

.wcre-reviews-container {
    --wcre-text: #242424;
    --wcre-muted: #6c655f;
    --wcre-border: rgba(169, 152, 132, 0.35);
    --wcre-border-strong: rgba(169, 152, 132, 0.55);
    --wcre-soft: rgba(169, 152, 132, 0.09);
    --wcre-soft-strong: rgba(169, 152, 132, 0.14);
    --wcre-bg: #ffffff;
    --wcre-accent: #242424;
    --wcre-star: #d4a017;
    --wcre-success: #5f7d4d;
    max-width: 100%;
    padding: 8px 0 0;
    color: var(--wcre-text);
    background: transparent;
    font-family: inherit;
}

.wcre-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wcre-muted);
    font-weight: 700;
}

.wcre-reviews-title {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    text-align: left;
}

.wcre-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 26px;
    margin-bottom: 28px;
    align-items: start;
}

.wcre-left-column,
.wcre-right-column {
    min-width: 0;
}

.wcre-left-column {
    display: grid;
    gap: 18px;
}

.wcre-rating-summary,
.wcre-rating-filters,
.wcre-customer-photos-section,
.wcre-cta-section,
.wcre-no-reviews,
.wcre-no-photos {
    background: var(--wcre-bg);
    border: 1px solid var(--wcre-border);
    border-radius: 12px;
}

.wcre-rating-summary {
    padding: 22px;
}

.wcre-average-rating {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wcre-rating-number {
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
}

.wcre-rating-stars,
.wcre-star-rating,
.wcre-review-rating {
    color: var(--wcre-star);
}

.wcre-rating-stars {
    font-size: 20px;
    letter-spacing: 2px;
}

.wcre-rating-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--wcre-muted);
}

.wcre-cta-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(180deg, var(--wcre-soft), rgba(169, 152, 132, 0.04));
}

.wcre-cta-text {
    display: grid;
    gap: 4px;
}

.wcre-cta-text strong {
    font-size: 16px;
    font-weight: 700;
}

.wcre-cta-text span {
    color: var(--wcre-muted);
    font-size: 13px;
    line-height: 1.5;
}

.wcre-add-review-btn,
.wcre-submit-review,
.wcre-page-btn,
.wcre-clear-filters,
.wcre-show-more-photos {
    appearance: none;
    border-radius: 999px;
    transition: all 0.2s ease;
    font: inherit;
}

.wcre-add-review-btn,
.wcre-submit-review {
    background: var(--wcre-accent);
    color: #fff;
    border: 1px solid var(--wcre-accent);
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

.wcre-add-review-btn:hover,
.wcre-submit-review:hover,
.wcre-page-btn:hover,
.wcre-page-btn.active {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(36, 36, 36, 0.12);
}

.wcre-rating-filters {
    padding: 20px;
}

.wcre-rating-filters-header h3 {
    margin: 0;
    font-size: 18px;
}

.wcre-rating-filters-header p {
    margin: 6px 0 16px;
    color: var(--wcre-muted);
    font-size: 13px;
}

.wcre-star-filters {
    display: grid;
    gap: 10px;
}

.wcre-star-filter-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--wcre-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}

.wcre-star-filter-item:hover,
.wcre-star-filter-item.active {
    background: var(--wcre-soft-strong);
    border-color: var(--wcre-border-strong);
}

.wcre-star-count,
.wcre-rating-percentage {
    font-size: 13px;
    font-weight: 600;
}

.wcre-bar-container {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: rgba(36, 36, 36, 0.08);
    border-radius: 999px;
}

.wcre-rating-bar {
    display: block;
    height: 100%;
    min-width: 2px;
    background: var(--wcre-success);
    border-radius: 999px;
}

.wcre-rating-bar[style*="width: 0%"] {
    min-width: 0;
    background: transparent;
}

.wcre-rating-count {
    display: inline-block;
    min-width: 22px;
    text-align: right;
    color: var(--wcre-muted);
    margin-left: 4px;
    font-weight: 500;
}

.wcre-filter-actions {
    margin-top: 14px;
    text-align: right;
}

.wcre-clear-filters,
.wcre-show-more-photos,
.wcre-page-btn {
    background: #fff;
    color: var(--wcre-text);
    border: 1px solid var(--wcre-border-strong);
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.wcre-clear-filters:hover,
.wcre-show-more-photos:hover {
    background: var(--wcre-soft);
}

.wcre-clear-icon {
    font-size: 16px;
    margin-right: 6px;
    line-height: 1;
}

.wcre-reviews-header {
    margin-bottom: 18px;
}

.wcre-reviews-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wcre-border);
}

.wcre-star-rating {
    font-size: 16px;
    letter-spacing: 1px;
}

.wcre-customer-photos-section {
    padding: 16px;
    margin-bottom: 22px;
}

.wcre-customer-photos-section h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    font-size: 16px;
}

.wcre-photos-count {
    font-size: 12px;
    color: var(--wcre-muted);
    background: var(--wcre-soft);
    border: 1px solid var(--wcre-border);
    border-radius: 999px;
    padding: 5px 10px;
}

.wcre-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 10px;
    max-height: 180px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.wcre-gallery.expanded {
    max-height: 900px;
}

.wcre-review-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.wcre-gallery-item {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--wcre-border);
    background: #fff;
}

.wcre-gallery-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(36, 36, 36, 0.08);
}

.wcre-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcre-show-more-container {
    margin-top: 14px;
    text-align: center;
}

.wcre-show-more-photos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wcre-reviews-list {
    display: grid;
    gap: 14px;
}

.wcre-review {
    background: #fff;
    border: 1px solid var(--wcre-border);
    border-radius: 14px;
    padding: 18px;
}

.wcre-review:hover {
    border-color: var(--wcre-border-strong);
    box-shadow: 0 10px 24px rgba(36, 36, 36, 0.05);
}

.wcre-review-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.wcre-reviewer-info {
    display: grid;
    gap: 4px;
}

.wcre-reviewer-name {
    font-size: 15px;
    font-weight: 700;
}

.wcre-review-date {
    font-size: 12px;
    color: var(--wcre-muted);
}

.wcre-review-rating {
    font-size: 15px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.wcre-review-content {
    font-size: 14px;
    line-height: 1.7;
    color: #3a3a3a;
}

.wcre-no-reviews,
.wcre-no-photos {
    padding: 22px;
    text-align: center;
    color: var(--wcre-muted);
}

.wcre-no-reviews strong {
    display: block;
    margin-bottom: 4px;
    color: var(--wcre-text);
    font-size: 16px;
}

.wcre-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
}

.wcre-page-btn.active,
.wcre-page-btn:hover {
    background: var(--wcre-accent);
    color: #fff;
    border-color: var(--wcre-accent);
}

.wcre-star-icon.wcre-star-empty {
    color: #d8d8d8;
}

.wcre-star-icon.wcre-star-half {
    color: var(--wcre-star);
    opacity: 0.65;
}

.wcre-modal {
    position: fixed;
    inset: 0;
    display: none;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    overflow-y: auto;
}

.wcre-modal-content {
    max-width: 640px;
    margin: 40px auto;
    padding: 26px;
    background: #fff;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.wcre-modal-content h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.wcre-close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--wcre-soft);
    cursor: pointer;
    font-size: 24px;
}

.wcre-form-group {
    margin-bottom: 16px;
}

.wcre-form-group label,
.wcre-form-group > span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.wcre-form-group input[type="text"], .wcre-form-group input[type="email"],
.wcre-form-group textarea {
    width: 100%;
    border: 1px solid var(--wcre-border-strong);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--wcre-text);
    background: #fff;
    box-sizing: border-box;
}

.wcre-form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.wcre-star-rating-input {
    display: inline-flex;
    gap: 6px;
    font-size: 28px;
    color: #d8d8d8;
    cursor: pointer;
}

.wcre-star-rating-input span {
    color: #d8d8d8;
    transition: color 0.18s ease, transform 0.18s ease;
    line-height: 1;
}

.wcre-star-rating-input span.active,
.wcre-star-rating-input span.selected,
.wcre-star-rating-input span.hover {
    color: var(--wcre-star);
}

.wcre-star-rating-input span:hover {
    transform: translateY(-1px);
}

.wcre-photo-upload-area {
    border: 1px dashed var(--wcre-border-strong);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    background: var(--wcre-soft);
}

.wcre-photo-upload-area p {
    margin: 0 0 6px;
    color: var(--wcre-muted);
    font-size: 13px;
}

#wcre-photos {
    margin-top: 10px;
}

@media (max-width: 1265px) {
    .wcre-grid-layout {
        grid-template-columns: 1fr;
    }

    .wcre-rating-summary,
    .wcre-rating-filters,
    .wcre-customer-photos-section,
    .wcre-cta-section,
    .wcre-review,
    .wcre-no-reviews,
    .wcre-no-photos {
        border-radius: 10px;
    }

    .wcre-cta-section,
    .wcre-review-header,
    .wcre-customer-photos-section h4 {
        flex-direction: column;
        align-items: flex-start;
    }

    .wcre-star-filter-item {
        grid-template-columns: 60px 1fr auto;
    }

    .wcre-modal-content {
        margin: 20px auto;
        padding: 20px;
    }
}

/* Show / Hide Review Filter */
.wcre-rating-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    padding: 8px 0;
}

.wcre-rating-filters-toggle {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777;
    flex: 0 0 auto;
}

.wcre-rating-filters-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.wcre-rating-filters-header[aria-expanded="true"] .wcre-rating-filters-toggle::before {
    transform: rotate(-135deg);
}

@media (min-width: 1265px) {
    .wcre-rating-filters-header {
        cursor: default;
    }

    .wcre-rating-filters-toggle {
        display: none;
    }
}
/* Native WooCommerce product review images */
.woocommerce-Reviews .wcre-native-review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.woocommerce-Reviews .wcre-native-review-images__item {
    display: inline-flex;
    width: 72px;
    height: 72px;
    border: 1px solid var(--wcre-border, rgba(169, 152, 132, 0.35));
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.woocommerce-Reviews .wcre-native-review-images__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
