/* Design tokens mirror mccommunityservices.com (css/redesign.css) so the
   store looks like part of the main site. Fonts: Albert Sans + Bitter
   (SIL Open Font License), self-hosted like the main site. */
@font-face { font-family: "Albert Sans"; font-weight: 400; font-display: swap; src: url("../fonts/albert-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Albert Sans"; font-weight: 600; font-display: swap; src: url("../fonts/albert-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Albert Sans"; font-weight: 700; font-display: swap; src: url("../fonts/albert-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Bitter"; font-weight: 600; font-display: swap; src: url("../fonts/bitter-600.woff2") format("woff2"); }
@font-face { font-family: "Bitter"; font-weight: 700; font-display: swap; src: url("../fonts/bitter-700.woff2") format("woff2"); }

:root {
  --page: #FAFCF7;
  --white: #FFFFFF;
  --mist: #EEF5E8;
  --field: #DCEBCF;
  --field-hover: #CFE3BD;
  --light-hover: #F1F7EC;
  --ink: #1E3F24;
  --ink-soft: #46604A;
  --forest: #2F5E34;
  --forest-hover: #24492A;
  --gold: #E3A33B;        /* accent only; ink text on gold, never gold text */
  --gold-hover: #D6922A;
  --leaf: #7AB547;
  --deep: #1E3F24;
  --deep-text: #EEF5E8;
  --deep-muted: #C9DBC0;
  --line: #E4EEDA;
  --danger: #B3411F;
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bitter", Georgia, serif;
  --r-pill: 999px;
  --r-section: 48px;
  --r-card: 40px;
  --r-inner: 28px;
  --shadow-nav: 0 1px 2px rgba(30,63,36,.06), 0 6px 20px rgba(30,63,36,.06);
  --shadow-lift: 0 8px 20px rgba(30,63,36,.22);
  --shadow-card: 0 12px 28px rgba(30,63,36,.10);
  --shadow-press: 0 2px 6px rgba(30,63,36,.2);
  --container: 1180px;
  --pad: clamp(1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.005em; color: var(--ink); text-wrap: balance; margin: 0 0 .5rem; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h3 { font-size: 1.15rem; }
p { color: var(--ink-soft); text-wrap: pretty; }
a { color: var(--forest); }
img { max-width: 100%; display: block; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--deep); color: var(--page); }

.inner { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Header: logo + white pill nav (as on the main site) ---------- */
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 96px; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand img { height: 58px; width: auto; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; border-left: 2px solid var(--field); padding-left: .75rem; }
.site-nav { display: flex; align-items: center; gap: 4px; background: var(--white); border-radius: var(--r-pill); padding: 6px 6px 6px 14px; box-shadow: var(--shadow-nav); }
.site-nav a { display: inline-flex; align-items: center; padding: 10px 14px; border-radius: var(--r-pill); font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; transition: background .2s ease; }
.site-nav a:hover { background: var(--mist); }
.site-nav a.nav-cart { min-height: 48px; padding: 0 20px; margin-left: 6px; background: var(--forest); color: var(--white); font-weight: 700; }
.site-nav a.nav-cart:hover { background: var(--forest-hover); }

/* ---------- Hero island ---------- */
.hero { margin: 0 clamp(12px, 1.7vw, 24px) 2.5rem; background: var(--mist); border-radius: var(--r-section); padding: clamp(2rem, 5vw, 3.5rem) 0; }
.hero .tagline { font-weight: 600; color: var(--ink); font-size: 1.15rem; margin: 0 0 .5rem; }
.hero p { max-width: 46rem; margin: 0; }

main.inner { padding-top: 1.5rem; padding-bottom: 4rem; }
.lede { margin: 0 0 1.5rem; }
.notice { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: var(--r-inner); padding: 1rem 1.25rem; margin-bottom: 1.5rem; color: var(--ink); }
.error { color: var(--danger); font-weight: 600; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card img { aspect-ratio: 1; object-fit: contain; background: var(--mist); padding: 1.5rem; margin: 10px 10px 0; border-radius: calc(var(--r-card) - 10px); }
.card .body { padding: 1rem 1.5rem 1.5rem; }
.card h2 { margin: .4rem 0 .1rem; }
.meta { color: var(--ink-soft); font-size: .95rem; }
.price { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; background: var(--field); color: var(--ink); border-radius: var(--r-pill); padding: .2rem .7rem; }
.badge.print { background: #D6ECE0; }

/* ---------- Product page ---------- */
.back { display: inline-block; font-weight: 600; margin: 0 0 1.25rem; }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.product .image { background: var(--mist); border-radius: var(--r-section); padding: 2.5rem; }
.product .price { font-size: 1.5rem; margin: .25rem 0 .5rem; }
fieldset { border: 0; padding: 0; margin: 1.25rem 0 0; }
legend { font-weight: 700; margin-bottom: .5rem; }
.options { display: flex; flex-wrap: wrap; gap: .5rem; }
.options label { position: relative; }
.options input { position: absolute; opacity: 0; inset: 0; }
.options span { display: inline-flex; align-items: center; justify-content: center; min-width: 3.25rem; min-height: 48px; padding: 0 1.1rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); font-weight: 600; cursor: pointer; transition: background .2s ease; }
.options span:hover { background: var(--mist); }
.options input:checked + span, .options input:checked + span:hover { background: var(--forest); border-color: var(--forest); color: var(--white); transition: none; }
.options input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.qty { width: 5.5rem; min-height: 48px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: var(--r-pill); font: inherit; background: var(--white); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border: 0; border-radius: var(--r-pill); background: var(--forest); color: var(--white); font: inherit; font-size: 1.125rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.btn:hover:not(:disabled) { background: var(--forest-hover); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active:not(:disabled) { transform: scale(.97); box-shadow: var(--shadow-press); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--light-hover); }
.btn.link { min-height: 0; padding: .2rem 0; background: none; color: var(--danger); font-size: .95rem; font-weight: 600; }
.btn.link:hover { background: none; box-shadow: none; transform: none; text-decoration: underline; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
.size-guide { margin-top: 1.5rem; font-size: .95rem; }

/* ---------- Cart ---------- */
.cart-line { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-inner); padding: .75rem 1.25rem .75rem .75rem; margin-bottom: .75rem; }
.cart-line img { background: var(--mist); border-radius: 20px; padding: .4rem; }
.cart-line .end { display: grid; justify-items: end; gap: .35rem; }
.summary { background: var(--mist); border-radius: var(--r-card); padding: clamp(1.25rem, 3vw, 2rem); margin-top: 1.25rem; }
.summary .row { display: flex; justify-content: space-between; gap: 1rem; }
.summary .total { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--field-hover); margin-top: .6rem; padding-top: .6rem; }
.ack { display: flex; gap: .65rem; align-items: flex-start; margin: 1.25rem 0; color: var(--ink); }
.ack input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--forest); flex-shrink: 0; }

form.stack label { display: block; margin-top: .9rem; font-weight: 700; }
form.stack input { width: 100%; min-height: 48px; padding: 0 1rem; border: 1px solid var(--line); border-radius: var(--r-pill); font: inherit; background: var(--white); }

/* ---------- Footer: deep green island ---------- */
.site-footer { margin: 0 clamp(12px, 1.7vw, 24px) clamp(12px, 1.7vw, 24px); background: var(--deep); color: var(--deep-muted); border-radius: var(--r-section); padding: 2rem 0; font-size: .95rem; }
.site-footer strong { color: var(--deep-text); font-family: var(--font-display); font-size: 1.15rem; display: block; margin-bottom: .25rem; }
.site-footer a { color: var(--deep-text); }

@media (max-width: 760px) {
  .site-header .inner { min-height: 80px; }
  .brand img { height: 44px; }
  .brand span { display: none; }
  .site-nav { padding: 4px; }
  .site-nav a.nav-home { display: none; }
  .site-nav a.nav-cart { margin-left: 0; min-height: 44px; padding: 0 16px; }
  .product { grid-template-columns: 1fr; }
  .product .image { padding: 1.5rem; border-radius: var(--r-card); }
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line .end { grid-column: 2; justify-items: start; }
}

/* Shown only when the site runs on Stripe test keys. */
.test-banner { background: var(--gold); color: var(--ink); text-align: center; padding: .6rem var(--pad); font-weight: 600; font-size: .95rem; }
