/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    padding: 16px;
    color: #333;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 20px;
}

/* 顶部导航按钮 */
.nav-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.nav-btn {
    padding: 10px 18px;
    border-radius: 40px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 15px;
    background: #007aff;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.nav-btn.home { background: #6c757d; }
.nav-btn.self { background: #007aff; }
.nav-btn.express { background: #28a745; }
.nav-btn:active { opacity: 0.8; }

/* 卡片 */
.form-card {
    background: white;
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    margin-bottom: 16px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
    font-size: 16px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007aff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

/* 提示小字 */
.hint {
    display: block;
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

/* 分类 Tab 栏 */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    background: white;
    padding: 12px;
    border-radius: 50px;
    justify-content: center;
}
.tab-btn {
    padding: 8px 16px;
    border-radius: 40px;
    border: none;
    background: #f0f0f0;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active {
    background: #007aff;
    color: white;
}

/* 商品网格：每行两个 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}
.product-item {
    background: #f8f8f8;
    border-radius: 20px;
    padding: 16px 12px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-align: center;
}
.product-price {
    font-size: 14px;
    color: #28a745;
    font-weight: 500;
    margin-bottom: 8px;
}

/* 数量控件 */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
}
.qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #007aff;
    background: white;
    color: #007aff;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.qty-btn:active {
    background: #e6f0ff;
}
.qty-display {
    font-size: 20px;
    font-weight: 700;
    color: #007aff;
    min-width: 40px;
    text-align: center;
}
.qty-input {
    display: none; /* 隐藏原始输入框 */
}
.qty-hint {
    color: #888;
    font-size: 13px;
    margin-top: 8px;
    text-align: right;
}

/* 合计总价区域 */
.total-price {
    text-align: right;
    margin: 20px 0;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
}
.total-price strong {
    color: #333;
}
.total-price span {
    color: #28a745;
    font-weight: 600;
}

/* 备注区域 */
.remark-group {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #ddd;
}
.remark-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 16px;
    background: #fafafa;
    min-height: 80px;
    resize: vertical;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0,122,255,0.2);
    transition: background 0.2s;
}
.submit-btn:hover {
    background: #005bbf;
}
.submit-btn:active {
    opacity: 0.9;
}

/* 针对 datetime-local 输入框的样式调整 */
input[type="datetime-local"] {
    padding: 13px 16px; /* 与其他输入框对齐 */
}
#totalAmount{
    color:red;
}