/* Shared Bouqshop customer reviews component (product + seller shop) */

.bq-customer-reviews {
    width: 100%;
    margin-top: 24px;
    margin-bottom: 22px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: none;
}

.bq-shop-page .home-section#reviews .bq-customer-reviews {
    margin-top: 0;
    margin-bottom: 0;
}

.bq-reviews-heading-row {
    margin-bottom: 0;
}

.bq-reviews-title {
    margin: 0 0 18px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    color: #222222;
}

.bq-reviews-layout {
    display: grid;
    grid-template-columns: minmax(245px, 300px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.bq-reviews-summary {
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.bq-review-score {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #222222;
}

.bq-review-stars {
    margin-top: 8px;
}

.bq-review-stars i {
    color: #e6a326;
}

.bq-review-total {
    margin-top: 8px;
    font-size: 13px;
    color: #777777;
}

.bq-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.bq-rating-breakdown-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 38px;
    gap: 8px;
    align-items: center;
}

.bq-rating-label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #555555;
}

.bq-rating-label i {
    color: #e6a326;
}

.bq-rating-progress {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #ececec;
}

.bq-rating-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #e6a326;
}

.bq-rating-percent {
    font-size: 11px;
    text-align: right;
    color: #777777;
}

.bq-write-review-btn {
    margin-top: 18px;
    min-height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #315d4f;
    border-radius: 7px;
    background: #ffffff;
    color: #315d4f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.bq-write-review-btn:hover {
    background: #315d4f;
    color: #ffffff;
}

.bq-reviews-content {
    min-width: 0;
}

.bq-reviews-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    border: 1px dashed #e5e5e5;
    border-radius: 14px;
    background: #ffffff;
}

.bq-reviews-empty-icon {
    margin-bottom: 10px;
    font-size: 26px;
    color: #557569;
}

.bq-reviews-empty h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222222;
}

.bq-reviews-empty p {
    margin: 5px 0 0;
    font-size: 12px;
    color: #777777;
}

.bq-review-cards-wrap {
    position: relative;
    min-width: 0;
}

.bq-review-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bq-review-cards.is-scrollable {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.bq-review-cards.is-scrollable::-webkit-scrollbar {
    display: none;
}

.bq-review-cards.is-scrollable .bq-review-card {
    flex: 0 0 calc((100% - 24px) / 3);
    scroll-snap-align: start;
}

.bq-review-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #ffffff;
}

.bq-review-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bq-review-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 50%;
    background: #f1f1f1;
}

.bq-review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bq-review-customer {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bq-review-customer strong {
    font-size: 12px;
    color: #282828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bq-review-verified {
    margin-top: 2px;
    font-size: 10px;
    color: #48705f;
}

.bq-review-date {
    margin-left: auto;
    font-size: 10px;
    color: #999999;
    white-space: nowrap;
}

.bq-review-card-stars {
    margin-top: 10px;
}

.bq-review-card-stars i {
    font-size: 13px;
    margin-right: 1px !important;
    color: #e6a326;
}

.bq-review-comment {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #555555;
}

.bq-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.bq-review-photo {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f7f7;
    cursor: pointer;
}

.bq-review-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bq-reviews-prev,
.bq-reviews-next {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background: #ffffff;
    color: #315d4f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transform: translateY(-50%);
}

.bq-reviews-prev:disabled,
.bq-reviews-next:disabled {
    cursor: default;
    opacity: 0.45;
}

.bq-reviews-prev {
    left: -10px;
}

.bq-reviews-next {
    right: -10px;
}

.bq-reviews-prev:hover:not(:disabled),
.bq-reviews-next:hover:not(:disabled) {
    border-color: #315d4f;
}

#reviewImageModal:not(.show) {
    display: none !important;
}

.bq-review-image-modal-body {
    position: relative;
}

.bq-review-image-modal-body #modalReviewImage {
    max-height: 40vh;
    width: 100%;
    object-fit: contain;
}

.bq-review-image-modal-body #prevImageBtn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.bq-review-image-modal-body #nextImageBtn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.bq-review-image-close {
    position: absolute;
    top: -15px;
    right: -15px;
}

@media (max-width: 991px) {
    .bq-reviews-layout {
        grid-template-columns: 1fr;
    }

    .bq-review-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bq-review-cards.is-scrollable .bq-review-card {
        flex: 0 0 calc((100% - 12px) / 2);
    }
}

@media (max-width: 767px) {
    .bq-reviews-layout {
        grid-template-columns: 1fr;
    }

    .bq-review-cards,
    .bq-review-cards.is-scrollable {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .bq-review-cards.is-scrollable .bq-review-card {
        flex: none;
    }

    .bq-reviews-prev,
    .bq-reviews-next {
        display: none;
    }
}

@media (max-width: 575px) {
    .bq-customer-reviews {
        padding: 16px;
    }
}
