/* Products page. Shares tokens, header, footer and buttons with styles.css. */
:root {
  --backdrop: #F6F1E8; /* must match BG in the image compositor so photos blend into the card */
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.top nav a[aria-current="page"] { color: var(--tomato); }

.p-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 20px 10px;
}
.p-hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
.p-hero h1 em { font-style: normal; color: var(--tomato); }
.p-hero .lead a { color: var(--tomato-dark); font-weight: 800; }

.p-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin-top: 8px;
  padding: 4px 6px 4px 18px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
}
.p-search input {
  flex: 1;
  min-width: 0;
  padding: .7em .4em;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
}
.p-search input:focus { outline: none; }
.p-search:focus-within { outline: 3px solid var(--leaf); outline-offset: 3px; }
.p-results { min-height: 1.6em; margin: 12px 0 0; font-weight: 800; color: var(--ink-soft); }

.p-chips {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: var(--cream);
  border-bottom: 2px dashed rgba(43, 36, 64, .18);
}
.p-chips ul {
  list-style: none;
  display: flex;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.p-chips a {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .3em .85em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
}
.p-chips a:hover { background: var(--mustard); }
.p-chips b {
  padding: 0 .45em;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .75rem;
}

.p-sections { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.p-section { padding-top: 44px; scroll-margin-top: 34px; }
.p-section h2 { display: flex; align-items: center; gap: .4em; flex-wrap: wrap; }
.p-count {
  font-family: var(--body);
  font-size: .9rem;
  padding: .1em .7em;
  border-radius: 999px;
  background: var(--mustard);
}
.p-note {
  display: inline-block;
  margin: 0 0 14px;
  padding: .4em .9em;
  border-radius: 12px;
  background: var(--blush);
  font-size: .92rem;
  font-weight: 600;
}

.p-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
  margin: 8px 0 0;
  padding: 0;
}
.p-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 0 rgba(43, 36, 64, .12);
  transition: transform .15s;
}
.p-card:hover { transform: translateY(-3px); }
.p-card[hidden], .p-section[hidden] { display: none; }
.p-img {
  aspect-ratio: 1;
  background: var(--backdrop);
  border-bottom: 2px solid var(--ink);
  display: grid;
  place-items: center;
}
.p-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.p-noimg { font-size: 3rem; opacity: .5; }
.p-card > p, .p-card > h3 { margin: 0; padding: 0 12px; }
.p-brand {
  padding-top: 10px !important;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tomato-dark);
}
.p-name {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 2px !important;
}
.p-variant { font-size: .9rem; color: var(--ink); line-height: 1.3; }
.p-size { font-size: .82rem; color: var(--ink-soft); margin-top: 2px !important; }
.p-card > :last-child { padding-bottom: 12px; }

.p-empty, .p-disclaimer {
  max-width: 1120px;
  margin: 40px auto 0;
  padding: 0 20px;
  color: var(--ink-soft);
}
.p-empty { font-size: 1.1rem; font-weight: 700; }
.p-empty a { color: var(--tomato-dark); }
.p-disclaimer { font-size: .9rem; }

@media (max-width: 860px) {
  .p-chips { top: 60px; }
  .p-section { scroll-margin-top: 30px; }
}
@media (max-width: 520px) {
  .p-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .p-name { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .p-card { transition: none; }
  .p-card:hover { transform: none; }
}
