/* ============================================================
   Product Center — isolated stylesheet.

   Deliberately self-contained and prefixed `pc-`. It reads the site's
   existing design tokens from tokens.css but defines no new global
   selectors, so it cannot collide with components.css or alter any
   existing page. Nothing here overrides `.category-card`, which is
   reused across all six category pages and must stay untouched.

   These pages carry NO hero and no heading block (2026-08-12): a buyer who
   lands here wants the product list. Everything above the list is the sticky
   `.pc-toolbar` — breadcrumb (its last node is the h1) plus product search.
   Header and footer styling is still owned by components.css.
   ============================================================ */

.pc-page {
  /* Anchor offsets have to clear the sticky toolbar as well as the site
     header, or a click in the left rail lands under the toolbar. */
  --pc-toolbar-height: 61px;
  padding: 24px 0 72px;
}

/* ---- breadcrumb ---- */
.pc-crumb {
  font-size: var(--font-small-size);
  color: var(--color-text-muted, #5B6472);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pc-crumb a { color: var(--color-text-link); text-decoration: none; }
.pc-crumb a:hover { text-decoration: underline; }
.pc-crumb span[aria-hidden] { color: var(--color-border, #E2E6ED); }

/* ---- sticky toolbar: breadcrumb + product search ----
   These pages carry no hero and no page heading block. The toolbar is all that
   sits above the product list, and it stays pinned under the site header: the
   two things a buyer still needs while scrolling a 400-item list are "where am
   I" and "look up another model". Nothing else may be added here. */
.pc-toolbar {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  margin-bottom: 18px;
  /* Opaque on purpose: product photography scrolling underneath ghosts
     through even a 4% translucent bar, which reads as a rendering fault. */
  background: var(--color-white);
  box-shadow: 0 6px 12px -10px rgba(15, 23, 42, .5);
  border-bottom: 1px solid var(--color-brand-line, rgba(23, 99, 203, .14));
}

.pc-toolbar .pc-crumb { margin: 0; }

/* The breadcrumb's last node is the page h1: full heading semantics, no extra
   vertical space. */
.pc-crumb__current {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

/* ---- search field ---- */
.pc-search { position: relative; flex: 0 1 360px; min-width: 220px; }
.pc-search__field { position: relative; display: flex; align-items: center; }

.pc-search__icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted, #8992A3);
  pointer-events: none;
}

.pc-search__input {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px 0 35px;
  border: 1px solid var(--color-border, #E2E6ED);
  border-radius: var(--radius-xs, 8px);
  background: var(--color-white);
  font-size: 14px;
  color: var(--color-text-primary);
}

.pc-search__input::placeholder { color: var(--color-text-muted, #8992A3); }

.pc-search__input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(23, 99, 203, .14);
}

/* ---- result panel ---- */
.pc-search__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border, #E2E6ED);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  z-index: 95;
}

.pc-search__meta {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted, #8992A3);
  border-bottom: 1px solid var(--color-border, #E2E6ED);
}

/* Category / subcategory jumps sit above the product rows: a buyer who typed a
   product word usually wants the section, not a wall of individual cards. */
.pc-search__section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 230, 237, .7);
}

.pc-search__section:hover { background: var(--color-brand-faint); }

.pc-search__section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-brand-dark, #0F4C9E);
}

.pc-search__section-parent {
  font-weight: 500;
  color: var(--color-text-muted, #8992A3);
}

.pc-search__section-count {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted, #8992A3);
  font-variant-numeric: tabular-nums;
}

.pc-search__item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 230, 237, .7);
}

.pc-search__item:last-child { border-bottom: 0; }
.pc-search__item:hover { background: var(--color-brand-faint); }

.pc-search__thumb {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--color-bg-soft, #F4F6FA);
  object-fit: contain;
}

.pc-search__text { min-width: 0; }

.pc-search__name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-search__sub {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-text-muted, #8992A3);
}

.pc-search__hit { background: rgba(23, 99, 203, .16); border-radius: 3px; }

.pc-search__more {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--color-border, #E2E6ED);
  background: transparent;
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.pc-search__more:hover { background: var(--color-brand-faint); }

/* No match is a routing point, not a dead end: hand the model to the shared
   inquiry modal rather than leaving the buyer with nothing. */
.pc-search__empty { padding: 16px 14px; }

.pc-search__empty-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.pc-search__empty-text {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.pc-search__empty-cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pc-search__empty-cta:hover { background: var(--color-brand-dark); }

/* Mobile: only the breadcrumb stays pinned. A pinned search field would cost
   ~96px of a 812px screen that already carries a fixed bottom CTA bar. */
@media (max-width: 767px) {
  .pc-toolbar {
    position: static;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 0 4px;
  }
  .pc-toolbar .pc-search {
    flex: 1 1 100%;
    order: 2;
  }
  .pc-toolbar .pc-crumb {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    flex: 1 1 100%;
    padding: 7px 0;
    background: var(--color-white);
    box-shadow: 0 6px 12px -10px rgba(15, 23, 42, .5);
    border-bottom: 1px solid var(--color-brand-line, rgba(23, 99, 203, .14));
  }
  .pc-search__panel { max-height: 320px; }
}

/* The boundary statement now closes the list instead of opening the page. */
.pc-boundary--foot { margin: 30px 0 0; }

.pc-boundary {
  margin: 0 0 26px;
  padding: 10px 14px;
  border-radius: var(--radius-xs, 8px);
  background: var(--color-brand-soft, rgba(23, 99, 203, 0.08));
  font-size: var(--font-small-size);
  line-height: 1.5;
  color: var(--color-text-muted, #5B6472);
}

/* ---- two-column layout ---- */
.pc-layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

/* ---- left category rail ---- */
.pc-nav {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  border: 1px solid var(--color-border, #E2E6ED);
  border-radius: var(--radius-sm, 12px);
  background: #fff;
  max-height: calc(100vh - var(--header-height) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.pc-nav__subs { list-style: none; margin: 0; padding: 8px 0; }
.pc-nav__group + .pc-nav__group {
  border-top: 1px solid var(--color-border, #E2E6ED);
}
.pc-nav__category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px 10px;
  font-size: 14px;
  font-weight: var(--font-weight-section);
  color: var(--color-text-muted, #5B6472);
  cursor: pointer;
  list-style: none;
  letter-spacing: 0.01em;
}
.pc-nav__category-title::-webkit-details-marker { display: none; }
.pc-nav__category-title::after {
  content: "+";
  color: var(--color-text-muted, #5B6472);
  font-size: 16px;
  font-weight: var(--font-weight-body);
  line-height: 1;
}
.pc-nav__category[open] .pc-nav__category-title::after { content: "−"; }
.pc-nav__group.is-current-category .pc-nav__category-title {
  color: var(--color-brand-dark);
}
.pc-nav__category-subs { list-style: none; margin: 0; padding: 0 0 8px; }
.pc-nav__l2 {
  display: block;
  padding: 6px 15px 6px 27px;
  font-size: 13px;
  color: var(--color-text-body, #14213A);
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.pc-nav__l2:hover {
  background: var(--color-brand-soft, rgba(23, 99, 203, 0.08));
  color: var(--color-brand-dark);
}
.pc-nav__l2.is-active {
  border-left-color: var(--color-brand);
  color: var(--color-brand-dark);
  font-weight: var(--font-weight-card);
}
.pc-nav__l2:focus-visible {
  outline: 0;
  background: var(--color-brand-soft, rgba(23, 99, 203, 0.08));
  border-left-color: var(--color-brand);
  color: var(--color-brand-dark);
  font-weight: var(--font-weight-card);
}

/* ---- product sections, divided by rules like a printed catalog ---- */
.pc-section { scroll-margin-top: calc(var(--header-height) + var(--pc-toolbar-height) + 16px); }
.pc-section + .pc-section {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--color-border, #E2E6ED);
}
.pc-section__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.pc-section__title {
  font-size: var(--font-card-title-size);
  font-weight: var(--font-weight-section);
  margin: 0;
}
.pc-section__count {
  font-size: var(--font-footnote-size);
  font-weight: var(--font-weight-card);
  color: var(--color-text-muted, #5B6472);
  background: var(--color-bg-subtle, #F1F4F8);
  border-radius: var(--radius-pill, 999px);
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}

/* ---- L3 groups inside an L2 section ---- */
.pc-l3-list { display: grid; gap: 24px; }
.pc-l3-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.pc-l3 { min-width: 0; scroll-margin-top: calc(var(--header-height) + var(--pc-toolbar-height) + 16px); }
.pc-l3__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.pc-l3__title {
  margin: 0;
  font-size: var(--font-small-size);
  font-weight: var(--font-weight-section);
  line-height: 1.4;
  color: var(--color-text-body, #14213A);
}

/* ---- card grid ---- */
.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px;
}
.pc-card {
  border: 1px solid var(--color-border, #E2E6ED);
  border-radius: var(--radius-xs, 8px);
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pc-card:hover { border-color: var(--color-brand-line, rgba(23, 99, 203, 0.3)); transform: translateY(-1px); }
.pc-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.pc-card__link:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 1px; }

.pc-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
}
.pc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pc-card__body { display: block; padding: 9px 10px 11px; }
.pc-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--font-footnote-size);
  font-weight: var(--font-weight-card);
  line-height: 1.35;
  margin-bottom: 4px;
}
.pc-card__meta,
.pc-card__models {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-text-muted, #8992A3);
}
.pc-card__models {
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  word-break: break-word;
}
.pc-card__cta {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: var(--font-weight-card);
  color: var(--color-brand);
}

/* ---- hub page ---- */
.pc-hub { display: grid; gap: 26px; }
.pc-hub__cat { padding-bottom: 22px; border-bottom: 1px solid var(--color-border, #E2E6ED); }
.pc-hub__cat:last-child { border-bottom: none; padding-bottom: 0; }
.pc-hub__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: var(--font-card-title-size);
  font-weight: var(--font-weight-section);
  margin: 0 0 6px;
}
.pc-hub__title a { color: var(--color-text-body, #14213A); text-decoration: none; }
.pc-hub__title a:hover { color: var(--color-brand-dark); text-decoration: underline; }
.pc-hub__count {
  font-size: var(--font-small-size);
  font-weight: var(--font-weight-body);
  color: var(--color-text-muted, #8992A3);
  font-variant-numeric: tabular-nums;
}
.pc-hub__intro {
  margin: 0 0 8px;
  font-size: var(--font-body-size);
  line-height: 1.55;
  color: var(--color-text-muted, #5B6472);
  max-width: 68ch;
}
.pc-hub__subs { margin: 0; font-size: var(--font-small-size); line-height: 1.9; color: var(--color-border, #C6CDD8); }
.pc-hub__subs a { color: var(--color-text-link); text-decoration: none; }
.pc-hub__subs a:hover { text-decoration: underline; }

/* ---- responsive ----
   Card System §3.4 and §8.9: grids must collapse with no horizontal overflow.
   minmax(0, 1fr) on the content column is what prevents the grid from being
   pushed wider than its track by long product names. */
@media (max-width: 900px) {
  .pc-layout { grid-template-columns: 1fr; gap: 18px; }
  .pc-nav {
    top: var(--header-height);
    z-index: 20;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }
  .pc-nav__subs { display: flex; padding: 6px; width: max-content; }
  .pc-nav__group { flex: 0 0 auto; }
  .pc-nav__group + .pc-nav__group {
    margin-left: 6px;
    padding-left: 6px;
    border-top: 0;
    border-left: 1px solid var(--color-border, #E2E6ED);
  }
  .pc-nav__category-title { padding: 8px 10px; white-space: nowrap; font-size: 13px; }
  .pc-nav__category-subs { display: flex; padding: 0 6px 6px; }
  .pc-nav__item { flex: 0 0 auto; }
  .pc-nav__l2 { padding: 7px 10px; white-space: nowrap; }
  .pc-nav__l2.is-active { border-left-color: transparent; box-shadow: inset 0 -2px var(--color-brand); }
  .pc-nav__l2:focus-visible { border-left-color: transparent; box-shadow: inset 0 -2px var(--color-brand); }
  .pc-section,
  .pc-l3 {
    scroll-margin-top: calc(var(--header-height) + 79px + 33px);
  }
}
@media (min-width: 768px) {
  .pc-l3-row--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-l3-row--pair .pc-grid { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
}
@media (max-width: 480px) {
  .pc-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-card { transition: none; }
  .pc-card:hover { transform: none; }
}
