/* Colors pulled from the logo */
:root {
  --cream: #fffaf2;
  --peach: #fbb36f;
  --peach-soft: #fde3c6;
  --beak: #f39a2e;
  --ink: #1d1b1a;
  --ink-soft: #4a4542;
  --blue: #2a4fd6;
  --pink: #f49ac1;
  --white: #ffffff;
  --radius: 22px;
  --shadow: 4px 4px 0 var(--ink);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3, .brand, .btn, .kicker {
  font-family: "Fredoka", "Nunito", system-ui, sans-serif;
  line-height: 1.15;
}

a { color: var(--blue); }

img { max-width: 100%; height: auto; display: block; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem clamp(1rem, 4vw, 2.5rem);
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img { border-radius: 50%; }

.brand, .topbar nav { position: relative; z-index: 1; }

/* Wandering geese (drawing and script are in js/site.js) */
.goose {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 54px;
  pointer-events: none;
  will-change: transform;
}

.goose svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Colors come from each goose's --g-* variables (set in js/site.js) */
.goose .gf-body { fill: var(--g-body, #fff); }
.goose .gf-wing { fill: var(--g-wing, #f1f0f4); }
.goose .gf-belly { fill: var(--g-belly, #e4e2e8); }
.goose .gf-beak { fill: var(--g-beak, #f39a2e); }
.goose .gf-acc { fill: var(--g-acc, #2a4fd6); }
.goose .gf-leg { fill: #f39a2e; }
.goose .gs-leg { stroke: #f39a2e; }
.goose .g-flower { display: none; }
.goose[data-acc="flower"] .g-flower { display: inline; }
.goose[data-acc="flower"] .g-bow { display: none; }

/* Friends waddle in when an item is added and out when one is removed */
.goose.arriving svg { animation: goose-arrive 0.6s ease-out; }
.goose.leaving { opacity: 0; transition: opacity 0.5s ease; }
@keyframes goose-arrive {
  0% { transform: translateY(-14px) scale(0.6); opacity: 0; }
  60% { transform: translateY(2px) scale(1.05); opacity: 1; }
  100% { transform: none; }
}

/* Meeting another goose */
.goose .g-wing, .goose .g-body { transform-box: fill-box; }
.goose .g-wing { transform-origin: 85% 30%; }
.goose[data-act="flap"] .g-wing { animation: goose-flap 0.22s ease-in-out 8 alternate; }
.goose[data-act="hug"] .g-body { transform-origin: 30% 100%; transform: rotate(10deg); transition: transform 0.3s ease; }
.goose[data-act="sit"] .g-leg { opacity: 0; transition: opacity 0.2s; }
.goose[data-act="sit"] svg { transform: translateY(6px); transition: transform 0.3s ease; }
.goose[data-act="honk"] .g-head-side { transform-box: fill-box; transform-origin: 20% 100%; animation: goose-honk 0.3s ease-in-out 3 alternate; }
@keyframes goose-flap { from { transform: rotate(0); } to { transform: rotate(-38deg); } }
@keyframes goose-honk { from { transform: rotate(0); } to { transform: rotate(-12deg); } }
.goose-fx {
  position: absolute;
  left: 70%;
  top: -14px;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: #e0457b;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.goose[data-act="hug"] .goose-fx, .goose[data-act="honk"] .goose-fx { animation: goose-fx 1.8s ease-out forwards; }
.goose[data-act="honk"] .goose-fx { color: var(--ink); }
@keyframes goose-fx {
  0% { opacity: 0; transform: scaleX(var(--face, 1)) translateY(4px) scale(0.6); }
  20% { opacity: 1; transform: scaleX(var(--face, 1)) translateY(0) scale(1); }
  80% { opacity: 1; transform: scaleX(var(--face, 1)) translateY(-6px); }
  100% { opacity: 0; transform: scaleX(var(--face, 1)) translateY(-10px); }
}

.goose[hidden] { display: none; }

.goose .g-head-front { display: none; }
.goose[data-state="look"] .g-head-side { display: none; }
.goose[data-state="look"] .g-head-front { display: inline; }

.goose .g-leg { transform-box: fill-box; transform-origin: 50% 0; }
.goose[data-state="walk"] .g-leg-back { animation: goose-step 0.42s ease-in-out infinite alternate; }
.goose[data-state="walk"] .g-leg-front { animation: goose-step 0.42s ease-in-out infinite alternate-reverse; }
.goose[data-state="walk"] .g-body { animation: goose-waddle 0.42s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }

@keyframes goose-step {
  from { transform: rotate(-22deg); }
  to { transform: rotate(22deg); }
}

@keyframes goose-waddle {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-1.5px) rotate(2deg); }
}

.topbar nav { display: flex; gap: clamp(0.6rem, 2vw, 1.5rem); flex-wrap: wrap; }

.topbar nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.topbar nav a:hover { color: var(--beak); }

@media (max-width: 640px) {
  .brand span { display: none; }
  .topbar nav { font-size: 0.95rem; }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.kicker strong { color: var(--beak); }

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
}

h1 .h1-plain { font-weight: inherit; }
h1 span {
  color: var(--blue);
  display: inline-block;
  transform: rotate(-1.5deg);
}

.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }

.hero-logo {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  justify-self: center;
  max-width: 420px;
  width: 100%;
}

.hero-logo img { border-radius: 50%; }

.hero-logo.honking { animation: wobble 0.6s ease; }

.honk-bubble {
  position: absolute;
  top: 6%;
  right: -4%;
  padding: 0.3rem 0.9rem;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  opacity: 0;
  transform: scale(0.4) rotate(8deg);
  pointer-events: none;
}

.hero-logo.honking .honk-bubble { animation: honk 1s ease forwards; }

@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg) scale(1.03); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-2deg); }
}

@keyframes honk {
  0% { opacity: 0; transform: scale(0.4) rotate(8deg); }
  20% { opacity: 1; transform: scale(1.1) rotate(8deg); }
  70% { opacity: 1; transform: scale(1) rotate(8deg); }
  100% { opacity: 0; transform: scale(1) translateY(-12px) rotate(8deg); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { order: -1; max-width: 260px; }
  .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn-primary { background: var(--peach); }
.btn-ghost { background: var(--white); }

/* Sections */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}

.hero + .section { padding-top: 0.5rem; }

.section-alt {
  max-width: none;
  background: var(--peach-soft);
  border-block: 3px solid var(--ink);
  padding-inline: max(clamp(1rem, 4vw, 2.5rem), calc((100% - 1040px) / 2));
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
}

.section-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 44rem; }

.note { margin-top: 1.5rem; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.card h3 { margin: 0.4rem 0; font-size: 1.35rem; }
.card p { margin: 0; color: var(--ink-soft); }
.card-emoji { font-size: 2.4rem; }

.tilt-l:hover { transform: rotate(-2deg) translateY(-4px); }
.tilt-r:hover { transform: rotate(2deg) translateY(-4px); }

/* Inventory carousel */
.carousel { margin-top: 2rem; }

.carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.carousel-head h3 { margin: 0; font-size: 1.5rem; }

.demo-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.15rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  font-family: "Nunito", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  transform: rotate(-3deg);
}

.carousel-btn {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--peach);
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.carousel-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.carousel-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.ring {
  position: relative;
  height: clamp(250px, 34vw, 360px);
  margin-top: 0.5rem;
  user-select: none;
}

.turntable {
  position: absolute;
  left: 50%;
  top: 62%;
  width: min(92%, 1000px);
  height: 40%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--peach-soft) 0 55%, transparent 72%);
  border: 3px dashed rgb(29 27 26 / 0.18);
}

.ring-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(150px, 24vw, 250px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform;
}

.ring-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.ring-item.is-front img { animation: bob 2.2s ease-in-out infinite; }

.ring-item:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; border-radius: 50%; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(-2deg); }
}

.spotlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin-top: 0.5rem;
}

.spotlight-text {
  flex: 0 1 26rem;
  min-height: 9.5rem;
  text-align: center;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
}

.carousel-btn { flex: none; }

.product-tag {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--beak);
}

.spotlight-text h4 {
  margin: 0.15rem 0 0.35rem;
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

.product-blurb { margin: 0 0 0.8rem; font-size: 0.95rem; color: var(--ink-soft); }

.product-price {
  margin: 0;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
}

.low-stock {
  margin-left: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: "Nunito", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  vertical-align: middle;
}

/* Commission steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.steps li {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
}

.steps h3 { margin: 0.6rem 0 0.4rem; font-size: 1.3rem; }
.steps p { margin: 0; color: var(--ink-soft); }

.step-num {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--beak);
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}

/* Partner (Stratum3D Engineering) */
.partner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--white);
  border: 3px dashed var(--blue);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.partner > div:first-child { flex: 1 1 22rem; max-width: 40rem; }
.partner-side { flex: 0 1 auto; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.partner-logo img { display: block; width: min(280px, 70vw); height: auto; }
.partner p { color: var(--ink-soft); }

/* Contact */
.contact { text-align: center; }

.email-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  color: var(--ink);
  text-decoration-color: var(--beak);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}

/* Footer */
.footer {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.95rem;
}

.footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring-item.is-front img, .hero-logo.honking, .hero-logo.honking .honk-bubble { animation: none; }
  .hero-logo.honking .honk-bubble { opacity: 1; transform: none; }
}

/* ---------- Shared UI: header cart, drawer, toast ---------- */
.no-scroll { overflow: hidden; }

.topbar nav { align-items: center; }
.topbar nav a[aria-current="page"] { color: var(--beak); }

.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--peach);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.cart-btn svg { width: 1.3rem; height: 1.3rem; }
.cart-count {
  position: absolute;
  top: -0.5rem;
  right: -0.55rem;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
}
.icon-btn:hover { background: var(--peach-soft); }

.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled], .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
button.btn { cursor: pointer; font-family: "Fredoka", sans-serif; }

.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgb(29 27 26 / 0.45); }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--cream);
  border-left: 3px solid var(--ink);
  animation: slide-in 0.22s ease-out;
}
@keyframes slide-in { from { transform: translateX(100%); } }
.drawer-head, .drawer-foot { padding: 1rem 1.25rem; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--ink); }
.drawer-head h2 { margin: 0; font-size: 1.6rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.drawer-foot { border-top: 3px solid var(--ink); background: var(--white); }
.drawer-empty { color: var(--ink-soft); }
.drawer-total { display: flex; justify-content: space-between; margin: 0; font-size: 1.2rem; }
.drawer-note { margin: 0.2rem 0 1rem; color: var(--ink-soft); font-size: 0.9rem; }

.cart-line { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.8rem 0; border-bottom: 2px dashed rgb(29 27 26 / 0.15); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--ink); border-radius: 12px; }
.cart-line-info { flex: 1; }
.cart-line-name { margin: 0; font-weight: 800; }
.cart-line-price { margin: 0 0 0.3rem; color: var(--ink-soft); }
.cart-warn { margin: 0.3rem 0 0; color: #b42318; font-size: 0.85rem; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--white); }
.qty button { width: 2rem; height: 1.9rem; border: 0; background: none; font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty span { min-width: 1.6rem; text-align: center; font-weight: 800; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 60;
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1.2rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translate(-50%, 160%);
  transition: transform 0.25s ease;
}
.toast.show { transform: translate(-50%, 0); }
.link-btn { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* ---------- Home carousel links ---------- */
a.ring-item { display: block; }
.spotlight-text h4 a { color: inherit; text-decoration: none; }
.spotlight-text h4 a:hover { text-decoration: underline; }

/* ---------- Shop ---------- */
.shop-head { padding-bottom: 1rem; }
.shop-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.chip {
  padding: 0.4rem 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.loading { color: var(--ink-soft); }

.shop-group { padding-top: clamp(2rem, 5vw, 3rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
.shop-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 1.25rem;
}
.shop-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.shop-grid li:nth-child(odd) .shop-card:hover { transform: rotate(-1.2deg) translateY(-4px); }
.shop-grid li:nth-child(even) .shop-card:hover { transform: rotate(1.2deg) translateY(-4px); }
.shop-card:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; }
.shop-card-photo { display: block; aspect-ratio: 1; border-bottom: 3px solid var(--ink); background: var(--peach-soft); }
.shop-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.shop-card-body { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; padding: 0.9rem 1rem 1.1rem; }
.shop-card-name { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.shop-card-blurb { color: var(--ink-soft); font-size: 0.95rem; }
.shop-card-price { margin-top: auto; padding-top: 0.4rem; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.3rem; }
.sold-out {
  margin-left: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-family: "Nunito", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  vertical-align: middle;
}

/* ---------- Product modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(29 27 26 / 0.55); }
.modal-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: min(960px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: 6px 6px 0 var(--ink);
  animation: pop 0.2s ease-out;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }
.modal-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1; }
.modal-photo { background: var(--peach-soft); border-right: 3px solid var(--ink); }
.modal-photo img { width: 100%; height: 100%; max-height: 80vh; object-fit: cover; }
.modal-info { padding: clamp(1.25rem, 3vw, 2rem); }
.modal-info h2 { margin: 0.2rem 0 0.4rem; padding-right: 2.5rem; }
.modal-info .product-price { font-size: 1.6rem; margin-bottom: 1rem; }
.modal-desc { color: var(--ink-soft); }
.modal-desc p { margin: 0 0 0.8rem; }
.buy-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem; margin-top: 1.25rem; }
.qty-select { display: flex; flex-direction: column; font-weight: 800; font-size: 0.85rem; }
.qty-select select { margin-top: 0.2rem; padding: 0.55rem 0.7rem; border: 3px solid var(--ink); border-radius: 12px; font: inherit; font-weight: 800; background: var(--white); }
@media (max-width: 720px) {
  .modal { padding: 0; place-items: end center; }
  .modal-card { grid-template-columns: 1fr; max-height: 92vh; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-photo { border-right: 0; border-bottom: 3px solid var(--ink); }
  .modal-photo img { max-height: 46vh; }
}

/* ---------- Checkout ---------- */
.checkout h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1.25rem; }
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }
.panel { background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 1.75rem); }
.panel h2 { font-size: 1.5rem; margin: 0 0 0.25rem; }
.panel h3 { font-size: 1.2rem; margin: 1.25rem 0 0.75rem; }
.hint, .muted { color: var(--ink-soft); }
.hint { font-size: 0.92rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.9rem; flex: 1; min-width: 0; }
.field label { font-weight: 800; font-size: 0.92rem; }
.field small { color: var(--ink-soft); font-size: 0.85rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--cream);
  font: inherit;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--peach); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #b42318; background: #fff1f0; }
.field-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.field-sm { flex: 0 0 6.5rem; }
.form-error, .alert { padding: 0.75rem 1rem; border: 2px solid #b42318; border-radius: 12px; background: #fff1f0; color: #7a1a12; font-weight: 700; }
.alert { border-color: var(--blue); background: #eef2ff; color: var(--ink); }
.summary-line { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; }
.summary-line img { width: 48px; height: 48px; object-fit: cover; border: 2px solid var(--ink); border-radius: 10px; }
.summary-line span { flex: 1; }
.totals { margin: 1rem 0 0; border-top: 2px dashed rgb(29 27 26 / 0.2); padding-top: 0.75rem; }
.totals div { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.totals dt, .totals dd { margin: 0; }
.totals .grand { margin-top: 0.4rem; padding-top: 0.6rem; border-top: 3px solid var(--ink); font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.35rem; }
#paypal-buttons { margin-top: 0.75rem; min-height: 0; }
.thanks { max-width: 640px; margin: 0 auto; text-align: center; }
.thanks .summary-lines, .thanks .totals { text-align: left; }
.thanks-logo { margin: 0 auto 0.5rem; border-radius: 50%; }

@media (max-width: 560px) {
  .topbar nav .nav-extra { display: none; }
  .topbar, .topbar nav { flex-wrap: nowrap; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
  .shop-card-body { padding: 0.7rem 0.75rem 0.85rem; }
  .shop-card-name { font-size: 1.05rem; }
  .shop-card-blurb { display: none; }
  .shop-card-price { font-size: 1.1rem; }
}

/* Product photo gallery */
.modal-photo { position: relative; display: flex; flex-direction: column; }
.modal-photo > img { flex: 1; min-height: 0; }
.modal-thumbs { display: flex; gap: 0.5rem; padding: 0.6rem; overflow-x: auto; background: var(--cream); border-top: 3px solid var(--ink); }
.modal-thumbs[hidden] { display: none; }
.thumb { flex: none; padding: 0; border: 3px solid transparent; border-radius: 12px; background: none; cursor: pointer; overflow: hidden; }
.thumb img { display: block; width: 64px; height: 64px; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--ink); }
.modal-size { margin: -0.5rem 0 1rem; color: var(--ink-soft); }
.modal-photo > img { object-fit: contain; background: #efe9e1; }
.btn-facebook { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }

/* Sections the owner adds in /admin > Site content */
.custom-section .custom-body { max-width: 44rem; font-size: 1.1rem; color: var(--ink-soft); }
.custom-section .custom-body p { margin: 0 0 0.9rem; }
.custom-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.custom-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.custom-photos.is-single { grid-template-columns: minmax(0, 640px); }
.custom-photos.is-single img { aspect-ratio: auto; }
.custom-section .btn { margin-top: 0.5rem; }
body.content-preview::after {
  content: "Preview: includes changes that aren't published yet";
  position: fixed; left: 50%; bottom: 0.75rem; transform: translateX(-50%); z-index: 100;
  padding: 0.35rem 0.9rem; border: 2px solid var(--ink); border-radius: 999px; background: #fde68a; font-weight: 800; font-size: 0.85rem;
}
