/* ===== ORANGE THEME VARIABLES ===== */
:root {
    /* Orange Theme Colors */
    --primary-orange: #F97316;        /* orange-500 */
    --primary-orange-dark: #EA580C;   /* orange-600 */
    --primary-orange-light: #FB923C;  /* orange-400 */
    --primary-orange-bg: rgba(249, 115, 22, 0.05);
    
    /* Star Colors */
    --star-gold: #FBBF24;            /* amber-400 */
    --star-gold-dark: #F59E0B;       /* amber-500 */
    --star-empty: #E5E7EB;           /* gray-200 */
    
    /* Green for verified */
    --green-primary: #10B981;         /* emerald-500 */
    --green-bg: rgba(16, 185, 129, 0.1);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(249, 115, 22, 0.08);
    
    /* Text Colors */
    --text-primary: #374151;          /* gray-700 */
    --text-secondary: #6B7280;        /* gray-500 */
    --text-light: #9CA3AF;            /* gray-400 */
    --text-white: #FFFFFF;
}

/* ===== MAIN WIDGET CONTAINER ===== */
.prw-widget {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.08);
    position: relative;
    overflow: hidden;
}

.prw-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-orange), 
        var(--star-gold), 
        var(--primary-orange)
    );
    border-radius: 24px 24px 0 0;
}

/* ===== HEADER STATISTICS ===== */
.prw-header {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 32px;
    border: none;
}

.prw-overall-rating {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: nowrap; /* Thay đổi từ wrap thành nowrap */
}

.prw-rating-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.prw-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.prw-star {
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
    color: var(--star-gold);
}

.prw-star-filled {
    color: var(--star-gold);
}

.prw-star-half {
    position: relative;
    color: var(--star-empty);
}

.prw-star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: var(--star-gold);
}

.prw-star-empty {
    color: var(--star-empty);
}

.prw-star:hover {
    transform: scale(1.1);
}

.prw-total-reviews {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ===== RATING BARS ===== */
.prw-rating-bars {
    margin-bottom: 32px;
}

.prw-rating-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.prw-bar-label {
    width: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.prw-star-icon {
    color: var(--star-gold);
    font-size: 14px;
}

.prw-bar-wrapper {
    flex: 1;
    height: 8px;
    background: var(--star-empty);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.prw-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange), var(--star-gold));
    border-radius: 4px;
    transition: width 0.8s ease-out;
    position: relative;
}

.prw-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.prw-bar-count {
    min-width: 80px;
    text-align: right;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* ===== EXPERIENCE RATING ===== */
.prw-experience-rating {
    margin-bottom: 32px;
}

.prw-experience-rating h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.prw-experience-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    flex-wrap: nowrap;
}

.prw-experience-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 12px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* Thêm CSS mới cho dòng đầu tiên */
.prw-experience-item .prw-experience-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.prw-experience-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.12);
    border-color: var(--primary-orange);
}

.prw-experience-item > span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.prw-stars-small {
    display: flex;
    gap: 2px;
}

.prw-stars-small .prw-star {
    font-size: 16px;
    color: var(--star-gold);
}

.prw-stars-small .prw-star-empty {
    color: var(--star-empty);
}

.prw-experience-item > span:last-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== FILTERS ===== */
.prw-filters {
    margin-bottom: 32px;
}

.prw-filter-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.prw-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prw-filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prw-filter-tab.active {
    background: var(--green-primary);
    color: white;
    border-color: var(--green-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.prw-filter-tab:hover:not(.active) {
    background: var(--primary-orange-bg);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

/* ===== REVIEWS LIST ===== */
.prw-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prw-review-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prw-review-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--star-gold), var(--primary-orange));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prw-review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.12);
    border-color: var(--primary-orange);
}

.prw-review-item:hover::before {
    opacity: 1;
}

.prw-review-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.prw-reviewer-avatar {
    margin-top: calc((1.2em - 0px) / 10);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-orange), var(--star-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.prw-reviewer-info {
    flex: 1;
}

.prw-reviewer-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1!important;
}

.prw-review-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.prw-review-rating .prw-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 0;
}

.prw-review-rating .prw-star {
    font-size: 16px;
    color: var(--star-gold);
}

.prw-review-rating .prw-star-empty {
    color: var(--star-empty);
}

.prw-rating-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== PURCHASED BADGE ===== */
.prw-purchased-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green-bg);
    color: var(--green-primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0; /* Xóa margin-bottom: 10px */
    margin-left: 8px; /* Thêm margin-left để cách các thành phần khác */
}

/* ===== REVIEW CONTENT ===== */
.prw-review-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 0px;
}

/* ===== REVIEW IMAGES ===== */
.prw-review-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.prw-review-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
}

.prw-review-image:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--primary-orange);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.2);
}

.prw-review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== LOAD MORE ===== */
.prw-load-more {
    text-align: center;
    margin-top: 30px;
}

.prw-load-more-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-orange), var(--star-gold));
    color: var(--text-white);
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    position: relative;
    overflow: hidden;
}

.prw-load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.prw-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.prw-load-more-btn:hover::before {
    left: 100%;
}

/* ===== LIGHTBOX ENHANCEMENTS ===== */
.prw-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.prw-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.prw-lightbox-close {
    position: absolute;
    top: -40px;
    right: -20px;
    color: #FFFFFF;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    transition: all 0.2s ease;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prw-lightbox-close:hover {
    background: var(--primary-orange);
    transform: scale(1.1);
}

.prw-lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(90vh - 60px);
}

.prw-lightbox-image-container img {
    max-width: 100%;
    max-height: calc(90vh - 60px);
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    animation: scaleIn 0.3s ease;
}

.prw-lightbox-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 25px;
    border-radius: 25px;
}

.prw-lightbox-prev,
.prw-lightbox-next {
    background: var(--primary-orange);
    border: none;
    color: #FFFFFF;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prw-lightbox-prev:hover,
.prw-lightbox-next:hover {
    background: var(--primary-orange-dark);
    transform: scale(1.1);
}

.prw-lightbox-prev:disabled,
.prw-lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--text-light);
}

.prw-lightbox-counter {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    padding: 0 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .prw-widget {
        padding: 12px;
        border-radius: 20px;
    }
    
.prw-overall-rating {
    flex-direction: row; /* Thay đổi từ column thành row */
    text-align: left; /* Thay đổi từ center thành left */
    gap: 8px; /* Giảm gap cho mobile */
    flex-wrap: wrap; /* Cho phép wrap trên mobile nếu cần */
}

.prw-rating-number {
    font-size: 28px; /* Giảm size cho mobile */
}

.prw-stars .prw-star {
    font-size: 16px; /* Giảm size sao cho mobile */
}

.prw-total-reviews {
    font-size: 12px; /* Giảm size text cho mobile */
}
    
    .prw-rating-number {
        font-size: 36px;
    }
    
    .prw-stars .prw-star {
        font-size: 18px;
    }
    
    .prw-experience-items {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .prw-filter-tabs {
        justify-content: left;
        gap: 5px;
    }
    
    .prw-filter-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .prw-review-item {
        padding: 10px 12px;
    }
    
    .prw-review-header {
        gap: 12px;
    }
    
    .prw-reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .prw-reviewer-name {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .prw-review-rating {
        gap: 4px;
        flex-wrap: wrap; /* Cho phép wrap xuống dòng khi màn hình nhỏ */
    }
    .prw-purchased-badge {
        margin-left: 0; /* Xóa margin-left trên mobile */
        margin-top: 8px; /* Thêm margin-top khi wrap */
    }
    .prw-review-content {
        font-size: 14px;
        margin-top: 12px;
    }
    
    .prw-review-images {
        gap: 5px;
    }
    
    .prw-review-image {
        width: 60px;
        height: 60px;
    }
    
    .prw-lightbox-close {
        position: fixed;
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .prw-lightbox-nav {
        gap: 15px;
        padding: 10px 20px;
    }
    
    .prw-lightbox-prev,
    .prw-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .prw-lightbox-counter {
        font-size: 14px;
        padding: 0 15px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== HOVER EFFECTS FOR STARS ===== */
.prw-star:hover:not(.prw-star-empty) {
    transform: scale(1.2) rotate(10deg);
    color: var(--star-gold-dark) !important;
}

.prw-review-rating .prw-star:hover:not(.prw-star-empty) {
    transform: scale(1.2) rotate(10deg);
    color: var(--star-gold-dark) !important;
}

.prw-stars-small .prw-star:hover:not(.prw-star-empty) {
    transform: scale(1.2) rotate(10deg);
    color: var(--star-gold-dark) !important;
}

/* ===== ADDITIONAL ENHANCEMENTS ===== */
.prw-review-item {
    cursor: pointer;
}

.prw-review-item:active {
    transform: translateY(-2px) scale(1.02);
}

/* ===== LOADER FOR LIGHTBOX ===== */
.prw-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 16px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
}
/* Thêm vào cuối file style.css */
.prw-overall-rating {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.prw-rating-number {
    margin-right: 4px;
}

.prw-total-reviews {
    white-space: nowrap;
}