/* ================= 全局通用样式 (Base) ================= */
/* 全局重置 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: #f7f8fa; /* 全局灰底 */
    color: #333; 
    padding-bottom: 70px; /* 给底部导航留出防遮挡位置 */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
img { display: block; max-width: 100%; } /* 图片防溢出 */

/* 容器限制 - 模拟手机屏幕 (PC端查看时居中) */
.container { 
    max-width: 600px; /* 限制最大宽度，防止PC端拉伸太丑 */
    margin: 0 auto; 
    min-height: 100vh; 
    position: relative; 
    background: #fff; /* 内容区域白底 */
}

/* ================= 底部导航栏 (Bottom Nav - Pro版) ================= */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    max-width: 600px; 
    margin: 0 auto;
    background: #fff; /* 纯白背景 */
    /* 顶部增加一点点阴影，比实线边框更高级 */
    box-shadow: 0 -1px 10px rgba(0,0,0,0.05); 
    display: flex; 
    justify-content: space-around; 
    align-items: center;
    padding: 6px 0; 
    padding-bottom: max(6px, env(safe-area-inset-bottom)); 
    z-index: 1000; 
    height: 60px; /* 固定高度 */
}

.nav-item { 
    flex: 1; /* 均分宽度，扩大点击区域 */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    color: #999999; /* 默认灰色 */
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 图标容器 */
.icon-box {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG 图标默认样式 */
.svg-icon {
    width: 24px;
    height: 24px;
    fill: #b0b0b0; /* 未选中时的灰色图标 */
    transition: fill 0.3s ease, transform 0.2s ease;
}

/* 文字样式 */
.nav-text {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

/* ======= 选中状态 (Active) ======= */
.nav-item.active .svg-icon {
    /* 关键：引用 base.html 里定义的渐变色ID */
    fill: url(#mainGradient); 
    transform: scale(1.1); /* 选中时稍微放大一点 */
}

.nav-item.active .nav-text {
    /* 文字也搞成渐变色 (仅Webkit内核支持，如Chrome/Safari/手机端) */
    background: linear-gradient(to right, #8e2de2, #4a00e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* 如果不支持文字渐变，回退到纯紫色 */
@supports not (background: linear-gradient(to right, #8e2de2, #4a00e0)) {
    .nav-item.active .nav-text {
        color: #6200ea;
        background: none;
    }
}



/* ================= 新订单弹窗样式 ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 80%;
    max-width: 320px;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: zoomIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.modal-body p { margin: 8px 0; color: #666; font-size: 14px; }
.highlight-price { color: #ff4757; font-weight: bold; font-size: 18px; margin: 0 4px; }
.sub-text { font-size: 12px; color: #999; }

.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-footer button, .modal-footer a {
    flex: 1;
    padding: 10px 0;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-cancel { background: #f1f2f6; color: #666; }
.btn-confirm { 
    background: linear-gradient(135deg, #8e2de2, #4a00e0); 
    color: white; 
    box-shadow: 0 4px 10px rgba(142, 45, 226, 0.3);
}

/* 简单的弹窗动画 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }


/* 底部导航栏的小红点 */
.nav-red-dot {
    position: absolute;
    top: 0;
    right: -2px; /* 稍微往右上角偏一点 */
    width: 8px;
    height: 8px;
    background-color: #ff4757; /* 鲜艳的红 */
    border-radius: 50%;
    border: 1px solid #fff; /* 加个白边，跟图标区分开 */
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}