:root {
  --bg: #ffffff;
  --fg: #151515;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --accent: #0057d9;
  --sidebar: 250px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Sidebar ---------- */
.site-header {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 36px 32px;
  overflow-y: auto;
  background: var(--bg);
  z-index: 20;
}
.site-title {
  display: block;
  font: italic 36px/1.05 var(--serif);
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--fg);
}
.site-title:hover { color: var(--accent); }
.nav-toggle { display: none; }
nav ul { list-style: none; margin: 0; padding: 0; }
.nav-main { margin-top: 34px; }
.nav-sub { margin-top: 26px; }
nav a { display: block; padding: 3px 0; text-decoration: none; }
.nav-main a { font-weight: 600; font-size: 17px; }
.nav-sub a { color: var(--muted); font-size: 16px; }
nav a:hover { color: var(--accent); }
nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Content ---------- */
main { margin-left: var(--sidebar); padding: 24px 28px 80px 12px; }
.page-title {
  font: italic 400 30px/1.2 var(--serif);
  margin: 12px 0 24px;
}
.home .grid { margin-top: 0; }

/* Thumbnail grid: columns give the staggered layout of the original site */
.grid { column-width: 250px; column-gap: 24px; }
.tile {
  display: block; position: relative;
  break-inside: avoid;
  margin: 0 0 24px;
  text-decoration: none;
}
.tile img { width: 100%; transition: opacity .2s; background: #f3f3f3; }
.tile:hover img, .tile:focus-visible img { opacity: .82; }
.tile-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px; font-size: 14px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  opacity: 0; transition: opacity .2s;
}
.tile:hover .tile-title, .tile:focus-visible .tile-title { opacity: 1; }

/* Project page */
.project { max-width: 1100px; }
.meta { margin: -12px 0 20px; color: var(--muted); font-size: 15px; }
.project p { max-width: 62ch; }
.gallery { margin-top: 28px; }
.gallery figure { margin: 0 0 22px; }
.gallery img { width: auto; max-height: 92vh; background: #f3f3f3; }
.zoom { display: inline-block; cursor: zoom-in; }

/* Big galleries: thumbnail grid that opens the lightbox */
.gallery-grid { column-width: 220px; column-gap: 14px; max-width: none; }
.gallery-grid figure { break-inside: avoid; margin: 0 0 14px; }
.gallery-grid .zoom { display: block; }
.gallery-grid img { width: 100%; max-height: none; transition: opacity .2s; }
.gallery-grid .zoom:hover img, .gallery-grid .zoom:focus-visible img { opacity: .82; }
.pager {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1100px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15px;
}
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--accent); }

/* Text pages */
.prose { max-width: 66ch; font-size: 17px; line-height: 1.7; }
.prose a { color: var(--accent); }

/* ---------- Shop ---------- */
.shop-intro { max-width: 62ch; color: var(--muted); margin: -8px 0 28px; }
.shop-h { font: 600 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 34px 0 14px; }
.prose .shop-h:first-of-type { margin-top: 22px; }
.shop-empty { color: var(--muted); }
.shop-tile .shop-img { display: block; position: relative; background: #f3f3f3; }
.shop-tile img { width: 100%; transition: opacity .2s; }
.shop-tile:hover img, .shop-tile:focus-visible img { opacity: .85; }
.shop-cap { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; font-size: 15px; }
.shop-name { font-weight: 600; }
.shop-sku { display: block; font-size: 12px; letter-spacing: .05em; color: var(--muted); }
.is-sold img { opacity: .5; filter: grayscale(.35); }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 99px; background: #fff; color: #111;
  font: 600 11px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.badge-sold { background: #111; color: #fff; }
.badge-reserved { background: var(--accent); color: #fff; }
.badge-sample { top: auto; bottom: 10px; border: 1px dashed #777; }
.item { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); grid-template-areas: "gallery head" "gallery buy";
  grid-template-rows: auto 1fr; column-gap: 40px; row-gap: 0; align-items: start; max-width: 1100px; }
.item-head { grid-area: head; }
.item .gallery { grid-area: gallery; }
.item .gallery { margin-top: 0; }
.item .gallery figure { margin: 0 0 14px; }
.item .gallery .zoom { display: block; }
.item .gallery img { width: 100%; max-height: none; }
.buybox { grid-area: buy; position: sticky; top: 24px; border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px 14px; }
.item-head .page-title { margin: 0 0 12px; font-size: 1.7rem; }
.item-head .sku { margin: 12px 0 4px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.price { font: italic 500 2rem/1.1 var(--serif); margin-bottom: 14px; }
.sample-note { font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 6px 10px; margin-bottom: 12px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14.5px; margin: 14px 0 18px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.exact { font-size: 14.5px; color: var(--muted); margin: 0 0 10px; }
.btn { display: block; text-align: center; background: var(--fg); color: var(--bg); padding: 13px 18px; border-radius: 6px;
  text-decoration: none; font-weight: 600; margin: 4px 0 12px; }
.btn:hover { background: var(--accent); color: #fff; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn-quiet { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.delivery { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.delivery a { color: var(--muted); }
.delivery a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.97);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 92vh; width: auto; height: auto; }
.lightbox button {
  position: absolute; background: none; border: 0; cursor: pointer;
  font: 32px/1 var(--sans); color: var(--fg); padding: 14px 18px;
}
.lb-close { top: 6px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { color: var(--accent); }
body.lb-open { overflow: hidden; }

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
  .site-header {
    position: sticky; top: 0; inset: auto;
    width: auto; padding: 14px 16px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  .site-title { font-size: 26px; }
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--fg);
    border-radius: 3px; padding: 6px 12px; font: 15px var(--sans); color: var(--fg);
  }
  #site-nav { display: none; flex-basis: 100%; padding-bottom: 8px; }
  #site-nav.open { display: block; }
  .nav-main { margin-top: 14px; }
  .nav-sub { margin-top: 12px; }
  nav a { padding: 8px 0; }
  main { margin-left: 0; padding: 16px 16px 60px; }
  .grid { column-width: 150px; column-gap: 12px; }
  .tile { margin-bottom: 12px; }
  .tile-title { display: none; }
  .gallery img { width: 100%; max-height: none; }
  .zoom { display: block; }
  .gallery-grid { column-width: 140px; column-gap: 8px; }
  .item { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "gallery" "buy"; grid-template-rows: auto; row-gap: 20px; }
  .item-head .sku { margin-top: 0; }
  .buybox { position: static; }
  .gallery-grid figure { margin-bottom: 8px; }
}

@media (prefers-color-scheme: dark) {
  :root { --bg: #111; --fg: #ececec; --muted: #a0a0a0; --line: #2a2a2a; --accent: #7fb0ff; }
  .tile img, .gallery img { background: #1c1c1c; }
  .lightbox { background: rgba(10,10,10,.97); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
