/**
 * 现代化设计增强样式
 * 基于以下设计导向：
 * 1. 卡片式设计
 * 2. 响应式设计
 * 3. 内容驱动
 * 4. 社交化元素
 * 5. 电商功能整合
 * 
 * @version 1.0
 * @author RENZHUNLA
 */

/* ============================================
   1. 卡片式设计优化
   ============================================ */

/* 基础卡片样式 - 现代化设计 */
.modern-card,
.feed-hot-card,
.product-card,
.card-large .card-large-li,
.feed-block {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

/* 卡片悬停效果 */
.modern-card:hover,
.feed-hot-card:hover,
.product-card:hover,
.card-large .card-large-li:hover,
.feed-block:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* 商品卡片优化 */
.feed-hot-list .feed-hot-card {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feed-hot-list .feed-hot-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* 商品图片容器 */
.feed-hot-list .feed-hot-card .feed-hot-pic {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
}

.feed-hot-list .feed-hot-card .feed-hot-pic img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-hot-list .feed-hot-card:hover .feed-hot-pic img {
    transform: scale(1.05);
}

/* 大卡片优化 */
.card-large .card-large-li {
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card-large .card-large-li:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-large .card-large-li .card-large-l {
    border-radius: 12px;
    overflow: hidden;
}

/* ============================================
   2. 响应式设计优化
   ============================================ */

/* 响应式容器 */
.modern-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 响应式网格布局 */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* 响应式断点 */
@media (max-width: 1200px) {
    .modern-container {
        padding: 0 16px;
    }
    
    .modern-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .feed-hot-list .feed-hot-card {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .modern-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .modern-card,
    .feed-hot-card,
    .product-card {
        border-radius: 8px;
    }
    
    .card-large .card-large-li {
        padding: 16px;
    }
    
    .card-large .card-large-li .card-large-l {
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .card-large .card-large-li .card-large-r {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modern-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modern-container {
        padding: 0 12px;
    }
}

/* ============================================
   3. 内容驱动设计优化
   ============================================ */

/* 内容卡片 */
.content-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 内容标题 */
.content-card .content-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card .content-title:hover {
    color: #e62828;
}

/* 内容摘要 */
.content-card .content-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 内容图片 */
.content-card .content-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.content-card .content-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.content-card:hover .content-image img {
    transform: scale(1.02);
}

/* 内容元信息 */
.content-card .content-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

/* ============================================
   4. 社交化元素增强
   ============================================ */

/* 社交互动按钮组 */
.social-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.social-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.social-action-btn:hover {
    background: #ffecec;
    color: #e62828;
    transform: scale(1.05);
}

.social-action-btn.active {
    background: #ffecec;
    color: #e62828;
}

.social-action-btn i {
    font-size: 16px;
}

.social-action-btn .count {
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* 点赞按钮动画 */
.social-action-btn.like-btn.active {
    animation: likeAnimation 0.5s ease;
}

@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 评论按钮 */
.social-action-btn.comment-btn:hover {
    background: #e3f2fd;
    color: #1976d2;
}

/* 分享按钮 */
.social-action-btn.share-btn:hover {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* 收藏按钮 */
.social-action-btn.favorite-btn.active {
    background: #fff3e0;
    color: #f57c00;
}

.social-action-btn.favorite-btn.active i::before {
    content: "\f004"; /* 实心收藏图标 */
}

/* 用户头像组 */
.user-avatars {
    display: flex;
    align-items: center;
    gap: -8px;
    margin-left: 8px;
}

.user-avatars .avatar-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    overflow: hidden;
    background: #f5f5f5;
}

.user-avatars .avatar-item:first-child {
    margin-left: 0;
}

.user-avatars .avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 社交统计信息 */
.social-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
    padding: 12px 0;
}

.social-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.social-stats .stat-item i {
    font-size: 16px;
    color: #999;
}

.social-stats .stat-item .stat-value {
    font-weight: 500;
    color: #333;
}

/* ============================================
   5. 电商功能整合优化
   ============================================ */

/* 商品卡片增强 */
.product-card-enhanced {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card-enhanced:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* 商品图片区域 */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 比例 */
    overflow: hidden;
    background: #f5f5f5;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-enhanced:hover .product-image-wrapper img {
    transform: scale(1.05);
}

/* 商品标签 */
.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: #e62828;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 2;
}

.product-badge.hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.product-badge.new {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.product-badge.sale {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* 商品信息区域 */
.product-info {
    padding: 16px;
}

.product-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.product-price-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.product-price-current {
    font-size: 20px;
    font-weight: 600;
    color: #e62828;
}

.product-price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-discount {
    font-size: 12px;
    color: #e62828;
    background: #ffecec;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* 购买按钮组 */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-buy {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #e62828, #ff4757);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #ff4757, #e62828);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 40, 40, 0.3);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-favorite {
    width: 40px;
    height: 40px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.btn-favorite:hover {
    background: #ffecec;
    color: #e62828;
}

.btn-favorite.active {
    background: #ffecec;
    color: #e62828;
}

/* 商品来源信息 */
.product-source {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
}

.product-source .source-logo {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
}

.product-source .source-name {
    flex: 1;
}

/* 商品统计信息 */
.product-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.product-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 价格对比卡片 */
.price-comparison {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    margin: 16px 0;
}

.price-comparison .comparison-title {
    font-size: 14px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.price-comparison .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-comparison .price-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.price-comparison .price-label {
    font-size: 14px;
}

.price-comparison .price-value {
    font-size: 18px;
    font-weight: 600;
}

/* ============================================
   6. 通用优化
   ============================================ */

/* 加载动画 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .empty-text {
    font-size: 14px;
}

/* 标签优化 */
.modern-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    color: #666;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.modern-tag:hover {
    background: #e62828;
    color: #fff;
    border-color: #e62828;
    transform: translateY(-2px);
}

.modern-tag.active {
    background: #e62828;
    color: #fff;
    border-color: #e62828;
}

/* 按钮优化 */
.modern-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.modern-btn-primary {
    background: linear-gradient(135deg, #e62828, #ff4757);
    color: #fff;
}

.modern-btn-primary:hover {
    background: linear-gradient(135deg, #ff4757, #e62828);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 40, 40, 0.3);
}

.modern-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.modern-btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 1000;
}

.tooltip:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    margin-bottom: 4px;
    z-index: 1000;
}

/* ============================================
   7. 移动端优化
   ============================================ */

@media (max-width: 768px) {
    .social-actions {
        gap: 16px;
    }
    
    .social-action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-buy {
        width: 100%;
    }
    
    .btn-favorite {
        width: 100%;
    }
    
    .product-price-current {
        font-size: 18px;
    }
}

/* ============================================
   8. 无障碍优化
   ============================================ */

/* 焦点可见性 */
.modern-card:focus,
.social-action-btn:focus,
.btn-buy:focus,
.modern-btn:focus {
    outline: 2px solid #e62828;
    outline-offset: 2px;
}

/* 减少动画（尊重用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

