:root {
  --page: #a5aba0;
  --surface: #f4f4eb;
  --panel: #ffffff;
  --ink: #0b0b09;
  --muted: #565b52;
  --line: #0b0b09;
  --gold: #d7ad37;
  --blue: #2c94c7;
  --soft-blue: #e8f5fa;
  --soft-gold: #fff7df;
  --shadow: 0 7px 0 var(--line);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
a {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1220px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  border-left: 1px solid rgba(11, 11, 9, 0.15);
  border-right: 1px solid rgba(11, 11, 9, 0.15);
}

.brand-header {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 18px;
  align-items: start;
  padding: 34px 34px 28px;
  border-bottom: 3px solid var(--line);
}

.round-action {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease;
}

.round-action:hover,
.round-action:focus-visible {
  border-color: var(--line);
  transform: translateY(-2px);
  outline: none;
}

.brand-mark {
  grid-column: 2;
  justify-self: center;
  width: 112px;
  height: 112px;
  object-fit: contain;
  padding: 10px;
  border-radius: 50%;
  background: var(--panel);
  animation: enter-pop 520ms ease both;
}

.brand-copy {
  grid-column: 1 / -1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  animation: enter-up 620ms ease both;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-copy h1,
.results-head h2,
.contact-band h2,
.modal-copy h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.brand-copy h1 {
  font-size: 2.2rem;
}

.intro {
  max-width: 520px;
  margin: 12px auto 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

.quick-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 680px;
  width: 100%;
  margin: 10px auto 0;
}

.quick-links a,
.load-more,
.copy-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.quick-links a:hover,
.quick-links a:focus-visible,
.load-more:hover,
.load-more:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  background: var(--soft-gold);
  box-shadow: 0 4px 0 var(--line);
  transform: translateY(3px);
  outline: none;
}

.catalog-area {
  padding: 24px 34px 40px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0 16px;
  background: var(--surface);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 54px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  font-size: 1rem;
  outline: none;
}

.search-box input:focus {
  background: var(--soft-blue);
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px;
  align-self: end;
}

.catalog-stats span {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.category-rail {
  display: flex;
  gap: 10px;
  margin: 0 -34px;
  padding: 0 34px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.category-button:hover,
.category-button:focus-visible {
  background: var(--soft-blue);
  transform: translateY(-2px);
  outline: none;
}

.category-button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  padding: 14px 0 18px;
}

.results-head h2,
.contact-band h2 {
  font-size: 1.7rem;
}

.source-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: right;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 314px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  animation: card-in 420ms ease both;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.product-card:hover,
.product-card:focus-visible {
  background: var(--soft-gold);
  box-shadow: 0 6px 0 var(--line);
  transform: translateY(-4px);
  outline: none;
}

.image-stage {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 142px;
  place-items: center;
  padding: 12px;
  border-bottom: 3px solid var(--line);
  background: #fff;
}

.image-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.batch-tag {
  position: absolute;
  left: 9px;
  top: 9px;
  max-width: calc(100% - 18px);
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-info {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.product-code {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.product-color {
  min-height: 36px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: auto;
}

.product-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.product-meta span:first-child {
  min-width: 0;
  background: var(--soft-blue);
}

.product-meta span:last-child {
  background: var(--gold);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  font-weight: 800;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 24px 0 8px;
}

.load-more {
  min-width: 220px;
  padding: 0 18px;
}

.load-more[hidden] {
  display: none;
}

.contact-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  padding: 22px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}

.contact-band .eyebrow,
.contact-band p {
  color: #fff;
}

.contact-band p {
  max-width: 360px;
  margin: 0;
  font-weight: 800;
  line-height: 1.45;
}

.contact-copy {
  display: grid;
  gap: 14px;
  justify-items: end;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  width: min(420px, 100%);
}

.contact-actions a {
  display: grid;
  min-height: 64px;
  align-content: center;
  gap: 4px;
  padding: 9px 12px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.contact-actions a:hover,
.contact-actions a:focus-visible {
  background: var(--soft-gold);
  box-shadow: 0 3px 0 var(--line);
  transform: translateY(2px);
  outline: none;
}

.contact-actions span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-actions strong {
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 11, 9, 0.58);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 360px);
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 0 var(--line);
  overflow: auto;
  animation: modal-in 180ms ease both;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  min-height: 38px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.modal-image-wrap {
  display: grid;
  min-height: 380px;
  place-items: center;
  padding: 28px;
  border-right: 3px solid var(--line);
  background: #fff;
}

.modal-image-wrap img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.modal-copy {
  display: grid;
  gap: 16px;
  align-content: center;
  padding: 56px 24px 24px;
}

.modal-copy h2 {
  font-size: 1.65rem;
}

.modal-copy dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.modal-copy dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.modal-copy dt {
  color: var(--muted);
  font-weight: 900;
}

.modal-copy dd {
  margin: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.copy-button {
  width: 100%;
}

body.modal-lock {
  overflow: hidden;
}

@keyframes enter-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: 100%;
  }

  .brand-header {
    grid-template-columns: 42px 1fr 42px;
    gap: 12px;
    padding: 20px 16px 24px;
  }

  .brand-mark {
    width: 92px;
    height: 92px;
  }

  .brand-copy h1 {
    font-size: 1.75rem;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .catalog-area {
    padding: 18px 16px 28px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .catalog-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-rail {
    margin: 0 -16px;
    padding: 0 16px 16px;
  }

  .results-head {
    display: grid;
  }

  .source-note {
    text-align: left;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    min-height: 286px;
  }

  .product-info {
    padding: 10px;
  }

  .product-meta {
    grid-template-columns: 1fr;
  }

  .contact-band {
    display: grid;
  }

  .contact-copy {
    justify-items: stretch;
  }

  .contact-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-image-wrap {
    min-height: 260px;
    border-right: 0;
    border-bottom: 3px solid var(--line);
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
