/**
 * Category Reviews Page Styles
 * 分类产品评论页面样式
 */

/* ========================================
   页面容器
   ======================================== */
.cr-reviews-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 0 60px;
}

/* ========================================
   面包屑导航 - 与产品详情页统一样式
   ======================================== */
.pd-breadcrumb {
    background-color: #f5f5f5;
    padding: 15px 0;
}

.pd-breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.pd-breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.pd-breadcrumb-nav a:hover {
    color: #e91e63;
}

.pd-breadcrumb-sep {
    margin: 0 10px;
    color: #999;
}

.pd-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* ========================================
   标题和描述
   ======================================== */
.cr-reviews-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.cr-reviews-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #c41230;
    margin: 0 0 20px;
}

.cr-title-line {
    display: inline-block;
    width: 60px;
    height: 2px;
    background: #c41230;
}

.cr-reviews-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    width: 100%;
    margin: 0;
    text-align: justify;
}

/* ========================================
   主内容区域 - 左右布局
   ======================================== */
.cr-reviews-main {
    display: flex;
    gap: 30px;
}

/* 左侧边栏 20% */
.cr-reviews-sidebar {
    width: 20%;
    min-width: 180px;
    flex-shrink: 0;
}

.cr-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    cursor: pointer;
}

.cr-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #c41230;
}

.cr-sidebar-toggle {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.cr-sidebar-toggle.is-open {
    transform: rotate(-135deg);
}

.cr-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    max-height: 600px;
    overflow-y: auto;
}

.cr-sidebar-list.is-collapsed {
    display: none;
}

.cr-sidebar-item {
    border-bottom: 1px solid #f0f0f0;
}

.cr-sidebar-item:last-child {
    border-bottom: none;
}

.cr-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.cr-sidebar-item a:hover {
    background: #fafafa;
    color: #c41230;
}

.cr-sidebar-item.is-active a {
    background: #fff5f5;
    color: #c41230;
    font-weight: 500;
}

.cr-sidebar-arrow {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1px solid #c41230;
    border-bottom: 1px solid #c41230;
    transform: rotate(-45deg);
}

/* 右侧内容区 80% */
.cr-reviews-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   评论项目
   ======================================== */
.cr-review-item {
    display: flex;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
}

.cr-review-item:first-child {
    padding-top: 0;
}

.cr-review-item:last-child {
    border-bottom: none;
}

/* 产品图片 25% */
.cr-review-product-image {
    width: 25%;
    min-width: 150px;
    flex-shrink: 0;
}

.cr-review-product-image a {
    display: block;
}

.cr-review-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

/* 评论详情 75% */
.cr-review-details {
    flex: 1;
    min-width: 0;
}

/* 产品名称 */
.cr-review-product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.4;
}

.cr-review-product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.cr-review-product-name a:hover {
    color: #c41230;
}

/* 评论元信息 */
.cr-review-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.cr-review-author,
.cr-review-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cr-icon-user,
.cr-icon-calendar {
    color: #999;
}

/* 星级评分 */
.cr-review-rating {
    display: flex;
    gap: 2px;
}

.cr-star {
    color: #ddd;
    font-size: 14px;
}

.cr-star.cr-star-filled {
    color: #f5a623;
}

/* 评论内容 */
.cr-review-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

/* 评论图片 */
.cr-review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.cr-review-img-link {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.cr-review-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cr-review-img-link:hover img {
    transform: scale(1.05);
}

.cr-review-video-wrap {
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    position: relative;
    cursor: pointer;
}

.cr-review-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

.cr-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cr-video-play-btn svg {
    margin-left: 3px;
}

.cr-review-video-wrap.is-playing .cr-video-play-btn {
    display: none;
}

/* 视频弹窗 */
.cr-video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.cr-video-modal.is-active {
    display: flex;
}

.cr-video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.cr-video-modal-video {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.cr-video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.cr-video-modal-close:hover {
    color: #c41230;
}

/* ========================================
   操作按钮
   ======================================== */
.cr-review-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.cr-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: none;
    border: none;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.cr-action-btn:hover {
    color: #c41230;
}

.cr-action-btn svg {
    stroke: currentColor;
}

.cr-like-btn:hover,
.cr-like-btn.is-active {
    color: #c41230;
}

.cr-dislike-btn:hover,
.cr-dislike-btn.is-active {
    color: #666;
}

.cr-reply-btn {
    margin-left: auto;
}

.cr-reply-btn:hover {
    color: #c41230;
}

/* ========================================
   回复表单
   ======================================== */
.cr-reply-form {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.cr-reply-to {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.cr-reply-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.cr-reply-textarea:focus {
    outline: none;
    border-color: #c41230;
}

.cr-reply-submit {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 25px;
    background: #c41230;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.cr-reply-submit:hover {
    background: #a50f28;
}

/* ========================================
   回复列表
   ======================================== */
.cr-replies-list {
    margin-top: 15px;
    padding: 15px;
    background: #fafafa;
    border-radius: 4px;
}

.cr-reply-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.cr-reply-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cr-reply-item:first-child {
    padding-top: 0;
}

.cr-reply-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 12px;
}

.cr-reply-author {
    color: #c41230;
    font-weight: 500;
}

.cr-reply-date {
    color: #999;
}

.cr-reply-content {
    font-size: 13px;
    line-height: 1.7;
    color: #555;
}

/* ========================================
   无评论提示
   ======================================== */
.cr-no-reviews {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ========================================
   分类卡片列表
   ======================================== */
.cr-reviews-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.cr-category-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s;
}

.cr-category-card:hover {
    border-color: #c41230;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.cr-category-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.cr-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cr-category-card:hover .cr-category-thumb img {
    transform: scale(1.05);
}

.cr-category-info {
    padding: 15px;
    text-align: center;
}

.cr-category-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.cr-category-count {
    font-size: 13px;
    color: #c41230;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .cr-reviews-main {
        flex-direction: column;
    }
    
    .cr-reviews-sidebar {
        width: 100%;
    }
    
    .cr-sidebar-list {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .cr-reviews-page {
        padding: 15px 10px 30px;
    }
    
    .cr-reviews-title {
        font-size: 20px;
        gap: 15px;
    }
    
    .cr-title-line {
        width: 40px;
    }
    
    .cr-review-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .cr-review-product-image {
        width: 100%;
        max-width: 200px;
    }
    
    .cr-review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cr-review-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .cr-reply-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cr-reviews-breadcrumb {
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .cr-reviews-title {
        font-size: 18px;
    }
    
    .cr-review-product-name {
        font-size: 14px;
    }
}
