/* proto-pages.css: the shared frame of the landing pages (templates/search/_macros.html) on cl-site.css's --site-*
   tokens: the wrap, the headings, the card grid and card, the stock line and the unpick link (stillen.ca: bakflip.ca's
   file trimmed of the which-one table, the tiles, the year picker and the links row, which its one page does not use).
   Square boxes (--site-radius), full-contrast text, the accent on the card's one Add.
   The same file on every brand site; a page's own rules go in proto-pages-<kind>.css, never here. */
@layer base, kit, site;

@layer site {

.pp-wrap { max-width: var(--site-max); margin: 0 auto; padding: 32px 24px 80px; }
.pp-h1 { font: 700 44px/1.05 var(--site-font-heading); letter-spacing: 0.5px; text-transform: uppercase; color: var(--site-fg); }
.pp-h2 { font: 700 28px/1.1 var(--site-font-heading); letter-spacing: 0.5px; text-transform: uppercase; color: var(--site-fg); }
.pp-h3 { font: 700 20px/1.2 var(--site-font-heading); text-transform: uppercase; color: var(--site-fg); }
.pp-lead { max-width: 760px; margin-top: 12px; font: 400 19px/1.4 var(--site-font-body); color: var(--site-fg); }
.pp-note { margin-top: 12px; font: 400 17px/1.4 var(--site-font-body); color: var(--site-fg); }
.pp-note a { text-decoration: underline; }
.pp-section { margin-top: 48px; }

/* buttons: the site's button colours, the accent for a card's Add, ghost for a second action; 40px tall */
.pp-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px;
  border: 0; border-radius: var(--site-radius); background: var(--site-button-bg); color: var(--site-button-fg);
  font: 700 16px/1 var(--site-font-button); letter-spacing: 0.5px; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.pp-btn:hover { background: var(--site-button-hover-bg); color: var(--site-button-hover-fg); }
.pp-btn--accent { background: var(--site-accent); color: var(--site-accent-fg); }
.pp-btn--accent:hover { background: var(--site-fg); color: var(--site-bg); }
.pp-btn--ghost { background: transparent; color: var(--site-fg); box-shadow: inset 0 0 0 2px var(--site-fg); }
.pp-btn--ghost:hover { background: var(--site-fg); color: var(--site-bg); }
.pp-btn:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 2px; }
.pp-more { margin-top: 16px; }

/* the card grid and the card */
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.pp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pp-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; background: var(--site-card); border: 1px solid var(--site-line); border-radius: var(--site-radius); color: var(--site-fg); }
.pp-card__img { display: block; background: var(--site-photo); }
.pp-card__img img { display: block; width: 100%; height: 180px; object-fit: contain; }
.pp-card__name { margin-top: 6px; font: 700 18px/1.2 var(--site-font-body); text-transform: uppercase; }
.pp-card__name a { color: var(--site-fg); }
.pp-card__name a:hover { color: var(--site-accent); }
.pp-card__detail { font: 700 16px/1.3 var(--site-font-body); }
.pp-card__fits { font: 400 16px/1.3 var(--site-font-body); }
.pp-card__fit { font: 700 16px/1.3 var(--site-font-body); }
.pp-card__part { font: 400 14px/1.2 var(--site-font-body); }
.pp-card__price { margin-top: 4px; font: 700 22px/1 var(--site-font-body); }
.pp-card__buy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.pp-card__buy > * { flex: 1 1 100%; }
.pp-card__buy .pp-btn { width: 100%; }
.pp-add { margin: 0; }

/* the stock line: a green square before "Ready to ship" */
.pp-stock { font: 700 15px/1.25 var(--site-font-body); color: var(--site-fg); }
.pp-stock--ok::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--site-ok); }

/* a section's head: the heading alone, a rule under (no count, the phone clean-up) */
.pp-shead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 48px; padding-bottom: 8px; border-bottom: 2px solid var(--site-fg); }
.pp-shead + * { margin-top: 16px; }

/* the unpick: a link 40px tall */
.pp-clear { display: inline-flex; align-items: center; min-height: 40px; margin-top: 12px; font: 700 16px/1 var(--site-font-body); color: var(--site-fg); text-decoration: underline; }

@media (max-width: 979.98px) {
  .pp-wrap { padding: 24px 16px 64px; }
  .pp-h1 { font-size: 36px; }
  .pp-h2 { font-size: 20px; }
  .pp-lead { font-size: 15px; }
  .pp-note { font-size: 15px; }
  .pp-section, .pp-shead { margin-top: 28px; }
  .pp-grid, .pp-grid--2, .pp-grid--3, .pp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pp-card { padding: 10px; }
  .pp-card__img img { height: 120px; }
  .pp-card__name { font-size: 14px; }
  .pp-card__price { font-size: 18px; }
  .pp-card__fits, .pp-card__detail, .pp-card__fit { font-size: 14px; }
  .pp-card__part, .pp-stock { font-size: 13px; }
  .pp-btn { padding: 0 10px; font-size: 14px; }
}

}
