/* 合并Bootstrap和Bootstrap Icons的CSS */
@import url('../bootstrap/5.3.0/css/bootstrap.min.css');
@import url('../bootstrap-icons/1.10.0/font/bootstrap-icons.css');

/* 自定义样式 */
:root {
    --primary-blue: #007aff;
    --primary-gradient: linear-gradient(135deg, #007aff, #0062cc);
    --accent-orange: #ff5e00;
    --bg-color: #f7f9fc;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.03);
    --text-main: #1d1d1f;
    --text-sub: #86868b;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; background: var(--bg-color); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.app-container { display: flex; flex-direction: column; height: 100%; position: relative; max-width: 600px; margin: 0 auto; background: #fff; box-shadow: 0 0 20px rgba(0,0,0,0.05); }

.top-search-header {
    padding: 10px 15px;
    background: #fff;
    position: relative;
    z-index: 50;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.search-box {
    background: #f2f4f7;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 36px;
    transition: all 0.3s;
}
.search-box:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(0,122,255,0.1); border: 1px solid var(--primary-blue); }
.search-input {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 13px;
    color: #333;
    outline: none;
    margin-left: 8px;
}
.search-btn {
    border: none;
    background: none;
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 600;
    padding: 0 5px;
    white-space: nowrap;
}

.carousel-item img { width: 100%; height: 150px; object-fit: cover; }

.notice-bar { background-color: #fff8f2; color: var(--accent-orange); padding: 0 15px; font-size: 12px; display: flex; align-items: center; border-bottom: 1px solid #ffeedd; height: 32px; font-weight: 500; }

.main-body { display: flex; flex: 1; overflow: hidden; background: var(--bg-color); }

.sidebar { width: 85px; background-color: #fff; height: 100%; overflow-y: auto; padding-bottom: 140px; flex-shrink: 0; border-right: 1px solid rgba(0,0,0,0.03); }
.nav-item { display: flex; align-items: center; justify-content: center; height: 50px; width: 100%; color: var(--text-sub); text-decoration: none; font-size: 12px; position: relative; transition: all 0.2s; font-weight: 500; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 8px; }
.nav-item.active { background: var(--primary-gradient); color: #fff; font-weight: 700; font-size: 13px; border-color: var(--primary-blue); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background-color: var(--primary-blue); border-radius: 0 4px 4px 0; }

.main-content { flex: 1; height: 100%; overflow-y: auto; padding: 10px; padding-bottom: 160px; background-color: var(--bg-color); }

.product-item { 
    display: flex; 
    padding: 10px; 
    background: #fff; 
    border-radius: 10px; 
    margin-bottom: 8px; 
    box-shadow: var(--card-shadow); 
    border: none;
    align-items: flex-start; 
    transition: transform 0.1s;
    position: relative;
}
.product-item:active { transform: scale(0.99); background: #fafafa; }

.p-img { 
    width: 64px; height: 64px; 
    border-radius: 6px; 
    object-fit: cover; 
    margin-right: 10px; 
    flex-shrink: 0; 
    background: #f8f8f8; 
    border: 1px solid rgba(0,0,0,0.03);
}

.p-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 64px; }

.p-name { 
    font-size: 12px; 
    font-weight: 600; 
    color: var(--text-main); 
    line-height: 1.4; 
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; 
    margin-bottom: 6px;
}

.p-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.p-price { color: var(--accent-orange); font-weight: 800; font-size: 15px; }
.p-price::before { content: '¥'; font-size: 11px; margin-right: 1px; }

.btn-buy-sm { 
    padding: 3px 10px; 
    border-radius: 12px; 
    font-size: 11px; 
    font-weight: 600; 
    background: #fff;
    color: var(--primary-blue); 
    border: 1px solid var(--primary-blue);
    text-decoration: none; 
}

.add-cart-btn { 
    width: 22px; height: 22px; 
    border-radius: 50%; 
    border: 1px solid #ddd; 
    display: flex; align-items: center; justify-content: center; 
    background: #fff; color: var(--primary-blue); 
    transition: all 0.2s; 
}
.add-cart-btn::before { content: '\F64D'; font-family: "bootstrap-icons"; font-size: 13px; }
.prod-check { display: none; } 
.prod-check:checked + .add-cart-btn { 
    background: var(--primary-blue); 
    border-color: var(--primary-blue); 
    color: #fff; 
    box-shadow: 0 2px 5px rgba(0, 122, 255, 0.3);
}
.prod-check:checked + .add-cart-btn::before { content: '\F26E'; }

.tech-navbar { 
    position: fixed; bottom: 85px; left: 5%; width: 90%; height: 48px; 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px);
    border-radius: 24px; 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0 15px; z-index: 990; 
    border: 1px solid rgba(0,0,0,0.05); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.06); 
}

.settle-bar { 
    position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; 
    background: #fff; 
    border-top: 1px solid #f0f0f0;
    display: flex; align-items: center; justify-content: space-between; padding: 0 15px; z-index: 1000; 
    max-width: 600px; margin: 0 auto; right: 0; 
}
.settle-total { font-size: 12px; color: var(--text-main); margin-right: 4px; }
.settle-price { color: var(--accent-orange); font-size: 18px; font-weight: 800; font-family: -apple-system, sans-serif; }
.btn-submit-cart { 
    background: var(--text-main); 
    color: #fff; border: none; border-radius: 30px; 
    padding: 0 20px; height: 34px; 
    font-weight: 600; font-size: 13px; 
}
.btn-submit-cart:disabled { background: #eee; color: #aaa; }
.btn-clear-cart { background: #f5f5f5; color: #666; border: none; border-radius: 30px; padding: 4px 12px; font-size: 12px; margin-right: 8px; }

@media (min-width: 600px) {
    .app-container { border-left: 1px solid #eee; border-right: 1px solid #eee; }
    .tech-navbar { left: 50%; transform: translateX(-50%); width: 540px; }
}