:root {
  --bg: #0e0e10;
  --surface-1: #17171a;
  --surface-2: #1f1f23;
  --border: #2a2a2e;
  --border-strong: #3a3a40;
  --border-accent: #4c8dff;
  --text: #f2f2f2;
  --text-secondary: #a8a8ad;
  --text-muted: #6e6e73;
  --accent: #4c8dff;
  --danger: #ff5b5b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#app { max-width: 480px; margin: 0 auto; padding: 10px 10px 100px; }

button {
  background: var(--surface-2);
  color: var(--text);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: inherit;
  cursor: pointer;
}

#topbar {
  display: flex; align-items: center; gap: 8px; min-height: 44px;
  position: fixed; top: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto;
  background: var(--bg); padding: 10px 10px; z-index: 60;
  border-bottom: 0.5px solid var(--border);
}
#topbarSpacer { height: 60px; }
.nav-btn { padding: 10px 16px; font-size: 16px; font-weight: 600; }
#crumb { font-size: 15px; color: var(--text-secondary); flex: 1; text-align: right; }

.cat-btn {
  width: 100%; text-align: left; padding: 18px 16px; margin-bottom: 8px;
  font-weight: 700; font-size: 16px; letter-spacing: .03em; text-transform: uppercase;
  background: var(--surface-2); border: 0.5px solid var(--border-strong);
}
.cat-btn.settings { background: #232326; }

.sub-btn {
  width: 100%; text-align: left; padding: 15px 16px; margin-bottom: 8px;
  font-size: 16px; background: var(--surface-2);
  border: 0.5px solid var(--border); border-left: 3px solid var(--border-accent);
}

.item-card {
  background: var(--surface-2); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
}
.item-top { display: flex; align-items: center; gap: 8px; }
.item-name { flex: 1; font-size: 15px; line-height: 1.35; }
.item-weight { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

.stepper { display: flex; align-items: center; gap: 5px; }
.stepper button { width: 34px; height: 34px; padding: 0; font-size: 19px; }
.stepper .qty { min-width: 22px; text-align: center; font-size: 16px; font-weight: 600; }

.photo-btn { width: 38px; height: 38px; padding: 0; flex-shrink: 0; font-size: 17px; }

.info-panel {
  margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--border);
  display: flex; gap: 10px; align-items: flex-start;
}
.info-photo {
  width: 72px; height: 72px; border-radius: 6px; object-fit: cover;
  background: var(--surface-1); border: 0.5px dashed var(--border-strong);
  flex-shrink: 0;
}
.info-text { font-size: 14px; color: var(--text-secondary); flex: 1; white-space: pre-wrap; }

.options-block { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--border); }
.options-title { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }
.option-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; }
.option-row input { width: 18px; height: 18px; }

.price-table { margin-top: 10px; padding-top: 10px; border-top: 0.5px solid var(--border); overflow-x: auto; }
.price-table table { width: 100%; font-size: 13px; border-collapse: collapse; white-space: nowrap; }
.price-table th { text-align: right; color: var(--text-secondary); font-weight: 500; padding: 4px 6px; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table td { padding: 4px 6px; text-align: right; }
.price-table .group-sep td { border-left: 1px solid var(--border-strong); }
.price-table thead .group-title { text-align: center; font-weight: 700; padding-bottom: 4px; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
  background: var(--surface-2); border-top: 1px solid var(--border-strong);
  padding: 12px 14px; font-size: 15px; z-index: 50;
}
.cart-summary { display: flex; justify-content: space-between; align-items: center; }
.cart-summary > span:first-child { cursor: pointer; }
.cart-toggle-btn {
  width: 40px; height: 34px; padding: 0; font-size: 17px; font-weight: 700;
}
.cart-clear-btn { padding: 8px 12px; font-size: 14px; }
.cart-detail { margin-top: 12px; max-height: 40vh; overflow-y: auto; }
.cart-detail table { font-size: 13px !important; }

.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 0.5px solid var(--border); font-size: 15px; }
.settings-row input { width: 64px; background: var(--surface-1); color: var(--text); border: 0.5px solid var(--border-strong); border-radius: 6px; padding: 6px 8px; text-align: right; font-size: 15px; }

.wide-btn { width: 100%; padding: 14px; margin-bottom: 8px; font-size: 16px; }
.muted { color: var(--text-muted); font-size: 13px; }
