:root {
  --ink: #111411;
  --paper: #f4f3ec;
  --surface: #fffefa;
  --surface-alt: #e9ebe3;
  --line: #d8d9cf;
  --muted: #6e7369;
  --green: #1d8b55;
  --blue: #334e68;
  --gold: #b8862f;
  --red: #b74242;
  --shadow: 0 12px 32px rgba(17, 20, 17, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(69, 91, 82, 0.12), transparent 260px),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  box-shadow: 5px 5px 0 rgba(184, 134, 47, 0.3);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong { font-size: 16px; }
.brand-lockup small { color: var(--muted); font-size: 12px; }

.top-actions {
  display: flex;
  gap: 8px;
}

.top-actions a,
.refresh-button,
.rvip-input-row button,
.copy-note {
  min-height: 34px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
}

.status-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
}

.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 11px;
  color: #184f31;
  background: #ddf3e5;
  border: 1px solid #b8ddc3;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.stock-chip span {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 74px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quick-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  color: #fff;
  background: #5965f2;
  border-radius: 8px;
  font-weight: 800;
}

.quick-icon.green { background: #11a05f; }
.quick-icon.gold { background: var(--gold); }

.quick-link strong,
.quick-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-link strong { font-size: 14px; }
.quick-link small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.rvip-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: center;
  margin: 14px 0;
  padding: 18px;
  color: #f9f7ed;
  background:
    linear-gradient(135deg, rgba(19, 29, 24, 0.94), rgba(38, 55, 49, 0.94)),
    url("./assets/avatar.jpg") center / cover;
  border-radius: 8px;
  overflow: hidden;
}

.rvip-copy p:last-child {
  max-width: 520px;
  margin: 10px 0 0;
  color: rgba(249, 247, 237, 0.72);
  font-size: 14px;
}

.rvip-panel .eyebrow { color: rgba(249, 247, 237, 0.62); }

.rvip-card {
  padding: 13px;
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: var(--ink);
}

.rvip-card label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rvip-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.rvip-input-row input,
.search-box input,
.sort-box select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.copy-note {
  width: 100%;
  margin-top: 8px;
  color: #0f3d28;
  background: #d9f1e1;
  border-color: #aad3b7;
}

.rvip-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 28px;
}

.trust-strip div,
.passport-grid article {
  min-height: 74px;
  padding: 13px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trust-strip strong,
.trust-strip small,
.passport-grid strong,
.passport-grid small {
  display: block;
}

.trust-strip strong,
.passport-grid strong {
  font-size: 13px;
}

.trust-strip small,
.passport-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.inventory,
.passport-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  margin-bottom: 10px;
}

.search-box,
.sort-box {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.category-tab {
  min-height: 56px;
  padding: 9px;
  color: #484d45;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-tab.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.category-tab strong,
.category-tab small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tab strong { font-size: 13px; }
.category-tab small {
  margin-top: 4px;
  opacity: 0.72;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filter {
  min-height: 32px;
  padding: 0 11px;
  color: #51564d;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.filter.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.product-grid {
  display: grid;
  gap: 10px;
}

.product-card {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 182px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 176px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 50%),
    var(--visual);
}

.product-visual::before {
  content: "";
  width: 92px;
  height: 112px;
  border: 2px solid rgba(17, 20, 17, 0.36);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.34);
  box-shadow: 18px 14px 0 rgba(17, 20, 17, 0.11);
  transform: rotate(-7deg);
}

.product-visual.has-image::before { display: none; }

.product-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-type {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 6px;
  color: #fff;
  background: rgba(17, 20, 17, 0.72);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.product-swatch {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.product-body {
  min-width: 0;
  padding: 15px;
}

.product-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.product-card h3 {
  overflow: hidden;
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-meta,
.product-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.product-description {
  min-height: 34px;
  margin-bottom: 10px;
  line-height: 1.45;
}

.product-badge {
  flex: 0 0 auto;
  align-self: start;
  padding: 5px 7px;
  color: #5d4315;
  background: #f3e7c7;
  border: 1px solid #dfc381;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.product-badge.rvip {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.size-pill {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 5px 2px;
  text-align: center;
  border-radius: 6px;
}

.size-pill strong,
.size-pill small {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.size-pill strong { font-size: 11px; }
.size-pill small { margin-top: 1px; font-size: 8px; }

.size-pill.in-stock {
  color: #0d4828;
  background: #c9efd5;
}

.size-pill.low-stock,
.size-pill.restocking {
  color: #695111;
  background: #f4e7ad;
}

.size-pill.sold-out {
  color: #762a2a;
  background: #f2c6c6;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  color: #113d28;
  text-decoration: none;
  background: #dff3e6;
  border: 1px solid #acd6b9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.product-link.disabled {
  color: #8b8d85;
  background: #eeeee8;
  border-color: #d8d9cf;
}

.note-button {
  color: #253f5d;
  background: #dce9f4;
  border-color: #b3cbe0;
}

.empty-state {
  margin: 28px 0;
  color: var(--muted);
  text-align: center;
}

.passport-section { margin-top: 28px; }
.quiet-label {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.passport-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

@media (max-width: 760px) {
  .site-shell { padding: 12px; }
  .topbar { align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .status-band,
  .rvip-panel,
  .toolbar {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 29px; }
  .quick-links,
  .trust-strip,
  .passport-grid {
    grid-template-columns: 1fr;
  }
  .category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-card {
    grid-template-columns: 122px minmax(0, 1fr);
  }
  .product-visual { min-height: 148px; }
  .product-body { padding: 12px; }
  .size-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-description { min-height: auto; }
  .site-footer { display: block; }
  .site-footer span { display: block; margin-top: 5px; }
}

@media (max-width: 460px) {
  .status-band { padding: 18px; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  .product-card { grid-template-columns: 1fr; }
  .product-visual { min-height: 210px; }
  .size-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
