/* FrameFox board — clean clinical-retail */

:root {
  --brand: #0e7490;
  --ink: #1c1c21;
  --muted: #6e6e76;
  --faint: #74747c;
  --hairline: #e4e4e8;
  --surface: #fafafa;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  border-top: 3px solid var(--brand);
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.practice-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.board-meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.board-meta:empty { display: none; }

/* ---------- Toolbar ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.search-field input,
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 8px 12px;
  width: 100%;
}

.search-field input::placeholder { color: var(--faint); }

.search-field input:hover,
.field select:hover { border-color: #c8c8cf; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.field {
  flex: 1 1 130px;
  min-width: 120px;
}

.field label,
.search-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.result-count {
  margin: 0 0 9px;
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Grid / cards ---------- */

.grid {
  list-style: none;
  margin: 0;
  padding: 28px 0 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.card:hover {
  border-color: #c8c8cf;
  box-shadow: 0 2px 10px rgba(20, 20, 25, 0.06);
}

.card-media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px 14px;
  flex: 1;
}

.card-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-model {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-detail {
  font-size: 13px;
  color: var(--muted);
}

.card-size {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.card-price-row {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.card-price {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.card-msrp {
  font-size: 13px;
  color: var(--faint);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .toolbar-inner { flex-direction: row; align-items: flex-end; }
  .search-field { flex: 1 1 280px; max-width: 360px; }
  .filter-row { flex: 1; }
}

@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(5, 1fr); gap: 24px; }
}

/* ---------- Empty / error states ---------- */

.empty-state {
  margin: 56px auto;
  max-width: 380px;
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed var(--hairline);
  border-radius: 8px;
}

.empty-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.empty-hint {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.empty-hint:last-child { margin-bottom: 0; }

.btn-clear {
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  background: var(--bg);
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.btn-clear:hover { background: var(--surface); }

.load-error {
  margin: 56px auto;
  max-width: 520px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.error-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.load-error pre {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 10px 14px;
  overflow-x: auto;
}

.load-error code { font-size: 13px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 20px 0 32px;
}

.footer-note {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--muted);
}

.updated {
  margin: 0;
  font-size: 12px;
  color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .btn-clear { transition: none; }
}
