.reviews-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Helvetica Neue', sans-serif;
    background-color: #fff;
    color: #333;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.stars {
    font-size: 20px;
    color: #fc40c7a1;
}

.count {
    font-size: 16px;
}

.write-review-btn {
    text-decoration: none;
    background-color: #fc40c7a1;
    color: white;
    border: 1px solid #fc40c7a1;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.write-review-btn:hover {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.write-review-btn:active {
    transform: scale(1);
}

.sort-options {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    font-size: 14px;
    align-items: center;
}

.sort-options button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 6px;
}

.sort-options .active {
    font-weight: bold;
    color: #000;
    border-bottom: 1px solid #000;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-card {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: nowrap;
}

.avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.review-content {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.review-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 8px;
    align-items: center;
}

.review-author {
    font-weight: bold;
}

.review-date {
    font-size: 13px;
    color: #888;
}

.review-stars {
    color: #fc40c7a1;
    font-size: 15px;
}

.review-text {
    display: block;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.5;
}

/* ======== Форма відгуку ======== */

.review-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

.review-form input[type="text"],
.review-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.button-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.review-form-container {
    max-width: 500px;
    margin: 40px auto 80px;
    padding: 25px 30px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.review-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #fc40c7a1;
}

.review-form-label {
    color: #fc40c7a1;
}

.review-form input[type="text"],
.review-form textarea,
.review-form input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}

/* ✅ Hover + Focus для полей */
.review-form input[type="text"]:hover,
.review-form textarea:hover,
.review-form input[type="text"]:focus,
.review-form textarea:focus,
.review-form input[type="number"]:focus {
    border-color: #fc40c7a1;
    box-shadow: 0 2px 10px rgba(252, 64, 199, 0.2);
    outline: none;
}

.review-form textarea {
    min-height: 100px;
}

.submit-btn {
    background-color: #fc40c7a1;
    color: white;
    border: 1px solid #fc40c7a1;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.1s ease, box-shadow 0.1s ease;
    width: 100%;
    max-width: 250px;
}

.submit-btn:hover {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.submit-btn:active {
    transform: scale(1);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    border-color: #fc40c7a1;
    outline: none;
    box-shadow: 0 2px 10px rgba(252, 64, 199, 0.2);
}

.errorlist {
    color: #d93025;
    font-size: 0.9rem;
    margin-top: 4px;
    margin-bottom: 0;
}

/* ======== Зірковий рейтинг ======== */

.star-rating {
    direction: rtl;
    font-size: 2.5rem;
    unicode-bidi: bidi-override;
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 5px;
}

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

.rating-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fc40c7a1;
    margin-top: 20px;
    margin-bottom: 5px;
    text-align: center;
}

/* ======== Пагінація ======== */

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    text-align: center;
}

.current-page {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-buttons a {
    padding: 8px 12px;
    background-color: #fc40c7a1;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pagination-buttons a:hover {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ======== Мобільна адаптація ======== */

@media (max-width: 768px) {
    .pagination-buttons a {
        padding: 4px 8px;
        font-size: 15px;
        border-radius: 4px;
    }
}

@media (max-width: 600px) {
    .review-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        max-width: 100%;
        overflow: hidden;
    }

    .review-content {
        flex-grow: 1;
        flex-shrink: 1;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .review-text {
        display: block;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
        overflow: hidden;
        font-size: 15px;
        line-height: 1.5;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .review-author {
        font-size: 15px;
    }

    .review-stars {
        font-size: 14px;
    }

    .review-date {
        font-size: 13px;
    }

    .stars {
        font-size: 16px;
    }

    .count {
        font-size: 14px;
    }

    .write-review-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .pagination-buttons a {
        padding: 4px 8px;
        font-size: 17px;
        border-radius: 6px;
    }
}
