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

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding-bottom: 70px;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-icons {
    display: flex;
    gap: 20px;
}

.header-icons a {
    color: white;
    font-size: 20px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    padding: 15px;
    background: white;
    margin-bottom: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
}

.search-bar button {
    padding: 0 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    border-radius: 0 25px 25px 0;
    color: white;
    cursor: pointer;
}

/* 轮播图 */
.banner {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin: 0 15px 20px;
    border-radius: 10px;
}

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

.slide-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
}

.slide-text h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

/* 分类导航 */
.categories {
    display: flex;
    overflow-x: auto;
    padding: 0 15px 15px;
    gap: 10px;
    white-space: nowrap;
}

.category {
    padding: 8px 20px;
    background: white;
    border-radius: 20px;
    border: 1px solid #eee;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.category.active {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-color: transparent;
}

/* 商品列表 */
.section-title {
    padding: 0 15px 15px;
    font-size: 18px;
    font-weight: bold;
}

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

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-author {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

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

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

.add-to-cart {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.add-to-cart:hover {
    opacity: 0.9;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: white;
    border-top: 1px solid #eee;
    padding: 10px 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    text-align: center;
    color: #666;
    text-decoration: none;
    padding: 5px 0;
}

.nav-item.active {
    color: #6a11cb;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
    display: block;
}

.nav-item span {
    font-size: 12px;
}

/* 详情页样式 */
.product-detail {
    background: white;
    margin: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.detail-content {
    padding: 20px;
}

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

.detail-author {
    color: #666;
    margin-bottom: 15px;
}

.detail-price {
    color: #ff6b6b;
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
}

.detail-description {
    line-height: 1.6;
    color: #666;
    margin: 20px 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    font-size: 20px;
    cursor: pointer;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: 1px solid #ddd;
    text-align: center;
    margin: 0 5px;
}

.buy-now {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 10px;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

/* 购物车样式 */
.cart-item {
    display: flex;
    background: white;
    margin: 15px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-item-img {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #ff6b6b;
    font-weight: bold;
    margin: 10px 0;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    background: white;
    margin: 15px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.total-row.final {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b6b;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.checkout-btn {
    width: calc(100% - 30px);
    margin: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

/* 结账页面样式 */
.checkout-form {
    background: white;
    margin: 15px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.payment-method {
    flex: 1;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method.selected {
    border-color: #6a11cb;
    background: #f9f7ff;
}

.payment-method i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.order-summary {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.confirm-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}