/* =========================================
   1. GENERAL STYLES & TYPOGRAPHY
   ========================================= */
.wrapbinhluan {
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrapbinhluan .bg-primary {
    background-color: var(--theme-color) !important;
}

.wrapbinhluan h2.section-title {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.wrapbinhluan .section-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* =========================================
   2. STATS CARD (THỐNG KÊ SAO)
   ========================================= */
.wrapbinhluan .stats-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.wrapbinhluan .rating-big {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: #0f172a;
}

.wrapbinhluan .rating-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.wrapbinhluan .star-label {
    min-width: 45px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    display: flex; 
    align-items: center; 
    gap: 4px;
}

.wrapbinhluan .custom-progress {
    height: 6px;
    background-color: #f1f5f9;
    border-radius: 100px;
    flex-grow: 1;
    margin: 0 12px;
    overflow: hidden;
}

.wrapbinhluan .progress-bar {
    /* Vẫn giữ màu vàng cho sao để chuẩn UX, bạn có thể đổi thành var(--theme-color) nếu muốn đồng bộ hoàn toàn */
    background: linear-gradient(90deg, #fcd34d 0%, #fbbf24 100%);
    border-radius: 100px;
}

.wrapbinhluan .count-label {
    color: #94a3b8;
    font-size: 0.85rem;
    min-width: 30px;
    text-align: right;
}

/* =========================================
   3. GALLERY WIDGET & VIDEO ICON
   ========================================= */
.wrapbinhluan .gallery-widget-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
}

.wrapbinhluan .gallery-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: #0f172a;
    position: relative;
    padding-left: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--theme-color);
}

.wrapbinhluan .media-swiper {
    padding-bottom: 30px !important;
}

.wrapbinhluan .media-item-wrap {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    background: #bbbbbb;
}

.wrapbinhluan .media-item-wrap img,
.wrapbinhluan .media-item-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.95;
}

.wrapbinhluan .media-item-wrap:hover {
    border-color: var(--theme-color);
    /* Thay đổi bóng mờ theo theme color */
    box-shadow: 0 10px 15px -3px rgba(255, 77, 141, 0.25);
}
.wrapbinhluan .media-item-wrap:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.wrapbinhluan .video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.65); 
    border: 2px solid #fff; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #fff;
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.wrapbinhluan .video-overlay i {
    font-size: 16px;
    margin-left: 4px; 
}

.wrapbinhluan .media-item-wrap:hover .video-overlay {
    background: var(--theme-color);
    border-color: var(--theme-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.wrapbinhluan .gallery-nav-btn {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: #0f172a;
    font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.wrapbinhluan .gallery-nav-btn:hover {
    background: var(--theme-color);
    color: #fff;
}
.wrapbinhluan .gallery-nav-btn::after { font-size: 12px; }

/* =========================================
   4. FORM VIẾT BÌNH LUẬN & UPLOAD AREA
   ========================================= */
.wrapbinhluan .review-form-wrapper .card {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05) !important;
}

.wrapbinhluan .form-control {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.wrapbinhluan .form-control:focus {
    background-color: #fff;
    border-color: var(--theme-color);
    /* Tạo hiệu ứng focus theo theme color */
    box-shadow: 0 0 0 3px rgba(255, 77, 141, 0.15);
}

.wrapbinhluan .upload-area {
    border: 2px dashed #cbd5e1;
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 2rem 1rem; 
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.wrapbinhluan .upload-area:hover {
    border-color: var(--theme-color);
    background-color: rgba(255, 77, 141, 0.02);
}

.wrapbinhluan .upload-trigger i {
    font-size: 2.5rem; 
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: block;
    transition: transform 0.3s;
}

.wrapbinhluan .upload-area:hover .upload-trigger i {
    color: var(--theme-color);
    transform: translateY(-5px); 
}

.wrapbinhluan .btn-primary-custom {
    background: var(--theme-color);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(255, 77, 141, 0.2);
}
.wrapbinhluan .btn-primary-custom:hover {
    background: var(--theme-color2);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 77, 141, 0.4);
}

/* =========================================
   5. FILTER CHIPS
   ========================================= */
.wrapbinhluan .filter-chip {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}
.wrapbinhluan .filter-chip:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
    background: rgba(255, 77, 141, 0.05);
}
.wrapbinhluan .filter-chip.active {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
    box-shadow: 0 4px 6px rgba(255, 77, 141, 0.25);
}

/* =========================================
   6. DANH SÁCH BÌNH LUẬN & ACTIONS
   ========================================= */
.wrapbinhluan .review-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.wrapbinhluan .avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color2));
    color: #fff;
    box-shadow: 0 4px 6px rgba(255, 77, 141, 0.2);
}

.wrapbinhluan .review-actions {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 15px;
}

.wrapbinhluan .action-like, 
.wrapbinhluan .reply-trigger {
    cursor: pointer !important; 
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #64748b;
    user-select: none;
    font-size: 0.9rem;
}

.wrapbinhluan .action-like:hover, 
.wrapbinhluan .reply-trigger:hover {
    background-color: rgba(255, 77, 141, 0.1); 
    color: var(--theme-color) !important; 
}

.wrapbinhluan .action-like i,
.wrapbinhluan .reply-trigger i {
    margin-right: 6px;
    font-size: 1rem;
}

.wrapbinhluan .like {
    margin-right: 2px;
}

.wrapbinhluan .gallery-group .media-thumb {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.wrapbinhluan .gallery-group .media-thumb:hover {
    transform: scale(1.05);
    border-color: var(--theme-color);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =========================================
   7. FORM TRẢ LỜI CON (SUB-FORM)
   ========================================= */
.wrapbinhluan .reply-input-wrapper .card {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

.wrapbinhluan .reply-input-wrapper textarea {
    background: #fff;
    border-color: #e2e8f0;
    resize: none;
    font-size: 0.9rem;
    min-height: 80px;
}
.wrapbinhluan .reply-input-wrapper textarea:focus {
    border-color: var(--theme-color);
}
.wrapbinhluan .btn-load-more-replies {
    color: var(--theme-color);
    font-weight: 600;
}
.wrapbinhluan .btn-load-more-replies:hover {
    color: var(--theme-color2);
}

.wrapbinhluan .text-secondary {
    color: rgb(25 25 25) !important;
    font-size: 15px;
}

.wrapbinhluan .reply-input-wrapper .btn-primary {
    background: var(--theme-color);
    border: none;
    border-radius: 20px; 
    padding: 8px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 77, 141, 0.2);
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.wrapbinhluan .reply-input-wrapper .btn-primary:hover {
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color2) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 77, 141, 0.35);
}

/* =========================================
   8. THREADED REPLIES (CẤU TRÚC PHẢN HỒI)
   ========================================= */
.wrapbinhluan .replies-wrapper {
    margin-top: 15px;
}

.wrapbinhluan .threaded-border {
    border-left: 2px solid #e2e8f0 !important;
    margin-left: 24px;
    padding-left: 20px;
}

.wrapbinhluan .item-reply {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.wrapbinhluan .item-reply:hover {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.wrapbinhluan .item-reply.ms-4 {
    margin-left: 2rem !important;
    background: #fff;
    border: 1px solid #f1f5f9;
}

.wrapbinhluan .text-primary {
    color: var(--theme-color) !important;
    font-weight: 700;
}

.wrapbinhluan .reply-child-trigger {
    cursor: pointer;
    font-size: 0.8rem;
    color: #64748b !important;
    font-weight: 600;
}
.wrapbinhluan .reply-child-trigger:hover {
    color: var(--theme-color) !important;
    text-decoration: underline;
}

/* =========================================
   9. LIGHTBOX & UTILS
   ========================================= */
.wrapbinhluan .modal-fullscreen .modal-content {
    background-color: rgba(15, 23, 42, 0.99); 
}

.wrapbinhluan .btn-loadmore {
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 10px 30px;
    background: transparent;
    transition: 0.3s;
    border-radius: 50px;
    font-weight: 600;
}
.wrapbinhluan .btn-loadmore:hover {
    border-color: var(--theme-color);
    background: var(--theme-color);
    color: #fff;
}

/* =========================================
   10. RESPONSIVE QUERIES (TỐI ƯU MOBILE/TABLET)
   ========================================= */
@media (max-width: 768px) {
    .wrapbinhluan .rating-big {
        font-size: 2.8rem;
    }
    .wrapbinhluan .stats-card,
    .wrapbinhluan .gallery-widget-card {
        padding: 16px;
    }
    .wrapbinhluan .review-card {
        padding: 16px;
    }
    .wrapbinhluan .threaded-border {
        margin-left: 12px;
        padding-left: 12px;
    }
    .wrapbinhluan .item-reply.ms-4 {
        margin-left: 1rem !important;
    }
}

@media (max-width: 576px) {
    .wrapbinhluan h2.section-title {
        font-size: 1.25rem;
    }
    .wrapbinhluan .avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    .wrapbinhluan .gallery-group .media-thumb {
        width: 70px;
        height: 70px;
    }
    .wrapbinhluan .btn-primary-custom {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
    .wrapbinhluan .filter-chip {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .wrapbinhluan .action-like, 
    .wrapbinhluan .reply-trigger {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}