/* KEYYO catalog parts: part rows, chips, category tiles, the hero search and the parts-page filters.
   Reads the kit's tokens (--ink --muted --line --surface --bg --accent --r-md --s-*), so it works on light and inverse grounds. */
.glyph { width: 26px; height: 26px; flex: none; }

/* a part as one row: picture, what it is, its condition and warranty, the quote link */
.part-list { list-style: none; margin: 0; padding: 0; display: grid; }
.part-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-8); }
.part-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: var(--s-2) var(--s-5); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.part-thumb { display: block; width: 88px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface); color: var(--muted); }
.thumb-glyph { display: block; width: 100%; height: 100%; }
.part-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.part-main { min-width: 0; display: grid; gap: 2px; }
.part-kind { font-size: 13px; color: var(--ink); }
.part-model { margin: 0; font: 600 18px/1.25 var(--font-display); letter-spacing: 0; color: var(--ink); overflow-wrap: anywhere; }
.part-model a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -11px; color: inherit; }
.part-model a:hover { text-decoration: underline; text-underline-offset: 3px; }
.part-meta { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.part-side { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s-2); }
.part-list--two .part-side { flex-direction: column; align-items: flex-end; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--ink); background: color-mix(in oklab, var(--accent) 12%, var(--bg)); }
.chip--ask { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.chip--warranty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.chip .glyph { width: 14px; height: 14px; }
.part-quote { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 500; white-space: nowrap; }
@media (max-width: 1023px) { .part-list--two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) {
  .part-row { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
  .part-thumb { width: 72px; }
  .part-side, .part-list--two .part-side { grid-column: 2; flex-direction: row; justify-content: flex-start; align-items: center; }
  .chips { justify-content: flex-start; }
  .part-model { font-size: 17px; }
}

/* the category tiles: a photograph, the name and what is in it */
.cat-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.cat-tile a { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.cat-tile__pic { display: block; overflow: hidden; border-radius: var(--r-md); background: var(--surface); }
.cat-tile__pic img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: transform 300ms cubic-bezier(.2, .7, .2, 1); }
.cat-tile a:hover .cat-tile__pic img { transform: scale(1.03); }
.cat-tile__name { margin-top: var(--s-3); font: 500 20px/1.25 var(--font-display); color: var(--ink); }
.cat-tile a:hover .cat-tile__name { text-decoration: underline; text-underline-offset: 4px; }
.cat-tile__line { font-size: 15px; color: var(--muted); }
@media (max-width: 1023px) { .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cat-tile__pic img { aspect-ratio: 1 / 1; } .cat-tiles { gap: var(--s-5) var(--s-4); } .cat-tile__name { font-size: 16px; margin-top: var(--s-2); } .cat-tile__line { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .cat-tile__pic img { transition: none; } .cat-tile a:hover .cat-tile__pic img { transform: none; } }

/* search: in the hero and on the parts page */
.hero-search { display: grid; gap: var(--s-2); margin-top: var(--s-6); max-width: 600px; }
.hero-search label, .filters label { font-size: 14px; font-weight: 500; color: var(--ink); }
.hero-search__row { display: flex; gap: var(--s-2); }
.search-input, .filters select { width: 100%; min-width: 0; height: 48px; padding: 0 var(--s-4); border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.search-input:focus-visible, .filters select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-search .btn { flex: none; height: 48px; }
.hero-search__alt { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 479px) { .hero-search .btn { padding-inline: var(--s-4); } .hero-search .btn .m-arrow { display: none; } }

.filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: var(--s-3); align-items: end; margin-top: var(--s-7); }
.filters label { display: grid; gap: 6px; }
.filters .btn { height: 48px; }
.cat-count { margin: var(--s-5) 0 0; font-size: 15px; color: var(--muted); }
@media (max-width: 1023px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters .filters__q { grid-column: 1 / -1; } }


.cat-group { padding-top: var(--s-8); }
.cat-group[hidden] { display: none; }
.cat-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--ink); }
.cat-group__head h2 { margin: 0; font-size: 28px; }
.cat-group__head span { font-size: 15px; color: var(--muted); }
.part-row[hidden] { display: none; }
.cat-none { margin-top: var(--s-8); padding: var(--s-6); border-radius: var(--r-md); background: var(--surface); }
.cat-none[hidden] { display: none; }
.cat-none h2 { margin: 0 0 var(--s-2); font-size: 24px; }
.cat-none p { margin: 0 0 var(--s-4); color: var(--muted); }

/* the home page's recent list: a button and one line under it */
.latest-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin: var(--s-6) 0 0; }
.latest-foot span { flex: 1 1 260px; font-size: 15px; color: var(--ink); }
.latest-photo { margin: 0; }
.latest-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); }
@media (min-width: 1024px) { .latest-photo { align-self: stretch; position: relative; min-height: 360px; } .latest-photo img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; } }
.latest-list .part-row { padding-block: 9px; }
.latest-list .latest-foot { margin-top: var(--s-5); }
@media (max-width: 1023px) { .latest-photo { margin-top: var(--s-6); } .latest-photo img { aspect-ratio: 3 / 2; } }
/* a phone: the list takes two screens, the shelf photograph upright under it */
@media (max-width: 639px) { #latest { --hm: 2; } .latest-photo img { aspect-ratio: 5 / 8; } }

/* the Parts menu's card: its picture, title and line close together */
.nav__menu .menu-card { align-content: start; }
