/* Reviews Section Modern Restyling */
.reviews-section {
    padding: 60px 20px;
    background-color: #fff;
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--font-body-family);
}

/* Header Grid Layout */
.reviews-header-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
    align-items: start;
}

.reviews-header-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reviews-title-row {
    margin-bottom: 10px;
}

.reviews-title {
    font-size: 2.4rem;
    color: #333;
    margin: 0;
    font-weight: 700;
}

/* Rating Summary & Distribution */
.rating-overview-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.rating-big-number-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 140px;
}

.reviews-average {
    font-size: 5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.stars-icon {
    color: #FFB800;
    /* Yellow */
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.total-reviews {
    color: #666;
    font-size: 1.3rem;
}

.rating-bars-block {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 300px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: #666;
}

.star-label {
    min-width: 20px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.star-label span {
    color: #FFB800;
    /* Yellow */
}

.bar-track {
    flex-grow: 1;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: #FFB800;
    border-radius: 4px;
    display: block !important;
}

/* Header Right - Photos & Actions */
.reviews-header-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.photos-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.reviews-gallery-preview {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-thumb:hover {
    transform: scale(1.05);
}

.gallery-more-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
    font-size: 1.4rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gallery-more-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.gallery-more-text {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 5px;
    border-radius: 4px;
}

.actions-row {
    display: none;
    /* Consistently hidden as requested */
}

.write-review-btn {
    background-color: #FFB800;
    /* Yellow */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.3s;
}

.write-review-btn:hover {
    background-color: #e5a700;
}

.filters-container {
    display: flex;
    gap: 10px;
}

.review-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 1.3rem;
    color: #555;
    cursor: pointer;
}

/* Reviews Grid Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Review Card */
.review-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.review-image-container {
    width: 100%;
    height: 180px;
    /* Reduced height as requested */
    background: #f9f9f9;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
}

.review-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.review-card:hover .review-img {
    transform: scale(1.05);
}

.review-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.review-author-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ccc;
    /* Fallback */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    flex-shrink: 0;
}

.review-meta {
    display: flex;
    flex-direction: column;
}

.review-name {
    font-weight: 700;
    font-size: 1.3rem;
    color: #333;
    line-height: 1.2;
}

.verified-badge {
    color: #27b50a;
    /* Green */
    font-size: 1.2rem;
    margin-left: 4px;
}

.review-date {
    font-size: 1.1rem;
    color: #999;
}

.review-rating-stars {
    color: #FFB800;
    /* Yellow */
    font-size: 12px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.review-text {
    font-size: 1.3rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 5px;
    /* Reduced to sit tighter with read more */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.read-more-link {
    font-size: 1.2rem;
    color: #FFB800;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    display: none;
    /* Hidden by default, toggled by JS */
    margin-bottom: 10px;
}

.read-more-link:hover {
    color: #e5a700;
}

.review-footer {
    margin-top: auto;
    border-top: 1px solid #f5f5f5;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: #999;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.load-more-btn {
    background: white;
    border: 1px solid #ccc;
    color: #333;
    padding: 10px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    border-color: #333;
    background: #f9f9f9;
}

/* Lightbox Styles */
.review-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2147483647;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.review-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}

/* Product Header Badge Styles */
.product-reviews-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    width: fit-content;
}

.product-reviews-badge .stars {
    color: #FFB800;
    /* Yellow */
    font-size: 18px;
    letter-spacing: 1px;
}

.product-reviews-badge .text {
    font-size: 1.4rem;
    color: #555;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-reviews-badge:hover .text {
    color: #2e5c42;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .reviews-header-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .rating-overview-row {
        width: 100%;
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Columns on tablet */
    }
}

@media (max-width: 480px) {
    .reviews-section {
        padding: 40px 15px;
    }

    .rating-overview-row {
        flex-direction: row;
        /* Keep side-by-side on mobile if fits, otherwise wrap */
        gap: 20px;
    }

    .reviews-average {
        font-size: 4rem;
    }

    .rating-bars-block {
        width: 100%;
    }

    .reviews-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 Columns on mobile as requested */
        gap: 10px;
        /* Smaller gap for mobile */
    }

    .review-image-container {
        height: 180px;
        /* Even smaller images for 2-col layout */
    }

    .review-content {
        padding: 10px;
    }

    .review-name {
        font-size: 1.1rem;
    }

    .review-text {
        font-size: 1.1rem;
    }

    .gallery-thumb {
        width: 50px;
        height: 50px;
    }

    .gallery-more-placeholder {
        width: 50px;
        height: 50px;
    }

    .actions-row {
        /* Already hidden at root but kept here for fallback logic if needed later */
        flex-direction: column;
        align-items: stretch;
    }

    .write-review-btn {
        width: 100%;
        text-align: center;
    }
}