/* The PaperTrail Pros shop — thepapertrailpros.com/shop
   Same tokens as the rest of the website. The portal's own /shop uses the portal styles instead; only the
   product card markup is shared between them (see website/shop/shop.js and the portal's shop pane). */

:root {
  --bg: #F6F2E9; --surface: #FFFFFF; --surface-2: #F0EADD;
  --fg: #17140F; --muted: #6A6256;
  --gold: #8F610C; --gold-bright: #C19031;
  --grad-gold: linear-gradient(135deg, #8F610C 0%, #C19031 52%, #F8D080 100%);
  --line: rgba(21, 18, 13, .12);
  --good: #2F7A47;
  --radius: 16px;
  --shadow-sm: 0 12px 30px -22px rgba(21, 18, 13, .45);
  --f-display: "Bitter", Georgia, serif;
  --f-body: "Questrial", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121009; --surface: #1A1710; --surface-2: #14110B;
    --fg: #F5F0E4; --muted: #A99E88;
    --gold: #E0B45C; --gold-bright: #E6BC68;
    --line: rgba(245, 240, 228, .12); --good: #7FC79A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121009; --surface: #1A1710; --surface-2: #14110B;
  --fg: #F5F0E4; --muted: #A99E88;
  --gold: #E0B45C; --gold-bright: #E6BC68;
  --line: rgba(245, 240, 228, .12); --good: #7FC79A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.6; }

.top { background: #15120D; border-bottom: 2px solid transparent; border-image: var(--grad-gold) 1; }
.top .in { max-width: 1180px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top img { height: 54px; width: auto; display: block; }
.top a.back { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #F5F0E4; text-decoration: none; border: 1px solid rgba(245, 240, 228, .25); border-radius: 4px; padding: .7em 1em; }
.top a.back:hover { border-color: #C19031; color: #E6BC68; }

main { max-width: 1180px; margin: 0 auto; padding: 40px 16px 64px; }
.eyebrow { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: block; text-align: center; }
h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.08; text-align: center; margin: 12px 0 0; }
.sub { text-align: center; color: var(--muted); max-width: 62ch; margin: 14px auto 0; }
.fine { font-size: .8rem; color: var(--muted); margin-top: 36px; text-align: center; }
footer { background: #15120D; color: #B6AC97; text-align: center; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .04em; padding: 20px 16px; }
footer a { color: #E6BC68; }

/* ---- filters ---- */
.cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 26px 0 0; }
.cats button { font: inherit; font-size: .85rem; cursor: pointer; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: .5em 1.1em; }
.cats button:hover { border-color: var(--gold-bright); }
.cats button[aria-pressed="true"] { background: var(--grad-gold); border-color: transparent; color: #15120D; font-weight: 600; }

/* ---- product grid ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; margin-top: 30px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: block; width: 100%; object-fit: cover; }
.thumb.ph { display: grid; place-items: center; font-family: var(--f-display); font-size: 2rem; color: var(--gold); background: var(--grad-gold); opacity: .22; }
.card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { font-family: var(--f-display); font-size: 1.15rem; margin: 0; }
.card .tag { font-size: .86rem; color: var(--muted); margin: 0; }
.card .price { font-family: var(--f-mono); font-size: 1.3rem; color: var(--gold); margin-top: 2px; }
.card .price small { font-size: .72rem; color: var(--muted); font-family: var(--f-body); }

details.what { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
details.what summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--gold); list-style: none; display: flex; align-items: center; gap: 6px; }
details.what summary::-webkit-details-marker { display: none; }
details.what summary::after { content: "+"; margin-left: auto; font-size: 1.1rem; line-height: 1; }
details.what[open] summary::after { content: "\2212"; }
details.what .inner { padding-top: 10px; font-size: .88rem; color: var(--muted); }
details.what ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; }
details.what li { color: var(--fg); }

.buy { margin-top: auto; padding-top: 14px; }
.buy a { display: block; text-align: center; text-decoration: none; font: inherit; font-weight: 600; border-radius: 10px; padding: 12px 18px; background: var(--grad-gold); color: #15120D; }
.buy a.soon { background: var(--surface-2); color: var(--muted); pointer-events: none; }
.securenote { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: .76rem; color: var(--muted); }
.securenote .ok { color: var(--good); font-weight: 700; flex: none; }

.empty, .loading { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); margin-top: 30px; }
.empty h2 { font-family: var(--f-display); color: var(--fg); margin: 0 0 8px; }

/* ---- download page ---- */
.panel { max-width: 640px; margin: 30px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 30px 26px; text-align: center; }
.panel h2 { font-family: var(--f-display); margin: 0 0 10px; }
.panel .btn { display: inline-block; margin-top: 16px; text-decoration: none; font-weight: 600; border-radius: 10px; padding: 13px 22px; background: var(--grad-gold); color: #15120D; }
.panel .seal { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-gold); color: #15120D; font-size: 26px; font-weight: 700; }
.panel.bad .seal { background: var(--surface-2); color: var(--muted); }
