/* 首页样式 */
.main {
    margin-top: 20px;
}

/* 布局A：图文卡片式 */
.layout-a {
    margin-bottom: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card-item {
    width: 284px;
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.card-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s;
}

.card-item:hover .card-img img {
    transform: scale(1.05);
}

.card-info {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 布局B：左图右文式 */
.layout-b {
    margin-bottom: 30px;
}

.image-text-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.image-text-item {
    display: flex;
    background: #fff;
    padding: 15px;
    border: 1px solid #e5e5e5;
}

.item-img {
    width: 200px;
    height: 150px;
    margin-right: 15px;
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.item-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 布局C：大图展示式 */
.layout-c {
    margin-bottom: 30px;
}

.large-card-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.large-card {
    background: #fff;
    border: 1px solid #e5e5e5;
}

.large-card-img {
    width: 100%;
    height: 200px;
}

.large-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.large-card-info {
    padding: 20px;
}

.large-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.large-card-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.large-card-meta {
    color: #999;
    font-size: 12px;
}

/* 布局D：文字列表式 */
.layout-d {
    margin-bottom: 30px;
}

.text-list-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.text-list {
    background: #fff;
    padding: 15px;
    border: 1px solid #e5e5e5;
}

.text-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.text-item:last-child {
    border-bottom: none;
}

.text-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-time {
    color: #999;
    margin-left: 15px;
}

/* 幻灯片和公告区域 */
.slider-notice-section {
    margin: 20px 0;
    padding: 20px 0;
}

.slider-notice-wrapper {
    display: flex;
    gap: 20px;
}

/* 幻灯片样式 */
.slider {
    flex: 1;
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 4px;
}

.slider-items {
    height: 100%;
    position: relative;
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slider-item.active {
    opacity: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 幻灯片导航按钮 */
.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-nav-item {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-nav-item.active {
    background: #fff;
    transform: scale(1.2);
}

/* 上一张/下一张按钮 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.5);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

/* 公告板块样式 */
.notice-board {
    width: 300px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.notice-header h3 {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notice-header h3 i {
    color: #2B61B3;
}

.notice-header .more {
    color: #999;
    font-size: 12px;
}

.notice-header .more:hover {
    color: #2B61B3;
}

.notice-list {
    padding: 10px 15px;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item a {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
}

.notice-item a:hover {
    color: #2B61B3;
}

.notice-time {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
} 


/* 商品展示 */
.product-section {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.product-item {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #2B61B3;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: #ff6b6b;
    font-size: 18px;
    font-weight: bold;
}

.shop-name {
    color: #666;
    font-size: 14px;
} 

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.more-link {
    color: #999;
    font-size: 14px;
}

.more-link:hover {
    color: #2B61B3;
}
