/* partstoorder.com. One stylesheet, no frameworks, nothing loaded from other sites. */
:root {
  --ink: #14212b; --ink2: #22313d; --text: #1b2733; --muted: #5c6b78; --line: #d9dfe5; --bg: #eef1f4; --card: #fff;
  --accent: #0e9384; --accent-d: #0a7468; --accent-l: #2ec4b6; --link: #0b6e99; --ok: #1a7f37; --warn: #9a5b00; --bad: #b3261e; --deal: #c0392b;
  --r: 8px; --max: 1480px;
  /* surfaces and tints (light/dark themes, 2026-11-20) */
  --soft: #f3f5f7; --hover: #eef1f4; --photo: #f6f8f9; --chip: #e6eaee; --chip2: #dfe5ea; --chip3: #c3ccd4;
  --field: #fff; --field-line: #8c99a5; --ctl-line: #9aa7b2; --focus-ring: #bfeee8; --glass: rgba(255, 255, 255, .88);
  --t-info: #e7f1f8; --t-ok: #e6f4ea; --t-warn: #fff4e0; --t-bad: #f6e4e2; --t-gone: #f1edfb; --t-acc: #ecf8f6; --t-acc2: #cfeee9;
  --gone: #5a3fa8; --gone-line: #6b4fbb; --avail: #2c7a3b; --avail-pre: #a05a00; --track-bg: #f3f8fb; --track-line: #d6e6ef;
  --shadow: rgba(0, 0, 0, .25); --strong: #14212b; --strong-h: #000; --tile-ic: .17; --ph-blend: multiply; --ph-filter: none; --ph-op: .38; --img-filter: none;
  color-scheme: light;
}
/* Dark is the default (owner, 2026-11-20); Light only when the visitor picked it with the header toggle (cookie
   pto_theme, written onto <html data-theme> by the server, so there is no flash). The system setting is not followed.
   Header and footer are dark in both. */
:root:not([data-theme="light"]) {
  --ink: #0b1218; --ink2: #16222c; --text: #dbe3ea; --muted: #97a6b3; --line: #2c3a46; --bg: #0e151b; --card: #17212a;
  --accent: #0e9384; --accent-d: #12a898; --accent-l: #2ec4b6; --link: #67b7e3; --ok: #5cc97a; --warn: #e3a64a; --bad: #f27b70; --deal: #ff7a68;
  --soft: #1d2933; --hover: #22303b; --photo: #e4e9ed; --chip: #26333e; --chip2: #26333e; --chip3: #3a4a57;
  --field: #0f181f; --field-line: #52626f; --ctl-line: #52626f; --focus-ring: #1f5f58; --glass: rgba(23, 33, 42, .88);
  --t-info: #142a3b; --t-ok: #153222; --t-warn: #3a2b12; --t-bad: #3b1c19; --t-gone: #2a2342; --t-acc: #11322e; --t-acc2: #154a43;
  --gone: #bba8f5; --gone-line: #8f78e0; --avail: #6fd18b; --avail-pre: #e8a85a; --track-bg: #142331; --track-line: #2a4458;
  --shadow: rgba(0, 0, 0, .6); --strong: #33495b; --strong-h: #3f5970; --tile-ic: .26; --ph-blend: normal; --ph-filter: invert(1) hue-rotate(180deg); --ph-op: .3; --img-filter: brightness(.93);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
h3 { font-size: 1rem; margin: 1em 0 .4em; }
img { max-width: 100%; height: auto; display: block; }
.muted, .count { color: var(--muted); font-size: .92rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; border-radius: var(--r); }
:focus-visible { outline: 3px solid var(--accent-l); outline-offset: 1px; }

/* buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 22px; padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.btn:hover { background: var(--accent-d); text-decoration: none; }
.btn.alt { background: var(--strong); }
.btn.alt:hover { background: var(--strong-h); }
.btn.ghost { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--ctl-line); }
.btn.ghost:hover { background: var(--soft); }
.btn.small { padding: 6px 14px; font-size: .9rem; }
.btn.wide { display: block; width: 100%; margin: 8px 0; }
button.link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }

/* header */
.top { background: var(--ink); color: #fff; }
.top-in { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--accent-l); }
.logo-mark { width: 24px; height: 34px; background: url(/assets/img/logo-mark.svg) center/contain no-repeat; }
.search { flex: 1; display: flex; position: relative; min-width: 0; border-radius: var(--r); background: var(--field); }
.search:focus-within { box-shadow: 0 0 0 3px var(--accent-l); }
.search select { border: 0; background: var(--chip); border-radius: 0; padding: 0 8px; max-width: 150px; font: inherit; font-size: .85rem; color: var(--text); }
.search input { flex: 1; min-width: 0; border: 0; padding: 10px 12px; font: inherit; outline: 0; background: transparent; color: var(--text); }
.search button { border: 0; background: var(--accent-l); color: var(--ink); padding: 0 14px; border-radius: 0 var(--r) var(--r) 0; cursor: pointer; display: flex; align-items: center; }
.search button:hover { background: #57d6ca; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; background: var(--card); color: var(--text); border-radius: 0 0 var(--r) var(--r); box-shadow: 0 8px 20px var(--shadow); z-index: 30; overflow: hidden; }
.suggest a { display: block; padding: 8px 14px; color: var(--text); }
.suggest a:hover, .suggest a.on { background: var(--hover); text-decoration: none; }
.tools { display: flex; align-items: center; gap: 4px; }
.tools a { color: #fff; padding: 6px 10px; border-radius: 4px; line-height: 1.2; white-space: nowrap; }
.tools a:hover { box-shadow: inset 0 0 0 1px #fff; text-decoration: none; }
.tools small { display: block; font-size: .75rem; color: #c8d2da; }
.tools b { font-size: .92rem; }
.tools .cart { display: flex; align-items: flex-end; gap: 4px; position: relative; }
.cart-n { position: absolute; left: 24px; top: 0; background: var(--accent-l); color: var(--ink); font-weight: 700; font-size: .8rem; min-width: 20px; text-align: center; border-radius: 10px; padding: 0 5px; }

/* category bar */
.nav { background: var(--ink2); font-size: .92rem; }
.nav-in { max-width: var(--max); margin: 0 auto; display: flex; align-items: stretch; padding: 0 8px; position: relative; }
.nav a { color: #fff; }
.mega > summary { list-style: none; cursor: pointer; padding: 9px 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.mega > summary::-webkit-details-marker { display: none; }
.mega > summary:hover, .nav-top:hover, .nav-right a:hover { box-shadow: inset 0 0 0 1px #fff; text-decoration: none; }
.mega-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); color: var(--text); z-index: 40; box-shadow: 0 12px 30px var(--shadow); padding: 16px 20px 22px; max-height: 76vh; overflow: auto; border-radius: 0 0 var(--r) var(--r); }
.mega-panel a { color: var(--text); display: block; padding: 2px 0; }
.mega-quick { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.mega-grid { columns: 5 210px; column-gap: 28px; }
.mega-col { break-inside: avoid; margin-bottom: 16px; }
.mega-head { font-weight: 700; }
.mega-head span, .mega-col a span, .nav-drop span { color: var(--muted); font-weight: 400; font-size: .82rem; }
.mega-col .all, .nav-drop .all { color: var(--link); font-size: .88rem; }
.nav-cats { display: flex; flex: 1; min-width: 0; overflow: hidden; flex-wrap: wrap; height: 38px; }
.nav-item { position: static; }
.nav-top { display: block; padding: 9px 11px; white-space: nowrap; }
.nav-drop { display: none; position: absolute; top: 100%; background: var(--card); z-index: 35; min-width: 240px; padding: 10px 0; box-shadow: 0 10px 24px var(--shadow); border-radius: 0 0 var(--r) var(--r); }
.nav-item:hover .nav-drop, .nav-item:focus-within .nav-drop { display: block; }
/* invisible strip over the 2px between the clipped name and its menu, so a slow pointer moving down keeps the menu open */
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px; }
.nav-drop a { display: flex; justify-content: space-between; gap: 16px; color: var(--text); padding: 5px 16px; }
.nav-drop a:hover { background: var(--hover); text-decoration: none; }
.nav-right { display: flex; margin-left: auto; }
.nav-right a { padding: 9px 11px; white-space: nowrap; font-weight: 600; }

/* page */
main { max-width: var(--max); margin: 0 auto; padding: 14px 16px 40px; min-height: 55vh; }
.crumbs { font-size: .86rem; color: var(--muted); margin: 0 0 10px; }
.crumbs span { margin: 0 2px; }
.crumbs b { font-weight: 400; color: var(--text); }
.panel { background: var(--card); border-radius: var(--r); padding: 20px 22px; margin-bottom: 16px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.prose { max-width: 820px; margin-left: auto; margin-right: auto; }
.prose li { margin-bottom: .4em; }
.agents code { font-size: .88em; overflow-wrap: anywhere; }
.agents pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); padding: 10px 12px; border-radius: 6px; font-size: .86rem; }
.flash { padding: 10px 14px; border-radius: var(--r); margin-bottom: 12px; background: var(--t-info); border-left: 4px solid var(--link); }
.flash.ok { background: var(--t-ok); border-color: var(--ok); }
.flash.warn { background: var(--t-warn); border-color: var(--warn); }
.note { background: var(--soft); border-left: 4px solid var(--ctl-line); padding: 8px 12px; border-radius: 4px; font-size: .93rem; }
.note.warn { background: var(--t-warn); border-color: var(--warn); }
.note.gone { background: var(--t-gone); border-color: var(--gone-line); }
.err { color: var(--bad); font-weight: 600; }
.previewbar { background: #ffd43b; color: #1b1b1b; padding: 6px 16px; font-size: .86rem; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.previewbar form { display: inline; }
.previewbar button { font: inherit; padding: 2px 10px; border-radius: 12px; border: 1px solid #1b1b1b; background: #fff; cursor: pointer; }
.previewbar a { color: #1b1b1b; text-decoration: underline; }

/* home */
.hero { background: linear-gradient(110deg, #14212b 0%, #1d3b47 55%, #0e9384 130%); color: #fff; border-radius: var(--r); padding: 38px 34px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); margin: 0 0 .3em; }
.hero p { max-width: 640px; font-size: 1.05rem; margin: 0 0 1em; color: #dbe6ec; }
.hero .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.shelf { background: var(--card); border-radius: var(--r); padding: 16px 18px 6px; margin-bottom: 16px; }
.shelf-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.shelf-head h2 { margin: 0; }
.shelf-head span { color: var(--muted); font-size: .9rem; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 14px; overflow-x: auto; padding: 12px 2px 14px; scroll-snap-type: x proximity; }
.row .card { scroll-snap-align: start; border: 0; padding: 0; }
.row .card-ship, .row .addform { display: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; right: -14px; bottom: -14px; width: 132px; height: 132px; background: var(--ic) no-repeat center / contain; opacity: var(--tile-ic); pointer-events: none; }
.tile > * { position: relative; z-index: 1; }
.tile h3 { margin: 0 0 8px; font-size: 1.15rem; }
.tile h3 a { color: var(--text); }
.tile-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; flex: 1; font-size: .92rem; }
.tile-links a { color: var(--text); background: color-mix(in srgb, var(--soft) 82%, transparent); border-radius: 6px; padding: 10px 10px 20px; position: relative; }
/* a product photo from the subcategory, faded into the button's lower-right corner behind the name and count */
.tile-links a.sub-ph { z-index: 0; }
.tile-links a.sub-ph::before { content: ""; position: absolute; right: 0; bottom: 0; width: 72%; height: 100%; z-index: -1; border-radius: 0 6px 6px 0;
  background: var(--ph) no-repeat right bottom / contain; opacity: var(--ph-op); mix-blend-mode: var(--ph-blend); filter: var(--ph-filter);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 60%); mask-image: linear-gradient(to right, transparent, #000 60%); pointer-events: none; }
.tile-links a .n { position: absolute; right: 8px; bottom: 4px; font-size: .75rem; color: var(--muted); }
.tile .more { margin-top: 12px; font-size: .9rem; }

/* cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card { background: var(--card); padding: 14px; display: flex; flex-direction: column; min-width: 0; }
.card-img { display: block; aspect-ratio: 1; background: var(--photo); border-radius: 6px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; filter: var(--img-filter); }
.ph { width: 100%; height: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, hsl(var(--h) 32% 88%), hsl(calc(var(--h) + 40) 30% 78%)); color: hsl(var(--h) 30% 38%); font-weight: 700; font-size: 2.2rem; letter-spacing: .04em; }
.ph.big { font-size: 5rem; border-radius: var(--r); }
.card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding-top: 10px; }
.card-title { color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title:hover { color: var(--link); }
.card-meta, .card-ship { color: var(--muted); font-size: .84rem; }
.card-date { color: var(--muted); font-size: .76rem; margin-top: .2rem; }
.card .addform { margin-top: auto; padding-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badges:empty { display: none; }
.inkit { margin: 6px 0 10px; padding: 8px 12px; border-left: 4px solid var(--link); background: var(--soft); border-radius: 4px; font-weight: 500; }
.inkit ul { margin: 4px 0 0; padding-left: 1.2em; }
.inkit li + li { margin-top: 2px; }
.badge { font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.badge.stock { background: var(--t-ok); color: var(--ok); }
.badge.gone { background: var(--t-gone); color: var(--gone); }
.badge.sold { background: var(--t-warn); color: var(--warn); }
.price { font-size: 1.45rem; font-weight: 500; color: var(--text); }
.price sup { font-size: .55em; top: -.6em; position: relative; }
.price.none { font-size: .9rem; color: var(--muted); font-weight: 400; }
.deal-tag { background: #c0392b; color: #fff; font-size: .8rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.was { color: var(--muted); font-size: .88rem; }

/* listing */
.listing { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.filters { background: var(--card); border-radius: var(--r); padding: 14px 16px; font-size: .92rem; }
.filters > details > summary { display: none; }
.filters h3 { margin: 14px 0 6px; }
.filters h3:first-of-type { margin-top: 0; }
.filters ul { list-style: none; margin: 0; padding: 0; }
.filters li { padding: 2px 0; }
.filters li span { color: var(--muted); font-size: .82rem; }
.filters a { color: var(--text); }
.dept .on a { font-weight: 700; }
.dept .up a { color: var(--muted); }
.check::before { content: ""; display: inline-block; width: 14px; height: 14px; border: 1px solid var(--field-line); border-radius: 3px; margin-right: 7px; vertical-align: -2px; background: var(--field); }
.check.on::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--field); }
.pricef { display: flex; gap: 6px; }
.pricef input { width: 70px; padding: 5px 6px; border: 1px solid var(--ctl-line); border-radius: 6px; font: inherit; background: var(--field); color: var(--text); }
.results { min-width: 0; }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.list-head h1 { margin: 0; }
.list-head .count { margin: 2px 0 0; }
.sortf select, .qty select, .line select { font: inherit; padding: 5px 8px; border: 1px solid var(--ctl-line); border-radius: 8px; background: var(--soft); color: var(--text); }
.intro { max-width: 900px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips a { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 12px; color: var(--text); font-size: .9rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 20px 0; flex-wrap: wrap; }
.pager a, .pager b { padding: 7px 13px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.pager b { background: var(--strong); color: #fff; border-color: var(--strong); }

/* item page */
.itempage { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(0, 6fr) 290px; gap: 26px; background: var(--card); border-radius: var(--r); padding: 22px; margin-bottom: 16px; align-items: start; }
.gallery { display: flex; gap: 10px; position: sticky; top: 12px; }
.thumbs { display: flex; flex-direction: column; gap: 8px; }
.thumbs button { border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: var(--photo); cursor: pointer; width: 54px; }
.thumbs button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-l); }
.galmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.mainimg { flex: 1; background: var(--photo); border-radius: var(--r); overflow: hidden; }
/* kit viewer (any set): the big picture shows the plate or part picked below it; no popups. The gallery is not
   sticky here, so every tile stays reachable on a long page. */
.gallery.kitgal { position: static; }
.nopic { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; aspect-ratio: 1; padding: 24px; text-align: center; color: var(--muted); }
.nopic[hidden] { display: none; }
.nopic b { font-size: 1.15rem; color: var(--text); }
.nopic span { max-width: 30ch; font-size: .9rem; }
.selcap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: -2px 0 0; font-size: .9rem; }
.selcap .selname { overflow-wrap: anywhere; color: inherit; text-decoration: none; }
.selcap a.selname[href] { color: var(--link); text-decoration: underline; }
.selcap .selmeta { color: var(--muted); font-size: .85rem; }
.selcap .sellinks { display: flex; flex-wrap: wrap; gap: 4px 12px; flex-basis: 100%; }
.selcap .sellinks:not(:has(> :not([hidden]))) { display: none; }
.selcap .selview { border: 0; background: none; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.selcap .selview[hidden], .selcap .selitem[hidden] { display: none; }
.kitsec h3 { margin: 4px 0 6px; font-size: .95rem; }
.kitsec h3 small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.kitsec ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.kitparts ul { max-height: 560px; overflow-y: auto; padding-right: 2px; }
.kitsec li > button { width: 100%; height: 100%; display: flex; align-items: center; gap: 5px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: 3px; cursor: pointer; font: inherit; font-size: .72rem; line-height: 1.2; color: var(--text); }
.kitsec li > button:hover { border-color: var(--accent); }
.kitsec li > button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-l); }
.kitsec li > button > span:last-child { min-width: 0; overflow-wrap: anywhere; }   /* long part names wrap inside the tile */
.kitsec img, .kitsec .ph { flex: none; width: 28px; height: 28px; border-radius: 4px; background: var(--photo); object-fit: contain; display: grid; place-items: center; font-size: .6rem; color: var(--muted); }
.kitlist { margin: 0 0 14px; }
.kitlist summary { font-weight: 700; cursor: pointer; margin-bottom: 6px; }
.kitlist table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.kitlist th, .kitlist td { text-align: left; padding: 2px 8px 2px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kitlist th:last-child, .kitlist td:last-child { text-align: right; width: 4em; padding-right: 0; }
.kitlist tfoot th { border-bottom: 0; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.linkish:hover { color: var(--accent-d); text-decoration: underline; }
.buybox .setnote { font-weight: 600; margin: 4px 0; }
.mainimg img { width: 100%; object-fit: contain; aspect-ratio: 1; filter: var(--img-filter); }
.mainimg { position: relative; }
.viewer { display: block; width: 100%; aspect-ratio: 1; touch-action: none; cursor: grab; }
.viewer:active { cursor: grabbing; }
.viewer[hidden] { display: none; }   /* display:block above would otherwise keep a hidden canvas taking a whole square under the photo */
.viewer-hint { position: absolute; left: 0; right: 0; bottom: 6px; margin: 0; text-align: center; font-size: .8rem; color: var(--muted); pointer-events: none; }
.thumbs .m3d { height: 54px; font-weight: 700; color: var(--accent-d); background: var(--t-acc); }
.thumbs .m3d small { display: block; font-weight: 400; }
.thumbs .pics img { width: 100%; height: auto; border-radius: 4px; }
.thumbs:not(:has(.m3d.on)) .pics { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-l); }   /* lit while a photo shows */
/* one photo at a time: arrows at the sides, dots and a "2 / 5" counter at the bottom */
.thumbs[hidden], .thumbs button[hidden] { display: none; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--glass); color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; padding: 0 0 3px; }
.gnav:hover { border-color: var(--accent); color: var(--accent-d); }
.gnav[hidden], .gdots[hidden] { display: none; }
.gnav.prev { left: 8px; }
.gnav.next { right: 8px; }
.gdots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; align-items: center; gap: 6px; z-index: 2; pointer-events: none; }
.gdots button { pointer-events: auto; width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--ctl-line); background: var(--glass); cursor: pointer; }
.gdots button.on { background: var(--accent); border-color: var(--accent); }
.gdots .gcount { font-size: .75rem; color: var(--muted); background: var(--glass); border-radius: 9px; padding: 1px 7px; margin-right: 4px; }
.iteminfo h1 { font-size: 1.5rem; font-weight: 500; }
.lead { font-size: 1.02rem; }
.item-price { margin: 8px 0; }
.item-price .price { font-size: 1.9rem; }
.specs { border-collapse: collapse; margin: 6px 0 14px; }
.specs th { text-align: left; font-weight: 700; padding: 4px 18px 4px 0; vertical-align: top; white-space: nowrap; }
.specs td { padding: 4px 0; }
.desc { margin: 10px 0; }
.measure, .credit { color: var(--muted); font-size: .9rem; }
.buybox { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: sticky; top: 12px; }
.buybox .ship { color: var(--ok); font-weight: 600; margin: 4px 0; }
.buybox .deliver { font-size: .88rem; color: var(--muted); }
.buybox .shipnote { font-size: .8rem; color: var(--muted); margin: -2px 0 6px; }
.buybox .low { color: var(--deal); font-weight: 600; }
.opts { border: 0; padding: 0; margin: 10px 0; }
.opts legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.opts label { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; }
.opts label:has(input:checked) { border-color: var(--accent); background: var(--t-acc); }
.opts label span { flex: 1; }
.opts label span small { display: block; color: var(--muted); font-size: .82rem; }
.opts .sw { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--text) 35%, transparent); }
.opts .swimg { flex: none; width: 48px; height: 48px; border-radius: 6px; border: 1px solid var(--line); background: var(--photo); object-fit: cover; }
.optgroup-h { font-weight: 600; margin: 8px 0 4px; }
.opts[hidden], .optgroup[hidden], .optgroup-h[hidden] { display: none; }
.qty { display: block; margin: 10px 0; }
.soldby { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: .86rem; margin: 12px 0 0; }
.soldby dt { color: var(--muted); }
.soldby dd { margin: 0; }

/* forms */
.form .field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-weight: 700; margin-bottom: 3px; }
.field > span i { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--field-line); border-radius: 6px; font: inherit; background: var(--field); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid var(--focus-ring); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--bad); }
.field em { display: block; color: var(--bad); font-style: normal; font-size: .9rem; margin-top: 3px; }
.field .code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; max-width: 240px; }
.cols { display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: 12px; }
.tick { display: block; margin: 8px 0 14px; }
.hp { position: absolute; left: -5000px; }
.cf-turnstile { margin: 10px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* cart and checkout */
.cartpage, .checkout, .orderpage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.line { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.line-img { background: var(--photo); border-radius: 6px; overflow: hidden; aspect-ratio: 1; }
.line-title { font-size: 1.05rem; color: var(--text); }
.line-opt { color: var(--muted); font-size: .9rem; }
.line-ship { color: var(--ok); font-size: .88rem; }
.line-act { margin-top: 8px; display: flex; gap: 14px; align-items: center; }
.line-price { font-weight: 700; font-size: 1.1rem; text-align: right; }
.line-price small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.cart-sub { font-size: 1.15rem; text-align: right; border-top: 1px solid var(--line); padding-top: 12px; margin: 0; }
.cartside .cart-sub { text-align: left; border: 0; padding: 0; }
.maketime { font-size: .92rem; margin: 10px 0; }
.maketime small { display: block; color: var(--muted); }
.line-ship a { display: block; }
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; background: var(--chip2); color: var(--muted); border-radius: 16px; padding: 4px 14px; font-size: .88rem; }
.steps li::before { content: counter(s) ". "; }
.steps li.on { background: var(--strong); color: #fff; font-weight: 700; }
.steps li.done { background: var(--t-acc2); color: var(--accent-d); }
.summary h2 { margin-top: 0; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum-line small { display: block; color: var(--muted); }
.sum-line.sub { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.sum-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 1.15rem; color: var(--deal); }
.sum-line s { color: var(--muted); }
.sum-line.refund { color: var(--ok); }
.sum-line.promo { color: var(--ok); }
.shipopt.off { opacity: .45; cursor: not-allowed; background: var(--soft); }
.promoform { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
.promorow { display: flex; gap: 8px; flex-wrap: wrap; }
.promorow input { flex: 1 1 180px; min-width: 0; text-transform: uppercase; }
.quotebox { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; background: var(--soft); padding: 10px 14px; margin: 16px 0 4px; }
.quotebox > div { flex: 1 1 260px; min-width: 0; }
.quotebox h2 { font-size: 1rem; margin: 0 0 2px; }
.quotebox p { margin: 0; font-size: .93rem; }
.quotelines { margin: 10px 0 6px; }
.quoteline { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; }
.quoteline span { flex: 1 1 auto; min-width: 0; }
.quoteline small { display: block; color: var(--muted); }
.quoteline input { width: 7.5em; flex: 0 0 auto; }
.quotelines.bad .quoteline { border-color: var(--bad); }
.line-cancel { margin: 0 0 6px; font-size: .88rem; }
.line-cancel input[type=number] { width: 4.2em; padding: 2px 4px; }
.st-line-printing, .st-refund-approved { background: var(--t-info); color: var(--link); }
.st-line-printed, .st-refund-completed { background: var(--t-ok); color: var(--ok); }
.st-line-cancelled, .st-refund-declined { background: var(--t-bad); color: var(--bad); }
.st-refund-pending { background: var(--t-warn); color: var(--warn); }
.shipopts { margin: 10px 0 16px; }
.shipopt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.shipopt:has(input:checked) { border-color: var(--accent); background: var(--t-acc); }
.shipopt span { flex: 1; }
.shipopt small { display: block; color: var(--muted); }
.localopts { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; }
.localopts legend { font-weight: 600; padding: 0 4px; }
.localopts .field { margin: 10px 0; }
.localopts .field.day input { max-width: 240px; }
.localopts .field small { display: block; margin-top: 4px; }
.localopts label.tick { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.localopts label.tick input { width: 18px; height: 18px; margin: 0; }
form:has(input[name="ship"][value="local:LOCAL"]:not(:checked)) .localopts { display: none; }
.shipopt i { font-style: normal; font-weight: 700; }
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.review h2 { font-size: 1rem; margin-top: 0; }
.review h2 a { font-weight: 400; font-size: .88rem; margin-left: 8px; }
body.bare .top-in { justify-content: center; }

/* orders and account */
.orderrow { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); }
.orderrow:hover { background: var(--hover); text-decoration: none; }
.st { font-size: .78rem; font-weight: 700; background: var(--chip); border-radius: 4px; padding: 1px 7px; }
.st-paid, .st-printing, .st-printed, .st-packed { background: var(--t-info); color: var(--link); }
.st-shipped, .st-delivered { background: var(--t-ok); color: var(--ok); }
.st-cancelled, .st-refunded { background: var(--t-bad); color: var(--bad); }
.st-pending_payment { background: var(--t-warn); color: var(--warn); }
p.status { background: none; font-size: 1.05rem; }
.track { list-style: none; display: flex; padding: 0; margin: 18px 0; }
.track li { flex: 1; text-align: center; font-size: .84rem; color: var(--muted); position: relative; padding-top: 22px; }
.track li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 6px; background: var(--chip2); }
.track li::after { content: ""; position: absolute; top: 0; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--chip3); }
.track li.done::before, .track li.on::before { background: var(--accent-l); }
.track li.done::after, .track li.on::after { background: var(--accent); }
.track li.on { color: var(--text); font-weight: 700; }
.history { list-style: none; padding: 0; }
.tracking { background: var(--track-bg); border: 1px solid var(--track-line); border-radius: 6px; padding: 10px 12px; }
ul.tracking { list-style: none; }
.trackno b { font-family: ui-monospace, monospace; letter-spacing: .03em; }
.tracklink { white-space: nowrap; margin-left: 6px; }
.history li { padding: 4px 0; border-top: 1px solid var(--line); }
.history time { color: var(--muted); font-size: .86rem; margin-right: 8px; }
.account { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.account .panel { margin: 0; }
.addrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.addr { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.addr p { margin: 0 0 6px; }

/* footer */
.foot { background: var(--ink2); color: #dbe3e9; margin-top: 30px; }
.foot a { color: #dbe3e9; }
.totop { display: block; text-align: center; padding: 12px; background: #2f4250; font-size: .9rem; }
.foot-in { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; padding: 30px 20px; }
.foot-in h3 { color: #fff; margin: 0 0 8px; }
.foot-in a { display: block; padding: 3px 0; font-size: .92rem; }
.foot-in p { font-size: .9rem; margin: 6px 0 0; color: #b5c2cc; }
.foot-bar { background: var(--ink); text-align: center; padding: 16px; font-size: .86rem; color: #b5c2cc; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 22px; box-shadow: 0 6px 20px var(--shadow); z-index: 90; max-width: 92vw; }
.toast a { color: var(--accent-l); margin-left: 10px; font-weight: 700; }
.toast.bad { background: #8a2a1f; border-radius: 10px; top: 30%; bottom: auto; padding: 16px 20px; max-width: min(460px, 92vw); text-align: center; }
.toast.bad .link { color: #fff; font-weight: 700; margin-left: 8px; text-decoration: underline; }
.opts small.avail { color: var(--avail); }
.opts small.avail.pre { color: var(--avail-pre); }

/* coming soon */
body.soon { background: var(--ink); color: #fff; display: flex; min-height: 100vh; align-items: center; justify-content: center; text-align: center; }
body.soon main { min-height: 0; padding: 30px; }
body.soon .logo { justify-content: center; font-size: 2rem; margin-bottom: 20px; }
body.soon h1 { font-size: 2.2rem; }
body.soon .muted { color: #9fb0bd; }

@media (max-width: 1100px) {
  .itempage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gallery { grid-row: span 2; }   /* photo on the left, buy box under the details: the photo stays beside the colour picker */
  .buybox { grid-column: 2; position: static; }
  .nav-right { display: none; }
}
@media (max-width: 820px) {
  .top-in { flex-wrap: wrap; gap: 8px 12px; }
  .search { order: 3; flex-basis: 100%; }
  .search select { max-width: 36%; padding: 0 4px; }   /* shown on a phone too (owner 2026-11-24); 16px or iOS zooms the page on focus */
  .search select, .search input { font-size: 16px; }
  .tools { margin-left: auto; }
  .tools small { display: none; }
  .nav-cats { display: none; }
  .listing, .cartpage, .checkout, .orderpage, .itempage, .review { grid-template-columns: minmax(0, 1fr); }
  .gallery { position: static; grid-row: auto; }
  .buybox { grid-column: auto; }
  .filters > details > summary { display: block; font-weight: 700; cursor: pointer; }
  .filters > details:not([open]) > *:not(summary) { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
  .line { grid-template-columns: 80px minmax(0, 1fr); }
  .line-price { grid-column: 2; text-align: left; }
  .hero { padding: 26px 20px; }
  .mega-grid { columns: 2 150px; }
}

/* custom print quote form */
.custom h2 { margin-top: 0; }
.custom fieldset.field { border: 0; padding: 0; margin: 0 0 12px; }
.custom .dims { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 10px; }
.custom .dims .field { margin-bottom: 0; }
.custom .dims .field > span { font-weight: 400; font-size: .9rem; }
.custom .tick { display: flex; gap: 8px; align-items: center; margin: 4px 0; font-weight: 400; }
.custom .tick input { width: auto; margin: 0; }
.custom .small { font-size: .9rem; margin-top: -6px; }
@media (max-width: 560px) { .custom .dims { grid-template-columns: 1fr 1fr; } }
.custom-about { margin-bottom: 18px; }
.custom-about h3 { font-size: 1rem; margin: 14px 0 4px; }
.mailin { background: var(--t-acc); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 4px 18px 8px; margin: 18px 0; scroll-margin-top: 12px; }
.mailin h2 { margin-top: .7em; }
.custom h3 { font-size: 1.05rem; margin: 22px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }

/* theme toggle in the header (sun in dark mode, moon in light; site.js switches it and stores cookie pto_theme) */
.themebtn { background: none; border: 0; color: #fff; padding: 6px 8px; border-radius: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; font: inherit; }
.themebtn:hover { box-shadow: inset 0 0 0 1px #fff; }
.themebtn svg { display: block; }
.themebtn small { font-size: .72rem; color: #c8d2da; }
.themebtn[hidden] { display: none; }
@media (max-width: 820px) { .themebtn small { display: none; } }
.themef { display: flex; margin: 0; }
body.bare .top-in .themef { margin-left: auto; }

/* bundle deals: a card in the Deals grid (its items' photos as a mosaic), the full card on the bundle's own page, and the group in the cart and the order summary */
.card-img.mosaic { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.card-img.mosaic > * { min-width: 0; min-height: 0; width: 100%; height: 100%; }
.card-img.mosaic img { object-fit: cover; }
.card-img.mosaic .ph { aspect-ratio: auto; font-size: 1.1rem; }
.card-img.mosaic.m1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.card-img.mosaic.m2 { grid-template-rows: 1fr; }
.card-img.mosaic.m3 > :first-child { grid-row: span 2; }
.badge.bundle { background: var(--accent); color: #fff; }
.bundlepage { padding: 12px 0; }
.bundlepage .bundlecard { max-width: 560px; margin: 14px 0; }
.bundlecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding: 12px 0 10px; }
.bundlecard { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bundlecard h3 { margin: 0; }
.bundlecard p { margin: 0; }
.bundle-items { list-style: none; margin: 0; padding: 0; }
.bundle-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.bundle-items img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--photo); display: block; }
.bundle-sum { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.bundle-sum dt, .bundle-sum dd { margin: 0; }
.bundle-sum dd { text-align: right; }
.bundle-sum .save { color: var(--deal); font-weight: 600; }
.bundle-sum .together { font-weight: 700; font-size: 1.15rem; }
.bundlecard form { margin-top: auto; padding-top: 6px; }
.bundlegroup { border: 1px solid var(--accent); border-radius: var(--r); padding: 0 14px; margin: 12px 0; }
.bundle-h { padding: 10px 0 8px; }
.bundle-h small { color: var(--muted); display: block; }
.bundle-f { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--deal); }
.bundle-more { color: var(--muted); font-size: .9rem; }
.sum-bundle { border-left: 3px solid var(--accent); padding-left: 10px; margin: 6px 0; }
.sum-line.bundle { color: var(--deal); }

/* shop name, mailing address and email: Contact, About, Terms and the footer */
.contact-card { font-style: normal; line-height: 1.5; margin: 10px 0 14px; padding: 10px 14px; border-left: 3px solid var(--line, #d5dde3); }
.foot-contact { font-style: normal; font-size: .88rem; line-height: 1.5; margin-top: 8px; }
.foot-contact a { display: inline; padding: 0; }
