:root {
  --navy: #173460;
  --navy-deep: #102544;
  --title: #003584;
  --blue: #0096ff;
  --ink: #1c2836;
  --muted: #5c6b7c;
  --line: #d7e0ea;
  --paper: #f3f6fa;
  --card: #ffffff;
  --shadow: 0 10px 28px rgba(23, 52, 96, 0.08);
  --header: 76px;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--title); }

h1, h2, h3, .brand, .btn, .cat-bar a, .eyebrow {
  font-family: Roboto, "Open Sans", sans-serif;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header);
}
.brand img {
  height: 52px;
  width: auto;
  max-width: min(280px, 58vw);
  background: transparent;
}
.header-note {
  margin: 0;
  color: var(--navy);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.cat-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cat-scroll {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.cat-bar a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}
.cat-bar a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.cat-bar a:hover {
  background: #f4f7fb;
  border-color: var(--line);
  color: var(--navy);
}
.cat-bar a:focus {
  outline: none;
}
.cat-bar a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
}
.cat-bar a[aria-current="page"]:hover,
.cat-bar a[aria-current="page"]:focus-visible {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.hero { background: #fff; border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 28px 20px 22px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--title);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1 {
  margin: 0 0 8px;
  color: var(--title);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.lede {
  margin: 0;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 20px 28px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  position: sticky;
  top: calc(var(--header) + 12px);
  max-height: calc(100vh - var(--header) - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 6px;
  flex: 0 0 auto;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.filters h2 { margin: 0; font-size: 20px; color: var(--navy); }
.panel-body {
  overflow: auto;
  padding: 0 16px 20px;
  flex: 1 1 auto;
}
.field {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
select, .search input {
  width: 100%;
  border: 1px solid #c5d0dc;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
select:focus, .search input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23, 52, 96, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn-navy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn-navy:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.btn-text {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
  padding: 6px 4px;
}
.btn-text:hover { color: var(--title); }
.btn-text:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--navy);
  flex: 0 0 auto;
}

.sheet-foot { display: none; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.search { flex: 1; }
.count {
  margin: 10px 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: var(--shadow);
}
.card-media {
  display: block;
  aspect-ratio: 3 / 2;
  background: #e6eef6;
  position: relative;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.dims {
  margin: 0;
  font-weight: 700;
  color: var(--title);
  font-size: 14px;
}
.features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.features li {
  font-size: 14px;
  color: var(--ink);
  padding-left: 14px;
  position: relative;
}
.features li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
  position: absolute;
  left: 0;
  top: 0.5em;
}
.card .btn { margin-top: auto; align-self: stretch; }
.preview-detail {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--title);
}

.empty {
  background: #fff;
  border: 1px dashed #9eb0c6;
  border-radius: 18px;
  padding: 42px 24px;
  text-align: center;
  max-width: 640px;
  margin: 12px auto 0;
}
.empty-mark { color: var(--navy); margin-bottom: 8px; }
.empty-lead {
  margin: 0 auto 16px;
  max-width: 42ch;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}
.empty .btn { margin-top: 0; }
.empty-custom {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--title);
}

.design-cta {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 56px;
}
.design-cta-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  padding: 32px 24px 28px;
}
.design-cta h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.design-cta p {
  margin: 0 auto 18px;
  max-width: 40em;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
.design-cta .btn { min-width: 220px; }

.preview-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  margin: 0 0 14px;
  padding-bottom: 2px;
}
.preview-cats button {
  flex: 0 0 auto;
  font: inherit;
  font-family: Roboto, "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.preview-cats button[aria-selected="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.preview-cats button:hover { background: #f4f7fb; }
.preview-cats button[aria-selected="true"]:hover { background: var(--navy); color: #fff; }
.preview-cats button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.site-footer {
  background: #3d4045;
  color: #e6e8eb;
  text-align: center;
  padding: 28px 16px;
}
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: #fff; }

.sheet-only { display: none; }
.sheet-backdrop { display: none; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --header: 60px; }
  .header-inner { padding: 8px 16px; }
  .brand img { height: 40px; }
  .header-note { font-size: 11px; }
  .cat-scroll {
    padding: 8px 28px 8px 16px;
    scroll-padding-inline: 16px;
  }
  .cat-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 70%);
    pointer-events: none;
  }
  .layout {
    /* 1fr is minmax(auto, 1fr). The auto minimum is the nowrap
       .preview-cats row, which stretches this column — and the search
       and cards inside it — past the viewport. minmax(0, 1fr) matches
       the desktop results column so the chips scroll inside the row. */
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 16px 16px;
  }
  .design-cta { padding: 0 16px 36px; }
  .design-cta-panel { padding: 28px 18px 24px; }
  .design-cta h2 { font-size: 24px; }
  .design-cta .btn { width: 100%; max-width: 320px; }
  .sheet-only { display: inline-flex; }
  .filters {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 50;
    max-height: min(88vh, 720px);
    border-radius: 18px 18px 0 0;
    transform: translateY(110%);
    transition: transform 0.22s ease;
    box-shadow: 0 -12px 40px rgba(16, 37, 68, 0.25);
  }
  .filters.is-open { transform: translateY(0); }
  .panel-body { padding-bottom: 24px; }
  .sheet-foot {
    display: block;
    flex: 0 0 auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .sheet-foot .btn { width: 100%; }
  .sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 37, 68, 0.46);
    z-index: 45;
  }
  .sheet-backdrop[hidden] { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 14px 16px 10px; }
  .eyebrow { display: none; }
  .hero h1 { font-size: 28px; margin-bottom: 6px; }
  .lede { font-size: 14.5px; line-height: 1.4; }
  .count { margin: 8px 0; }
  body.sheet-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .filters { transition: none; }
  html { scroll-behavior: auto; }
}
