:root {
  --bg: #efeae2;
  --paper: #fbf8f3;
  --ink: #221e1a;
  --muted: #5e584f;
  --line: #e3dbd0;
  --moss: #1e4a38;
  --clay: #b55233;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: #d7ebe3; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(239, 234, 226, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(34, 30, 26, 0.06);
}
.bar { display: flex; align-items: center; min-height: 64px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.mark { width: 28px; height: 28px; display: block; }
.site-footer {
  border-top: 1px solid rgba(34, 30, 26, 0.06);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 22px 0 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 18px;
  padding: 26px 0 72px;
}
.card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: #e7e1d8;
}
.thumb img, .thumb .no-photo, .hero-frame img, .hero-frame .no-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb img { transition: transform 0.45s ease; }
.no-photo {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #e7e1d8;
}
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(251, 248, 243, 0.94);
  color: var(--clay);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}
.card h2 {
  margin: 12px 2px 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin: 6px 2px 0;
}
.card .price, .buybox .price, .buybar strong {
  font-family: var(--serif);
  font-weight: 650;
  color: var(--moss);
}
.card .price { font-size: 1.05rem; }
.sold { color: var(--muted); font-size: 0.82rem; }

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  column-gap: 48px;
  row-gap: 42px;
  padding: 28px 0 72px;
}
.gallery, .buybox, .story { min-width: 0; }
.hero-frame {
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: #e7e1d8;
}
.gallery.multi .hero-frame { cursor: pointer; }
.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}
.thumbs button {
  width: 72px;
  height: 84px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid transparent;
  overflow: hidden;
  background: #e7e1d8;
  cursor: pointer;
}
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buybox { position: sticky; top: 84px; align-self: start; }
.buybox h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.buybox .price { margin: 12px 0 0; font-size: 1.8rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 0; color: var(--muted); }
.facts .out, .soldout-box p { color: var(--clay); }
.specs-block, #order, .soldout-box { margin-top: 22px; }
.specs-block h2, #order h2, .soldout-box h2, .story > h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs {
  white-space: pre-wrap;
  margin-top: 10px;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  line-height: 1.6;
}
#order, .soldout-box {
  display: grid;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.hint, .soldout-box p { margin: 0; color: var(--muted); }
label { display: grid; gap: 6px; }
label span { font-size: 0.92rem; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
}
textarea { resize: vertical; min-height: 84px; }
#order button, .btn, .buybar a {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: var(--moss);
  color: #f7f4ee;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 600;
}
#order button { width: 100%; }
#order button:disabled { opacity: 0.65; cursor: wait; }
.form-error { margin: 0; color: var(--clay); }
.story > h2 { margin-bottom: 14px; }
.story { grid-column: 1 / -1; }
.story img { width: 100%; border-radius: 16px; display: block; background: #e7e1d8; }
.rich { max-width: 72ch; }
.rich p, .rich div, .rich li { margin: 0; font-size: 1.05rem; line-height: 1.75; }
.rich h2, .rich h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-transform: none;
  color: var(--ink);
  line-height: 1.2;
}
.rich h2 { font-size: 1.7rem; }
.rich h3 { font-size: 1.25rem; }
.rich ul, .rich ol { margin: 0; padding-left: 1.25em; }
.rich blockquote {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid #d9d0c4;
  color: var(--muted);
}
.rich a { color: var(--moss); }
.rich > * + * { margin-top: 14px; }
.story > * + * { margin-top: 18px; }
.empty {
  min-height: 52vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
}
.empty h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.04em;
}
.empty p { margin: 0 0 8px; color: var(--muted); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.buybar { display: none; }
#order { scroll-margin-bottom: 96px; }
.buybar.away { display: none; }

@media (hover: hover) {
  .card:hover img { transform: scale(1.04); }
}
@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  .product { grid-template-columns: 1fr; padding-top: 16px; }
  .buybox { position: static; }
  .buybar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(251, 248, 243, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .buybar div { display: grid; }
  .buybar small { color: var(--muted); }
  .buybar strong { font-size: 1.25rem; }
  .buybar span.out {
    background: #e6e0d7;
    color: var(--muted);
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
  }
  html { scroll-padding-bottom: 96px; }
  body.page-product { padding-bottom: 84px; }
}
@media (max-width: 720px) {
  .wrap { width: min(1120px, calc(100% - 24px)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; padding-top: 16px; }
  .card h2 { font-size: 1rem; }
  .thumb, .hero-frame { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thumb img { transition: none; }
}
