/* Reviews Slider Container */
.reviews-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 50px;
    overflow: hidden;
}

/* Reviews Track */
.reviews-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Individual Review Slide */
.review-slide {
    flex: 0 0 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Review Card */
.review-card {
    background: #fafafa;
    border-radius: 4px;
    padding: 20px;
    height: 100%;
    position: relative;
}

/* Review Header */
.review-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.review-avatar {
    flex-shrink: 0;
    margin-right: 15px;
}

.review-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.review-meta {
    flex: 1;
    min-width: 0;
}

.reviewer-name {
    color: #202020;
    font-weight: 600;
    font-family: 'Cormorant';
    text-transform: lowercase;
    font-size: 16px;
}

.review-time {
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

/* Star Rating */
.review-stars {
    margin-bottom: 15px;
}

.stars-container {
    display: inline-flex;
    gap: 2px;
}

.star {
    display: inline-block;
    width: 17px;
    height: 17px;
}

.star svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Review Content */
.review-content {
    flex: 1;
    margin-bottom: 15px;
}

.review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
    height: 261px;
    overflow-y: auto;
    padding-right: 5px;
}

.review-text::-webkit-scrollbar {
    width: 6px;
}

.review-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.review-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.review-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.read-more {
    color: #4285f4;
    cursor: pointer;
    font-size: 13px;
    margin-top: 5px;
    display: inline-block;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #1a73e8;
    text-decoration: underline;
}

/* Review Images */
.review-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.review-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.review-images img:hover {
    transform: scale(1.05);
}

/* Source Icon */
.review-source {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-icon {
    display: block;
}

.google-icon {
    width: 25px;
    height: 25px;
}

.etsy-icon {
    width: 35px;
    height: 35px;
}

.facebook-icon {
    width: 25px;
    height: 25px;
}

.source-icon svg {
    width: 100%;
    height: 100%;
}

/* Navigation Buttons */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-nav svg {
    width: 20px;
    height: 20px;
    fill: #333;
}

/* Responsive Design */
@media (min-width: 768px) {
    .review-slide {
        flex: 0 0 50%;
    }
    
    .reviews-slider-container {
        padding: 0 60px;
    }
}

@media (min-width: 1024px) {
    .review-slide {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 767px) {
    .reviews-slider-container {
        padding: 0 40px;
    }
    
    .slider-nav {
        width: 35px;
        height: 35px;
    }
    
    .slider-prev {
        left: 5px;
    }
    
    .slider-next {
        right: 5px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .review-text {
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 425px) {
    .review-slide {
        flex: 0 0 100%;
    }
}

/* Loading State */
.reviews-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.reviews-loading:before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.reviews-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.reviews-empty h3 {
    color: #666;
    margin-bottom: 10px;
}

/* Accessibility */
.slider-nav:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

.review-card:focus-within {
    box-shadow: 0 0 0 2px #4285f4;
}

/* Print Styles */
@media print {
    .slider-nav {
        display: none;
    }
    
    .reviews-track {
        display: block;
    }
    
    .review-slide {
        width: 100%;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Smooth Scrolling for Infinite Loop */
.reviews-track.no-transition {
    transition: none !important;
}

/* Hide cloned slides from screen readers */
.review-slide.cloned {
    aria-hidden: true;
}

/* Lightbox Styles */
.reviews-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.reviews-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: #333;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: #333;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 1);
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* Mobile responsive lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-close {
        top: -40px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: -50px;
    }
    
    .lightbox-next {
        right: -50px;
    }
}

@media (max-width: 480px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        position: fixed;
    }
    
    .lightbox-prev {
        left: 10px;
        position: fixed;
        top: 50%;
    }
    
    .lightbox-next {
        right: 10px;
        position: fixed;
        top: 50%;
    }
}
