/* /shop: the page-specific parts. Theme lives in /neo.css. */

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(20px, 5vw, 72px);
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(8px, 1.5vw, 16px) var(--gutter) clamp(44px, 5.5vw, 68px);
}

/* the shirt design, stuck on like a sticker */
.sticker {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 410px;
  rotate: -5deg;
  --lift: clamp(6px, 1.5vw, 10px);
  filter: drop-shadow(var(--lift) var(--lift) 0 var(--ink));
  animation: slap 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; /* slapped on once, at load */
}
.sticker img { width: 100%; height: auto; }
@keyframes slap {
  from { scale: 1.3; rotate: 4deg; opacity: 0; }
  to { scale: 1; rotate: -5deg; opacity: 1; }
}
.sticker .eye {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pupil { transition: transform 0.15s ease-out; }

.hero h1 { font-size: clamp(5rem, 15vw, 11rem); }

.lede {
  max-width: 24ch;
  margin: 0.7em 0 0;
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .sticker { max-width: min(74vw, 340px); }
  .lede { margin-inline: auto; }
}

/* ---------- order confirmation (shown on /shop/?thanks=1) ---------- */

.thanks {
  width: min(720px, 100% - 2 * var(--gutter));
  margin: 6px auto 30px;
  padding: 22px 26px 24px;
  rotate: -1deg;
}
.thanks .puff { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.thanks p + p { margin: 0.4em 0 0; }

.nojs {
  width: min(720px, 100% - 2 * var(--gutter));
  margin: 0 auto 30px;
  padding: 16px 22px;
}

/* ---------- the shelf ---------- */

.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px);
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 8vw, 96px);
}
@media (max-width: 980px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .shelf { grid-template-columns: minmax(0, 1fr); } }

.item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 18px;
  transition: translate 0.1s, box-shadow 0.1s;
}

/* a card with a live link is one big button: the buy link stretches over it */
.buy[href]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--round);
}
.item .buy:active { transform: none; }
.item:has(.buy[href]):hover {
  translate: -2px -2px;
  box-shadow: calc(var(--drop) + 2px) calc(var(--drop) + 2px) 0 var(--ink);
}
.item:has(.buy[href]):hover .buy { background: var(--eye); }
.item:has(.buy[href]:active) {
  translate: 3px 3px;
  box-shadow: calc(var(--drop) - 3px) calc(var(--drop) - 3px) 0 var(--ink);
}

.art {
  position: relative;
  aspect-ratio: 1;
  background: var(--ground);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--round) - 8px);
}
.art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: calc(var(--round) - 12px);
}
.art.has-photo { background: var(--paper); }

/* optional second picture ("back" in the config): hovering the card shows it,
   the Back view button pins it (and is the only way in on a phone) */
.art-back {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--paper);
  opacity: 0;
  transition: opacity 0.15s;
}
.art.is-flipped .art-back { opacity: 1; }
@media (hover: hover) {
  .item:hover .art-back { opacity: 1; }
}
.flip {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  padding: 0.5em 0.85em;
  font: 700 0.95rem/1 var(--puff);
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}
.flip[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
  box-shadow: none;
  translate: 3px 3px;
}

/* the price rides on the manatee's eye */
.price {
  position: absolute;
  top: -24px;
  right: -24px;
  z-index: 1;
  pointer-events: none;
  display: grid;
  place-items: center;
  min-width: 78px;
  height: 78px;
  padding: 0 12px;
  font: 700 1.5rem/1 var(--puff);
  color: var(--paper);
  background: var(--eye);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  rotate: 8deg;
}

.item h2 {
  margin: 16px 4px 2px;
  font-size: 1.55rem;
}
.spec {
  margin: 0 4px 16px;
  font-size: 1rem;
}
.item .btn {
  width: 100%;
  margin-top: auto;
}

/* sixth cell: how ordering works */
.fine {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 24px;
}
.fine h2 {
  margin-bottom: 0.7em;
  font-size: 1.9rem;
}
.fine ul {
  display: grid;
  gap: 1em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fine li {
  position: relative;
  padding-left: 1.7em;
  line-height: 1.4;
}
.fine li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 0.85em;
  height: 0.85em;
  background: var(--eye);
  border-radius: 50%;
}
.fine b {
  display: block;
  font-weight: 800;
}
.fine img {
  align-self: flex-end;
  width: 88px;
  height: auto;
  margin-top: auto;
  padding-top: 8px;
  rotate: 6deg;
}
