/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    min-height: 100vh;
}

/* 包装容器 */
.wrapper {
    min-height: 100vh;
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 414px;
    min-height: calc(100vh - 40px);
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 60px;
    border-radius: 10px;
    overflow: hidden;
}

/* 响应式图片 */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 轮播图容器 */
.banner {
    width: 100%;
    overflow: hidden;
    height: 150px; /* 降低 banner 高度 */
}

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

/* 订单类型区域 */
.order-types {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    gap: 15px;
}

.order-type {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.order-type:hover {
    transform: translateY(-2px);
}

.order-type .responsive-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.order-type span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.order-type .desc {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

@media screen and (max-width: 414px) {
    .order-types {
        padding: 10px;
        gap: 10px;
        flex-direction: row;
    }
    
    .order-type {
        padding: 10px;
    }
    
    .order-type .responsive-img {
        width: 80px;
        height: 80px;
    }
    
    .order-type span {
        font-size: 16px;
        margin: 8px 0;
    }
    
    .order-type .desc {
        font-size: 12px;
    }
}

/* 热门商品区域 */
.hot-products {
    padding: 15px;
}

.hot-products h2 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #ff6b6b;
}

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

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

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

.product-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

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

/* 底部导航栏 */
.footer-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.footer-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 0;
}

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

.footer-nav .nav-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    background-color: #ff6b6b;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #ff5252;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading.active {
    display: block;
}

/* 媒体查询 */
@media screen and (max-width: 414px) {
    .wrapper {
        padding: 0;
    }

    .container {
        max-width: 100%;
        min-height: 100vh;
        box-shadow: none;
        border-radius: 0;
    }

    .footer-nav {
        position: fixed;
        width: 100%;
    }
    
    .product-list {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* 在大屏幕上添加背景色 */
@media screen and (min-width: 415px) {
    body {
        background-color: #f0f2f5;
    }
    
    .container {
        border-radius: 10px;
        overflow: hidden;
        min-height: calc(100vh - 40px);
    }

    .footer-nav {
        max-width: 414px; /* 与容器宽度相同 */
        margin: 0 auto;
    }
}
