:root {
  --bg: #0b1710;
  --bg2: #11231a;
  --card: #152b1f;
  --card2: #1d3b2a;
  --line: #29483a;
  --text: #f4fff6;
  --muted: #a7c3b0;
  --green: #1e9b3c;        /* logo circle */
  --accent: #3cc04a;       /* light awning green */
  --accent-ink: #052010;
  --yellow: #ffe81a;       /* sponge */
  --brown: #3a1a0a;        /* outlines */
  --warn: #ffd84d;
  --bad: #ff7a8a;
  --radius: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #0b1710; scrollbar-gutter: stable; }

/* Smooth page switches (Chrome/Edge/Safari): a quick fade between pages, with the header staying put.
   Browsers that don't support it just switch pages normally. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
#site-header { view-transition-name: site-header; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: radial-gradient(800px 380px at 85% -120px, rgba(30,155,60,.45) 0%, transparent 70%), radial-gradient(600px 300px at -10% 10%, rgba(255,232,26,.10) 0%, transparent 70%);
  background-repeat: no-repeat;
  min-height: 100vh;
}
body.hasBar { padding-bottom: 88px; }
h1, h2, h3, .brand, .offerBig { font-family: "Fredoka", system-ui, sans-serif; letter-spacing: .2px; }
h1 { font-size: clamp(30px, 6.5vw, 46px); line-height: 1.08; margin: 8px 0 8px; }
h1 .hl { color: var(--yellow); }
h2 { font-size: 22px; margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0; line-height: 1.25; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* header */
#site-header { max-width: 1040px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 24px; font-weight: 600; }
.logo { width: 44px; height: 44px; display: block; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
nav { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
nav a { color: var(--muted); text-decoration: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
nav a[aria-current="page"] { background: var(--green); color: #fff; }
.navCount[hidden] { display: none; }
.navCount { background: var(--yellow); color: var(--brown); border-radius: 999px; font-size: 12px; font-weight: 800; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; }
@media (max-width: 520px) {
  #site-header { justify-content: center; }
  nav { width: 100%; justify-content: space-between; }
  nav a { padding: 7px 10px; font-size: 14px; flex: 1; justify-content: center; }
}

/* hero */
.hero { padding: 14px 0 6px; display: flex; align-items: center; gap: 22px; }
.hero .heroLogo { width: 120px; height: 120px; flex: 0 0 auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
@media (max-width: 600px) { .hero .heroLogo { width: 84px; height: 84px; } .hero { gap: 14px; } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.pill { background: var(--bg2); border: 1px solid var(--line); color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.pill b { color: var(--text); }
.pill.y { border-color: rgba(255,232,26,.45); }
.pill.y b { color: var(--yellow); }
.pill.cash { border-color: rgba(0,214,50,.55); background: rgba(0,214,50,.10); }
.pill.cash b { color: #00d632; } /* Cash App green */

/* controls */
/* No background until the bar is stuck to the top while scrolling (it showed as a dark box over the page glow). */
.controls { display: flex; gap: 8px; margin: 14px 0; position: sticky; top: 0; z-index: 5; padding: 10px 0; transition: background .15s; }
.controls.stuck { background: rgba(11,23,16,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; box-shadow: 0 8px 18px rgba(0,0,0,.35); }
input[type="search"], input[type="text"], select, textarea {
  font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 46px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(60,192,74,.25); }
.controls input[type="search"] { flex: 1 1 auto; min-width: 0; }
.controls select { flex: 0 0 auto; max-width: 42%; }

/* price cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; min-height: 60vh; align-content: start; }
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 12px 14px; position: relative; }
.item .pic { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.16), rgba(255,255,255,0) 68%); }
/* Fixed square: tall pictures (e.g. Cola Cat) shrink to fit instead of stretching the card. */
.item .pic { position: relative; overflow: hidden; }
.item .pic img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
/* Fade pictures in on the first load only (not every time the list redraws after a + tap). */
body:not(.listReady) .item .pic img { animation: picIn .25s ease-out; }
@keyframes picIn { from { opacity: 0; } to { opacity: 1; } }
.item .pic .none { font-size: 40px; opacity: .4; }
.item h3 { min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
/* Price on top, full-width add button / counter underneath, so it fits any card width. */
.item .offerRow { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; margin-top: auto; padding-top: 2px; }
.item .offerRow .offerBig { align-self: center; }
.item .offerRow .add { width: 100%; font-size: 16px; }
.item .offerRow .add::after { content: ' Add'; }
.item .offerRow .qty.pick { width: 100%; justify-content: space-between; }
.item .offerRow .qty.pick button { width: 44px; }
.offerBig { font-size: 22px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; background: var(--green); padding: 3px 12px; border-radius: 12px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.22); text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.add { font: inherit; font-weight: 800; border: 0; border-radius: 12px; background: var(--card2); color: var(--text); width: 44px; height: 40px; cursor: pointer; font-size: 22px; line-height: 1; flex: 0 0 auto; }
.add:hover { background: var(--line); }
.qty.pick { flex: 0 0 auto; height: 40px; background: var(--card2); border-color: var(--line); }
.qty.pick button { width: 30px; height: 38px; color: var(--text); font-weight: 800; }
.qty.pick span { min-width: 18px; font-weight: 800; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; grid-column: 1 / -1; }

/* bundle bar */
.bundleBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(640px, calc(100% - 24px)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none;
  background: var(--green); color: #fff; padding: 14px 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 16px; border: 2px solid rgba(255,255,255,.12); }
.bundleBar[hidden] { display: none; }
.barGo { font-weight: 800; white-space: nowrap; color: var(--yellow); }

/* sell page */
.sellGrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; margin-bottom: 40px; }
@media (max-width: 820px) { .sellGrid { grid-template-columns: 1fr; } }
.line { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line img { width: 44px; height: 44px; object-fit: contain; }
.line .nm b { display: block; line-height: 1.25; }
.line .nm small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.qty button { font: inherit; background: none; border: 0; color: var(--text); width: 34px; height: 34px; cursor: pointer; font-size: 18px; }
.qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.lineTotal { font-weight: 700; min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 12px; }
.total b { font-size: 30px; color: #fff; font-family: "Fredoka", system-ui, sans-serif; }
.note { border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 12px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); }
.note.warn { border-color: #6b5a22; background: #2a2414; color: var(--warn); }
.note.ok { border-color: #2d6a3a; background: #12301b; color: var(--accent); }
.note.bad { border-color: #6b2a35; background: #2a1419; color: var(--bad); }
.picker { margin-top: 14px; }
.picker input { width: 100%; }
.results { margin-top: 6px; }
.results .row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.results .row:first-child { border-top: 0; }
.results .row img { width: 34px; height: 34px; object-fit: contain; }
.results .row .nm { flex: 1; min-width: 0; }
.results .row .of { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
label.field { display: block; margin: 0 0 14px; }
label.field span { display: block; font-weight: 600; margin-bottom: 6px; }
label.field input { width: 100%; }
label.field small { color: var(--muted); display: block; margin-top: 4px; }
textarea#msg { width: 100%; min-height: 150px; resize: vertical; font-size: 14px; line-height: 1.45; }
.btn { font: inherit; font-weight: 800; border: 0; border-radius: 14px; padding: 14px 18px; width: 100%; cursor: pointer; background: var(--accent); color: var(--accent-ink); font-size: 17px; text-decoration: none; display: inline-block; text-align: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn + .btn { margin-top: 10px; }
.linkBtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 0; }
.stepNum, label.field span.stepNum { display: inline-grid; vertical-align: -5px; margin-bottom: 0; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); color: var(--brown); font-weight: 800; font-size: 13px; margin-right: 6px; }

/* how page */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 14px 14px 60px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--brown); display: grid; place-items: center; font-weight: 800; }
.steps li > b:first-child { display: block; margin-bottom: 2px; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.trust .card a.btn { margin-top: 10px; }
section { margin: 28px 0; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; }

footer#site-footer { max-width: 1040px; margin: 40px auto 20px; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer#site-footer p { margin: 4px 0; }
