* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    transition: background-color 0.3s;
}

/* 轮播图样式 */
.swiper {
    width: 100%;
    height: 56.25vw; /* 保持16:9的宽高比 */
    max-height: 422px;
}

.swiper-slide {
    width: 100%;
    height: 100%;
}

.swiper-slide img,
.swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 特征区域样式 */
.feature-section {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    justify-content: space-between;
}

.feature-item {
    width: 18%;
    text-align: center;
    margin-bottom: 20px;
}

.feature-img {
    width: 100%;
    padding-bottom: 100%; /* 保持1:1的宽高比 */
    position: relative;
    overflow: hidden;
    border-radius: 50%;
}

.feature-img img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-text {
    margin-top: 10px;
    font-size: 14px;
}

/* 商品列表样式 */
.product-container {
    padding: 20px;
    overflow: hidden;
}

.product-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* 为滚动条预留空间 */
    scroll-behavior: smooth;
}

/* 隐藏滚动条但保持可以滚动 */
.product-list::-webkit-scrollbar {
    display: none;
}

.product-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-right: 15px;
}

.product-item:last-child {
    margin-right: 0;
}

.product-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-item h3 {
    padding: 10px;
    font-size: 16px;
}

.price {
    padding: 0 10px 10px;
    color: #f00;
    font-weight: bold;
}

.error-message {
    width: 100%;
    padding: 20px;
    text-align: center;
    color: #666;
    background: #f8f8f8;
    border-radius: 8px;
}

.loading {
    width: 100%;
    padding: 20px;
    text-align: center;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #666;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loading 0.8s linear infinite;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
} 