/* --- 基础重置与全局变量 --- */
:root {
    --primary-color: #FFCC33; /* 外卖平台常用的醒目暖色调 */
    --bg-color: #F4F4F4;
    --text-main: #333333;
    --text-sub: #666666;
    --text-light: #999999;
    --tag-red: #FF4B33;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 取消移动端点击高亮 */
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    /* 给底部导航栏留出空间，防止内容被遮挡 */
    padding-bottom: 65px; 
}

/* --- 1. 顶部导航与搜索区 --- */
.app-header {
    background-color: var(--primary-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* 吸顶效果 */
    position: sticky;
    top: 0;
    z-index: 100;
}

.location-bar {
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    background-color: #fff;
}

/* --- 2. 主体内容区 --- */
.app-main {
    padding: 10px 12px;
}

/* 轮播占位 */
.banner-placeholder {
    background-color: #E0E0E0;
    height: 120px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* 金刚区 (分类) */
.category-grid {
    display: flex;
    justify-content: space-between;
    background: #fff;
    padding: 15px 10px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.category-item {
    text-align: center;
    font-size: 12px;
    color: var(--text-sub);
}

.category-item .icon {
    display: block;
    font-size: 28px;
    margin-bottom: 6px;
}

/* 商家列表 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.list-header h2 {
    font-size: 18px;
}

.list-header .filter {
    font-size: 13px;
    color: var(--text-sub);
}

.restaurant-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

.card-img {
    width: 85px;
    height: 85px;
    background-color: #F0F0F0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 12px;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-info h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.rating {
    font-size: 12px;
    color: var(--text-sub);
}

.delivery-info {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.tags {
    margin-top: 6px;
    display: flex;
    gap: 5px;
}

.tag {
    font-size: 10px;
    color: var(--tag-red);
    border: 1px solid var(--tag-red);
    padding: 1px 4px;
    border-radius: 4px;
}

/* --- 3. 底部固定导航栏 --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #EAEAEA;
    z-index: 100;
    /* 适配 iPhone 底部安全区 */
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    text-decoration: none;
    color: var(--text-light);
    text-align: center;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.nav-item.active {
    color: var(--text-main);
}

.nav-item .icon {
    font-size: 22px;
}