/* The shop (/shop), each product's page (/shop/<id>), the thanks page and the tip jar. The shared
   look (colours, .btn, .card, the top bar) is styles.css; this file only adds what these pages
   need. It's loaded on the homepage too for the tip jar, so everything else is scoped. */

.shop-page, .tip-jar {
  --s-head: var(--font-head, "Shantell Sans", "Nunito", system-ui, sans-serif);
  --s-body: var(--font-body, "Nunito", system-ui, sans-serif);
  --art-paper: #F0E2CC;                 /* the paper every product picture is drawn on */
}

body.shop-page { font-family: var(--s-body); font-size: 18px; line-height: 1.55; }
.shop-page h1, .shop-page h2, .shop-page dt, .shop-page .btn, .shop-soon, .shop-downloads a { font-family: var(--s-head); }

.shop-main { max-width: var(--max, 1120px); margin: 0 auto; padding: clamp(20px, 4vw, 44px) var(--gutter, 16px) 0; }
.shop-loading { color: var(--soft); }

/* ---------------------------------------------------------------- a sale, across the top */

.sale-bar {
  margin: 0; padding: 9px 16px; text-align: center;
  font-family: var(--s-head); font-size: 15.5px; line-height: 1.4; color: #FFF6EA; background: #B44C43;
}
.sale-bar[hidden] { display: none; }
.sale-bar .left, .pp-deal .left {
  display: inline-block; padding: 0 9px; margin-left: 2px; border-radius: 999px;
  font-variant-numeric: tabular-nums; background: rgba(255, 246, 234, .2);
}
.copy-code {
  font: inherit; font-weight: 700; letter-spacing: .05em; cursor: pointer;
  padding: 0 10px; color: inherit; background: none; border: 1.5px dashed currentColor; border-radius: 8px;
}
.copy-code[data-copied]::after { content: " ✓"; }

/* ---------------------------------------------------------------- the shop's top: name, filters, sort */

.shop-intro { margin-bottom: 28px; }
.shop-page h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.05; margin: 0 0 .15em; }
.shop-intro h1 { text-decoration: underline wavy var(--honey) 3px; text-underline-offset: 10px; text-decoration-skip-ink: none; }
.shop-intro > p { color: var(--soft); font-size: 19px; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 15px;
  font: inherit; font-family: var(--s-head); font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer;
  background: var(--card); border: 0; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .1); transition: background-color .15s, transform .15s;
}
:root[data-night] .chip { box-shadow: inset 0 0 0 1.5px rgba(240, 226, 204, .14); }
.chip:hover { transform: translateY(-1px); }
.chip small { font-family: var(--s-body); font-size: 13px; font-weight: 700; opacity: .55; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip[aria-pressed="true"] small { opacity: .7; }
.sort-by { display: inline-flex; align-items: center; gap: 8px; font-family: var(--s-head); font-size: 15px; color: var(--soft); }
.sort-by select {
  min-height: 40px; padding: 6px 34px 6px 14px; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E5A4C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .1); appearance: none; cursor: pointer;
}
.shop-count { margin: 0; font-size: 15px; color: var(--soft); }

/* ---------------------------------------------------------------- the cards */

.shop-grid { display: grid; gap: clamp(26px, 3vw, 36px) clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* the wide first card + six fill two rows of four, or four rows of two */
@media (max-width: 1000px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-more .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* three related things */
.pcard { position: relative; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
.pcard.wide { grid-column: span 2; }
.pcard-art {
  position: relative; display: block; aspect-ratio: 1; margin-bottom: 10px; overflow: hidden;
  background: var(--art-paper); border-radius: 22px; box-shadow: 0 10px 26px rgba(30, 20, 10, .09);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.25), box-shadow .3s;
}
:root[data-night] .pcard-art { box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }
.pcard.wide .pcard-art { aspect-ratio: 2.12 / 1; }   /* two cards and the gap between: as tall as its neighbours */
.pcard-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s, transform .5s; }
.pcard-art .alt { opacity: 0; }
a.pcard:hover .pcard-art, a.pcard:focus-visible .pcard-art { transform: translateY(-6px) rotate(-.8deg); box-shadow: 0 18px 34px rgba(30, 20, 10, .16); }
.shop-grid > a.pcard:nth-child(even):hover .pcard-art { transform: translateY(-6px) rotate(.8deg); }
a.pcard:hover .pcard-art .alt, a.pcard:focus-visible .pcard-art .alt { opacity: 1; }
a.pcard:hover .pcard-art img:only-of-type, a.pcard:hover .pcard-art .alt { transform: scale(1.03); }
a.pcard:focus-visible { outline: none; }
a.pcard:focus-visible .pcard-art { outline: 3px dashed var(--rose); outline-offset: 3px; }
.pcard-name { font-family: var(--s-head); font-weight: 700; font-size: 19px; line-height: 1.25; }
.pcard.wide .pcard-name { font-size: 23px; }
.pcard-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-family: var(--s-head); }
.pcard-price b { font-size: 17px; }
.pcard-price s { font-size: 15px; color: var(--soft); }
.pcard-price em { font-style: normal; font-size: 14px; font-weight: 700; padding: 0 9px; border-radius: 999px; background: var(--honey); color: #3B2A22; }
.pcard.is-free .pcard-price b { color: #B44C43; }
:root[data-night] .pcard.is-free .pcard-price b { color: #F09088; }
/* a handwritten word on a strip of tape: "best value", "new" */
.pcard-note {
  position: absolute; left: 12px; top: -10px; z-index: 2; padding: 0 12px 2px;
  font-family: "Caveat", var(--s-head); font-weight: 700; font-size: 22px; line-height: 1.3; color: #9C3B33;
  background: rgba(232, 196, 140, .92); box-shadow: 0 2px 4px rgba(30, 20, 10, .12); rotate: -4deg;
}
/* a round sale sticker */
.pcard-off {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  display: grid; place-items: center; width: 58px; aspect-ratio: 1; border-radius: 50%;
  font-family: var(--s-head); font-weight: 700; font-size: 16px; color: #FFF6EA; background: #B44C43;
  box-shadow: 0 4px 10px rgba(120, 40, 30, .3); rotate: 10deg;
}
.pp-bundle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- a product's own page */

.pp[hidden] { display: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 15px; color: var(--soft); }
.crumbs a { color: inherit; }
.crumbs [aria-current] { color: var(--ink); }
.pp-top { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.pp-gallery { position: sticky; top: 84px; }
.pp-stage { position: relative; aspect-ratio: 1; background: var(--art-paper); border-radius: 26px; box-shadow: 0 14px 34px rgba(30, 20, 10, .1); }
.pp-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.pp-stage .pcard-note { left: 18px; top: -12px; font-size: 26px; }
.pp-stage .pcard-off { width: 72px; right: 18px; top: 18px; font-size: 19px; }
.pp-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pp-thumbs button { width: 74px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--art-paper); opacity: .7; transition: opacity .15s, box-shadow .15s; }
.pp-thumbs button:hover { opacity: 1; }
.pp-thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ink); }
.pp-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pp-kind { margin: 0 0 4px; font-family: var(--s-head); font-size: 15px; font-weight: 600; color: var(--soft); }
.pp h1 { font-size: clamp(32px, 4.2vw, 46px); margin-bottom: .25em; }
.pp-line { font-size: 19px; color: var(--soft); margin-bottom: 18px; }
.pp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-family: var(--s-head); }
.pp-price b { font-size: 32px; line-height: 1.1; }
.pp-price s { font-size: 21px; color: var(--soft); }
.pp-off { align-self: center; padding: 2px 11px; border-radius: 999px; font-size: 15px; font-weight: 700; color: #FFF6EA; background: #B44C43; }
.pp-save { align-self: center; padding: 2px 11px; border-radius: 999px; font-size: 15px; font-weight: 700; color: #3B2A22; background: var(--honey); }
.pp-deal { margin: 8px 0 0; font-family: var(--s-head); font-size: 16px; color: #B44C43; }
:root[data-night] .pp-deal { color: #F09088; }
.pp-deal[hidden] { display: none; }
.pp-deal .left { background: rgba(180, 76, 67, .12); }
.pp-actions { margin-top: 20px; }
.pp-buy { width: 100%; min-height: 58px; font-size: 20px; }
.pp-free .signup { margin-top: 0; }
.pp-free .thanks-line { font-family: var(--s-head); font-weight: 700; margin-bottom: 4px; }
.pp-free .downloads { grid-template-columns: 1fr; }
.pp-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--soft); }
.pp-trust li { display: inline-flex; align-items: center; gap: 6px; }
.pp-trust svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pp-get { margin-top: 30px; padding-top: 24px; border-top: 1.5px solid rgba(59, 42, 34, .1); }
:root[data-night] .pp-get { border-color: rgba(240, 226, 204, .12); }
.pp-get h2, .pp-more h2 { font-size: 22px; margin-bottom: 12px; }
.pp-get ul { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.pp-get li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card); border-radius: 14px; font-size: 17px; }
.pp-get li svg { flex: none; width: 19px; height: 19px; fill: none; stroke: #B07A3C; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-night] .pp-get li svg { stroke: var(--honey); }
.pp-about { color: var(--soft); margin: 0; }

.pp-bundle {
  display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 12px 16px 12px 12px;
  color: var(--ink); text-decoration: none; background: var(--card); border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--honey); transition: transform .2s;
}
.pp-bundle[hidden] { display: none; }
.pp-bundle:hover { transform: translateY(-2px) rotate(-.4deg); }
.pp-bundle img { width: 84px; flex: none; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.pp-bundle b { display: block; font-family: var(--s-head); font-size: 17px; }
.pp-bundle em { font-style: normal; font-size: 15.5px; color: var(--soft); }

.pp-how { margin-top: 22px; border-top: 1.5px solid rgba(59, 42, 34, .1); }
:root[data-night] .pp-how { border-color: rgba(240, 226, 204, .12); }
.pp-how summary {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 2px;
  font-family: var(--s-head); font-weight: 700; font-size: 18px; cursor: pointer; list-style: none;
}
.pp-how summary::-webkit-details-marker { display: none; }
.pp-how summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--soft); transition: transform .2s; }
.pp-how[open] summary::after { transform: rotate(45deg); }
.pp-how dl { margin: 0 0 8px; }
.pp-how dt { font-weight: 700; font-size: 16px; margin-top: 10px; }
.pp-how dd { margin: 2px 0 0; color: var(--soft); font-size: 16px; }
.pp-more { margin-top: clamp(56px, 8vw, 96px); }

/* stars: from reviews by people who bought it (shown by the owner) */
.stars { display: inline-flex; gap: 1px; letter-spacing: 0; }
.stars i { font-style: normal; color: rgba(59, 42, 34, .2); }
:root[data-night] .stars i { color: rgba(240, 226, 204, .22); }
.stars i.on { color: #D99A3E; }
.pcard-stars { font-size: 14px; font-weight: 700; color: var(--soft); }
.pcard-stars small { font-weight: 600; }
.pp-rating { margin: -4px 0 10px; font-size: 15px; }
.pp-rating:empty { display: none; }
.pp-rating a { color: var(--soft); text-decoration: none; font-weight: 700; }
.pp-rating a:hover { text-decoration: underline; }
.pp-rating .stars { font-size: 17px; }
.pp-reviews { margin-top: clamp(48px, 7vw, 80px); scroll-margin-top: 90px; }
.pp-reviews[hidden] { display: none; }
.pp-reviews h2 { font-size: 26px; margin-bottom: 4px; }
.pp-reviews-sum { color: var(--soft); font-weight: 700; }
.pp-reviews-sum .stars { font-size: 20px; }
.pp-reviews ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 16px 0; padding: 0; list-style: none; }
.pp-reviews li { padding: 18px 20px; background: var(--card); border-radius: 18px; }
.pp-reviews li[hidden] { display: none; }
.pp-reviews li p { margin: 8px 0 10px; font-size: 17px; }
.pp-reviews li small { font-size: 14px; color: var(--soft); }
.pp-reviews li small b { color: var(--ink); font-family: var(--s-head); }
.pp-more .pcard-note { display: none; }

/* on phones: the price and the button stay at the bottom once the big button scrolls away */
.pp-bar { display: none; }
@media (max-width: 720px) {
  .pp-bar {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 20;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
    background: var(--card); border-radius: 999px; box-shadow: 0 14px 34px rgba(30, 20, 10, .22);
    transform: translateY(140%); transition: transform .3s cubic-bezier(.2, .9, .3, 1.1);
  }
  .pp-bar.on { transform: none; }
  .pp-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--s-head); font-size: 15px; }
  .pp-bar b { font-family: var(--s-head); font-size: 17px; }
  .pp-bar .btn { min-height: 44px; padding: 8px 20px; font-size: 16px; }
}

/* ---------------------------------------------------------------- downloads (the thanks page) */

.shop-soon {
  margin: 0; align-self: flex-start; padding: 6px 16px; font-weight: 700; font-size: 17px;
  color: var(--soft); background: var(--card); border-radius: 999px;
}
.shop-status:empty { display: none; }
.shop-status { color: var(--rose) !important; font-size: 16px !important; margin: 10px 0 0 !important; }
.shop-downloads { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.shop-downloads a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 18px;
  font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink);
  background: var(--paper); border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .16);
}
.shop-downloads a:not(.btn):hover { background: var(--honey); color: #3B2A22; }
.shop-downloads.big { margin: 8px 0 4px; }

/* ---------------------------------------------------------------- the tip jar (here and on the homepage) */

.shop-tip-wrap { max-width: 820px; margin: clamp(56px, 8vw, 88px) auto 0; }
.tip-jar { display: grid; }
.tip-body h2 { font-family: var(--s-head); font-size: clamp(22px, 2.8vw, 28px); margin: 0 0 .2em; }
.tip-body > p { color: var(--soft); margin: 0 0 12px; font-size: 17px; }
.tip-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* the hot chocolates are gentle choices, not three red alarms */
.tip-buttons .tip-buy {
  flex: 1 1 120px; min-height: 42px; padding: 6px 14px; font-family: var(--s-head); font-size: 16px;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .16);
}
.tip-buttons .tip-buy:hover { background: var(--honey); color: #3B2A22; box-shadow: none; }
:root[data-night] .tip-buttons .tip-buy { box-shadow: inset 0 0 0 1.5px rgba(240, 226, 204, .2); }
.tip-more {
  margin-top: 10px; padding: 4px 0; font: inherit; font-size: 15px; color: var(--soft); cursor: pointer;
  background: none; border: 0; text-decoration: underline; text-underline-offset: 3px;
}
.tip-more[hidden], .tip-own[hidden] { display: none; }
.tip-own { margin-top: 12px; }
.tip-own-row { display: flex; gap: 8px; align-items: stretch; }
.tip-own-row > :first-child {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 0 12px;
  font-family: var(--s-head); font-weight: 700; font-size: 18px;
  background: var(--paper); border-radius: 999px;
}
.tip-own input {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 6px 16px;
  font: inherit; font-size: 17px; color: var(--ink); background: var(--paper);
  border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .18);
}
.tip-own input:focus { outline: none; box-shadow: inset 0 0 0 2.5px #B44C43; }
.tip-own input::placeholder { color: var(--soft); opacity: .7; }
.tip-own .tip-buy { flex: 0 0 auto; min-height: 44px; }
.tip-jar .shop-status:empty { display: none; }
.tip-jar .shop-status { color: var(--rose); font-size: 16px; margin: 10px 0 0; }

.shop-faq { margin: clamp(56px, 8vw, 88px) auto 0; max-width: 760px; }
.shop-faq h2 { font-size: clamp(24px, 3.2vw, 32px); }
.shop-faq dl { margin: 0; }
.shop-faq dt { font-weight: 700; font-size: 18px; margin-top: 20px; }
.shop-faq dd { margin: 4px 0 0; color: var(--soft); }

/* thanks page: the review card (stars light up to the one you point at) */
.review-card { margin-top: 28px; padding: 22px 24px; background: var(--card); border-radius: 20px; }
.review-card h2 { font-size: 26px; margin-bottom: 4px; }
.review-card > p { color: var(--soft); }
.star-pick { margin: 0 0 12px; padding: 0; border: 0; }
.star-pick legend { margin-bottom: 4px; padding: 0; font-family: var(--s-head); font-weight: 700; font-size: 16px; }
.star-row { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.star-pick label { font-size: 38px; line-height: 1; color: rgba(59, 42, 34, .2); cursor: pointer; transition: color .1s, transform .15s; }
:root[data-night] .star-pick label { color: rgba(240, 226, 204, .22); }
.star-pick label:hover, .star-pick label:hover ~ label, .star-pick input:checked ~ label,
:root[data-night] .star-pick label:hover, :root[data-night] .star-pick label:hover ~ label,
:root[data-night] .star-pick input:checked ~ label { color: #D99A3E; }   /* (the night grey above was beating it) */
.star-pick label:hover { transform: scale(1.15) rotate(-6deg); }
.star-pick input:focus-visible + label { outline: 3px dashed var(--rose); outline-offset: 2px; border-radius: 6px; }
.review-field { display: block; margin-bottom: 12px; }
.review-field span { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 700; color: var(--soft); }
.review-field textarea, .review-field input {
  width: 100%; padding: 10px 14px; font: inherit; font-size: 17px; color: var(--ink); background: var(--paper);
  border: 0; border-radius: 14px; box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .16); resize: vertical;
}
.review-field textarea:focus, .review-field input:focus { outline: none; box-shadow: inset 0 0 0 2.5px #B44C43; }
.review-status { margin: 10px 0 0; color: var(--rose); font-weight: 700; font-size: 15px; }
.review-status:empty { display: none; }

/* thanks page */
.thanks { max-width: 680px; }
.thanks-art { width: 180px; margin-bottom: 12px; border-radius: 18px; }
.thanks-keep {
  margin-top: 18px !important; padding: 14px 18px;
  background: var(--card); border-radius: 16px;
}

/* ---------------------------------------------------------------- smaller screens */

@media (max-width: 900px) {
  .pp-top { grid-template-columns: 1fr; }
  .pp-gallery { position: static; }
}
@media (max-width: 720px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .pcard-name { font-size: 16.5px; }
  .pcard.wide .pcard-name { font-size: 19px; }
  .pcard-price b { font-size: 16px; }
  .pcard-art { border-radius: 18px; }
  .pcard-note { left: 8px; font-size: 19px; }
  .pcard-off { width: 46px; right: 8px; top: 8px; font-size: 13.5px; }
  /* the filters scroll sideways in one row */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .pp-thumbs button { width: 64px; }
  .pp-more .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-more .shop-grid > :nth-child(3) { display: none; }
  .product-page .site-foot { padding-bottom: 96px; }
}
