/**
 * Customer Review Masonry Layout
 * 客户评论瀑布流布局 - 一排2个，真正的瀑布流效果
 */

/* ========== 瀑布流容器 ========== */
.list3 .cbx {
    column-count: 2;
    column-gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 评论卡片 ========== */
.list3 .cson {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 30px;
    display: inline-block;
    width: 100%;
}

.list3 .cson:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

/* ========== 用户信息 ========== */
.list3 .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.list3 .user-info .img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #D4AF37;
}

.list3 .user-info .name {
    font-size: 15px;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0;
    flex: 1;
}

.list3 .user-info .date {
    font-size: 12px;
    color: #999;
}

/* ========== 评论内容 ========== */
.list3 .text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list3 .text .p {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
    word-wrap: break-word;
}

.list3 .text .p.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.list3 .show-more {
    color: #D4AF37;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.list3 .show-more:hover {
    color: #B8860B;
}

/* ========== 图片区域 ========== */
.list3 .img-box {
    margin-bottom: 15px;
}

.list3 .single-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.list3 .single-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.list3 .single-image:hover img {
    transform: scale(1.05);
}

/* ========== Swiper轮播图 ========== */
.list3 .swiper-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.list3 .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.list3 .swiper-button-prev,
.list3 .swiper-button-next {
    color: #D4AF37;
    background: rgba(255,255,255,0.9);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.list3 .swiper-button-prev:after,
.list3 .swiper-button-next:after {
    font-size: 16px;
}

.list3 .swiper-button-prev:hover,
.list3 .swiper-button-next:hover {
    background: white;
    color: #B8860B;
}

/* ========== 回复区域 ========== */
.list3 .rep {
    background: #F8F8F8;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 3px solid #D4AF37;
}

.list3 .rep .user-info {
    border-bottom: none;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.list3 .rep .user-info .img {
    width: 35px;
    height: 35px;
}

.list3 .rep .text .p {
    font-size: 13px;
    margin-bottom: 10px;
}

/* ========== 评论按钮 ========== */
.list3 .comment-btn {
    align-self: flex-start;
    padding: 8px 20px;
    background: linear-gradient(135deg, #D4AF37, #B8860B);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.list3 .comment-btn:hover {
    background: linear-gradient(135deg, #B8860B, #9A7209);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .list3 .cbx {
        column-gap: 25px;
        padding: 0 15px;
    }
    
    .list3 .cson {
        padding: 20px;
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    .list3 .cbx {
        column-count: 1;
        column-gap: 0;
    }
    
    .list3 .cson {
        padding: 18px;
        margin-bottom: 20px;
    }
    
    .list3 .user-info .img {
        width: 40px;
        height: 40px;
    }
    
    .list3 .user-info .name {
        font-size: 14px;
    }
    
    .list3 .text .p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .list3 .cbx {
        padding: 0 10px;
    }
    
    .list3 .cson {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .list3 .user-info {
        gap: 10px;
    }
    
    .list3 .user-info .img {
        width: 35px;
        height: 35px;
    }
}

/* ========== 评论表单区域 ========== */
.list1 .cbxm {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.list1 .eva {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.list1 .eva label {
    display: block;
}

.list1 .eva label > span {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 15px;
    display: block;
}

.list1 .eva textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.list1 .eva textarea:focus {
    outline: none;
    border-color: #D4AF37;
}

/* ========== 图片上传区域 ========== */
.upload-area {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #E0E0E0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: rgba(255,0,0,0.8);
}

.add-image-btn {
    width: 100px;
    height: 100px;
    border: 2px dashed #D4AF37;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #FFF8E7;
}

.add-image-btn:hover {
    background: #F4E4C1;
    border-color: #B8860B;
}

.add-image-btn i {
    font-size: 24px;
    color: #D4AF37;
    margin-bottom: 5px;
}

.add-image-btn span {
    font-size: 12px;
    color: #666;
}

.file-input {
    display: none;
}

.submit-area {
    margin-top: 20px;
    text-align: right;
}

.submit-area .comment-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #D4AF37, #B8860B);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-area .comment-btn:hover {
    background: linear-gradient(135deg, #B8860B, #9A7209);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

.submit-area .comment-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ========== 弹窗样式 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #D4AF37;
    color: white;
}

/* ========== 分页样式 ========== */
.cbx2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* 防止被瀑布流影响 */
    column-count: 1 !important;
}

.page-fenye {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    gap: 20px;
    /* 防止被瀑布流影响 */
    break-inside: auto;
    column-span: all;
}

/* 显示结果文本 - 放在上方 */
.page-fenye p,
.page-fenye .pagination-info {
    margin: 0;
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* Laravel 分页导航容器 */
.page-fenye nav,
.page-fenye .pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 分页链接和当前页 - 统一样式 */
.page-fenye a,
.page-fenye span,
.page-fenye .page-link,
.page-fenye .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: white;
    flex-shrink: 0;
}

/* Previous/Next 按钮 - 允许更宽 */
.page-fenye a[rel="prev"],
.page-fenye a[rel="next"],
.page-fenye span[aria-label*="Previous"],
.page-fenye span[aria-label*="Next"],
.page-fenye .page-item:first-child .page-link,
.page-fenye .page-item:last-child .page-link {
    min-width: auto;
    max-width: none;
    padding: 0 12px;
    color: #666;
    font-weight: 400;
}

/* 悬停效果 - 简洁的蓝色 */
.page-fenye a:hover,
.page-fenye .page-link:hover {
    background: #E8F4FD;
    color: #4A90E2;
    border-color: #4A90E2;
}

/* 当前页样式 - 蓝色背景 */
.page-fenye .active,
.page-fenye span[aria-current="page"],
.page-fenye .page-item.active .page-link {
    background: #4A90E2 !important;
    color: white !important;
    border-color: #4A90E2 !important;
    font-weight: 500;
}

/* 禁用状态 */
.page-fenye .disabled,
.page-fenye span[aria-disabled="true"],
.page-fenye .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: #F5F5F5;
}

/* 省略号 */
.page-fenye .dots,
.page-fenye span[aria-disabled="true"]:not([aria-label]),
.page-fenye .page-item.disabled span {
    border: none;
    background: transparent;
    color: #999;
    cursor: default;
    min-width: 20px;
    max-width: 20px;
}

/* 箭头符号 */
.page-fenye a[rel="prev"]::before,
.page-fenye span[aria-label*="Previous"]::before {
    content: "‹";
    margin-right: 4px;
}

.page-fenye a[rel="next"]::after,
.page-fenye span[aria-label*="Next"]::after {
    content: "›";
    margin-left: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-fenye {
        gap: 15px;
        margin: 30px 0;
    }
    
    .page-fenye a,
    .page-fenye span,
    .page-fenye .page-link {
        min-width: 34px;
        max-width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .page-fenye a[rel="prev"],
    .page-fenye a[rel="next"],
    .page-fenye span[aria-label*="Previous"],
    .page-fenye span[aria-label*="Next"],
    .page-fenye .page-item:first-child .page-link,
    .page-fenye .page-item:last-child .page-link {
        padding: 0 10px;
    }
    
    .page-fenye p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-fenye {
        gap: 12px;
    }
    
    .page-fenye a,
    .page-fenye span,
    .page-fenye .page-link {
        min-width: 32px;
        max-width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .page-fenye a[rel="prev"],
    .page-fenye a[rel="next"],
    .page-fenye span[aria-label*="Previous"],
    .page-fenye span[aria-label*="Next"],
    .page-fenye .page-item:first-child .page-link,
    .page-fenye .page-item:last-child .page-link {
        padding: 0 8px;
        font-size: 12px;
    }
    
    /* 在小屏幕上隐藏部分页码 */
    .page-fenye nav a:not([rel]):not(.active):nth-child(n+6),
    .page-fenye .page-item:not(:first-child):not(:last-child):not(.active):nth-child(n+6) {
        display: none;
    }
    
    .page-fenye p {
        font-size: 12px;
    }
}
