.product-review-list,
.b-modal,
#all-reviews-modal,
#review-image-gallery-modal {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

    .b-modal .modal-content,
    #all-reviews-modal .modal-content {
        max-height: calc(100vh - 3.5rem);
        width: 40rem;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .b-modal .all-reviews-container,
    #all-reviews-modal .all-reviews-container {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        max-height: calc(100vh - 9rem);
    }

        #all-reviews-modal .all-reviews-container .all-reviews-scroll {
            flex: 1 1 auto;
            overflow-y: auto;
            box-sizing: border-box;
            padding: 0;
            height: 40rem;
        }

    #all-reviews-modal .reviews-list {
        overflow-y: auto;
        box-sizing: border-box;
        margin-left: 0.5rem;
    }

    .b-modal .modal-body,
    .b-modal .review-modal-body,
    #all-reviews-modal .modal-body {
        display: flex;
        flex-direction: column;
        padding: 0;
        box-sizing: border-box;
    }

    .b-modal .all-reviews-container,
    .b-modal .reviews-list,
    #all-reviews-modal .all-reviews-container {
        display: flex;
        flex-direction: column;
        padding-bottom: 2rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .b-modal .reviews-list {
        padding: 1rem;
        padding-bottom: 4.5rem;
        background: var(--color-white);
    }

        .b-modal .reviews-list::after {
            content: '';
            display: block;
            height: 6rem;
            width: 100%;
        }

    .gallery-images,
    .b-modal .gallery-images {
        display: flex;
        gap: 0.75rem;
        flex-wrap: nowrap;
        align-items: center;
        padding: 0.75rem 2rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        box-sizing: border-box;
        margin-bottom: -1rem;
    }

    .review-gallery-thumb,
    .b-modal .header-gallery .review-gallery-thumb {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 4.5rem;
        height: 4.5rem;
        border-radius: 0.5rem;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        border: 0.0625rem solid var(--grey-20);
        flex-shrink: 0;
        position: relative;
    }

        .review-gallery-thumb:hover {
            transform: scale(1.03);
            box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.12);
        }

        .review-gallery-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

.gallery-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.5);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
}

.b-modal .header-gallery .review-gallery-thumb {
    width: 3.5rem;
    height: 3.5rem;
    border: 0.0625rem solid var(--grey-20);
}

.b-modal .all-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

    .b-modal .all-reviews-header .gallery-more {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.75rem;
        height: 2.75rem;
        padding: 0 0.625rem;
        margin-left: 0.375rem;
        border-radius: 0.5rem;
        background: var(--grey-10);
        color: var(--dark-black);
        font-weight: 600;
        font-size: 0.875rem;
        border: 0.0625rem solid rgba(0,0,0,0.06);
    }

.review-thumbs .review-thumb {
    display: inline-block;
    width: 4rem;
    height: 4rem;
    margin-right: 0.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 0.0625rem solid var(--grey-20);
}

    .review-thumbs .review-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.review-item .circle-name,
.b-modal .circle-name {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.review-item .review-content {
    margin-left: calc(1.75rem + 0.75rem);
}
@media (max-width :36rem){

    .review-item .review-content {
        margin-left: 0rem;
    }
}
@media (max-width: 36rem) {
    .review-item .circle-name,
    .b-modal .circle-name {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
    }
}

.review-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

    .review-text.is-clamped {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
    }

    .review-text.is-expanded {
        display: block;
        -webkit-line-clamp: unset;
    }

.text-expanded-link {
    display: inline-block;
    margin-top: 0.5rem;
    cursor: pointer;
    color: var(--dark-black);
}

    .text-expanded-link:focus {
        outline: none;
        text-decoration: underline;
    }

.product-review-list .btn-outline-primary {
    display: flex;
    width: 16.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background: var(--grey-10);
    color: var(--dark-black);
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    transition: background 0.2s ease, color 0.2s ease;
}

    .product-review-list .btn-outline-primary:hover {
        background: var(--grey-10-hover);
    }

    .product-review-list .btn-outline-primary:focus {
        box-shadow: 0 0 0 0.1875rem rgba(124,58,237,0.08);
    }

    .product-review-list .btn-outline-primary.w-100 {
        max-width: 16.5rem;
        display: inline-flex;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }

#review-image-gallery-modal.modal {
    z-index: 1070 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#review-image-gallery-modal .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    width: auto;
    margin: 1.75rem auto;
}

#review-image-gallery-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 43rem;
    width: auto;
}

#review-image-gallery-modal .modal-body {
    padding: 0;
}

#review-image-gallery-modal .gallery-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: var(--color-white);
    border-radius: 0.75rem;
    box-shadow: 0 1.125rem 3.125rem rgba(2,6,23,0.16);
    overflow: hidden;
    width: 40rem;
    height: 40rem;
    max-width: 40rem;
    max-height: 40rem;
}

#review-image-gallery-modal .gallery-image {
    width: 40rem;
    height: 40rem;
    max-width: 40rem;
    max-height: 40rem;
    object-fit: cover;
    border-radius: 0.75rem;
    display: block;
}

#review-image-gallery-modal .gallery-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.375rem;
    border-radius: 50%;
    background: var(--color-white);
    border: none;
    box-shadow: 0 0.375rem 1.125rem rgba(2,6,23,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#review-image-gallery-modal .gallery-nav-prev,
#review-image-gallery-modal .gallery-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--color-white);
    border: 0.0625rem solid rgba(0,0,0,0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.5rem 1.25rem rgba(2,6,23,0.08);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

    #review-image-gallery-modal .gallery-nav-prev:hover,
    #review-image-gallery-modal .gallery-nav-next:hover {
        background: var(--color-white);
        transform: translateY(-50%) scale(1.05);
    }

#review-image-gallery-modal .gallery-nav-prev {
    left: 0.75rem;
}

#review-image-gallery-modal .gallery-nav-next {
    right: 0.75rem;
}

    #review-image-gallery-modal .gallery-close .s4d-icon,
    #review-image-gallery-modal .gallery-nav-prev .s4d-icon,
    #review-image-gallery-modal .gallery-nav-next .s4d-icon {
        font-size: 1.25rem;
        color: var(--dark-black);
        display: flex;
        align-items: center;
        justify-content: center;
    }

#all-reviews-modal .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 3.5rem);
    margin: 1.75rem auto;
    max-width: 40rem;
}

#all-reviews-modal.modal {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#all-reviews-modal .modal-dialog {
    margin: 1.75rem auto;
}

.b-modal .s4d-thumb-up,
.product-review-list .s4d-thumb-up {
    color: var(--green-success);
}

.b-modal .s4d-thumb-down,
.product-review-list .s4d-thumb-down {
    color: var(--red);
}

.b-modal,
.product-review_list {
    color: var(--green-success);
}

    #all-reviews-modal .s4d-thumb-up,
    #all-reviews-modal .s4d-thumb-up-filled,
    .b-modal#all-reviews-modal .s4d-thumb-up,
    .b-modal .s4d-thumb-up,
    .product-review-list .s4d-thumb-up,
    .product-review-list .s4d-thumb-up-filled,
    #all-reviews-modal .s4d-thumb-up::before,
    #all-reviews-modal .s4d-thumb-up-filled::before,
    .b-modal#all-reviews-modal .s4d-thumb-up::before,
    .b-modal .s4d-thumb-up::before,
    .product-review-list .s4d-thumb-up::before {
        color: var(--green-success);
        fill: currentColor;
        stroke: currentColor;
    }

#all-reviews-modal .s4d-thumb-down,
#all-reviews-modal .s4d-thumb-down-filled,
.b-modal#all-reviews-modal .s4d-thumb-down,
.b-modal .s4d-thumb-down,
.product-review-list .s4d-thumb-down,
.product-review-list .s4d-thumb-down-filled,
#all-reviews-modal .s4d-thumb-down::before,
#all-reviews-modal .s4d-thumb-down-filled::before,
.b-modal#all-reviews-modal .s4d-thumb-down::before,
.b-modal .s4d-thumb-down::before,
.product-review-list .s4d-thumb-down::before {
    color: var(--red);
    fill: currentColor;
    stroke: currentColor;
}

#all-reviews-modal .vote-btn .s4d-icon,
#all-reviews-modal .vote-btn .s4d-icon::before,
.b-modal .vote-btn .s4d-icon,
.product-review-list .vote-btn .s4d-icon {
    color: inherit;
}

@media (max-width: 36rem) {
    .b-modal .reviews-list {
        padding-top: calc(3.5rem + 0.75rem);
    }

    .b-modal .all-reviews-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .product-review-list .see-all-header {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        background: transparent;
    }

        .product-review-list .see-all-header .see-all-text {
            color: var(--action);
            font-weight: 600;
            font-size: 0.95rem;
        }
}

@media (max-width: 48rem) {
    .b-modal .modal-content,
    #all-reviews-modal .modal-content {
        max-height: calc(100vh - 0.5rem);
    }

    #all-reviews-modal .all-reviews-container {
        max-height: calc(100vh - 7rem);
    }

    #review-image-gallery-modal .modal-dialog {
        max-width: 100vw;
        margin: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #review-image-gallery-modal .gallery-container {
        width: 21.4375rem;
        height: 21.4375rem;
        max-width: 21.4375rem;
        max-height: 21.4375rem;
    }

    #review-image-gallery-modal .gallery-image {
        width: 21.4375rem;
        height: 21.4375rem;
        max-width: 21.4375rem;
        max-height: 21.4375rem;
    }
}

.b-modal button:focus,
.product-review-list button:focus,
#review-image-gallery-modal .gallery-close:focus {
    outline: 0.1875rem solid rgba(124,58,237,0.12);
    outline-offset: 2px;
}

#reviews > h4,
.product-reviews h4,
.product-reviews h4.mb-3 {
    display: none !important;
}

@media (max-width: 36rem) {
    #all-reviews-modal .modal-dialog {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        height: 100vh !important;
        display: flex;
        align-items: stretch;
    }

    #all-reviews-modal .modal-content {
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #all-reviews-modal .modal-body.review-modal_body,
    #all-reviews-modal .image-gallery-modal,
    #all-reviews-modal .all-reviews-container {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #all-reviews-modal .all-reviews-scroll {
        max-height: calc(100vh - 4rem);
    }

    #all-reviews-modal .reviews-list {
        padding: 1rem;
    }

    #all-reviews-modal .close {
        z-index: 30;
    }
}

@media (max-width: 47.9375rem) {
    .review-item .review-header-right {
        gap: 0.375rem;
    }

        .review-item .review-header-right .text-muted {
            font-size: 0.8rem;
        }

        .review-item .review-header-right .vote-btn {
            font-size: 1rem;
        }

            .review-item .review-header-right .vote-btn .b-icon {
                font-size: 0.75rem;
            }
}

.review-item .review-header-right .vote-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 1rem;
    color: var(--grey-60);
}

.review-item .review-header-right .text-muted {
    white-space: nowrap;
    font-size: 0.875rem;
}

.reviews-count {
    font-weight: 500;
}

.reviews-label {
    font-weight: 500;
}

.rating-value {
    font-weight: 600;
}
