:root {
    --bg: #f6f4ef;
    --card: #fff;
    --text: #1f2933;
    --muted: #6b7280;
    --accent: #c45c26;
    --line: #e5e1d8;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.logo {
    font-weight: 700;
    font-size: 22px;
    color: var(--accent);
    text-decoration: none;
}
.search { display: flex; flex: 1; max-width: 420px; }
.search input, label input, .checkout input, label textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.search button, button {
    margin-left: 8px;
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}
.nav-links { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; }

.container { max-width: 1080px; margin: 16px auto; padding: 0 16px; }
.category-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.category-bar a {
    text-decoration: none;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
}
.category-bar a.active { background: var(--accent); color: #fff; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(31, 41, 51, 0.06);
}
.card img, .detail img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.card a { color: inherit; text-decoration: none; display: block; padding-bottom: 12px; }
.card h3, .card .price { margin: 8px 16px; }
.price { color: var(--accent); font-weight: 700; }

.form-box, .order, table { background: #fff; padding: 20px; border-radius: 12px; }
.form-box form, .checkout { display: grid; gap: 12px; max-width: 360px; }
.flash { color: #0f766e; }
.flash.error { color: #b91c1c; }
.empty { color: var(--muted); }
.detail { display: grid; grid-template-columns: 360px 1fr; gap: 24px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
.order { margin-bottom: 16px; }
.order header { display: flex; gap: 16px; }
.pull-tip {
    position: sticky;
    top: 0;
    z-index: 20;
    display: none;
    text-align: center;
    padding: 10px;
    color: var(--accent);
    background: rgba(255,255,255,0.92);
}
.pull-tip.show { display: block; }
.load-more {
    text-align: center;
    color: var(--muted);
    padding: 16px 0 28px;
}
