@font-face {
  font-family: "Rosarivo"; src: url("/assets/fonts/rosarivo.woff2") format("woff2");
  font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Rosarivo"; src: url("/assets/fonts/rosarivo-italic.woff2") format("woff2");
  font-style: italic; font-display: swap;
}
:root { --fg: #111; --bg: #fff; --muted: #888; --line: #e5e5e5; --side: 220px; --hl: #0047ff; }
* { box-sizing: border-box; margin: 0; }
body { font: 16px/1.5 "Rosarivo", Georgia, serif; color: var(--fg); background: var(--bg); }
a { color: inherit; text-decoration: none; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  display: flex; flex-direction: column; gap: 40px;
  padding: 32px 24px; background: var(--bg);
}
.sidebar nav { display: flex; flex-direction: column; gap: 10px; }
.sidebar nav a { color: var(--muted); }
.sidebar nav a:hover, .sidebar nav a[aria-current] { color: var(--fg); }

main { margin-left: var(--side); padding: 32px 48px; min-height: 100vh; display: flex; flex-direction: column; }

@media (max-width: 720px) {
  .sidebar {
    position: static; width: auto; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 16px; padding: 16px;
  }
  .sidebar nav { flex-direction: row; gap: 16px; }
  main { margin-left: 0; padding: 24px 16px; }
}

button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-weight: 400; }

.nav-img { align-self: flex-start; padding: 4px 6px; margin-left: -6px; }
.nav-img img { display: block; width: var(--w); height: auto; image-rendering: pixelated; opacity: .5; }
.nav-img[aria-current] img { opacity: 1; }
/* hover: blue block behind the whole name/arrow, art + letters flip to white */
.nav-img:hover, .nav-img:focus-visible, .pix-link:hover, .pix-link:focus-visible { background: var(--hl); outline: none; }
.nav-img:hover img, .nav-img:focus-visible img, .pix-link:hover img, .pix-link:focus-visible img { opacity: 1; filter: invert(1); }
.pix-link { padding: 6px 8px; cursor: pointer; }
.g-nav { gap: 48px; }
.pix-link img { display: block; image-rendering: pixelated; }
.page-head img { display: block; image-rendering: pixelated; max-width: 100%; height: auto; }
@media (max-width: 720px) { .nav-img img { width: calc(var(--w) * .65); } }

/* ---- items (Apparel / Peripheral): grid of all items, or one item view ---- */
:root { --bw: 2px; --bw-thick: 3px; --ph: #efefef; }
.px-defs { position: absolute; }
.px { filter: url(#px); }          /* 2px mosaic, header grain */
.px-edge { filter: url(#px-edge); } /* hard pixel edges only, for small text */

.items { margin-top: 40px; }
.photo { aspect-ratio: 4 / 5; background: var(--ph); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

/* grid (default) — hidden while an item is open */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 40px 32px; max-width: 1100px; }
.items:has(.item:target) .grid { display: none; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card-name { align-self: flex-start; font-size: 22px; line-height: 1.2; padding: 2px 6px; margin-left: -6px; }
.card-price { font: 700 18px/1 Arial, Helvetica, sans-serif; color: var(--hl); }
.card:hover .card-name, .card:focus-visible .card-name { background: var(--hl); color: #fff; }
.card:focus-visible { outline: none; }

/* one item view — shown when its #id is targeted. Huge scroll-margin = the jump never scrolls the page */
/* rows: back link / photo + info box (same size: photo stretches to the box) / photo arrows */
.item { display: none; grid-template-columns: repeat(2, minmax(0, 440px)); justify-content: space-between; column-gap: 64px; align-items: stretch; scroll-margin-top: 100vh; }
.gallery { display: contents; }
.item:target { display: grid; }
.back { grid-column: 1 / -1; justify-self: start; display: flex; align-items: center; gap: 12px; font-size: 22px; line-height: 1.2; padding: 4px 8px; margin: 0 0 20px -8px; }
.back img { display: block; image-rendering: pixelated; }
.back:hover, .back:focus-visible { background: var(--hl); color: #fff; outline: none; }
.back:hover img, .back:focus-visible img { filter: invert(1); }
.gallery .photo img, .g-nav { display: none; }
.g-radio { position: absolute; opacity: 0; pointer-events: none; }
.item .photo { grid-column: 1; grid-row: 2; aspect-ratio: auto; height: 100%; }
.pager { grid-column: 1; grid-row: 3; display: flex; justify-content: center; padding-top: 24px; }

.item-info { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; }
.item-info .item-body { flex: 1; }
.item-head { border: var(--bw-thick) solid var(--fg); }
.item-name { font-size: 40px; line-height: 1.2; padding: 10px 28px; border-bottom: var(--bw-thick) solid var(--fg); }
/* options bar: colours | line down the centre | sizes (no sizes = colours take the full bar) */
.item-options { display: grid; grid-template-columns: 1fr; }
.item-options:has(.item-sizes) { grid-template-columns: 1fr 1fr; }
.item-colors { display: flex; align-items: center; gap: 18px; padding: 10px 24px; min-width: 0; }
.item-sizes { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-left: var(--bw) solid var(--fg); flex-wrap: wrap; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size span { display: block; min-width: 30px; padding: 3px 6px; text-align: center; font-size: 16px; line-height: 1.2; border: var(--bw) solid var(--fg); cursor: pointer; }
.size:hover span, .size input:checked + span { background: var(--hl); border-color: var(--hl); color: #fff; }
.size input:focus-visible + span { outline: 2px solid var(--hl); outline-offset: 2px; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.dot { display: block; width: 26px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--fg); cursor: pointer; }
.swatch input:checked + .dot, .swatch input:focus-visible + .dot { outline: 2px solid var(--hl); outline-offset: 3px; }
.color-name { margin-left: auto; font-size: 18px; }
.color-name span { display: none; }
.item-body { border: var(--bw) solid var(--fg); border-top: 0; min-height: 480px; padding: 22px 28px; display: flex; flex-direction: column; }
.item-blurb { text-align: right; font-size: 18px; }
.item-buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.item-price { font: 700 22px/1 Arial, Helvetica, sans-serif; color: var(--hl); }
.buy-btn { display: block; border: var(--bw) solid var(--fg); padding: 12px 40px; font-size: 32px; line-height: 1.2; text-align: center; }
.buy-btn span { display: block; }  /* the pixel filter needs a block box */
.buy-btn.is-off { color: var(--muted); border-color: var(--muted); cursor: default; }
.buy-btn.is-off:hover { background: none; color: var(--muted); border-color: var(--muted); }
.buy-btn:hover, .buy-btn:focus-visible { background: var(--hl); border-color: var(--hl); color: #fff; outline: none; }

/* gallery: the checked photo radio shows its photo + its prev/next arrows (up to 8 photos) */
.gallery:has(.g-radio:nth-of-type(1):checked) .photo img:nth-of-type(1) { display: block; }
.gallery:has(.g-radio:nth-of-type(1):checked) .g-nav:nth-of-type(1) { display: flex; }
.gallery:has(.g-radio:nth-of-type(2):checked) .photo img:nth-of-type(2) { display: block; }
.gallery:has(.g-radio:nth-of-type(2):checked) .g-nav:nth-of-type(2) { display: flex; }
.gallery:has(.g-radio:nth-of-type(3):checked) .photo img:nth-of-type(3) { display: block; }
.gallery:has(.g-radio:nth-of-type(3):checked) .g-nav:nth-of-type(3) { display: flex; }
.gallery:has(.g-radio:nth-of-type(4):checked) .photo img:nth-of-type(4) { display: block; }
.gallery:has(.g-radio:nth-of-type(4):checked) .g-nav:nth-of-type(4) { display: flex; }
.gallery:has(.g-radio:nth-of-type(5):checked) .photo img:nth-of-type(5) { display: block; }
.gallery:has(.g-radio:nth-of-type(5):checked) .g-nav:nth-of-type(5) { display: flex; }
.gallery:has(.g-radio:nth-of-type(6):checked) .photo img:nth-of-type(6) { display: block; }
.gallery:has(.g-radio:nth-of-type(6):checked) .g-nav:nth-of-type(6) { display: flex; }
.gallery:has(.g-radio:nth-of-type(7):checked) .photo img:nth-of-type(7) { display: block; }
.gallery:has(.g-radio:nth-of-type(7):checked) .g-nav:nth-of-type(7) { display: flex; }
.gallery:has(.g-radio:nth-of-type(8):checked) .photo img:nth-of-type(8) { display: block; }
.gallery:has(.g-radio:nth-of-type(8):checked) .g-nav:nth-of-type(8) { display: flex; }
.gallery:has(.g-radio:focus-visible) .photo { outline: 2px solid var(--hl); outline-offset: 4px; }
/* colour picker: the checked swatch shows its name (up to 6 colours) */
.item:has(.swatch:nth-of-type(1) input:checked) .color-name span:nth-child(1) { display: inline; }
.item:has(.swatch:nth-of-type(2) input:checked) .color-name span:nth-child(2) { display: inline; }
.item:has(.swatch:nth-of-type(3) input:checked) .color-name span:nth-child(3) { display: inline; }
.item:has(.swatch:nth-of-type(4) input:checked) .color-name span:nth-child(4) { display: inline; }
.item:has(.swatch:nth-of-type(5) input:checked) .color-name span:nth-child(5) { display: inline; }
.item:has(.swatch:nth-of-type(6) input:checked) .color-name span:nth-child(6) { display: inline; }

/* buy: one link per colour × size (data-c / data-s, 0 = item has none); show only the one matching
   the checked swatch + size. "Pick a size" shows until a size is chosen. Up to 6 colours × 8 sizes. */
.buy-btn[data-c], .buy-pick { display: none; }
.item:has(.item-sizes):not(:has(.size input:checked)) .buy-pick { display: block; }
.item:not(:has(.swatch)):not(:has(.item-sizes)) .buy-btn[data-c="0"][data-s="0"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="0"][data-s="1"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="0"][data-s="2"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="0"][data-s="3"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="0"][data-s="4"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="0"][data-s="5"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="0"][data-s="6"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="0"][data-s="7"] { display: block; }
.item:not(:has(.swatch)):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="0"][data-s="8"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):not(:has(.item-sizes)) .buy-btn[data-c="1"][data-s="0"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="1"][data-s="1"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="1"][data-s="2"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="1"][data-s="3"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="1"][data-s="4"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="1"][data-s="5"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="1"][data-s="6"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="1"][data-s="7"] { display: block; }
.item:has(.swatch:nth-of-type(1) input:checked):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="1"][data-s="8"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):not(:has(.item-sizes)) .buy-btn[data-c="2"][data-s="0"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="2"][data-s="1"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="2"][data-s="2"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="2"][data-s="3"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="2"][data-s="4"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="2"][data-s="5"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="2"][data-s="6"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="2"][data-s="7"] { display: block; }
.item:has(.swatch:nth-of-type(2) input:checked):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="2"][data-s="8"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):not(:has(.item-sizes)) .buy-btn[data-c="3"][data-s="0"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="3"][data-s="1"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="3"][data-s="2"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="3"][data-s="3"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="3"][data-s="4"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="3"][data-s="5"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="3"][data-s="6"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="3"][data-s="7"] { display: block; }
.item:has(.swatch:nth-of-type(3) input:checked):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="3"][data-s="8"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):not(:has(.item-sizes)) .buy-btn[data-c="4"][data-s="0"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="4"][data-s="1"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="4"][data-s="2"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="4"][data-s="3"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="4"][data-s="4"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="4"][data-s="5"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="4"][data-s="6"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="4"][data-s="7"] { display: block; }
.item:has(.swatch:nth-of-type(4) input:checked):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="4"][data-s="8"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):not(:has(.item-sizes)) .buy-btn[data-c="5"][data-s="0"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="5"][data-s="1"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="5"][data-s="2"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="5"][data-s="3"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="5"][data-s="4"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="5"][data-s="5"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="5"][data-s="6"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="5"][data-s="7"] { display: block; }
.item:has(.swatch:nth-of-type(5) input:checked):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="5"][data-s="8"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):not(:has(.item-sizes)) .buy-btn[data-c="6"][data-s="0"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(1) input:checked) .buy-btn[data-c="6"][data-s="1"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(2) input:checked) .buy-btn[data-c="6"][data-s="2"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(3) input:checked) .buy-btn[data-c="6"][data-s="3"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(4) input:checked) .buy-btn[data-c="6"][data-s="4"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(5) input:checked) .buy-btn[data-c="6"][data-s="5"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(6) input:checked) .buy-btn[data-c="6"][data-s="6"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(7) input:checked) .buy-btn[data-c="6"][data-s="7"] { display: block; }
.item:has(.swatch:nth-of-type(6) input:checked):has(.size:nth-of-type(8) input:checked) .buy-btn[data-c="6"][data-s="8"] { display: block; }
@media (max-width: 960px) {
  .item:target { grid-template-columns: 1fr; row-gap: 0; }
  .item .photo { grid-row: auto; aspect-ratio: 4 / 5; height: auto; }
  .pager { grid-row: auto; padding-bottom: 32px; }
  .item-info { grid-column: 1; grid-row: auto; }
  .item-body { min-height: 260px; }
}
