:root {
  color-scheme: light;
  --paper: #f6e7d8;
  --ink: #312e27;
  --muted: #655c50;
  --line: #e7d7c6;
  --empty-photo: #eee3d6;
  --softened-cotton: rgb(252 245 235 / 64%);
  --action: #505646;
  --action-text: #fffdf7;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f0e8de; color: var(--ink); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.shop {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  background: var(--paper) url('./assets/cotton.jpg') left top / 390px auto repeat;
}

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
}
.hero img {
  position: absolute;
  top: 38%;
  left: 0;
  width: 100%;
  height: auto;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 97%, transparent),
              linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  mask-composite: intersect;
}
.wordmark {
  color: #594d3d;
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1;
  text-decoration: none;
}
.hero .wordmark { position: absolute; inset: 29% 0 auto; text-align: center; font-size: 56px; }
.content { padding: 22px 18px 28px; }
.catalog { background: linear-gradient(transparent, var(--softened-cotton) 105px); }
.catalog h2 { margin-bottom: 2px; font-size: 20px; }
.sample-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.products a { display: block; text-decoration: none; }
.products a:hover h3 { text-decoration: underline; }
.products h3 { font-size: 15px; }
.products p, .product-title span { color: var(--muted); font-size: 14px; }
.photo { display: block; overflow: hidden; border-radius: 4px; background: var(--empty-photo); }
.catalog-photo { width: 100%; aspect-ratio: 4 / 5; margin-bottom: 7px; object-fit: contain; }

.masthead { display: grid; place-items: center; min-height: 52px; border-bottom: 1px solid var(--line); }
.masthead .wordmark { display: grid; place-items: center; min-height: 44px; font-size: 24px; }
.product, .missing { background: linear-gradient(rgb(252 245 235 / 34%), var(--softened-cotton) 135px); }
.product-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.product-title h1, .missing h1 { font-size: 21px; }
.product-title span { white-space: nowrap; }
.product-photo { width: 100%; aspect-ratio: 4 / 5; margin-bottom: 15px; object-fit: contain; }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 7px; font-size: 14px; font-weight: 650; }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.option {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  text-align: center;
}
.option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 1px; }
.option:has(input:checked) { border-color: var(--action); font-weight: 700; }
.option .photo { height: clamp(37px, 13vw, 57px); }
.option .photo > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 92%; }
.sold { color: var(--muted); }
.sold .photo { position: relative; display: grid; place-items: center; }
.sold .photo > img { position: absolute; inset: 0; }
.sold .photo::before { position: absolute; z-index: 1; inset: 0; background: rgb(252 245 235 / 68%); backdrop-filter: blur(1px); content: ""; }
.sold .photo > span { position: relative; z-index: 2; padding: 1px 5px; border-radius: 3px; background: var(--paper); color: var(--ink); }
.purchase { display: grid; gap: 7px; margin: 12px 0 15px; }
.purchase p { color: var(--muted); font-size: 13px; }
.purchase button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--action);
  color: var(--action-text);
  font: inherit;
  font-weight: 600;
}
.purchase button:disabled { background: var(--empty-photo); color: var(--muted); }
.product-description { display: grid; gap: 5px; padding-top: 13px; border-top: 1px solid var(--line); }
.product-description h2 { font-size: 15px; }
.product-description p { color: var(--muted); }
