/* 【修复】全局重置 - 原文档缺失了选择器 * */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #6a28b5;
    font-family: 'Arial', sans-serif;
}

/* Banner 容器：负责居中 */
.banner-container {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    
    /* 【修改】方向改为 -45deg (从右下流向左上) */
    /* 颜色顺序保持不变：起始色(红)在右下，结束色(黄)在左上 */
    background: linear-gradient(-45deg, #D90429 0%, #EF476F 50%, #FFD166 100%);
    
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3);
}

/* Logo 图片 */
.banner-logo {
    width: auto;               
    height: 120px;             
    display: block;           
}

/* 店铺导航栏样式 - 强制单行显示 */
.shop-nav {
    background-color: #ffc107;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-bottom: 0px solid #ff9800;
    white-space: nowrap;
}

/* 导航项基础样式 */
.shop-nav-item {
    text-decoration: none; 
    color: purple; 
    font-size: 16px;
    font-weight: bold;
    padding: 8px 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 选中状态 */
.shop-nav-item.active {
    color: #ff4081;
    border-bottom: 2px solid #ff4081;
}

/* 🔥 火爆图标 - 紧挨文字的上标样式 */
.fire-icon {
    display: inline-block;
    font-size: 12px; 
    line-height: 1;
    vertical-align: super; 
    margin-left: 2px;      
    transform: translateY(-1px); 
    pointer-events: none;  
    animation: fire-pulse 1.5s infinite ease-in-out;
}

@keyframes fire-pulse {
    0%, 100% { transform: translateY(-1px) scale(1); }
    50% { transform: translateY(-1px) scale(1.2) rotate(10deg); }
}

/* =========================================
轮播公告栏样式
========================================= */
.notice-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 10px 0;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}

.notice-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.notice-label {
    background: #e94560;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.notice-scroll {
    flex: 1;
    overflow: hidden;
}

.notice-text {
    display: inline-block;
    animation: scroll-left 20s linear infinite;
    padding-left: 100%;
}

.notice-text span {
    display: inline-block;
    padding: 0 15px;
}

.notice-text .separator {
    color: #e94560;
    padding: 0 10px !important;
}

.notice-text strong {
    color: #ffeb3b;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.notice-bar:hover .notice-text {
    animation-play-state: paused;
}

/* 商品/内容展示区域通用样式 */
.products-container {
    padding: 20px;
    max-width: 1200px;
    margin: 10px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- 商城网格样式 --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 85%;
    height: auto;
    margin: 10px auto;
    display: block;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-name {
    text-align: center;
    margin: 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.price-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.current-price {
    color: red;
    font-weight: bold;
    display: inline-flex;
    align-items: baseline;
}

.current-price .cp-label {
    font-size: 14px;
    margin-right: 2px;
}

.current-price .cp-num {
    font-size: 18px;
}

.buy-btn {
    background: #ff4081;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    font-weight: bold;
    transition: background 0.2s;
}

.buy-btn:hover {
    background: #f50057;
}

/* --- 论坛列表样式 (新增) --- */
.forum-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forum-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap; 
    overflow: hidden;
}

.forum-item:hover {
    background-color: #fdfdfd;
    border-color: #ffc107;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.forum-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1; 
    margin-right: 15px;
    min-width: 0;
}

.forum-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
    flex-shrink: 0;
}

.forum-views {
    color: #ff9800;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.forum-time {
    color: #999;
    font-size: 12px;
    min-width: 130px;
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notice-bar { font-size: 11px; padding: 8px 0; }
    .notice-content { padding: 0 10px; }
    .notice-label { font-size: 10px; padding: 2px 6px; margin-right: 8px; }
    .products-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
    .banner-container { height: 120px; }
    .shop-nav-item { font-size: 14px; padding: 6px 4px; }
    .fire-icon { font-size: 12px; }
    
    .products-container { padding: 10px 8px; margin: 10px auto; }
    
    /* 手机端商城两列 */
    .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .product-card { padding: 8px; }
    .product-image { width: 100%; margin: 4px 0; }
    .product-name { 
        font-size: 14px;
        margin: 6px 0 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .price-container { flex-direction: column; gap: 2px; margin: 4px 0 6px; }
    .buy-btn { width: 100%; font-size: 13px; padding: 6px; }

    /* 手机端论坛适配：允许换行 */
    .forum-item {
        flex-wrap: wrap;
        padding: 10px;
        height: auto;
    }
    .forum-title {
        width: 100%;
        margin-bottom: 8px;
        font-size: 14px;
    }
    .forum-meta {
        width: 100%;
        justify-content: space-between;
        font-size: 12px;
    }
    .forum-time {
        text-align: left;
        min-width: auto;
    }
}