:root {
    --bg: #f6f8fb;
    --panel: #ffffff;
    --line: #eef1f6;
    --text: #1f2630;
    --muted: #7a8494;
    --blue: #416dff;
    --deep: #0f1724;
    --soft-blue: #edf3ff;
    --shadow: 0 0.16rem 0.48rem rgba(30, 48, 88, 0.08);
    --radius: 0.36rem;
    --nav-height: 0.56rem;
    --safe-bottom: 0.7rem;
    font-size: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-width: 320px;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    color: var(--text);
    background: var(--bg);
    font-family: "Microsoft YaHei", "PingFang SC", "SimHei", sans-serif;
    font-size: 0.14rem;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, li {
    list-style: none;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

button, input {
    border: none;
    outline: none;
    font: inherit;
}

.page {
    min-height: 100vh;
    padding-bottom: var(--safe-bottom);
}

.container {
    width: 92vw;
    max-width: 4.42rem;
    margin: 0 auto;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--nav-height);
    display: grid;
    grid-template-columns: 0.56rem 1fr 0.56rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(0.16rem);
}

.icon-btn {
    width: 0.44rem;
    height: 0.44rem;
    display: grid;
    place-items: center;
    margin: 0 auto;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.icon-line {
    width: 0.18rem;
    height: 0.02rem;
    background: currentColor;
    box-shadow: 0 0.07rem 0 currentColor, 0 -0.07rem 0 currentColor;
}

.logo {
    text-align: center;
    font-size: 0.26rem;
    font-weight: 700;
    letter-spacing: 0.03rem;
    line-height: 1;
}

.search-icon,
.close-icon,
.cart-icon,
.user-icon {
    position: relative;
    width: 0.2rem;
    height: 0.2rem;
}

.search-icon::before {
    content: "";
    position: absolute;
    width: 0.13rem;
    height: 0.13rem;
    border: 0.025rem solid currentColor;
    border-radius: 50%;
}

.search-icon::after {
    content: "";
    position: absolute;
    right: 0.01rem;
    bottom: 0.01rem;
    width: 0.08rem;
    height: 0.025rem;
    background: currentColor;
    transform: rotate(45deg);
    border-radius: 0.02rem;
}

.close-icon::before,
.close-icon::after {
    content: "";
    position: absolute;
    top: 0.09rem;
    left: 0;
    width: 0.2rem;
    height: 0.02rem;
    background: currentColor;
}

.close-icon::before { transform: rotate(45deg); }
.close-icon::after { transform: rotate(-45deg); }

.cart-icon::before {
    content: "";
    position: absolute;
    left: 0.02rem;
    top: 0.04rem;
    width: 0.16rem;
    height: 0.11rem;
    border: 0.02rem solid currentColor;
    border-top: none;
    border-radius: 0 0 0.03rem 0.03rem;
}

.cart-icon::after {
    content: "";
    position: absolute;
    left: 0.06rem;
    top: 0.01rem;
    width: 0.08rem;
    height: 0.07rem;
    border: 0.02rem solid currentColor;
    border-bottom: none;
    border-radius: 0.08rem 0.08rem 0 0;
}

.user-icon::before {
    content: "";
    position: absolute;
    left: 0.065rem;
    width: 0.07rem;
    height: 0.07rem;
    border: 0.02rem solid currentColor;
    border-radius: 50%;
}

.user-icon::after {
    content: "";
    position: absolute;
    left: 0.02rem;
    bottom: 0;
    width: 0.16rem;
    height: 0.09rem;
    border: 0.02rem solid currentColor;
    border-radius: 0.1rem 0.1rem 0 0;
}

.nav-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    overflow-y: auto;
    background: #fff;
}

.nav-sheet.open {
    display: block;
}

.nav-list {
    padding: 0.08rem 0.16rem 0.28rem;
}

.nav-row {
    min-height: 0.52rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    font-size: 0.14rem;
}

.nav-row span:last-child {
    font-size: 0.22rem;
    font-weight: 600;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 0.28rem;
    padding: 0.24rem 0.16rem;
}

.nav-auth {
    padding: 0.22rem 0;
    text-align: center;
    color: var(--muted);
}

.nav-auth a {
    color: var(--blue);
    margin: 0 0.03rem;
}

.nav-location {
    display: flex;
    justify-content: center;
    gap: 0.08rem;
    color: var(--text);
}

.bottom-tabs {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 30;
    width: min(100vw, 480px);
    height: 0.58rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    transform: translateX(-50%);
}

.tab-link {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.02rem;
    color: var(--muted);
    font-size: 0.11rem;
}

.tab-link.active { color: var(--blue); }
.tab-dot {
    width: 0.2rem;
    height: 0.2rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.12;
}

.section-head { margin: 0.28rem 0 0.16rem; text-align: center; }
.section-head h2 { font-size: 0.22rem; font-weight: 600; }
.section-head p {
    margin-top: 0.04rem;
    color: var(--muted);
    font-size: 0.12rem;
}

.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }

