:root {
  color-scheme: light;
  --background: #f5f6fa;
  --surface: #ffffff;
  --foreground: #111318;
  --muted: #626b78;
  --line: #e3e6eb;
  --primary: #056cf2;
  --primary-dark: #0057c9;
  --navy: #001b43;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--background); scroll-behavior: smooth; }
body { margin: 0; color: var(--foreground); background: var(--background); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--primary); color: #fff; }

.header-inner, main, .catalog-footer span {
  width: min(calc(100% - 3rem), 76rem);
  margin-inline: auto;
}

.catalog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0d1016f5;
  border-bottom: 3px solid var(--primary);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: block; outline-offset: 5px; }
.brand img { display: block; width: 190px; height: auto; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #fff;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
  padding: .7rem .85rem;
  border: 1px solid #343b46;
  border-radius: .65rem;
}

.back-link svg { width: 1.1rem; height: 1.1rem; stroke-width: 2; }

main { padding-block: 3.5rem 5rem; }
.catalog-intro { max-width: 47rem; }
.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.catalog-intro p {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 2.4rem 1.4rem;
  padding: .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
  box-shadow: 0 10px 28px #001b4308;
}

.category-selector {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-left: .35rem;
}

.category-tabs {
  display: flex;
  gap: .35rem;
  padding: .25rem;
  border-radius: .7rem;
  background: #eef0f3;
}

.category-tab {
  padding: .55rem .78rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: #555f6d;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.category-tab.is-active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 12px #001b4320;
}

.category-selector > strong { color: var(--muted); font-size: .83rem; white-space: nowrap; }

.search-box {
  width: min(100%, 23rem);
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .72rem .85rem;
  border: 1px solid #d7dbe1;
  border-radius: .65rem;
  background: #fafbfc;
}

.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px #056cf21a; }
.search-box svg { flex: none; width: 1.1rem; height: 1.1rem; stroke-width: 1.8; color: #697381; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--foreground); font-size: .9rem; }
.search-box input::placeholder { color: #89919d; }

.models-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.model-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 9px 28px #001b4309;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.preview-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: #eef0f3;
  cursor: zoom-in;
  overflow: hidden;
}

.preview-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 240ms ease;
}

.model-info { padding: 1rem; }
.model-info strong { display: block; margin-bottom: .25rem; font-size: 1rem; letter-spacing: -.02em; }
.model-type { display: block; min-height: 1.15rem; margin-bottom: .75rem; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.model-info:not(:has(.model-type)) strong { margin-bottom: .8rem; }

.quote-button {
  min-height: 2.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .7rem .8rem;
  border-radius: .6rem;
  background: var(--primary);
  color: #fff;
  font-size: .83rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.empty-state { padding: 3rem 1rem; text-align: center; color: var(--muted); }

.catalog-note {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  border-left: 4px solid var(--primary);
  background: #fff;
  color: var(--muted);
  line-height: 1.5;
}
.catalog-note strong { color: var(--foreground); }

.catalog-footer { padding-block: 1.45rem; background: #0d1016; color: #b8c0cc; font-size: .78rem; line-height: 1.6; }
.catalog-footer span { display: block; }

.image-dialog {
  width: min(calc(100% - 2rem), 45rem);
  max-height: calc(100svh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 80px #0008;
}
.image-dialog::backdrop { background: #05070bd9; backdrop-filter: blur(3px); }
.dialog-content { position: relative; padding: 1rem 1rem 1.2rem; text-align: center; }
.dialog-content img { display: block; width: 100%; max-height: calc(100svh - 7rem); object-fit: contain; border-radius: .65rem; background: #f0f1f3; }
.dialog-content strong { display: block; margin-top: .85rem; }
.dialog-close {
  position: absolute;
  top: 1.65rem;
  right: 1.65rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: #0d1016e8;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.brand:focus-visible, .back-link:focus-visible, .preview-button:focus-visible, .quote-button:focus-visible, .dialog-close:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

@media (hover: hover) {
  .model-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px #001b4314; }
  .model-card:hover .preview-button img { transform: scale(1.025); }
  .quote-button:hover { background: var(--primary-dark); }
  .back-link:hover { background: #1a2029; }
  .category-tab:not(.is-active):hover { color: var(--navy); background: #fff; }
}

@media (max-width: 940px) {
  .models-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .header-inner, main, .catalog-footer span { width: min(calc(100% - 2rem), 36rem); }
  .header-inner { min-height: 4.65rem; }
  .brand img { width: 155px; }
  .back-link { padding: .6rem .68rem; font-size: .82rem; }
  main { padding-block: 2.35rem 3.5rem; }
  h1 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .catalog-intro p { font-size: .95rem; }
  .catalog-tools { align-items: stretch; flex-direction: column; padding: .7rem; margin-top: 1.8rem; }
  .category-selector { justify-content: space-between; padding: 0; }
  .category-tab { padding-inline: .68rem; }
  .search-box { width: 100%; }
  .models-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .model-card { border-radius: .8rem; }
  .model-info { padding: .8rem; }
  .model-info strong { margin-bottom: .65rem; font-size: .92rem; }
  .quote-button { min-height: 2.55rem; padding: .62rem .45rem; font-size: .77rem; }
  .catalog-note { font-size: .88rem; }
}

@media (max-width: 360px) {
  .header-inner, main, .catalog-footer span { width: calc(100% - 1.3rem); }
  .models-grid { gap: .55rem; }
  .model-info { padding: .68rem; }
  .quote-button { font-size: .72rem; }
}

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