@import url("/css/fonts.css");

/* "Daylight workshop": a sunny print room. Warm cream paper with faint horizontal lines (the
   layers of an FDM print), a dark ink strip on top, amber light, terracotta for prices and the
   main action, and occasion tags edged in filament colours. */
:root {
  --cream: #f6efe4;
  --layers: repeating-linear-gradient(0deg, rgba(90,60,30,.035) 0 2px, transparent 2px 5px);
  --ink: #2a231d;
  --amber: #ffb547;
  --terracotta: #d2552f;
  --coral: #e8604c;
  --green: #4fae86;
  --blue: #7d94f0;

  --amber-soft: #ffcf80;     /* highlighter under the hero words */
  --paper: #fffaf2;          /* raised surfaces: chips, form fields, boxes */
  --bed: #ebe1d1;            /* print bed: photo placeholders */
  --bed-2: #e4d8c5;
  --ink-soft: #6b5d50;
  --rule: #ddd0bc;
  --terracotta-dark: #b8441f;
  --fil-0: var(--amber);
  --fil-1: var(--coral);
  --fil-2: var(--green);
  --fil-3: var(--blue);

  /* Shared names used by checkout and admin */
  --bg: var(--cream);
  --surface: var(--paper);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --line: var(--rule);
  --accent: var(--terracotta);
  --accent-ink: #fff;
  --accent-soft: #fbe3d6;
  --warn: #b3261e;
  --radius: 8px;
  --shadow: 0 1px 0 rgb(42 35 29 / .08);

  --display: "Unbounded", "Trebuchet MS", sans-serif;
  --serif: var(--display); /* admin figures */
  --sans: "Rethink Sans", "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;

  font-family: var(--sans);
  font-size: 17px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  line-height: 1.5;
  background: var(--cream) var(--layers);
}
/* Rethink Sans ligates "(1)" into "①" (its standard "liga" feature, not only "calt"): customers and the
   owner must see exactly what was typed, so ligatures are off everywhere, form controls included. */
body, input, select, textarea, button { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0, "dlig" 0; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--terracotta); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ---------- header strip ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--cream); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -.01em; color: inherit; text-decoration: none; white-space: nowrap; }
.logo i { font-style: normal; color: var(--amber); padding: 0 .08em; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: var(--cream); text-decoration: none; font-weight: 600; }
.cart-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.cart-link:hover .cart-word { text-decoration: underline; text-decoration-color: var(--amber); }
.top .btn { min-height: 40px; color: var(--cream); border-color: rgb(246 239 228 / .35); }
.top .btn:hover { border-color: var(--amber); background: transparent; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--amber); color: var(--ink); font-size: .78rem; font-weight: 600; line-height: 22px; text-align: center; }
.badge:empty, .badge[data-n="0"] { display: none; }
@media (max-width: 359px) { .cart-word { display: none; } .logo { font-size: 13.5px; } }

/* Owner's announcement (e.g. holiday deadlines): an amber tape across the page */
.banner { margin: 0; padding: 10px 20px; text-wrap: balance; background: var(--amber); color: var(--ink); font-weight: 600; text-align: center; border-bottom: 1px solid rgb(42 35 29 / .15); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: rgb(42 35 29 / .05); }
.btn-primary { background: var(--terracotta); border-color: var(--terracotta); color: #fff; box-shadow: 0 3px 0 var(--terracotta-dark); }
.btn-primary:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--terracotta-dark); }
.btn[disabled], .btn[aria-disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- shared bits ---------- */
.price { font-family: var(--display); font-weight: 500; color: var(--terracotta); letter-spacing: -.02em; }
.hand { font-family: var(--hand); font-weight: 600; color: var(--terracotta); font-size: 1.6rem; line-height: 1; display: inline-block; transform: rotate(-3deg); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--ink); color: var(--cream); font-size: .8rem; font-weight: 600; }

/* Occasion chip: a paper tag with a filament-coloured edge, colours cycling amber, coral, green, blue */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  --edge: var(--amber);
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px 0 13px;
  border-radius: 6px; border-left: 4px solid var(--edge);
  background: var(--paper); box-shadow: 0 1px 0 rgb(42 35 29 / .08), inset 0 0 0 1px rgb(42 35 29 / .06);
  color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.chip:nth-child(4n+2) { --edge: var(--coral); }
.chip:nth-child(4n+3) { --edge: var(--green); }
.chip:nth-child(4n+4) { --edge: var(--blue); }
.chip:hover { background: #fff; }
.chip.on { background: var(--ink); color: var(--cream); box-shadow: none; }

/* ---------- hero ---------- */
.hero { padding: 52px 0 34px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.hero h1 { margin: 0; font-size: clamp(1.85rem, 5.4vw, 3.6rem); line-height: 1.08; max-width: 14ch; text-wrap: balance; }
.mark { background: linear-gradient(transparent 58%, var(--amber-soft) 58%, var(--amber-soft) 92%, transparent 92%); padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sub { margin: 18px 0 0; color: var(--ink-soft); font-size: 1.1rem; }
.hero .hand { margin: 10px 0 0 6px; }

/* A bauble with a name on it, which prints itself bottom-up, one layer at a time. */
.bauble { position: relative; width: 250px; height: 330px; margin-right: 24px; }
.bauble .string { position: absolute; left: 50%; top: 0; height: 52px; border-left: 1.5px solid var(--ink); }
.bauble .string::before { content: ""; position: absolute; top: 46px; left: -9px; width: 16px; height: 16px; border: 1.5px solid var(--ink); border-radius: 50%; }
.bauble .cap { position: absolute; left: calc(50% - 22px); top: 60px; width: 44px; height: 26px; border-radius: 5px 5px 2px 2px; background: var(--ink) repeating-linear-gradient(90deg, transparent 0 5px, rgb(255 255 255 / .12) 5px 7px); }
.bauble .ball {
  position: absolute; left: 0; right: 0; bottom: 0; height: 250px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 34% 30%, rgb(255 255 255 / .45), transparent 34%),
    repeating-linear-gradient(0deg, rgb(0 0 0 / .07) 0 2px, transparent 2px 5px),
    var(--coral);
  box-shadow: inset -14px -18px 0 rgb(0 0 0 / .08), 0 18px 30px -18px rgb(90 40 20 / .5);
}
.bauble .ball b { font-family: var(--display); font-weight: 800; font-size: 3.4rem; letter-spacing: -.03em; color: var(--cream); text-shadow: 0 2px 0 rgb(120 30 15 / .35); }
@media (max-width: 760px) {
  .hero { padding: 30px 0 22px; }
  .hero-grid { display: block; position: relative; }
  .bauble { position: absolute; right: 0; bottom: -4px; width: 104px; height: 140px; margin: 0; }
  .hero .sub, .hero .hand { margin-right: 118px; }
  .bauble .string { height: 22px; }
  .bauble .string::before { top: 17px; left: -6px; width: 11px; height: 11px; }
  .bauble .cap { top: 26px; left: calc(50% - 10px); width: 20px; height: 12px; }
  .bauble .ball { height: 104px; box-shadow: inset -6px -8px 0 rgb(0 0 0 / .08); }
  .bauble .ball b { font-size: 1.45rem; }
  .sub { font-size: 1rem; margin-top: 12px; }
  .hero .hand { font-size: 1.4rem; }
}

/* ---------- product shelf ---------- */
.shelf { padding: 6px 0 64px; }
.shelf .chips { margin-bottom: 26px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 26px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } }
.tile a { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.ph { display: block; aspect-ratio: 1; border-radius: var(--radius); background: var(--bed) center / cover no-repeat; overflow: hidden; }
/* No photo yet: the print bed with the product's first letter printed in filament layers */
.ph-empty { display: grid; place-items: center; background: repeating-linear-gradient(0deg, var(--bed) 0 3px, var(--bed-2) 3px 6px); }
.ph-empty b {
  font-family: var(--display); font-weight: 800; font-size: clamp(4rem, 11vw, 7.5rem); line-height: 1;
  color: transparent; background: repeating-linear-gradient(0deg, var(--fil) 0 4px, color-mix(in srgb, var(--fil) 86%, var(--ink)) 4px 5px);
  -webkit-background-clip: text; background-clip: text;
  transform: translateY(4%);
}
.tile .name { margin-top: 12px; font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.tile a:hover .name { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; }
.tile a:hover .ph { outline: 2px solid var(--ink); outline-offset: 3px; }
.tile .meta { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; }
.tile .price { font-size: 1.05rem; }
.tile .days { color: var(--ink-soft); font-size: .9rem; }
.tile.sold-out .ph { filter: grayscale(.8); opacity: .6; }
.tile.sold-out .price { color: var(--ink-soft); }
@media (max-width: 560px) { .tile .name { font-size: .98rem; margin-top: 9px; } .tile .price { font-size: .95rem; } .tile .days { font-size: .82rem; } }

/* Chosen occasion with a cover photo: the photo under ink, printed in layers, edged like its chip */
.occ-head {
  --edge: var(--amber);
  position: relative; display: flex; align-items: flex-end; min-height: clamp(128px, 20vw, 220px);
  margin: -8px 0 28px; padding: 18px 22px; overflow: hidden;
  border-radius: 0 var(--radius) var(--radius) 0; border-left: 6px solid var(--edge);
  background: var(--bed) center / cover no-repeat; color: var(--cream);
}
.occ-head::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgb(42 35 29 / .1) 0 2px, transparent 2px 5px),
    linear-gradient(100deg, rgb(42 35 29 / .82) 0%, rgb(42 35 29 / .45) 45%, rgb(42 35 29 / 0) 80%);
}
.occ-name { position: relative; margin: 0; font-weight: 800; font-size: clamp(1.45rem, 4.2vw, 2.4rem); text-wrap: balance; text-shadow: 0 2px 12px rgb(30 18 10 / .45); }
@media (max-width: 560px) { .occ-head { padding: 14px 16px; margin-bottom: 22px; } }
@media (prefers-reduced-motion: no-preference) { .occ-head:not([hidden]) { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; } }

.closed { padding: 22px 24px; border-left: 4px solid var(--amber); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.1rem; max-width: 40em; }
.empty-state { color: var(--ink-soft); padding: 18px 0; }

/* ---------- one orchestrated load: copy rises, tiles follow, the bauble prints itself ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .sub.rise { animation-delay: .1s; }
  .hero .hand.rise { animation-delay: .9s; }
  .chips.rise { animation-delay: .2s; }
  .rise-each .tile { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.28s + var(--i, 0) * 70ms); }
  .bauble .cap, .bauble .ball { animation: print 1.4s steps(28, end) both; }
  .bauble .ball { animation-delay: .15s; }
  .bauble .cap { animation-duration: .3s; animation-delay: 1.55s; animation-timing-function: steps(6, end); }
  .bauble .string { animation: rise .4s 1.85s ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes print { from { clip-path: inset(100% -40px -40px -40px); } to { clip-path: inset(-40px -40px -40px -40px); } }

/* ---------- forms (checkout) ---------- */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); font: inherit; color: var(--ink); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--ink); }
.optin { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 18px 0 0; cursor: pointer; }
.optin input { width: 20px; min-height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--terracotta); }
.optin small { display: block; color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: .9rem; margin: 4px 0 0; }
.notice { margin: 24px 0; padding: 16px 18px; border-left: 4px solid var(--amber); background: var(--paper); }
.error { color: var(--warn); font-weight: 600; margin: 12px 0 0; }

.checkout { display: grid; gap: 24px; grid-template-columns: 1fr; padding: 24px 0 48px; }
@media (min-width: 860px) { .checkout { grid-template-columns: 1.4fr 1fr; align-items: start; } .summary { position: sticky; top: 78px; } }
.box { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.box h2 { margin: 0 0 8px; font-size: 1.25rem; }
.methods { display: grid; gap: 10px; }
.method { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--rule); border-radius: var(--radius); cursor: pointer; margin: 0; font-weight: 400; background: var(--paper); }
.method:has(input:checked) { border-color: var(--terracotta); background: var(--accent-soft); }
.method input { width: 20px; min-height: 20px; margin: 3px 0 0; accent-color: var(--terracotta); }
.method .m-body { flex: 1; font-weight: 600; }
.method .m-fee { font-weight: 600; white-space: nowrap; }
.method .m-info { display: block; color: var(--ink-soft); font-size: .9rem; font-weight: 400; }
.method.disabled { opacity: .55; cursor: not-allowed; }
.results { border: 1.5px solid var(--rule); border-radius: var(--radius); margin-top: 6px; max-height: 260px; overflow: auto; background: var(--paper); }
.results button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--rule); background: none; font: inherit; cursor: pointer; }
.results button:hover, .results button.sel { background: var(--accent-soft); }
.results small { color: var(--ink-soft); }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; }
.sum-row.total { font-weight: 600; font-size: 1.15rem; border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 10px; }

/* ---------- product page ---------- */
.back { display: inline-block; margin: 22px 0 14px; color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); }
.pd { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 44px; align-items: start; padding-bottom: 64px; }
@media (max-width: 820px) { .pd { grid-template-columns: minmax(0, 1fr); gap: 22px; } .back { margin: 14px 0 10px; } }
@media (min-width: 821px) { .pd-media { position: sticky; top: 78px; } }
/* Phones: while a name field has focus, the preview shrinks and pins under the header, so the
   customer sees the text appear on the product as they type. Caption-only previews pin just the strip. */
@media (max-width: 640px) {
  .pd.typing .pd-media {
    position: sticky; top: 58px; z-index: 5; margin: 0 -16px; padding: 8px 16px 10px;
    background: var(--cream) var(--layers); box-shadow: 0 10px 14px -12px rgb(42 35 29 / .45);
  }
  .pd.typing .stage { width: fit-content; margin: 0 auto; container-type: normal; /* inline-size containment would shrink it to 0 */ }
  .pd.typing .stage-img { width: auto; height: auto; max-height: min(30svh, 200px); max-width: calc(100vw - 32px); }
  .pd.typing .stage-tag { left: 6px; bottom: 6px; padding: 1px 6px; font-size: .68rem; }
  .pd.typing .thumbs, .pd.typing .stage-ph, .pd.typing.captioned .stage { display: none; }
  .pd.typing.captioned .caption { margin-top: 0; }
}

/* The photo shows uncropped, so the preview spot (percent of the photo) lands where the owner set it. */
.stage { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bed); container-type: inline-size; }
.stage-img { width: 100%; height: auto; }
.stage-ph { aspect-ratio: 1; border-radius: 0; }
@media (max-width: 820px) { .stage-ph { aspect-ratio: 4 / 3; } }
.stage-ph b { font-size: clamp(7rem, 30cqw, 13rem); }
.overlay {
  position: absolute; transform: translate(-50%, -50%); max-width: none;
  font-family: var(--display); font-weight: 800; line-height: 1.06; letter-spacing: -.02em;
  white-space: pre; text-align: center; color: #fffaf2;
  text-shadow: 0 1px 0 rgb(30 18 10 / .55), 0 2px 10px rgb(30 18 10 / .55);
  pointer-events: none; transition: opacity .15s;
}
.overlay.ghost, .caption-text.ghost { opacity: .45; }
.stage-tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 4px; background: rgb(42 35 29 / .78); color: var(--cream); font-size: .78rem; font-weight: 600; }
/* No photo or no spot: the text printed on a strip of paper under the picture */
.caption { margin-top: 12px; padding: 12px 16px 14px; border-radius: var(--radius); background: var(--paper); border-left: 4px solid var(--amber); box-shadow: inset 0 0 0 1px rgb(42 35 29 / .06); }
.caption-label { display: block; color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.caption-text { min-height: 1.3em; margin-top: 2px; font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 4.4vw, 1.9rem); line-height: 1.15; letter-spacing: -.02em; white-space: pre-wrap; overflow-wrap: anywhere; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumbs .thumb { width: 68px; flex: none; border: 0; padding: 0; cursor: pointer; }
.thumbs .thumb.on { outline: 2px solid var(--ink); outline-offset: 2px; }

.pd-info h1 { margin: 6px 0 10px; font-size: clamp(1.6rem, 4vw, 2.5rem); text-wrap: balance; }
.pd-price { margin: 0; }
.pd-price .price { font-size: clamp(1.5rem, 3.4vw, 2rem); }
.pd-days { margin: 4px 0 0; color: var(--ink-soft); }
.pd-desc { margin: 16px 0 6px; white-space: pre-line; max-width: 52ch; }
#buy { margin-top: 8px; }

.opt { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.opt legend { padding: 0; margin-bottom: 9px; font-weight: 600; }
.opt legend b { font-weight: 400; color: var(--ink-soft); }
.opt input { position: absolute; opacity: 0; width: 1px; min-height: 0; height: 1px; margin: 0; }
.swatches, .segs { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { margin: 0; cursor: pointer; }
.sw-dot { display: block; width: 42px; height: 42px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgb(42 35 29 / .2), inset 0 -5px 0 rgb(0 0 0 / .1); transition: transform .12s; }
.sw input:checked + .sw-dot { box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--ink), inset 0 -5px 0 rgb(0 0 0 / .1); }
.sw:hover .sw-dot { transform: scale(1.06); }
.sw input:focus-visible + .sw-dot, .seg input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 4px; }
.seg { margin: 0; font-weight: 600; }
.seg span { display: inline-flex; align-items: baseline; gap: 6px; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.seg small { font-weight: 400; color: var(--ink-soft); }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.seg input:checked + span small { color: var(--amber-soft); }

.flds { margin-top: 6px; }
.fld label { margin-top: 18px; }
.fld-note { font-weight: 400; color: var(--ink-soft); }
.fld input, .fld textarea { font-size: 1.1rem; }
.fld textarea { min-height: 0; resize: none; line-height: 1.4; }
.fld [aria-invalid] { border-color: var(--warn); }
.fld-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; font-size: .88rem; min-height: 1.3em; }
.fld-err { color: var(--warn); font-weight: 600; }
.counter { margin-left: auto; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter.over { color: var(--warn); font-weight: 600; }
.fld .hint { margin-top: 0; }
.personal-note { margin: 18px 0 0; padding-left: 12px; border-left: 3px solid var(--coral); color: var(--ink-soft); font-size: .93rem; }
.add { margin-top: 20px; min-height: 54px; font-size: 1.05rem; }
#buy .closed { margin-top: 18px; font-size: 1rem; }

/* ---------- cart drawer ---------- */
.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(430px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; display: none; flex-direction: column;
  background: var(--cream) var(--layers); color: var(--ink); box-shadow: -18px 0 40px -20px rgb(30 18 10 / .45);
}
.drawer[open] { display: flex; }
.drawer::backdrop { background: rgb(42 35 29 / .45); }
@media (prefers-reduced-motion: no-preference) {
  .drawer[open] { animation: slide-in .28s cubic-bezier(.2, .7, .2, 1); }
  .drawer[open]::backdrop { animation: fade .28s ease-out; }
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; min-height: 58px; background: var(--ink); color: var(--cream); }
.drawer-head h2 { margin: 0; font-size: 1.05rem; }
.x { width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; border-radius: var(--radius); }
.x:hover { color: var(--amber); }
.drawer .notice { margin: 14px 20px 0; }
.drawer-lines { list-style: none; margin: 0; padding: 4px 20px; flex: 1; overflow-y: auto; }
.drawer-empty { padding: 30px 0; font-weight: 600; }
.drawer-empty .hint { font-weight: 400; }
.drawer-foot { padding: 14px 20px 20px; border-top: 1px solid var(--rule); background: var(--paper); display: grid; gap: 8px; }
.drawer-foot .sum-row.total { border: 0; margin: 0; padding: 0; }
.drawer-foot .hint { margin: 0 0 6px; }
.drawer-foot .closed { font-size: .95rem; padding: 12px 14px; }

/* A cart line (drawer and checkout summary) */
.cl { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px dashed var(--rule); }
.cl:last-child { border-bottom: 0; }
.cl a { text-decoration: none; }
.cl .thumb { width: 64px; border-radius: 6px; }
.cl .ph-empty b { font-size: 2rem; }
.cl-body { display: flex; flex-direction: column; min-width: 0; }
.cl-name { color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.3; }
.cl-name:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.cl-desc { display: flex; flex-direction: column; margin-top: 2px; color: var(--ink-soft); font-size: .88rem; overflow-wrap: anywhere; }
.cl-qty { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cl-qty .qty { color: var(--ink-soft); font-size: .9rem; margin-top: -6px; }
.cl-price { font-weight: 600; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.stepper button { width: 34px; height: 34px; border: 0; background: none; font: inherit; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.linkish { border: 0; background: none; padding: 4px 0; font: inherit; font-size: .88rem; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--warn); }

/* ---------- checkout ---------- */
.checkout-title { margin: 28px 0 0; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.box + .box { margin-top: 16px; }
.summary .cl { grid-template-columns: 48px minmax(0, 1fr) auto; }
.summary .cl .thumb { width: 48px; }
.summary .cl .ph-empty b { font-size: 1.5rem; }
.summary .lines-box { flex: none; overflow: visible; padding: 0; margin: 4px 0 10px; border-bottom: 1px solid var(--rule); }
.summary h2 { display: inline-block; margin-right: 10px; }
.results-none { padding: 10px 12px; margin: 0; }
.summary .optin { margin-top: 14px; }
.summary .personal { padding: 12px; border-radius: var(--radius); background: var(--accent-soft); }
.pickup-info { white-space: pre-line; margin: 12px 0 0; }
.ship-days { margin: 10px 0 0; color: var(--ink-soft); font-size: .93rem; }
.edit-cart { font-size: .9rem; }

/* ---------- footer strip ---------- */
.foot { background: var(--ink); color: var(--cream); padding: 30px 0 36px; font-size: .95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: flex-start; }
.foot-brand { display: flex; flex-direction: column; gap: 4px; }
.foot-brand .logo { margin-bottom: 6px; }
.foot a { color: var(--cream); text-decoration-color: rgb(246 239 228 / .4); }
.foot a:hover { text-decoration-color: var(--amber); }
.foot-links { display: flex; flex-direction: column; gap: 4px; }

/* ---------- text pages (terms, privacy, 404, success) ---------- */
.page { padding: 40px 20px 64px; max-width: 760px; }
.page h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 0 0 18px; }
.page h2 { font-size: 1.15rem; margin-top: 30px; }
.page p { max-width: 68ch; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .btn { margin-top: 12px; }
[hidden] { display: none !important; }
