:root {
    --primary: #800020; /* 红酒色 */
    --gray: #f4f4f4;
    --text: #333;
    --border: #eee;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fff;
    margin: 0;
    /* 关键：给顶部和底部留出空间，防止内容被遮挡 */
    padding-top: 60px;    
    padding-bottom: 70px; 
    color: var(--text);
    -webkit-tap-highlight-color: transparent; /* 去除点击高亮 */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- 1. App Header (顶部) --- */
.app-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: #fff; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 15px; box-sizing: border-box;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
.header-left, .header-right { width: 40px; display: flex; justify-content: center; }
.header-title { font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.icon-btn { font-size: 20px; color: #333; cursor: pointer; }

/* --- 2. App Bottom Nav (底部导航栏) --- */
.app-tabbar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 60px;
    background: #fff; z-index: 1000;
    display: flex; justify-content: space-around; align-items: center;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}
.tab-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #999; font-size: 10px; flex: 1; height: 100%;
    position: relative;
}
.tab-item i { font-size: 20px; margin-bottom: 4px; }
.tab-item.active { color: var(--primary); }
.cart-badge {
    position: absolute; top: 5px; right: 20px; /* 根据图标位置微调 */
    background: var(--primary); color: white;
    font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; justify-content: center; align-items: center; padding: 0 3px;
}

/* --- 3. Mobile Sidebar (侧滑菜单) --- */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar-panel {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
    background: white; z-index: 2001; transition: 0.3s;
    display: flex; flex-direction: column;
}
.sidebar-panel.active { left: 0; }
.sidebar-head {
    height: 150px; background: var(--primary); color: white;
    display: flex; flex-direction: column; justify-content: center; padding: 20px;
}
.sidebar-list a {
    display: block; padding: 15px 20px; border-bottom: 1px solid #f9f9f9;
    font-size: 15px; display: flex; align-items: center; gap: 10px;
}
.sidebar-list i { width: 20px; text-align: center; color: #999; }

/* 通用工具类 */
.container { padding: 15px; }
.section-title { font-size: 16px; font-weight: bold; margin: 20px 0 10px; border-left: 3px solid var(--primary); padding-left: 10px; }