/* 移动端基础样式 */
:root {
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #888888;
    --brand-color: #ffc300;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; 
    background-color: #e8e8e8; 
    color: var(--text-primary); 
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
}

/* 移动端固定宽度容器 */
.page-container { 
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background-color: var(--bg-color);
    padding-bottom: 80px; 
}
.page-header { display: flex; align-items: center; padding: 15px; background-color: var(--card-bg); }
.page-header .back-btn { background: none; border: none; font-size: 24px; cursor: pointer; margin-right: 15px; }
.page-header h1 { font-size: 18px; text-align: center; flex-grow: 1; }

.content-area { padding: 15px; }
.card { background-color: var(--card-bg); border-radius: 12px; padding: 15px; margin-bottom: 15px; }

.restaurant-info { display: flex; justify-content: space-between; align-items: center; }
.restaurant-info h2 { font-size: 16px; margin-bottom: 4px; }
.restaurant-info p { font-size: 12px; color: var(--text-secondary); }
.switch-btn { background: none; border: 1px solid #ddd; border-radius: 15px; padding: 4px 10px; font-size: 12px; }

.dining-options { display: flex; gap: 15px; }
.option-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; border: 1px solid #eee; border-radius: 8px; background-color: #fafafa; cursor: pointer; }
.option-btn.active { border-color: var(--brand-color); background-color: var(--card-bg); font-weight: bold; }
.option-btn img { width: 40px; height: 40px; margin-bottom: 8px; }
.option-btn span { font-size: 14px; }

.pickup-time, .option-row { display: flex; justify-content: space-between; align-items: center; }
.pickup-time span, .option-row span { font-size: 14px; }
.pickup-time a, .option-row a { font-size: 14px; color: var(--text-secondary); text-decoration: none; }
.option-row { padding: 15px 0; }
.option-row:not(:last-child) { border-bottom: 1px solid #f0f0f0; }

.details-header { margin-bottom: 15px; }
.order-item { display: flex; align-items: center; margin-bottom: 15px; }
.item-image { width: 50px; height: 50px; border-radius: 8px; margin-right: 10px; object-fit: cover; }
.item-info { flex-grow: 1; }
.item-name { font-size: 14px; }
.item-quantity { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.item-price { font-size: 14px; font-weight: bold; }

.payment-footer { position: relative; width: 100%; background-color: var(--card-bg); border-top: 1px solid #f0f0f0; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.total-amount { font-size: 14px; }
.total-amount .price { font-size: 20px; font-weight: bold; color: var(--text-primary); }
.pay-btn { background-color: var(--brand-color); color: var(--text-primary); border: none; border-radius: 25px; padding: 12px 40px; font-size: 16px; font-weight: bold; }

/* --- 新增：发票信息样式 --- */
.invoice-section {
    padding-top: 20px; /* 与“餐具份数”拉开距离 */
}

.invoice-section h4 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px; /* 标题和说明文字的间距 */
    color: var(--text-primary);
}

.invoice-section .details-text {
    font-size: 12px;
    color: var(--text-secondary); /* 使用我们在:root中定义的灰色 */
    line-height: 1.6; /* 增加行高，方便阅读 */
    margin-bottom: 10px;
}

.invoice-section .details-text:last-child {
    margin-bottom: 0; /* 最后一行不需要下边距 */
}

/* --- 新增：订单确认页动态列表样式 --- */
.order-item-group {
    padding: 15px 0;
}
.order-item-group:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.main-item {
    display: flex;
    align-items: center;
    width: 100%;
}

.sub-item-list {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 60px; /* 左侧缩进，与主项目的图片对齐 */
    margin-top: 8px;
}
.sub-item {
    line-height: 1.6;
}
