/* Container thẻ đánh giá */
.review-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    width: 100%; 
    height: 100%; 
    min-height: 350px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0; 
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header */
.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.review-header .avatar {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: #e2e8f0; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden; 
}
.review-header .avatar img { 
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.review-header .meta { display: flex; flex-direction: column; }
.review-header .author { font-weight: 700; font-size: 15px; color: #111; margin-bottom: 2px; }
.review-header .date { font-size: 12px; color: #888; }

/* Khung Ảnh Sản Phẩm */
.review-image-box {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background-color: #ffffff; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.review-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.review-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
    background-color: #f8f9fa;
}

/* Nội dung review */
.review-content {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

/* Tiêu đề lớn (Tên sản phẩm) 1 hàng duy nhất */
.review-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 20px; 
}

.review-text-wrapper { position: relative; }

/* Tiêu đề nhỏ (Nội dung review) đúng 2 hàng */
.review-text-short, .review-text-full {
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}
.review-text-short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em; 
}

.toggle-content {
    display: inline; 
    font-size: 13px;
    font-weight: 600;
    color: #1a73e8;
    cursor: pointer;
    white-space: nowrap;
}
.toggle-content:hover { text-decoration: underline; }


/* ========================================= */
/* FIX FOOTER CĂN THẲNG 1 HÀNG NGANG TUYỆT ĐỐI */
/* ========================================= */
.review-footer {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; 
    justify-content: space-between !important;
    gap: 8px !important; 
    border-top: 1px solid #f2f2f2;
    padding-top: 10px;
    margin-top: auto; 
    height: 46px;
    box-sizing: border-box;
}

/* Triệt tiêu margin/padding ngầm của theme cho 2 nút */
.like-btn, .btn-buy {
    height: 36px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* Nút Like */
.like-btn {
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #3b82f6;
    color: #ffffff !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer;
    gap: 5px !important;
    border: none !important;
    transition: transform 0.1s, background-color 0.2s;
    position: relative;
    text-transform: uppercase;
    user-select: none;
    white-space: nowrap;
}
.like-btn:hover { background-color: #2563eb; }
.like-btn .icon-thumb { font-size: 14px; display: inline-block; }
.like-btn .mini-heart { position: absolute; top: -3px; left: 4px; font-size: 10px; }
.like-count-text { display: flex; align-items: center; gap: 3px; }

/* Nút Giỏ hàng */
.btn-buy {
    width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #e4e6eb;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: 0.2s;
    flex-shrink: 0 !important;
    border: none !important;
    padding: 0 !important;
}
.btn-buy:hover { background-color: #d8dadf; }
.btn-buy svg { width: 18px; height: 18px; fill: #1c1e21; display: block; }


/* ========================================= */
/* Swiper Slider & Animations                  */
/* ========================================= */
.woo-review-slider { padding: 15px; }
.woo-review-slider .swiper-slide { height: auto; }

.flying-heart {
    position: absolute;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.5);
}
.flying-heart.animate.float {
    animation: floatHeart 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes floatHeart {
    0% { opacity: 1; transform: scale(0.5) translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: scale(1.5) translateY(-80px) rotate(20deg); }
}
