/* 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, the which-one table, the tiles, the year
   picker and the links row. 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-plate); }
.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; }
/* the name's link is a 40px tap box (its padding taken back by the margin, so the card keeps its rhythm) */
.pp-card__name a { display: block; padding: 10px 0; margin: -10px 0; color: var(--site-fg); }
.pp-card__name a:hover { color: var(--site-accent-text); }
.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(--parts-stock); }

/* a section's head: the heading alone, a rule under */
.pp-shead { margin-top: 48px; padding-bottom: 8px; border-bottom: 2px solid var(--site-fg); }
.pp-shead + * { margin-top: 16px; }

/* the year picker: 16px selects and a button, 40px tall, square */
.pp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 16px; }
.pp-pick__select { min-height: 40px; max-width: 100%; padding: 0 10px; border: 2px solid var(--site-fg); border-radius: var(--site-radius); background: var(--site-bg); color: var(--site-fg); font: 400 16px/1.2 var(--site-font-body); }
.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; }

/* a picked vehicle the page has nothing for: the line, the listing and the pages that hold it, the unpick */
.pp-nofit { margin-top: 32px; padding: 20px; border: 2px solid var(--site-fg); border-radius: var(--site-radius); color: var(--site-fg); }
.pp-nofit__say { font: 700 20px/1.3 var(--site-font-body); }
.pp-nofit__go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pp-nofit__go .pp-btn { max-width: 100%; text-align: center; }

/* the which-one table */
.pp-which { width: 100%; border-collapse: collapse; font: 400 17px/1.3 var(--site-font-body); color: var(--site-fg); }
.pp-which th, .pp-which td { padding: 10px 12px; border-bottom: 1px solid var(--site-line); text-align: left; vertical-align: top; }
.pp-which th { font-weight: 700; text-transform: uppercase; }
.pp-which th a { display: inline-flex; align-items: center; min-height: 40px; margin: -10px 0; color: var(--site-fg); text-decoration: underline; }
.pp-which th a:hover { color: var(--site-accent-text); }
.pp-which__n { text-align: right; white-space: nowrap; font-weight: 700; }

/* the tiles: a product photo and the label */
.pp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pp-tile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 0 0 14px; border: 2px solid var(--site-fg); border-radius: var(--site-radius); background: var(--site-bg); color: var(--site-fg); }
.pp-tile__img { grid-column: 1 / -1; width: 100%; height: 160px; object-fit: contain; margin-bottom: 10px; border-bottom: 2px solid var(--site-fg); background: var(--site-plate); }
.pp-tile__name { padding: 0 14px; font: 700 18px/1.2 var(--site-font-heading); text-transform: uppercase; }
.pp-tile:hover, .pp-tile.is-mine { border-color: var(--site-accent); }
.pp-tile:hover .pp-tile__name { color: var(--site-accent-text); }
.pp-tile:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 2px; }

/* the links row */
.pp-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 56px; padding-top: 16px; border-top: 2px solid var(--site-line); }
.pp-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--site-fg); font: 700 16px/1.2 var(--site-font-body); text-transform: uppercase; text-decoration: underline; }
.pp-links a:hover { color: var(--site-accent-text); }

/* the phone: the H1 a little bigger than before, every other text a step smaller (MOBILE-BRIEF rule 4, Greg
   2026-10-29); the selects stay 16px, nothing under 13px */
@media (max-width: 979.98px) {
  .pp-wrap { padding: 20px 16px 48px; }
  .pp-h1 { font-size: 36px; }
  .pp-h2 { font-size: 21px; }
  .pp-h3 { font-size: 17px; }
  .pp-lead { margin-top: 8px; font-size: 15px; }
  .pp-note { font-size: 15px; }
  .pp-section { margin-top: 28px; }
  .pp-shead { margin-top: 28px; }
  .pp-shead + * { margin-top: 12px; }
  .pp-pick { margin: 10px 0 12px; }
  .pp-clear, .pp-links a { font-size: 14px; }
  .pp-links { margin-top: 40px; }
  .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: 15px; }
  .pp-card__name a { padding: 11px 0; margin: -11px 0; }
  .pp-nofit { padding: 16px; }
  .pp-nofit__say { font-size: 16px; }
  .pp-nofit__go .pp-btn { min-height: 40px; height: auto; padding: 8px 12px; line-height: 1.2; }
  .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; }
  .pp-which { font-size: 14px; }
  .pp-which th, .pp-which td { padding: 8px 6px; }
  .pp-which__n { white-space: normal; }
  .pp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pp-tile__img { height: 110px; }
  .pp-tile__name { padding: 0 10px; font-size: 14px; }
}

}
