/* City Toys — public storefront (Product Catalog + Customer Portal) design tokens,
   ported verbatim from design_handoff_inventory_system/source/README.md. */

:root {
  --bg: #eeece7;
  --card: #fff;
  --border: #ededea;
  --text: #1a1a18;
  --text-secondary: #6a6a62;
  --text-tertiary: #a3a39b;
  --sale-red: #b04a3f;
  --link-blue: #2a6fdb;
  --link-blue-hover: #1c50a3;
  --dark: #1a1a18;
  --bazaar-bg: #fdf8dd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

h1, h2, h3 { font-family: "Newsreader", serif; font-weight: 600; margin: 0 0 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.money, .code { font-family: "Spline Sans Mono", monospace; font-weight: 500; }
.price-strike { text-decoration: line-through; color: var(--text-tertiary); font-size: 12.5px; }
.price-sale { color: var(--sale-red); font-weight: 600; }

a { color: var(--link-blue); text-decoration: none; }
a:hover { color: var(--link-blue-hover); }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-header img.logo { height: 36px; }
.site-header .search { flex: 1; min-width: 200px; }
.site-header .search input {
  width: 100%; max-width: 420px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 20px; font-size: 14px;
}
.site-header nav a { margin-left: 16px; font-size: 13.5px; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pills a {
  padding: 6px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: 13px;
}
.pills a.active { background: var(--dark); color: #fff; border-color: var(--dark); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }

.p-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.p-card .photo { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.p-card .photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.p-card .body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-card .brand { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.p-card .name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.p-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge.sale { background: var(--sale-red); color: #fff; }
.badge.pwp { background: var(--link-blue); color: #fff; }
.badge.points { background: #a5720f; color: #fff; }
.badge.parts { background: #2f7a52; color: #fff; }
.badge.status { background: #f0efec; color: var(--text-secondary); }

.btn {
  display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--dark); background: var(--dark);
  color: #fff; font-size: 13px; cursor: pointer; font-family: inherit; text-align: center;
}
.btn:hover { opacity: .85; }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border); }

.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.bazaar-card { background: var(--bazaar-bg); border: 1px solid #ece2b9; border-radius: 12px; padding: 16px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; }
.flash.success { background: #eaf5ee; color: #2f7a52; border: 1px solid #cfe6d8; }
.flash.error { background: #fbecea; color: var(--sale-red); border: 1px solid #f0d3ce; }

.empty-state { color: var(--text-tertiary); padding: 40px; text-align: center; }

.login-shell { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { width: 380px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
