:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #15171a;
  --muted: #717783;
  --accent: #2481cc;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); padding-bottom: 90px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; position: sticky; top: 0; background: rgba(245,246,248,.94); backdrop-filter: blur(12px); z-index: 5; }
h1 { margin: 0; font-size: 24px; }
p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cart, .loadMore, .qty button, .panelBottom button { border: 0; border-radius: 14px; background: var(--accent); color: white; padding: 12px 14px; font-weight: 700; }
.searchBox { padding: 0 16px 10px; }
.searchBox input { width: 100%; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; font-size: 16px; outline: none; }
.chips { display: flex; overflow-x: auto; gap: 8px; padding: 0 16px 12px; }
.chip { white-space: nowrap; border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 9px 12px; }
.chip.active { background: var(--accent); color: white; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }
.card { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.06); display: flex; flex-direction: column; min-height: 260px; }
.img { height: 132px; background: #e8eaef; display: flex; align-items: center; justify-content: center; font-size: 36px; overflow: hidden; }
.img img { width: 100%; height: 100%; object-fit: cover; }
.content { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.name { font-weight: 700; line-height: 1.2; min-height: 38px; }
.price { font-size: 18px; font-weight: 800; margin-top: auto; }
.stock { color: var(--muted); font-size: 12px; }
.qty { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; }
.qty span { text-align: center; font-weight: 700; }
.loadMore { margin: 16px; width: calc(100% - 32px); }
.panel { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 22px 22px 0 0; max-height: 75vh; overflow: auto; z-index: 20; box-shadow: 0 -8px 24px rgba(0,0,0,.16); padding: 16px; }
.hidden { display: none; }
.panelHead { display: flex; justify-content: space-between; align-items: center; }
.panelHead button { border: 0; background: transparent; font-size: 32px; }
.cartLine { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.panelBottom { position: sticky; bottom: 0; background: var(--card); padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (min-width: 650px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } body { max-width: 900px; margin: 0 auto; } }
