.frs-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    direction: rtl;
}

.frs-reviews-grid.frs-columns-1 { grid-template-columns: repeat(1, 1fr); }
.frs-reviews-grid.frs-columns-2 { grid-template-columns: repeat(2, 1fr); }
.frs-reviews-grid.frs-columns-3 { grid-template-columns: repeat(3, 1fr); }
.frs-reviews-grid.frs-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .frs-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .frs-reviews-grid {
        grid-template-columns: 1fr;
    }
}

.frs-review-card {
    border: 1px solid #e5d9c3;
    border-radius: 10px;
    padding: 18px 20px;
    background: #fff;
    direction: rtl;
    text-align: right;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.frs-review-card.frs-visible {
    opacity: 1;
    transform: translateY(0);
}

.frs-review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.frs-review-card__stars {
    color: #f5a623;
    font-size: 15px;
    letter-spacing: 1px;
}

.frs-review-card__author {
    font-weight: bold;
    font-size: 15px;
    color: #222;
}

.frs-review-card__date {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.frs-review-card__product {
    font-size: 12px;
    color: #b98b3e;
    margin-top: 4px;
}

.frs-review-card__text {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.9;
    color: #444;
}

.frs-testimonial-form {
    direction: rtl;
    text-align: right;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ece3d2;
    border-radius: 16px;
    padding: 26px 24px 22px;
    box-shadow: 0 6px 24px rgba(120, 95, 45, 0.07);
}

.frs-form-greeting {
    margin: 0 0 6px;
    font-size: 15.5px;
    line-height: 1.9;
    color: #4a3a22;
}

.frs-form-greeting strong {
    color: #b98b3e;
}

.frs-form-note {
    margin: 0 0 20px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #faf6ee;
    font-size: 12.5px;
    line-height: 1.9;
    color: #8a7a5e;
}

.frs-form-row {
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frs-form-row label {
    font-weight: bold;
    font-size: 14px;
    color: #4a3a22;
}

.frs-form-row input[type="text"],
.frs-form-row textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e3d9c6;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.9;
    color: #333;
    background: #fdfbf7;
    direction: rtl;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.frs-form-row input[type="text"]:focus,
.frs-form-row textarea:focus {
    outline: none;
    background: #fff;
    border-color: #b98b3e;
    box-shadow: 0 0 0 3px rgba(185, 139, 62, 0.14);
}

.frs-form-row textarea {
    resize: vertical;
    min-height: 110px;
}

.frs-star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
    font-size: 30px;
    line-height: 1;
}

.frs-star-rating input {
    display: none;
}

.frs-star-rating label {
    color: #e2dbcc;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.frs-star-rating label:hover {
    transform: scale(1.12);
}

.frs-star-rating input:checked ~ label,
.frs-star-rating label:hover,
.frs-star-rating label:hover ~ label {
    color: #f5a623;
}

.frs-form-submit {
    width: 100%;
    background: #b98b3e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    font-size: 15.5px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.frs-form-submit:hover:not(:disabled) {
    background: #a37a34;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(185, 139, 62, 0.28);
}

.frs-form-submit:disabled {
    opacity: 0.65;
    cursor: default;
}

.frs-testimonial-form .frs-form-row:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .frs-testimonial-form {
        padding: 20px 16px 18px;
        border-radius: 14px;
    }

    .frs-star-rating {
        font-size: 27px;
    }
}

.frs-form-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.9;
    margin: 0 0 16px;
}

.frs-form-success {
    background: #e6f4ea;
    color: #1e7e34;
}

.frs-form-error {
    background: #fdecea;
    color: #b71c1c;
}

.frs-form-note {
    font-size: 13px;
    color: #777;
    margin: -8px 0 16px;
}

/* --- Horizontal scroller: [purchase_testimonials layout="scroll"] --- */
.frs-reviews-scroller {
    position: relative;
    direction: rtl;
    padding: 0 46px;
}

.frs-reviews-track {
    display: flex;
    cursor: grab;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 6px 2px 16px;
    scrollbar-width: thin;
    scrollbar-color: #e5d9c3 transparent;
}

.frs-reviews-track::-webkit-scrollbar {
    height: 6px;
}

.frs-reviews-track::-webkit-scrollbar-thumb {
    background: #e5d9c3;
    border-radius: 3px;
}

.frs-reviews-track::-webkit-scrollbar-track {
    background: transparent;
}

.frs-reviews-track.frs-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.frs-reviews-track.frs-dragging .frs-review-card {
    pointer-events: none;
}

.frs-reviews-track .frs-review-card {
    flex: 0 0 320px;
    max-width: 320px;
    scroll-snap-align: start;
}

/* Keep every card the same, compact height even when one review is very long. */
.frs-reviews-track .frs-review-card__text {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.frs-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e5d9c3;
    background: #fff;
    color: #b98b3e;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.frs-scroll-btn:hover {
    background: #b98b3e;
    color: #fff;
}

.frs-scroll-prev { right: 0; }
.frs-scroll-next { left: 0; }

@media (max-width: 900px) {
    .frs-scroll-btn { display: none; }
    .frs-reviews-scroller { padding: 0; }
    .frs-reviews-track.frs-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.frs-reviews-track.frs-dragging .frs-review-card {
    pointer-events: none;
}

.frs-reviews-track .frs-review-card {
        flex-basis: 82%;
        max-width: 82%;
    }
}

/* --- Thank-you dialog after a review is submitted --- */
body.frs-modal-open {
    overflow: hidden;
}

.frs-thanks-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(35, 25, 10, 0.55);
    direction: rtl;
    animation: frs-fade-in 0.25s ease;
}

.frs-thanks-overlay:not(.frs-thanks-visible) {
    display: none;
}

.frs-thanks-box {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    padding: 28px 26px 24px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    animation: frs-pop-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.frs-thanks-emoji {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 10px;
}

.frs-thanks-title {
    margin: 0 0 10px;
    font-size: 19px;
    color: #4a3a22;
}

.frs-thanks-text {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 2;
    color: #666;
}

.frs-thanks-close {
    background: #b98b3e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
}

.frs-thanks-close:hover {
    background: #a37a34;
}

@keyframes frs-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes frs-pop-in {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
