/* "Apple IIe" theme.
   The desk is the machine: a platinum-beige case with fine vent lines and the six-colour stripe. Everything you read is on a black
   monitor screen with green phosphor type, framed by a beige bezel. Buttons are keycaps, the category list is a disk CATALOG, prompts
   start with "]" and mistakes say ?ERROR. Type: VT323 (SIL OFL), self-hosted in assets/fonts/. CSS + inline SVG only; no logos. */

@font-face { font-family: "VT323"; src: url("fonts/vt323.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
    --case: #d5ccb4;      /* platinum beige */
    --case-hi: #ebe5d3;
    --case-lo: #a99f86;
    --key: #3d3730;       /* dark keycap */
    --key-hi: #6a6258;
    --legend: #f3eedf;
    --ink: #2a251f;
    --screen: #07120a;
    --screen2: #0d1f12;
    --p: #46ff7e;         /* P1 phosphor green */
    --p2: #b9ffd0;
    --pd: #1f8f46;
    --amber: #ffb53f;
    --red: #ff6a5a;
    --s1: #5ebd3e; --s2: #ffb900; --s3: #f78200; --s4: #e23838; --s5: #973999; --s6: #009cdf;
    --font: "VT323", "Courier New", ui-monospace, monospace;
    --mono: var(--font);
    --link: var(--p2);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--pd) var(--screen); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); font: 21px/1.2 var(--font);
    background: var(--case) repeating-linear-gradient(180deg, rgba(255,255,255,.28) 0 2px, rgba(0,0,0,.055) 2px 4px, transparent 4px 9px); }
a { color: var(--link); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; text-transform: uppercase; letter-spacing: .02em; }
h1 { font-size: 32px; } h2 { font-size: 26px; } h3 { font-size: 23px; }
p { margin: 0 0 .7em; }
.mono { font-family: var(--font); }
.muted { opacity: .78; }
.small { font-size: 18px; }
.sr { position: absolute; left: -9999px; }
::selection { background: var(--p); color: var(--screen); }

/* ---- Top of the case ---- */
.stripe { height: 12px; background: linear-gradient(180deg, var(--s1) 0 16.66%, var(--s2) 0 33.33%, var(--s3) 0 50%, var(--s4) 0 66.66%, var(--s5) 0 83.33%, var(--s6) 0); }
.menubar { position: sticky; top: 0; z-index: 20; background: var(--case-hi); border-bottom: 3px solid var(--case-lo); font-size: 22px; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.menubar-in { max-width: 1180px; margin: 0 auto; padding: 6px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.menubar a, .menubar summary { color: var(--ink); text-decoration: none; text-transform: uppercase; padding: 5px 10px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; border-radius: 4px; }
.menubar summary::-webkit-details-marker { display: none; }
.menubar a:hover, .menubar summary:hover, .menubar details[open] > summary { background: var(--screen); color: var(--p); }
.brand { padding-left: 0 !important; font-size: 26px; }
.brand svg { width: 38px; height: 36px; }
.nameplate { background: var(--key); color: var(--legend); border-radius: 4px; padding: 2px 12px 3px; font-size: 22px; letter-spacing: .08em; box-shadow: inset 0 1px 0 var(--key-hi); margin-right: 8px; }
.menubar .spacer { flex: 1; }
.menu { position: relative; display: flex; }
.menu-list { position: absolute; top: calc(100% + 4px); left: 0; background: var(--screen); border: 8px solid var(--case-hi); border-radius: 10px; outline: 2px solid var(--case-lo); min-width: 280px; max-height: 70vh; overflow: auto; z-index: 30; padding: 6px; }
.menubar .menu-list a { display: flex; justify-content: space-between; gap: 14px; width: 100%; color: var(--p); border-radius: 0; }
.menubar .menu-list a:hover { background: var(--p); color: var(--screen); }
.menu-list hr { border: 0; border-top: 1px dashed var(--pd); margin: 4px 0; }
.search { display: flex; align-items: center; }
.search input { width: 170px; }
.cartlink b { background: var(--s4); color: #fff; border-radius: 3px; padding: 0 7px; font-weight: 400; }

/* ---- Page frame ---- */
.desktop { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 14px 36px; }
.cols { display: grid; grid-template-columns: 270px 1fr; gap: 22px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.stack > * + * { margin-top: 22px; }
@media (max-width: 860px) { .cols, .cols-2 { grid-template-columns: 1fr !important; } }

/* ---- Monitors: a beige bezel around a black screen ---- */
.win { position: relative; background: var(--screen); color: var(--p); border: 10px solid var(--case-hi); border-radius: 16px; outline: 2px solid var(--case-lo); box-shadow: 0 5px 0 var(--case-lo), 0 10px 22px rgba(0,0,0,.25); overflow: hidden; text-shadow: 0 0 5px rgba(70,255,126,.35); }
.win::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.16) 2px 3px); }
.win-title { position: relative; display: flex; align-items: center; gap: 4px; padding: 7px 42px 5px 14px; border-bottom: 2px solid var(--pd); cursor: default; min-height: 38px; }
.win-title::before { content: "]"; font-size: 24px; }
.win-title::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--p); }
.win-title h1, .win-title h2, .win-title .t { margin: 0; font-size: 24px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.win-title h1::after { content: "\2588"; margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .win-title h1::after, .prompt::after { animation: none; } }
.win-body { margin: 0; padding: 16px; }
.win-body.paper { background: var(--screen2); border: 1px solid var(--pd); margin: 10px; border-radius: 4px; }
.win-status { border-top: 1px dashed var(--pd); padding: 6px 14px; display: flex; justify-content: space-between; gap: 10px; }
.win.shaded > :not(.win-title) { display: none; }
.win.shaded .win-title { border-bottom: 0; }
.win.shaded .win-title::after { background: var(--p); }
.infobar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 14px; border-bottom: 1px dashed var(--pd); color: var(--p2); font-size: 19px; }
.win a:hover { background: var(--p); color: var(--screen); text-shadow: none; }

/* ---- Keycaps ---- */
.btn, button.btn { font: 21px/1 var(--font); text-transform: uppercase; text-decoration: none; display: inline-block; cursor: pointer; text-align: center; color: var(--legend); text-shadow: none; position: relative; z-index: 1;
    background: linear-gradient(180deg, var(--key-hi), var(--key) 45%); border: 2px solid #221e19; border-radius: 7px; padding: 8px 16px 9px; box-shadow: 0 4px 0 #17140f, inset 0 1px 0 rgba(255,255,255,.22); margin: 0 2px 4px 0; }
.win a.btn:hover, .btn:hover { background: linear-gradient(180deg, #7d746a, #4a433b 45%); color: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #17140f; }
.btn.default { background: linear-gradient(180deg, #fffaf0, var(--case) 60%); color: var(--ink); border-color: #6b6354; box-shadow: 0 4px 0 #6b6354, inset 0 1px 0 #fff; }
.win a.btn.default:hover, .btn.default:hover { background: linear-gradient(180deg, #fff, #e6ddc4 60%); color: var(--ink); }
.btn[disabled], .btn.off { opacity: .45; cursor: not-allowed; }
.btn.block { display: block; width: 100%; }
.btn.link { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; color: var(--link); text-decoration: underline; text-transform: none; font-size: inherit; }

/* ---- Typing fields ---- */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=number], select, textarea {
    font: 21px/1.15 var(--font); color: var(--p); background: var(--screen); border: 2px solid var(--pd); border-radius: 4px; padding: 5px 8px; max-width: 100%; caret-color: var(--p); position: relative; z-index: 1; }
::placeholder { color: var(--pd); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--p); }
input[type=number] { width: 4.2em; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
select { cursor: pointer; }
select option { background: var(--screen); color: var(--p); }
input[type=checkbox], input[type=radio] { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: -4px; background: var(--screen); border: 2px solid var(--p); flex: none; cursor: pointer; position: relative; z-index: 1; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:checked, input[type=radio]:checked { background: var(--p); box-shadow: inset 0 0 0 3px var(--screen); }
label { display: block; margin-bottom: 4px; text-transform: uppercase; }
label .small, label .muted { text-transform: none; }
.field { margin-bottom: 14px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field select { width: 100%; }
.field-err { color: var(--red); margin-top: 3px; }
.field-err::before { content: "? "; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 14px; }
@media (max-width: 560px) { .row, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---- Messages ---- */
.alert { position: relative; background: var(--screen); color: var(--p); border: 2px solid var(--p); border-radius: 6px; padding: 12px 16px 12px 38px; margin-bottom: 18px; text-shadow: 0 0 5px rgba(70,255,126,.35); }
.alert::before { content: "]"; position: absolute; left: 14px; top: 12px; font-size: 24px; }
.alert.error { color: var(--screen); background: var(--p); text-shadow: none; }
.alert.error::before { content: "?"; }
.alert.error a { color: var(--screen); }

/* ---- Home ---- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.hero h1 { font-size: 40px; }
.hero .mac { width: 190px; height: 178px; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; } .hero .mac { display: none; } }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ---- Categories: a disk CATALOG ---- */
.finder { list-style: none; margin: 0; padding: 0; }
.finder li a { display: flex; align-items: baseline; gap: 8px; padding: 2px 6px; text-decoration: none; color: var(--p); text-transform: uppercase; }
.finder li a::before { content: "*B"; color: var(--pd); }
.finder li a:hover, .finder li a.on { background: var(--p); color: var(--screen); text-shadow: none; }
.finder li a:hover::before, .finder li a.on::before { color: var(--screen); }
.finder .n { margin-left: auto; }
.finder li a.d1 { padding-left: 24px; } .finder li a.d2 { padding-left: 42px; } .finder li a.d3 { padding-left: 60px; }

/* ---- Product grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; border-width: 8px; }
.card > .win-title .t { font-size: 20px; color: var(--p2); }
.card .win-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 12px; }
.card .pic { display: block; position: relative; background: #fff; border: 1px solid var(--pd); border-radius: 4px; aspect-ratio: 1 / 1; overflow: hidden; }
.card .pic img, .card .pic .noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.card .name { text-decoration: none; color: var(--p); font-size: 22px; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cardh { margin: 0; font: inherit; line-height: inherit; text-transform: none; }
.price { font-size: 30px; line-height: 1; color: var(--p2); }
.price s { color: var(--pd); margin-right: 8px; font-size: .75em; }
.tag { display: inline-block; font-size: 17px; line-height: 1; padding: 3px 7px 4px; border: 1px solid var(--p); text-transform: uppercase; }
.tag.out { background: var(--p); color: var(--screen); text-shadow: none; }
.tag.low { border-color: var(--amber); color: var(--amber); text-shadow: none; }
.noimg { display: grid; place-items: center; height: 100%; color: #444; text-shadow: none; }

/* ---- Product page ---- */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } }
.buy { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 2px dashed var(--pd); border-radius: 6px; padding: 14px; margin: 16px 0; }
.buy .price { font-size: 44px; }
.ptitle { font: 400 34px/1.1 var(--font) !important; text-transform: uppercase; }
.prose { font-size: 22px; line-height: 1.25; }
.prose h2, .prose h3, .prose h4 { margin: 1em 0 .4em; font-size: 24px; color: var(--p2); }
.prose strong, .prose b { color: var(--p2); font-weight: 400; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 .8em; }
.prose table { border-collapse: collapse; margin-bottom: .8em; } .prose td, .prose th { border: 1px solid var(--pd); padding: 3px 8px; }
.crumbs { margin-bottom: 14px; color: var(--ink); text-transform: uppercase; }
.crumbs a { color: var(--ink); } .crumbs a:hover { background: var(--screen); color: var(--p); }
.win .crumbs, .win .crumbs a { color: var(--p2) !important; }

/* Gallery: pictures can never spill out of their box */
.gallery { min-width: 0; }
.gallery .main { position: relative; display: block; overflow: hidden; background: #fff; border: 6px solid var(--screen2); outline: 1px solid var(--pd); border-radius: 8px; aspect-ratio: 1 / 1; }
.gallery .main img, .gallery .main .noimg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; position: relative; z-index: 1; }
.thumbs a { flex: 0 0 66px; width: 66px; height: 66px; position: relative; overflow: hidden; display: block; background: #fff; border: 2px solid var(--pd); border-radius: 4px; }
.thumbs a img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; }
.thumbs a:hover { background: #fff; }
.thumbs a.on { border-color: var(--amber); }

/* ---- Tables ---- */
table.t { width: 100%; border-collapse: collapse; border: 1px solid var(--pd); }
table.t th { text-align: left; padding: 5px 8px; background: var(--p); color: var(--screen); text-shadow: none; font-weight: 400; text-transform: uppercase; }
table.t td { padding: 7px 8px; border-bottom: 1px dashed var(--pd); vertical-align: middle; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
table.t tfoot td { border-top: 2px solid var(--p); }
.thumb { position: relative; display: block; overflow: hidden; flex: 0 0 56px; width: 56px; height: 56px; background: #fff; border: 1px solid var(--pd); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; display: block; }
.item { display: flex; gap: 10px; align-items: center; }

/* ---- Order status ---- */
.status { text-transform: uppercase; border: 1px solid var(--p); padding: 2px 7px; }
.status.new, .status.invoiced { border-color: var(--amber); color: var(--amber); }
.status.paid, .status.shipped, .status.completed { background: var(--p); color: var(--screen); text-shadow: none; }
.status.cancelled { text-decoration: line-through; opacity: .7; }
.steps { display: flex; margin: 12px 0 18px; }
.steps div { flex: 1; text-align: center; padding: 6px 2px; border: 1px solid var(--pd); text-transform: uppercase; }
.steps div.done { background: var(--screen2); color: var(--p2); }
.steps div.cur { background: var(--p); color: var(--screen); text-shadow: none; }

/* ---- Pager ---- */
.pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 20px; position: relative; z-index: 1; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 5px 10px; border: 1px solid var(--p); text-decoration: none; color: var(--p); }
.pager span.on { background: var(--p); color: var(--screen); text-shadow: none; }

/* ---- Bottom of the case ---- */
.statusbar { background: var(--case-hi); border-top: 3px solid var(--case-lo); }
.statusbar-in { max-width: 1180px; margin: 0 auto; padding: 8px 14px 10px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; text-transform: uppercase; }
.statusbar a { color: var(--ink); }
.prompt::before { content: "]"; margin-right: 4px; }
.prompt::after { content: "\2588"; margin-left: 4px; animation: blink 1.1s steps(1) infinite; }

/* ---- Misc ---- */
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar form { display: flex; gap: 6px; align-items: center; }
.inline { display: inline; }
.subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0 0 18px; align-items: start; position: relative; z-index: 1; }
.subcats a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; min-height: 54px; border: 2px solid var(--pd); border-radius: 6px; padding: 8px; text-decoration: none; color: var(--p); text-transform: uppercase; }
.subcats a:hover { border-color: var(--p); }
.subcats img { width: 100%; height: 90px; object-fit: contain; background: #fff; }

/* ---- Options (add-ons) ---- */
.opts { border: 2px dashed var(--pd); border-radius: 6px; padding: 14px; margin: 16px 0 0; }
.opts .field { margin-bottom: 12px; } .opts .field:last-child { margin-bottom: 0; }
.opts select, .opts input[type=text] { width: 100%; max-width: 380px; }
.opts label.check { display: flex; align-items: flex-start; margin: 0; text-transform: none; }
.opt-line { font-size: 18px; }

/* Orders split by seller */
.order-group { border: 2px solid var(--pd); margin: 0 0 14px; padding: 0; border-radius: 6px; overflow: hidden; }
.order-group > .t { margin: 0; border: 0; }
.order-group > p { margin: 8px; }
.order-group-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 10px; background: var(--screen2); border-bottom: 2px solid var(--pd); }
.order-group-head.seller-line { border: 2px solid var(--pd); margin-bottom: 12px; }
.og-num { text-transform: uppercase; color: var(--amber); text-shadow: none; }
.split-note { margin-bottom: 14px; }

/* Recommended products */
.recs { margin-top: 18px; }
.rec-list { list-style: none; margin: 0 0 12px; padding: 0; }
.rec { display: grid; grid-template-columns: 24px 64px 1fr auto auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--pd); }
.rec:last-child { border-bottom: 0; }
.rec-pic { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 3px; }
.rec-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rec-info .small { display: block; }
.rec-price { white-space: nowrap; color: var(--p2); }
.rec-act:empty { display: none; }
@media (max-width: 620px) { .rec { grid-template-columns: 24px 56px 1fr; } .rec-price, .rec-act { grid-column: 3; } .rec-pic { width: 56px; height: 56px; } }
.backorder-note { margin: 10px 0; }

@media (max-width: 620px) {
    .menubar { position: static; font-size: 20px; }
    .search { order: 5; flex: 1 0 100%; } .search input { width: 100%; }
    .menubar .spacer { display: none; }
    .win { border-width: 6px; border-radius: 12px; }
}

/* Photographs sit above the scan lines, so products always look as they are. */
.card .pic, .gallery .main, .thumbs, .rec-pic, .thumb, .subcats img { position: relative; z-index: 2; }
.card .pic { position: relative; }
.thumb { position: relative; }
/* Headings that sit on the beige desk (the shared templates colour them white) */
.desktop h2[style] { color: var(--ink) !important; text-shadow: none !important; }

/* The screen font has one weight: faked bold smears it, so emphasis is by brightness. */
body, h1, h2, h3, h4, strong, b, th { font-synthesis: none; }
.win strong, .win b { color: #c4ffd6; }
