.dreamcode-custom-reviews-wrapper {
    font-family: inherit;
    color: #333;
}

/* هدر فیلترها و مرتب‌سازی */
.dreamcode-reviews-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.dreamcode-reviews-categories, .dreamcode-reviews-sorting {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dreamcode-filter-label, .dreamcode-sort-label {
    font-size: 13px;
    font-weight: bold;
    color: #444;
}

.dreamcode-pills-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dreamcode-cat-pill {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 6px 18px;
    border-radius: 20px;
    cursor: pointer;
    color: #666!important;
    font-size: 13px;
    transition: all 0.3s ease;
}

.dreamcode-cat-pill.active, .dreamcode-cat-pill:hover {
    background: #4DA1FF;
    border-color: #4DA1FF;
    color: #fff!important;
}

/* دکمه رادیو سفارشی */
.dreamcode-custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 25px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    user-select: none;
}

.dreamcode-custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.dreamcode-checkmark {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 50%;
    transition: 0.2s;
}

.dreamcode-custom-radio input:checked ~ .dreamcode-checkmark {
    border-color: #4DA1FF;
}

.dreamcode-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4DA1FF;
}

.dreamcode-custom-radio input:checked ~ .dreamcode-checkmark:after {
    display: block;
}

/* ساختار گرید */
#dreamcode-ajax-container {
    transition: opacity 0.3s ease;
}

.dreamcode-reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* کارت نظر */
.dreamcode-review-card {
    background: #fff;
    border: 1px solid #EBEBEB;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.dreamcode-card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.dreamcode-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dreamcode-user-avatar {
    width: 45px;
    height: 45px;
    background-color: #4DA1FF;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.dreamcode-user-details h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #222;
}

.dreamcode-user-details span {
    font-size: 12px;
    color: #888;
}

.dreamcode-review-meta {
    text-align: left;
}

.dreamcode-stars {
    margin-bottom: 4px;
    font-size: 16px;
    direction: ltr;
}

.dreamcode-star.filled { color: #FFC107; }
.dreamcode-star { color: #E0E0E0; }

.dreamcode-date {
    font-size: 12px;
    color: #aaa;
}

.dreamcode-product-badge {
    background: #F4F8FF;
    color: #5B8DEF;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* منطق کارکرد دکمه ادامه نظر با سی اس اس کلمپ خطوط */
.dreamcode-review-text {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    flex-grow: 1;
    margin-bottom: 20px;
}

.dreamcode-review-text p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* نمایش حداکثر ۳ خط در ابتدا */
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.dreamcode-review-text.expanded p {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.dreamcode-read-more {
    color: #4DA1FF;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    margin-top: 5px;
    cursor: pointer;
}

/* فوتر کارت */
.dreamcode-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
}

.dreamcode-cat-tag {
    background: #F9F9F9;
    color: #777;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #EBEBEB;
}

.dreamcode-like-button {
    background: #fff;
    border: 1px solid #EBEBEB;
    padding: 8px 16px;
    border-radius: 20px;
    color: #666!important;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s ease;
}

.dreamcode-like-button:hover, .dreamcode-like-button.liked {
    background: #F4F8FF;
    border-color: #4DA1FF;
    color: #4DA1FF!important;
}

/* المان صفحه‌بندی داینامیک */
/* المان صفحه‌بندی هوشمند، زیبا و کاملاً ریسپانسیو */
.dreamcode-reviews-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap; /* جلوگیری از بهم ریختگی و شکستن خطوط در دایس‌های کوچک */
}

.dreamcode-reviews-pagination a, 
.dreamcode-reviews-pagination span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border: 1px solid #EAEAEA;
    border-radius: 10px;
    background: #fff;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

/* استایل صفحه فعلی با سایه ملایم زنده */
.dreamcode-reviews-pagination .current {
    background: #4DA1FF;
    color: #fff;
    border-color: #4DA1FF;
    box-shadow: 0 4px 12px rgba(77, 161, 255, 0.25);
    cursor: default;
}

/* افکت هاور دکمه‌ها */
.dreamcode-reviews-pagination a:hover {
    background: #F4F8FF;
    color: #4DA1FF;
    border-color: #4DA1FF;
}

/* استایل بخش سه نقطه */
.dreamcode-reviews-pagination .dreamcode-page-dots {
    border: none;
    background: transparent;
    color: #999;
    min-width: 24px;
    letter-spacing: 1px;
}

/* کنترل سایز و بهینه‌سازی نهایی در موبایل‌های بسیار کوچک */
@media (max-width: 480px) {
    .dreamcode-reviews-pagination {
        gap: 4px;
    }
    .dreamcode-reviews-pagination a, 
    .dreamcode-reviews-pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 8px;
    }
    .dreamcode-reviews-pagination .dreamcode-page-dots {
        min-width: 16px;
    }
}
@media (max-width: 992px) {
    .dreamcode-reviews-grid { grid-template-columns: 1fr; }
    .dreamcode-reviews-header-top { flex-direction: column; align-items: flex-start; }
}