/* Retro86 parts catalogue: a modern shop layout with a 90s mail-order catalogue's flavour. */
#catalog {
  --c-bg: #f4f1ea; --c-card: #ffffff; --c-ink: #1d1b17; --c-mute: #6c675c; --c-line: #e2ddd1;
  --c-accent: #e2382b; --c-gold: #ffc928; --c-blue: #1f5fbf; --c-dark: #17150f;
  width: min(1560px, 97vw); height: min(940px, 94vh); max-width: none; max-height: none; padding: 0; border: none; border-radius: 14px;
  background: var(--c-bg); color: var(--c-ink); overflow: hidden; box-shadow: 0 30px 80px #000c;
  font: 15px/1.45 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: none; grid-template-columns: 210px minmax(0, 1fr) 330px; grid-template-rows: auto minmax(0, 1fr);
}
#catalog[open] { display: grid; }
#catalog::backdrop { background: rgba(10, 9, 7, .72); backdrop-filter: blur(3px); }

/* The masthead: the RETRO86 name in the VGA font beside rainbow stripes, like an early-90s catalogue cover. */
.cat-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 16px 26px; background: var(--c-dark); color: #f4efe2; position: relative; }
.cat-stripes { display: flex; flex-direction: column; gap: 3px; width: 54px; }
.cat-stripes i { display: block; height: 5px; border-radius: 3px; }
.cat-stripes i:nth-child(1) { background: #61bb46; } .cat-stripes i:nth-child(2) { background: #fdb827; } .cat-stripes i:nth-child(3) { background: #f5821f; }
.cat-stripes i:nth-child(4) { background: #e03a3e; } .cat-stripes i:nth-child(5) { background: #009ddc; }
.cat-title { display: flex; flex-direction: column; }
.cat-logo { font: 34px/1 VGA8x16, monospace; letter-spacing: .08em; }
.cat-sub { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #c9c1ad; margin-top: 4px; }
.cat-note { margin-left: auto; font-size: 13px; color: #c9c1ad; }
.cat-x { background: none; border: 1px solid #ffffff33; color: #f4efe2; width: 38px; height: 38px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.cat-x:hover { background: #ffffff1a; }

/* Steps on the left. */
.cat-steps { display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; border-right: 1px solid var(--c-line); overflow: auto; }
.cat-steps button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: none; border-radius: 10px; background: none; color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; }
.cat-steps button b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-line); font: 13px/1 VGA8x16, monospace; }
.cat-steps button:hover { background: #ebe6da; }
.cat-steps button.on { background: var(--c-ink); color: #fff; }
.cat-steps button.on b { background: var(--c-gold); color: var(--c-ink); }

/* The products. */
.cat-main { display: flex; flex-direction: column; min-height: 0; }
.cat-filter { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 18px 24px 12px; }
.cat-filter h2 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.cat-filter span { color: var(--c-mute); }
.cat-filter button { border: 1px solid var(--c-line); background: #fff; color: var(--c-ink); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; }
.cat-filter button.on { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.cat-grid { flex: 1; overflow: auto; padding: 6px 24px 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-content: start; grid-auto-rows: max-content; }
.card { position: relative; display: block; width: 100%; text-align: left; padding: 0; border: 1px solid var(--c-line); border-radius: 12px; background: var(--c-card); color: var(--c-ink); font: inherit; cursor: pointer; overflow: hidden; transition: transform .12s, box-shadow .12s, border-color .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px #0000001c; border-color: #cfc8b8; }
.card.sel { border: 2px solid var(--c-accent); box-shadow: 0 10px 26px #e2382b33; }
.card .ph { position: relative; display: grid; place-items: center; height: 180px; background: radial-gradient(ellipse at 50% 40%, #ffffff, #efebe2); border-bottom: 1px solid var(--c-line); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; mix-blend-mode: multiply; }
.ph-none { display: grid; place-items: center; width: 100%; height: 100%; }
.ph-ico { width: 46%; fill: none; stroke: #b8b0a0; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
/* The year: a round yellow sticker, slightly crooked, like a price tag. */
.sticker { position: absolute; top: 10px; right: 10px; padding: 7px 8px; border-radius: 50%; background: var(--c-gold); color: var(--c-ink); font: 13px/1 VGA8x16, monospace; transform: rotate(-8deg); box-shadow: 0 2px 4px #0003; }
.card .info { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.card .info b { font-size: 16px; line-height: 1.25; }
.card .txt { font-size: 13.5px; color: var(--c-mute); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips i { font: 12px/1 VGA8x16, monospace; font-style: normal; padding: 5px 7px; border-radius: 6px; background: #f0ece2; color: #4b463b; }
.tick { position: absolute; top: 10px; left: 10px; background: var(--c-accent); color: #fff; font: 12px/1 VGA8x16, monospace; padding: 6px 8px; border-radius: 6px; letter-spacing: .04em; }

/* Your build. */
.cat-build { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; background: #1f1c16; color: #f4efe2; min-height: 0; }
.cat-build h3 { margin: 0 0 2px; font: 18px/1 VGA8x16, monospace; letter-spacing: .1em; color: var(--c-gold); }
.cat-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cat-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: none; border-radius: 9px; background: none; color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.cat-list button:hover, .cat-list button.on { background: #ffffff14; }
.cat-list small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #a69e8a; }
.mini { flex: 0 0 auto; width: 54px; height: 42px; border-radius: 7px; background: #f4f1ea; object-fit: contain; padding: 3px; box-sizing: border-box; }
.mini.ph-none { display: grid; }
.mini .ph-ico { width: 80%; }
.cat-small { margin: 4px 0 0; font-size: 12.5px; color: #a69e8a; }
.cat-go { padding: 15px; border: none; border-radius: 11px; background: var(--c-gold); color: var(--c-ink); font: 20px/1 VGA8x16, monospace; letter-spacing: .08em; cursor: pointer; box-shadow: 0 3px 0 #b88a00; }
.cat-go:hover { filter: brightness(1.05); }
.cat-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #b88a00; }
.cat-cancel { padding: 10px; border: 1px solid #ffffff33; border-radius: 11px; background: none; color: #f4efe2; font: inherit; cursor: pointer; }
.card .cap { font-size: 12.5px; font-style: italic; color: #8a7f68; }
.card .credit { font-size: 10.5px; color: #a39b8a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Prices: a shop tag on each card, the cost on each line of the build, the total under it. */
.card .price { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.card .price b { font: 22px/1 VGA8x16, monospace; color: var(--c-accent); letter-spacing: .02em; }
.card .price small { font-size: 12px; color: var(--c-mute); }
.cat-list button > span, .cat-list .basics > span { flex: 1; min-width: 0; }
.cat-list em { flex: 0 0 auto; font: 14px/1 VGA8x16, monospace; font-style: normal; color: var(--c-gold); }
.cat-list em.est { color: #d8c48a; }
.cat-list .basics { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 72px; font-size: 13.5px; }
.cat-total { border-top: 1px dashed #ffffff40; padding-top: 10px; }
.cat-total .sum { display: flex; justify-content: space-between; align-items: baseline; font: 16px/1 VGA8x16, monospace; letter-spacing: .1em; color: #a69e8a; }
.cat-total .sum b { font-size: 28px; color: var(--c-gold); letter-spacing: .02em; }
.cat-total .today { text-align: right; font-size: 13px; color: #d9d2c0; margin-top: 4px; }
.cat-total .cat-small { font-size: 11.5px; }
