/* ================================
   Product Reviews Page Styles
   Modern Design with Theme Colors
   Horizontal Layout: Image Left, Text Right
   ================================ */

.reviews-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
    background: linear-gradient(135deg, var(--md-sys-color-surface, #fcf9ef) 0%, var(--md-sys-color-surface-container-low, #f9f6ec) 100%);
}

.reviews-header {
    text-align: center;
    margin-bottom: 64px;
}

.reviews-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--md-sys-color-primary, #5f7a5b);
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.reviews-header p {
    font-size: 18px;
    color: var(--md-sys-color-on-surface-variant, #5a5649);
    margin: 0;
    font-weight: 400;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.review-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(95, 122, 91, 0.08), 0 1px 2px rgba(95, 122, 91, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--md-sys-color-outline-variant, #d1cdc1);
    display: flex;
    flex-direction: row;
    min-height: 220px;
}

.review-card:hover {
    box-shadow: 0 8px 24px rgba(95, 122, 91, 0.15), 0 4px 8px rgba(95, 122, 91, 0.1);
    transform: translateY(-4px);
    border-color: var(--md-sys-color-primary, #5f7a5b);
}

.review-customer-images {
    position: relative;
    flex-shrink: 0;
    width: 45%;
    display: grid;
    grid-template-rows: 1fr;
    gap: 0;
    background: var(--md-sys-color-surface-container-low, #f9f6ec);
    overflow: hidden;
}

.review-customer-images.single-image {
    grid-template-rows: 1fr;
}

/* When there are 2 images, stack them vertically */
.review-customer-images:not(.single-image) {
    grid-template-rows: 1fr 1fr;
}

.review-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.review-secondary-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.review-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.review-rating .star {
    font-size: 18px;
    color: #e8e8e8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.review-rating .star.filled {
    color: #FBBF24;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.review-message {
    font-size: 17px;
    line-height: 1.7;
    color: var(--md-sys-color-on-surface, #1d1c16);
    margin: 0 0 14px 0;
    font-weight: 400;
    letter-spacing: 0.01em;
    flex-grow: 1;
}

.review-customer {
    font-size: 16px;
    font-weight: 600;
    color: var(--md-sys-color-primary, #5f7a5b);
    margin: 0 0 18px 0;
    font-style: normal;
    letter-spacing: 0.02em;
}

.review-product-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--md-sys-color-surface-container-highest, #e7e4da) 0%, var(--md-sys-color-surface-container-high, #ebe8de) 100%);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(95, 122, 91, 0.15);
}

.review-product-link:hover {
    background: linear-gradient(135deg, var(--md-sys-color-primary, #5f7a5b) 0%, var(--md-sys-color-secondary, #4a6b46) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(95, 122, 91, 0.3);
}

.product-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.review-product-link:hover .product-thumbnail {
    transform: scale(1.05);
}

.review-product-link span {
    font-size: 13px;
    color: var(--md-sys-color-primary, #5f7a5b);
    font-weight: 600;
    flex: 1;
    transition: color 0.3s;
    letter-spacing: 0.01em;
}

.review-product-link:hover span {
    color: #ffffff;
}

.no-reviews {
    text-align: center;
    padding: 100px 24px;
    color: var(--md-sys-color-on-surface-variant, #5a5649);
    font-size: 18px;
    grid-column: 1 / -1;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .reviews-container {
        padding: 40px 16px;
    }

    .reviews-header {
        margin-bottom: 40px;
    }

    .reviews-header h1 {
        font-size: 28px;
    }

    .reviews-header p {
        font-size: 15px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .review-card {
        flex-direction: column;
        min-height: auto;
    }

    .review-customer-images {
        width: 100%;
        min-height: 200px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }

    .review-customer-images.single-image {
        grid-template-columns: 1fr;
    }

    .review-customer-images:not(.single-image) {
        grid-template-rows: 1fr;
        grid-template-columns: 1fr 1fr;
    }

    .review-content {
        padding: 20px;
    }

    .review-message {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 12px;
    }

    .review-customer {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .product-thumbnail {
        width: 36px;
        height: 36px;
    }

    .review-product-link {
        padding: 10px 12px;
    }

    .review-product-link span {
        font-size: 12px;
    }

    .review-rating .star {
        font-size: 16px;
    }
}

/* Tablet - Keep 2 columns but smaller */
@media (min-width: 769px) and (max-width: 1024px) {
    .reviews-container {
        max-width: 100%;
        padding: 50px 20px;
    }

    .review-customer-images {
        width: 40%;
    }

    .review-content {
        padding: 20px;
    }

    .review-message {
        font-size: 16px;
    }

    .review-customer {
        font-size: 15px;
    }
}

/* Animation for cards appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.review-card:nth-child(1) {
    animation-delay: 0.1s;
}

.review-card:nth-child(2) {
    animation-delay: 0.2s;
}

.review-card:nth-child(3) {
    animation-delay: 0.3s;
}

.review-card:nth-child(4) {
    animation-delay: 0.4s;
}

.review-card:nth-child(5) {
    animation-delay: 0.5s;
}

.review-card:nth-child(6) {
    animation-delay: 0.6s;
}

.review-card:nth-child(7) {
    animation-delay: 0.7s;
}

.review-card:nth-child(8) {
    animation-delay: 0.8s;
}

/* Smooth gradient overlay on images on hover */
.review-customer-images::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.review-card:hover .review-customer-images::after {
    opacity: 1;
}