* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 100%;
    padding-bottom: 60px; /* 给底部导航留空间 */
}

/* 顶部导航栏 */
.header {
    background: #ff6b6b;
    color: white;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 8px 15px;
    margin-top: 15px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
}

.search-box button {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
}

.actions {
    display: flex;
    gap: 20px;
}

/* 轮播图 */
.carousel {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

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

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    font-size: 14px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.indicator.active {
    background: white;
}

/* 分类导航 */
.category-nav {
    background: white;
    margin: 15px 10px;
    border-radius: 10px;
    padding: 15px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-left: 5px;
    border-left: 4px solid #ff6b6b;
}

.categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    text-align: center;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #f0f9ff, #cbebff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #3498db;
    font-size: 20px;
}

.category-item:nth-child(2) .category-icon {
    background: linear-gradient(to bottom right, #f0fff4, #c6f6d5);
    color: #38a169;
}

.category-item:nth-child(3) .category-icon {
    background: linear-gradient(to bottom right, #fffaf0, #feebc8);
    color: #dd6b20;
}

.category-item:nth-child(4) .category-icon {
    background: linear-gradient(to bottom right, #fff5f5, #fed7d7);
    color: #e53e3e;
}

.category-item:nth-child(5) .category-icon {
    background: linear-gradient(to bottom right, #faf5ff, #e9d8fd);
    color: #9f7aea;
}

.category-name {
    font-size: 12px;
    color: #555;
}

/* 商品展示区 */
.products-section {
    background: white;
    margin: 15px 10px;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    color: #ff6b6b;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-price span {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 5px;
}

.product-rating {
    color: #ffc107;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-sales {
    font-size: 12px;
    color: #777;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #ff6b6b;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* 响应式调整 */
@media (max-width: 350px) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}
