/* ============================================
   SAGO REVIEW PRODUCT - STYLE CSS
   ============================================ */

/* ============================================
   1. ICONS
   ============================================ */
   .sg-icon-like {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-image: url('../img/like.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 4px;
}

.sg-icon-like-outline {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-image: url('../img/like-outline.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 5px;
}

.sg-icon-like-outline.active {
    background-image: url('../img/like.png') !important;
}

.sg-icon-star {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../img/star.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 4px;
}

.sg-icon-star-empty {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../img/star-empty.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 4px;
}

.sg-icon-star-outline {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url('../img/star-outline.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.sg-icon-camera-outline {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../img/camera.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 4px;
}

.sago-icon-check {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url('../img/check.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 3px;
}

.sago-icon-heart {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url('../img/heart.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 3px;
}

.cmt-top-star .sg-icon-star,
.cmt-top-star .sg-icon-star-empty {
    width: 16px;
    height: 16px;
    margin-right: 3px;
}

/* ============================================
   2. PAGINATION
   ============================================ */
.sago-review-pagination {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.sago-pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
}

.sago-pagination-list li {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0px !important;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.sago-pagination-list li:hover {
    border-color: #999;
    color: #333;
    background: #f5f5f5;
}

.sago-pagination-list li.active {
    border-color: var(--primary-color, #0071e3);
    background: var(--primary-color, #0071e3);
    color: #fff;
    cursor: default;
}

.sago-pagination-list li.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================
   3. FILTERS
   ============================================ */
ul.sago-filter-buttons {
    display: flex;
    margin-top: 10px;
    white-space: nowrap;
    gap: 10px;
    padding-left  : 0px !important;
}

li.sago-filter-btn {
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    color: #f2994a;
    cursor: pointer;
    display: block;
 
    padding: 4px 17px;
    transition: .3s;
    margin-left: 0px !important;
    font-size: 14px;
}

li.sago-filter-btn:first-child {
    color: #333;
}

li.sago-filter-btn.active {
    border-color: #0071e3;
}

.sago-filter-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: #333;
}

h3.sago-filter-title {
    font-size: 14px;
    color: #333;
}

/* ============================================
   4. SUMMARY SECTION
   ============================================ */
.sago-review-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
}

.sago-summary-left {
    text-align: center;
    min-width: 150px;
}

.sago-avg-rating {
    font-size: 36px;
    font-weight: bold;
    color: #101828;
    line-height: 1;
}

.sago-avg-rating .sg-icon-star {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../img/star.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 4px;
}

.sago-avg-rating span {
    font-size: 14px;
    color: #98a2b3;
    font-weight: 400;
}

.sago-satisfied-count {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.sago-total-reviews {
    font-size: 14px;
    color: #98a2b3;
    font-weight: 400;
}

.sago-summary-right {
    flex-grow: 1;
}

.sago-rating-bars {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sago-rating-bars li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    margin-left: 5px !important;
}

.star-number {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-number .sg-icon-star {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-image: url('../img/star.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.star-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #ddd;
    border-radius: 5px;
    margin: 0 10px;
    overflow: hidden;
}

.star-fill {
    height: 100%;
    background-color: #64b2fa;
}

.star-percent {
    width: 40px;
    text-align: left;
    font-size: 14px;
}

.sago-write-review-btn {
    color: white;
    padding: 4px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 400;
    margin-top: 10px;
    background-color: #0071e3;
    border: 1px solid #0071e3;
    width: 100%;
    text-align: center;
    margin-bottom: 0px;
    margin-right: 0px;
    min-height: 40px;
}

.sago-write-review-btn:hover {
    background-color: #fff;
    color: #0071e3;
    border: 1px solid #0071e3;
}

/* Info Icon & Tooltip */
.info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.info-icon-wrapper svg {
    width: 12px;
    height: 12px;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.info-icon-wrapper svg:hover {
    opacity: 0.7;
}

.point-explain {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    white-space: normal;
}

.point-explain::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
}

.point-explain b {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 6px;
}

.point-explain span {
    display: block;
    font-size: 13px;
    color: #667085;
    line-height: 1.5;
}

.info-icon-wrapper:hover .point-explain {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   5. REVIEW IMAGES
   ============================================ */
.sago-summary-photos {
    margin-top: 15px;
    width: 250px;
}

.sago-photo-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sago-photo-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
}

.sago-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sago-view-all-photos-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 8px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sago-view-all-photos-btn:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sago-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.sago-view-all-overlay {
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    z-index: 10;
}

.sago-view-all-overlay span {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    padding: 0 8px;
    line-height: 1.3;
}

/* Desktop: overlay hiển thị khi hover trên item thứ 6 */
.sago-photo-item.has-overlay[data-overlay-desktop="1"]:hover .sago-photo-overlay,
.sago-photo-item.has-overlay[data-overlay-desktop="1"] .sago-view-all-overlay {
    opacity: 1;
    visibility: visible;
}

.sago-photo-item.has-overlay[data-overlay-desktop="1"] .overlay-text-mobile {
    display: none;
}

.sago-photo-item.has-overlay[data-overlay-desktop="1"] .overlay-text-desktop {
    display: block;
}

/* ============================================
   6. REVIEW LIST & ITEMS
   ============================================ */
h2.sago-review-title {
    color: #333;
    font-size: 100%;
}

.sago-comment-item {
    padding: 12px 0;
    border-bottom: 1px solid #ebf0f9;
    display: flex;
    flex-direction: column;
    margin-left: 0px !important;
}

.cmt-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmt-top-name {
    text-transform: capitalize;
    color: #222b45;
    display: inline;
    font-weight: bold;
    font-size: 14px;
    line-height: 16px;
    margin-right: 10px;
    margin-bottom: 0px;
}

.confirm-buy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0a9c45;
    font-size: 13px;
    background: #e8f8ef;
    padding: 4px 8px;
    border-radius: 4px;
}

.cmt-intro {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.cmt-intro .txt-intro::before {
    background-color: #ebf0f9;
    content: '';
    height: 16px;
    left: 0;
    position: absolute;
    top: calc(50% - 8px);
    width: 1px;
}

.cmt-top-star .dashicons {
    color: #ff9600;
    font-size: 16px;
}

.txt-intro {
    display: inline-flex;
    gap: 4px;
    color: #222b45;
    margin: 0;
    align-items: center;
    font-size: 14px;
    padding-left: 10px;
    position: relative;
}

.cmt-content {
    margin: 5px 0px;
}

.cmt-txt {
    margin: 0 0 12px 0;
    font-size: 15px;
}

.cmt-txt p {
    margin-bottom: 0px;
}

.sago-review-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sago-review-images .sago-review-image-link {
    display: block;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
  
    aspect-ratio: 1 / 1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
}

.sago-review-images .sago-review-image-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.sago-review-images img {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 4px;
    display: block;
}

/* Single image popup */
#sago-single-image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.9);
}

#sago-single-image-popup .popup-backdrop {
    position: absolute;
    inset: 0;
}

#sago-single-image-popup .popup-content {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sago-single-image-popup .popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: background 0.2s;
}

#sago-single-image-popup .popup-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

#sago-single-image-popup .popup-slider {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sago-single-image-popup .popup-slider button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#sago-single-image-popup .popup-slider .prev-btn {
    left: 20px;
}

#sago-single-image-popup .popup-slider .next-btn {
    right: 20px;
}

#sago-single-image-popup .popup-slider button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#sago-single-image-popup .popup-img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.cmt-command {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #777;
    font-size: 13px;
    margin-top: 2px;
}

.sago-like-btn {
    display: inline-flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.sago-like-btn:hover {
    color: #000;
}

.sago-like-btn.loading {
    opacity: 0.6;
    cursor: wait;
}

.sago-like-btn.liked .sg-icon-like-outline {
    background-image: url('../img/like.png') !important;
}

.cmt-usage {
    color: #888;
}

span.cmtd.dot-line {
    color: #aaa;
    font-size: 12px;
    padding-left: 12px;
    position: relative;
}

.dot-line::before {
    background-color: #f1f1f1;
    content: '';
    height: 18px;
    left: 0;
    position: absolute;
    top: calc(50% - 9px);
    width: 1px;
}

/* ============================================
   7. REPLIES
   ============================================ */
.sago-replies {
    margin-top: 15px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid #e8f0f5;
    position: relative;
}

.sago-replies::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #e8f0f5 0%, #e8f0f5 100%);
}

.sago-reply-item {
    margin-bottom: 16px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
}

.sago-reply-item:hover {
    background: #f1f3f5;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sago-reply-item:last-child {
    margin-bottom: 0;
}

.sago-reply-item:has(.sago-admin-badge) {
    background: #f5f8fd;
    border-color: #d0e3f5;
}

.sago-reply-item:has(.sago-admin-badge):hover {
    background: #e8f0f8;
    border-color: #b8d4f0;
}

.sago-reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sago-reply-author strong {
    color: #222b45;
    font-size: 14px;
    font-weight: 600;
}

.sago-admin-badge {
    display: inline-block;
    background: #007bff;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sago-reply-date {
    color: #6c757d;
    font-size: 12px;
    margin-left: auto;
}

.sago-reply-content {
    margin-bottom: 10px;
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
}

.sago-reply-content p {
    margin: 0 0 8px 0;
}

.sago-reply-content p:last-child {
    margin-bottom: 0;
}

.sago-reply-btn {
    display: inline-block;
    color: #007bff;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
}

.sago-reply-btn::before {
    background-color: #f1f1f1;
    content: '';
    height: 18px;
    left: 0;
    position: absolute;
    top: calc(50% - 9px);
    width: 1px;
}

.sago-reply-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Nested replies */
.sago-reply-item .sago-replies {
    margin-top: 12px;
    margin-left: 15px;
    padding-left: 15px;
    border-left-color: #cbd5e0;
}

.sago-reply-item .sago-replies .sago-reply-item {
    background: #ffffff;
    border-color: #e1e8ed;
}

.sago-reply-item .sago-replies .sago-reply-item:hover {
    background: #f8f9fa;
}

.sago-reply-item .sago-replies .sago-reply-item:has(.sago-admin-badge) {
    background: #f5f8fd;
    border-color: #d0e3f5;
}

.sago-reply-item .sago-replies .sago-reply-item:has(.sago-admin-badge):hover {
    background: #e8f0f8;
    border-color: #b8d4f0;
}

.sago-reply-item .sago-replies .sago-replies {
    border-left-color: #b8c5d1;
}

.sago-reply-item .sago-replies .sago-replies .sago-reply-item {
    background: #fafbfc;
    border-color: #d4dde6;
    padding: 10px 12px;
}

.sago-reply-item .sago-replies .sago-replies .sago-reply-item:hover {
    background: #f1f3f5;
}

.sago-reply-item .sago-replies .sago-replies .sago-reply-item:has(.sago-admin-badge) {
    background: #f5f8fd;
    border-color: #d0e3f5;
}

.sago-reply-item .sago-replies .sago-replies .sago-reply-item:has(.sago-admin-badge):hover {
    background: #e8f0f8;
    border-color: #b8d4f0;
}

/* Reply Form */
.sago-reply-form {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sago-reply-form-inner textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
}

.sago-reply-form-inner textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.sago-reply-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.sago-reply-fields input {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.sago-reply-fields input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.sago-reply-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sago-reply-actions .button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.sago-submit-reply {
    background: #007bff;
    color: #fff;
}

.sago-submit-reply:hover {
    background: #0056b3;
}

.sago-cancel-reply {
    background: #6c757d;
    color: #fff;
}

.sago-cancel-reply:hover {
    background: #5a6268;
}

/* ============================================
   8. POPUPS
   ============================================ */

/* Review Popup */
.sago-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sago-review-popup {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sago-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.sago-popup-title {
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    padding: 15px 22px;
    border-bottom: 1px solid #f5f5f7;
    color: #101010;
}

.sago-product-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    flex-direction: column;
    justify-content: center;
}

.sago-product-info h3 {
    color: #333;
    text-align: center;
    margin-bottom: 0px;
}

.sago-product-img {
    display: block;
    margin-bottom: 10px;
}

.sago-product-img img {
    max-width: 150px;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.sago-rating-stars {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.sago-rating-stars li {
    text-align: center;
    cursor: pointer;
    padding: 0 5px;
}

.sago-rating-stars li.active span {
    background-image: url('../img/star.png');
}

.sago-rating-stars li span {
    font-size: 32px;
    transition: color 0.2s;
}

.sago-rating-stars li p {
    font-size: 12px;
    margin-top: 5px;
}
.sago-form-group{
    margin-bottom: 20px;
}
form#sago-review-form {
    margin-top: 30px;
    padding: 0 30px;
}

form#sago-review-form textarea {
    border: 1px solid #e5e5e5;
    color: #323232;
    font-size: 14px;
    height: 80px;
    line-height: 17px;
    padding: 15px;
    resize: none;
    width: 100%;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 0px;
}

/* Image Popup */
#sago-image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

#sago-image-popup .popup-backdrop {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(4px);
}

#sago-image-popup .popup-content {
    background: #fff;
    position: relative;
    z-index: 10;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.popup-back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s;
    background: #fff;
    padding: 5px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

.popup-back-link:hover {
    opacity: 0.8;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: background 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

.popup-slider {
    position: relative;
    flex: 0 0 65%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    min-height: 500px;
}

.popup-slider button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #333;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popup-slider button:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-slider .prev-btn {
    left: 20px;
}

.popup-slider .next-btn {
    right: 20px;
}

.popup-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 90vh;
}

.popup-meta {
    flex: 0 0 35%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    background: #fff;
}

.popup-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.popup-author {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.popup-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e8f8ef;
    border-radius: 4px;
    font-size: 13px;
}

.popup-check-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.popup-verified-text {
    color: #0a9c45;
    font-size: 13px;
}

.popup-rating-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: flex-start;
}
p.sago-no-reviews{font-size: 15px;}
.popup-stars {
    display: flex;
    gap: 2px;
}

.popup-stars .sg-icon-star {
    width: 14px;
    height: 14px;
}

.popup-stars .sg-icon-star-empty {
    width: 14px;
    height: 14px;
}

.popup-recommend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #333;
    font-size: 13px;
}

.popup-heart-icon {
    font-size: 16px;
}

.popup-text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    margin-top: 5px;
}

.popup-replies-loading {
    color: #999;
    font-size: 13px;
    padding: 10px 0;
}

.popup-replies-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-reply-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.popup-reply-item.popup-reply-admin {
    background: #f5f8fd;
}

.popup-reply-item.popup-reply-nested {
    margin-left: 20px;
    background: #fff;
    border-left-color: #ddd;
}

.popup-reply-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.popup-reply-author strong {
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.popup-admin-badge {
    background: #0071e3;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.popup-reply-date {
    font-size: 12px;
    color: #999;
}

.popup-reply-content {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.popup-replies-nested {
    margin-top: 10px;
    padding-left: 15px;
    border-left: 2px solid #e5e5e5;
}

/* Gallery Popup */
#sago-gallery-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 99998;
    padding: 20px;
    overflow-y: auto;
}

.gallery-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.gallery-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: background 0.2s;
    z-index: 20;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

.gallery-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 25px 0;
}

ul.gallery-filters {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    justify-content: center;
    white-space: nowrap;
    flex-wrap: wrap;
    gap: 0;
}

li.gallery-filter-btn {
    list-style: none;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    color: #f2994a;
    cursor: pointer;
    display: block;
    margin-right: 10px;
    padding: 4px 17px;
    transition: .3s;
    margin-left: 0px !important;
    font-size: 14px;
    background: transparent;
}

li.gallery-filter-btn:first-child {
    color: #333;
    margin-left: 0;
}

li.gallery-filter-btn:hover {
    border-color: #0071e3;
}

li.gallery-filter-btn.active {
    border-color: #0071e3;
}

li.gallery-filter-btn .sg-icon-star,
li.gallery-filter-btn .sg-icon-star-empty {
    color: #f2994a;
    font-size: 14px;
}

li.gallery-filter-btn.active .sg-icon-star,
li.gallery-filter-btn.active .sg-icon-star-empty {
    color: #0071e3;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 10px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f5f5f5;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-top: 20px;
}

.gallery-item-stars {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.gallery-item-stars .sg-icon-star {
    color: #ff9800;
    font-size: 12px;
}

.gallery-item-stars .sg-icon-star-empty {
    color: #ddd;
    font-size: 12px;
}
.sago-photo-item img, .sago-review-images  img {
    height: 100% !important;
    max-width: 100% !important;
}
/* ============================================
   9. FORMS
   ============================================ */
.sago-review-form input[type="text"],
.sago-review-form input[type="email"] {
    border: 1px solid #e5e5e5;
    color: #323232;
    font-size: 14px;
    height: 45px;
    line-height: 17px;
    padding: 0px 15px;
    resize: none;
    width: 100%;
    border-radius: 10px;
    box-shadow: none !important;
    margin-bottom: 0px;
}
.sago-checkbox-item label{font-size: 14px;}
.sago-review-form textarea {
    resize: vertical;
    min-height: 100px;
}
.sago-comments{
    padding-left: 0px;
    font-size: 15px;
}
.sago-form-column {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sago-upload-box {
    width: 40%;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
}

.sago-upload-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #007bff;
}

.sago-upload-btn p {
    font-size: 1em;
    color: #007bff;
    font-weight: 400;
    margin-bottom: 0px;
}

.sago-upload-btn p span {
    color: #222;
}

.sago-upload-input {
    display: none;
}

.sago-uploaded-previews {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sago-preview-item {
    position: relative;
    display: inline-block;
    width: 48px;
    height: auto;
}

.sago-uploaded-previews img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.sago-remove-image {
    position: absolute;
    top: 3px;
    right: 3px;
    min-height: 15px;
    min-width: 15px;
    border-radius: 50%;
    background-color: #fff;
    color: #333;
    font-size: 10px;
    line-height: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
    padding: 0px;
    margin: 0px;
    text-align: center;
}

.sago-checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sago-checkbox-item input[type=checkbox],
.sago-checkbox-item input[type=radio] {
    transform: scale(1.1);
    margin-right: 5px;
    vertical-align: middle;
    margin-bottom: 10px;
}

.sago-checkbox-item label {
    font-weight: 400;
}

.sago-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.sago-form-row input {
    flex: 1;
}

.sago-policy-agree {
    margin-bottom: 20px;
}

.sago-policy-agree a {
    color: #007bff;
    text-decoration: none;
}
.sago-form-column label{font-size: 14px;}
.sago-submit-btn {
    width: 100%;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
    cursor: not-allowed;
    opacity: 0.6;
    margin-bottom: 20px;
}

.sago-submit-btn:enabled {
    cursor: pointer;
    opacity: 1;
    background-color: #0056b3;
}

.sago-policy-links {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
}

.sago-policy-links a {
    margin: 0 10px;
    color: #666;
    text-decoration: none;
}

.sago-success-message {
    text-align: center;
    padding: 30px;
}

.sago-close-popup-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

/* ============================================
   10. MEDIA QUERIES
   ============================================ */

/* Tablet & Mobile (max-width: 849px) */
@media (max-width: 849px) {
    /* Summary Section */
    .sago-review-summary {
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .sago-summary-left {
        width: 40% !important;
        min-width: 40% !important;
    }

    .sago-summary-photos {
        width: 100%;
    }

    /* Image Popup */
    #sago-image-popup .popup-content {
        flex-direction: column;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .popup-slider {
        flex: 0 0 50%;
        min-height: 300px;
    }

    .popup-meta {
        flex: 1;
        padding: 20px;
    }

    /* Gallery Popup */
    .gallery-content {
        padding: 20px;
        margin: 10px;
        border-radius: 0;
    }

    .gallery-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .gallery-filters {
        gap: 8px;
        margin-bottom: 20px;
    }

    .gallery-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        max-height: calc(100vh - 200px);
    }
}

/* Mobile (max-width: 549px) */
@media (max-width: 549px) {
    /* Filters */
    ul.sago-filter-buttons {
        display: flex;
        margin-top: 10px;
        gap: 8px;
        flex-wrap: wrap;
        white-space: normal;
    }

    li.sago-filter-btn {
        margin-right: 0px !important;
        padding: 4px 12px;
    }

    /* Summary Section */
    .sago-review-summary {
        display: flex;
        align-items: flex-start;
        gap: 3% !important;
        flex-wrap: wrap;
    }

    .sago-summary-left {
        width: 40% !important;
        min-width: 145px !important;
    }

    .sago-summary-photos {
        width: 100%;
    }

    /* Review Images */
    .sago-photo-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .sago-photo-list .sago-photo-item:nth-child(n+5) {
        display: none;
    }

    .sago-photo-item.has-overlay[data-overlay-mobile="1"] .sago-view-all-overlay {
        opacity: 1;
        visibility: visible;
        display: flex !important;
    }

    .sago-photo-item.has-overlay[data-overlay-mobile="1"] .overlay-text-desktop {
        display: none;
    }

    .sago-photo-item.has-overlay[data-overlay-mobile="1"] .overlay-text-mobile {
        display: block;
    }

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

    /* Review Popup */
    .sago-popup-overlay {
        align-items: flex-start;
        padding: 10px 0;
        overflow-y: auto;
    }

    .sago-review-popup {
        max-height: calc(100vh - 20px);
        overflow-y: auto;
        margin: 10px auto;
        border-radius: 15px;
        -webkit-overflow-scrolling: touch;
    }

    .sago-popup-title {
        margin-bottom: 0px;
    }

    .sago-rating-stars {
        margin-bottom: 10px;
    }

    .sago-rating-stars .sg-icon-star-outline {
        width: 25px;
        height: 25px;
    }

    .sago-rating-stars li {
        padding: 0 3px;
        margin-bottom: 0px;
    }

    .sago-rating-stars li span {
        font-size: 24px;
    }

    .sago-rating-stars li p {
        font-size: 11px;
        margin-top: 3px;
    }

    form#sago-review-form {
        margin-top: 0px;
        padding: 0px 15px;
    }

    .sago-form-row {
        flex-wrap: wrap;
    }

    .sago-form-row input:nth-child(3) {
        flex: 0 0 100%;
    }

    .sago-upload-box {
        width: 60% !important;
    }
    .txt-intro{
            font-size: 12px;
                padding-left: 8px;
    }
    .cmt-intro{
        gap:0px
    }
    li.sago-filter-btn{
        font-size: 12px;
    }
   
    .cmt-top-star{
            min-width: 100px;
    }
    .cmt-top-star .sg-icon-star, .cmt-top-star .sg-icon-star-empty {
        width: 13px;
        height: 13px;
        margin-right: 1px;
    }
    .sago-form-column{
        margin-bottom: 10px;
    }
    .sago-form-group{
        margin-bottom: 10px;
    }
    .sago-product-img img{
        width: 100px;
        height: 100px;
    }
}
