/* 首页特有样式 */

/* 首页内容区样式 */
.home-content {
    width: 100%;
    height: 100%;
}



/* 商品列表样式 */
.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 150px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: #ff6b35;
    font-weight: bold;
    font-size: 16px;
}

/* 轮播图样式 */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 200px; /* 固定高度以兼容旧版浏览器 */
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    aspect-ratio: 16 / 9; /* 保持宽高比 - 现代浏览器 */
}
/* 为不支持aspect-ratio的浏览器提供后备方案 */
@supports not (aspect-ratio: 16 / 9) {
    .banner-carousel {
        height: 200px;
    }
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: white;
}

/* 商品分类网格样式 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.category-item {
    text-align: center;
    padding: 10px 5px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-3px);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    display: block;
}

.category-text {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 5px;
}
