/* ===== PRODUCT DETAIL PAGE - RATING SPECIFIC STYLES ===== */

/* === Rating Summary Main (on Page) === */
.rating-summary-main {
    text-align: center;
    padding: 0.875rem 0.75rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.1);
}

.rating-summary-score-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.rating-summary-score-large .fa-star {
    font-size: 1.1rem;
}

.rating-summary-score-large .score {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.rating-summary-score-large .max-score {
    font-size: 0.95rem;
    color: #6c757d;
    align-self: flex-end;
    padding-bottom: 0.15rem;
}

.rating-summary-details {
    font-size: 0.8125rem;
    line-height: 1.4;
}

.rating-summary-details .satisfied-count {
    color: #212529;
    margin-bottom: 0.125rem;
    cursor: help;
    position: relative;
}

.rating-summary-details .satisfied-count strong {
    font-weight: 600;
    border-bottom: 1px dotted #ffc107;
    transition: all 0.2s ease;
}

.rating-summary-details .satisfied-count strong:hover {
    color: #ffc107;
    border-bottom-style: solid;
}

.rating-summary-details .total-reviews {
    font-size: 0.75rem;
    color: #6c757d;
}

/* === Rating Summary Box (in Modal) === */
.rating-summary-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.rating-summary-box:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rating-summary-score .fs-4 {
    color: #212529;
    line-height: 1;
}

.rating-summary-info {
    line-height: 1.4;
}

.rating-summary-info .text-dark {
    font-weight: 600;
    color: #495057 !important;
}

.rating-summary-icon .btn-link {
    font-size: 1.1rem;
    text-decoration: none;
}

.rating-summary-icon .btn-link:hover {
    color: #0056b3 !important;
}

/* Preview Images */
#preview img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

/* === Customer Images Section (Under Progress Bars) === */
.customer-images-section {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.customer-images-section h6 {
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.customer-images-section h6 i {
    font-size: 0.85rem;
}

/* === Customer Images Strip === */
.strip-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.strip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.strip-item .overlay-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    pointer-events: none;
    backdrop-filter: blur(2px);
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

/* === All Images Modal === */
#allImagesModal .modal-content {
    border-radius: 18px;
}

#allImagesModal .modal-header {
    padding: 18px 22px;
}

#allImagesModal .modal-title {
    font-weight: 700;
    width: 100%;
    text-align: center;
}

#allImagesModal .filters-wrap {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding: 8px 0 10px;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 10px;
}

#imgFilters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#imgFilters .chip {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    transition: all .15s ease;
    cursor: pointer;
}

#imgFilters .chip:hover {
    transform: translateY(-1px);
}

#imgFilters .chip.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 6px 16px rgba(13,110,253,.25);
}

#imgFilters .chip .fa-star {
    color: #ffc107 !important;
    margin-left: 4px;
    font-size: 0.95em;
}

#allImagesModal .modal-body {
    min-height: 440px;
}

/* === Gallery Grid === */
.gallery-grid {
    display: grid;
    justify-content: center;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, 180px);
    grid-auto-rows: 230px;
    min-height: 260px;
}

.gallery-card {
    width: 180px;
    height: 230px;
    margin: 0;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 14px rgba(16,24,40,.06);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16,24,40,.12);
}

.gallery-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gallery-meta {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
}

.gallery-stars {
    font-size: 16px;
    color: #ffc107;
    letter-spacing: 1px;
    line-height: 1;
    font-weight: 600;
}

#allImagesGrid .empty {
    grid-column: 1 / -1;
    align-self: center;
    justify-self: center;
    text-align: center;
    color: #6b7280;
    font-weight: 600;
    padding: 18px 22px;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
}

/* === Image Viewer Full Screen === */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 99999 !important;
    display: none;
}

.image-viewer-modal.active {
    display: block;
}

.image-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), transparent);
}

.image-viewer-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-viewer-close:hover {
    background: #e0e0e0;
}

.image-viewer-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.image-viewer-body {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
    overflow: hidden;
}

#imageViewerImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    transition: opacity 0.15s ease;
}

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-viewer-nav:hover {
    background: #e0e0e0;
}

.image-viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-viewer-prev {
    left: 20px;
}

.image-viewer-next {
    right: 20px;
}

.image-viewer-footer {
    flex-shrink: 0;
    max-height: 40vh;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.image-viewer-review-info {
    color: #333;
}

.viewer-stars {
    display: flex;
    gap: 2px;
}

.viewer-stars i {
    color: #ffc107;
    font-size: 14px;
}

#viewerUserName {
    color: #333 !important;
}

#viewerDate {
    color: #666 !important;
}

#viewerDescription {
    color: #555 !important;
}

#viewerCounter {
    color: #666 !important;
}

/* === Customer Images Strip Enhancement === */
#customerImagesStrip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}

#customerImagesStrip::-webkit-scrollbar {
    display: none;
}

#customerImagesStrip .strip-item {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#customerImagesStrip .strip-item:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76,175,80,0.2);
}

#customerImagesStrip .strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#customerImagesStrip .strip-item:hover img {
    transform: scale(1.05);
}

#customerImagesStrip .overlay-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    padding: 8px;
    line-height: 1.3;
    backdrop-filter: blur(2px);
}



/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 767px) {
    /* Rating Summary Main - Mobile */
    .rating-summary-main {
        padding: 0.75rem 0.625rem;
        margin-bottom: 1rem;
    }
    
    .rating-summary-score-large .fa-star {
        font-size: 1.1rem;
    }
    
    .rating-summary-score-large .score {
        font-size: 1.75rem;
    }
    
    .rating-summary-score-large .max-score {
        font-size: 0.9rem;
    }
    
    .rating-summary-details {
        font-size: 0.8rem;
    }
    
    .rating-summary-details .total-reviews {
        font-size: 0.75rem;
    }
    
    .customer-images {
        margin-top: 24px;
        padding: 24px;
        background: #f8f9fa;
        border-radius: 12px;
        border: 1px solid #e0e0e0;
    }

    .customer-images h6 {
        font-size: 15px;
        font-weight: 600;
        color: #333;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .customer-images h6::before {
        content: '🖼️';
        font-size: 18px;
    }

    #customerImagesStrip {
        gap: 10px;
        margin: 0 -16px;
        padding: 0 16px 8px;
    }

    #customerImagesStrip .strip-item {
        width: 95px;
        height: 95px;
        border-radius: 10px;
        border-width: 2px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }

    #customerImagesStrip .strip-item:active {
        transform: scale(0.95);
    }

    #customerImagesStrip .overlay-more {
        font-size: 12px;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(3px);
    }

    #customerImagesStrip .overlay-more::before {
        font-size: 22px;
        margin-bottom: 3px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .gallery-card {
        width: 100%;
        height: auto;
        min-height: 188px;
    }

    .gallery-img {
        height: 140px;
    }

    .gallery-meta {
        height: auto;
        padding: 6px 8px;
    }

    #imgFilters .chip {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    /* Rating Summary Box - Mobile */
    .rating-summary-box {
        padding: 0.75rem !important;
    }
    
    .rating-summary-box .d-flex {
        gap: 0.5rem !important;
    }
    
    .rating-summary-score .fs-4 {
        font-size: 1.5rem !important;
    }
    
    .rating-summary-info .small {
        font-size: 0.8rem !important;
    }

    .image-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .image-viewer-prev {
        left: 12px;
    }

    .image-viewer-next {
        right: 12px;
    }

    .image-viewer-body {
        padding: 60px 10px 10px;
    }

    .image-viewer-footer {
        max-height: 50vh;
        padding: 12px;
    }

    .image-viewer-review-info {
        font-size: 14px;
    }

    #viewerAvatar {
        width: 36px !important;
        height: 36px !important;
    }
}
