/* 评论容器样式 */
.simulated-comment {
    margin-bottom: 20px;
    max-width: 100%;
}

/* 评论间分割线 */
.simulated-comment::after {
    content: '';
    display: block;
    width: calc(100% - 40px);
    height: 1px;
    border-bottom: 1px dashed #eaeaea;
    margin: 20px auto;
}

.simulated-comment:last-child::after {
    display: none;
}

/* 评论头部 */
.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    position: relative;
}

/* 头像样式 */
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    object-fit: cover;
    margin-right: 10px !important;
    overflow: hidden;
    flex-shrink: 0;
}

.default-avatar {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
}

/* 评论元数据 */
.comment-meta {
    flex: 1;
    padding-top: 2px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    display: inline-block;
}

.comment-product {
    font-size: 14px;
    color: #999999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    background: #ff4d4f;
    color: white;
    font-size: 12px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 4px;
    height: 18px;
}

.comment-time {
    font-size: 14px;
    color: #999;
    position: absolute;
    right: 0px;
    top: 0;
}

/* 评论内容 */
.comment-content {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    margin-left: 50px;
    clear: both;
}

.comment-content p {
    margin-bottom: 10px !important;
    margin-top: 0;
}

/* 评论图片 - 关键调整：确保紧凑排列且间距正确 */
.comment-images {
    display: flex !important; /* 强制启用flex布局 */
    gap: 10px !important; /* 图片左右间距精确10px */
    margin-top: 0 !important; /* 移除顶部额外间距 */
    padding: 0 !important; /* 清除内边距 */
    justify-content: flex-start !important; /* 左对齐排列 */
    flex-wrap: wrap !important; /* 超出自动换行 */
}

.comment-image {
    width: 80px; /* 固定宽度确保排列整齐 */
    height: 80px; /* 固定高度确保排列整齐 */
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 0 !important; /* 清除图片自身可能的外边距 */
    padding: 0 !important; /* 清除图片自身可能的内边距 */
    display: block !important; /* 确保图片为块级元素 */
}

.comment-image:hover {
    transform: scale(1.05);
}

/* 图片查看器 */
.comment-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border: 4px solid white;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #ddd;
}

/* 新增：昵称右侧自定义标签样式 */
.custom-tag {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    height: 22px;
    vertical-align: middle;
}

/* 保持原有样式兼容，移除固定颜色定义 */
.product-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 4px;
    height: 18px;
    /* 移除原有固定背景色和文字色定义，改为通过内联样式控制 */
}

/* 标签链接样式调整 */
.custom-tag, .product-badge {
    text-decoration: none !important; /* 移除默认下划线 */
}

.custom-tag:hover, .product-badge:hover {
    opacity: 0.9; /*  hover时轻微透明度变化提示可点击 */
    text-decoration: none; /* 确保hover时也无下划线 */
}