/* Testimonial Carousel Widget Styles */
.yoowan-testimonial-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
    background-color: #ffffff; /* 白色背景 */
}

.yoowan-testimonial-carousel {
    position: relative;
    background-color: #ffffff; /* 白色背景 */
}

/* Elementor Editor Specific Styles */
.yoowan-testimonial-carousel.elementor-editor-active {
    pointer-events: all;
}

.yoowan-testimonial-carousel.elementor-editor-active .yoowan-testimonial-card {
    animation: none !important;
    transform: none !important;
    cursor: default !important;
}

.yoowan-testimonial-carousel.elementor-editor-active .yoowan-testimonial-card:hover {
    transform: none !important;
}

.yoowan-carousel-wrapper {
    overflow: hidden;
    background-color: #ffffff; /* 白色背景 */
}

.yoowan-carousel-items {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    width: fit-content;
    background-color: #ffffff; /* 白色背景 */
}

/* Card Styles */
.yoowan-testimonial-card {
    flex: 0 0 auto;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin: 0 15px;
    transition: none;
    min-height: 450px;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.yoowan-testimonial-card:hover {
    /* 移除 hover 效果 */
}

/* Product Image Section */
.yoowan-testimonial-product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
    border-radius: 16px 16px 0 0;
}

.yoowan-testimonial-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content Section */
.yoowan-testimonial-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Rating Stars */
.yoowan-testimonial-rating {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.yoowan-rating-star {
    color: #ddd;
    font-size: 16px;
    transition: color 0.3s ease;
}

.yoowan-rating-star.filled {
    color: #000000;
}

/* User Line with Name and Verified Badge */
.yoowan-testimonial-user-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.yoowan-testimonial-username {
    font-weight: 600;
    font-size: 14px;
    color: #222222;
}

.yoowan-testimonial-verified {
    background-color: #000000;
    color: white;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
    text-transform: capitalize;
}

/* Review Title */
.yoowan-testimonial-review-title {
    font-weight: 700;
    font-size: 18px;
    color: #222222;
    margin: 0 0 12px 0;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
}

/* Comment Text */
.yoowan-testimonial-comment {
    font-size: 14px;
    line-height: 1.6;
    color: #444444;
    margin: 0 0 12px 0;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
}

/* Author/Source */
.yoowan-testimonial-author {
    font-size: 13px;
    color: #666666;
    margin-bottom: 6px;
    font-weight: 500;
}

/* Date */
.yoowan-testimonial-date {
    font-size: 13px;
    color: #999999;
    margin-top: auto;
}

/* Carousel Navigation Arrows */
.yoowan-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 28px;
    color: #555555;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.yoowan-carousel-arrow:hover {
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.yoowan-carousel-prev {
    left: 15px;
}

.yoowan-carousel-next {
    right: 15px;
}

/* Carousel Dots */
.yoowan-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.yoowan-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e0e0e0;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.yoowan-carousel-dot:hover {
    background-color: #999999;
}

.yoowan-carousel-dot.active {
    background-color: #555555;
    width: 24px;
    border-radius: 5px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .yoowan-testimonial-card {
        min-height: 380px;
    }
    
    .yoowan-testimonial-product-image {
        height: 250px;
    }
}

@media (max-width: 992px) {
    .yoowan-testimonial-card {
        min-height: 360px;
        margin: 0 12px;
    }
    
    .yoowan-testimonial-product-image {
        height: 220px;
    }
    
    .yoowan-testimonial-content {
        padding: 20px;
    }
    
    .yoowan-carousel-arrow {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    /* Mobile: Show 1 card with peek of next card */
    .yoowan-carousel-wrapper {
        overflow: hidden; /* Keep overflow hidden for proper clipping */
        padding-right: 0; /* Remove extra padding */
    }
    
    .yoowan-carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
        z-index: 20; /* Ensure arrows are above cards */
    }
    
    .yoowan-carousel-prev {
        left: 10px;
    }
    
    .yoowan-carousel-next {
        right: 10px;
    }
    
    .yoowan-testimonial-card {
        /* Width controlled by JavaScript for peek effect */
        margin: 0; /* Margin controlled by JavaScript */
        min-height: 340px;
        max-width: none; /* Remove max-width restriction */
    }
    
    .yoowan-testimonial-product-image {
        height: 200px;
    }
    
    .yoowan-testimonial-content {
        padding: 18px;
    }
    
    .yoowan-testimonial-review-title {
        font-size: 16px;
    }
    
    .yoowan-testimonial-comment {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .yoowan-testimonial-card {
        padding: 0;
        margin: 0; /* Margin controlled by JavaScript */
        min-height: 320px;
        max-width: none; /* Remove max-width restriction */
    }
    
    .yoowan-testimonial-product-image {
        height: 180px;
    }
    
    .yoowan-testimonial-content {
        padding: 16px;
    }
    
    .yoowan-carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 18px;
        z-index: 20;
    }
    
    .yoowan-carousel-prev {
        left: 8px;
    }
    
    .yoowan-carousel-next {
        right: 8px;
    }
    
    .yoowan-testimonial-comment {
        font-size: 12px;
    }
    
    .yoowan-testimonial-review-title {
        font-size: 15px;
    }
}

/* Animation - 移除动画效果 */
.yoowan-testimonial-card {
    animation: none;
}

/* Print styles */
@media print {
    .yoowan-carousel-arrow,
    .yoowan-carousel-dots {
        display: none;
    }
}
