:root {
  --wood: #F4F3F0;      /* whitewashed wood from the logo */
  --paper: #FFFFFF;
  --ink: #37373A;       /* the charcoal of the tagline */
  --muted: #66666B;
  --velvet: #2A2B2F;    /* the dark backdrop the pieces are photographed on */
  --gold: #B8914A;
  --gold-deep: #7A5F26;
  --line: #DDDAD3;
  --danger: #A23B2F;
  --serif: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wood); color: var(--ink); font: 400 1rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-style: italic; font-weight: 400; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.wordmark { font: italic 400 1.9rem/1 var(--serif); color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--gold); }
.cart-count { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: 2px; border-radius: 1em; background: var(--velvet); color: #fff; font-size: .78rem; line-height: 1.4em; text-align: center; }
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: baseline; }
.foot p { margin: 0; }
.foot-tag { font: italic 400 1.2rem var(--serif); color: var(--ink); }

/* home */
.hero { width: 100%; margin-top: 28px; }
.section { padding-block: 56px 0; }
.lede { font-size: 1.1rem; color: var(--muted); margin: 0 0 28px; max-width: 60ch; }
.empty { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 40px 28px; }
.grid-small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card { display: block; color: var(--ink); text-decoration: none; }
.card-photo { display: block; aspect-ratio: 3 / 4; background: var(--velvet); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-title { display: block; margin-top: 12px; font: 500 1.25rem/1.25 var(--serif); }
.card:hover .card-title { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.card-price { display: block; color: var(--muted); margin-top: 2px; }
.is-sold .card-photo img { opacity: .5; }

/* product */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.photo-main { background: var(--velvet); aspect-ratio: 3 / 4; }
.photo-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb { padding: 0; border: 2px solid transparent; background: var(--velvet); cursor: pointer; width: 72px; height: 96px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--gold); }
.info .crumbs { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }
.info .price { font: 500 1.6rem var(--serif); margin: 0 0 20px; }
.desc p { margin: 0 0 1em; max-width: 60ch; }
.fine { font-size: .9rem; color: var(--muted); margin: 10px 0 0; }
.sold-note { font: italic 400 1.3rem var(--serif); }

/* buttons + forms */
.btn { display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: 2px; padding: 14px 24px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--velvet); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-block { display: block; width: 100%; margin-top: 24px; }
.btn-quiet { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-quiet:hover { background: var(--ink); color: #fff; }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-deep); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
label { display: block; font-weight: 500; margin: 16px 0 6px; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid #BDB9B0; border-radius: 2px; background: var(--paper); font: inherit; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
.error { color: var(--danger); margin: 12px 0 0; }
.notice { background: #FBF3E3; border: 1px solid #E6D3A8; padding: 10px 14px; margin: 0 0 18px; }

/* cart */
.cart-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-row .thumb-sm { width: 72px; height: 96px; background: var(--velvet); }
.cart-row .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.cart-row h2 { font: 500 1.25rem var(--serif); font-style: normal; margin: 0; }
.cart-row .meta { color: var(--muted); font-size: .92rem; }
.cart-row.is-gone h2, .cart-row.is-gone .meta { color: var(--muted); text-decoration: line-through; }
.totals { margin: 24px 0 0 auto; max-width: 340px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 1px solid var(--ink); margin-top: 8px; padding-top: 10px; font-weight: 600; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .card-title { font-size: 1.1rem; }
  .site-header nav { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ---- admin ---- */
.adm-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; }
.adm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 24px; }
.adm-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; font: 600 1rem var(--sans); cursor: pointer; color: var(--muted); }
.adm-tab[aria-selected="true"] { color: var(--ink); border-color: var(--gold); }
.adm-list { display: grid; gap: 12px; }
.adm-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); padding: 10px 14px; }
.adm-item .th { width: 60px; height: 80px; background: var(--velvet); }
.adm-item .th img { width: 100%; height: 100%; object-fit: cover; }
.adm-item strong { font: 500 1.15rem var(--serif); }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 9px; border-radius: 1em; background: #E7E4DD; margin-left: 6px; vertical-align: middle; }
.pill.available { background: #DCEBDD; color: #25562B; }
.pill.sold, .pill.paid { background: #F1DEDA; color: #7B2D22; }
.pill.shipped, .pill.delivered { background: #DCE7F1; color: #1F4465; }
.adm-form { background: var(--paper); border: 1px solid var(--line); padding: 8px 24px 24px; margin-bottom: 28px; }
.adm-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.photos { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.photo { width: 108px; }
.photo .th { width: 108px; height: 144px; background: var(--velvet); }
.photo .th img { width: 100%; height: 100%; object-fit: cover; }
.photo .ctl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 2px; }
.photo .cover-row { font-size: .78rem; font-weight: 600; color: var(--gold-deep); margin-top: 4px; min-height: 1.3em; }
.photo .ctl button { background: var(--paper); border: 1px solid var(--line); cursor: pointer; padding: 3px 0; font-size: 1rem; }
.photo .ctl button:disabled { opacity: .35; cursor: default; }
.order { background: var(--paper); border: 1px solid var(--line); padding: 16px 20px; margin-bottom: 14px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.order address { font-style: normal; white-space: pre-line; margin: 10px 0; }
.order ul { margin: 6px 0; padding-left: 18px; }
.track { display: grid; grid-template-columns: 140px 1fr 150px auto; gap: 10px; align-items: end; margin-top: 12px; }
.track label { margin: 0 0 4px; font-size: .85rem; }
@media (max-width: 760px) { .adm-row, .track { grid-template-columns: 1fr; } .adm-item { grid-template-columns: 60px 1fr; } .adm-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.cart-row h2 a { color: inherit; text-decoration: none; }
.adm-title { margin: 0; }
.toast { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 420px; margin: 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
[hidden] { display: none !important; }
.adm-actions.left { justify-content: flex-start; }
