/* ============================================
   Live catalogue: product grid on /shop/<category> and the
   product pages at /shop/<category>/<product>. Both are rendered
   by Pages Functions (functions/shop/) from the Weave catalogue.
   Built only from tokens and components already in style.css.
   ============================================ */

/* ---- Category shelf ---- */
.shelf { padding: 8px 0 80px; }
.shelf-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 28px;
}
.shelf-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; line-height: 1.12;
  letter-spacing: -0.015em; margin: 0;
}
.shelf-asof { font-size: 14px; color: var(--text-dim); margin: 0; }
.shelf-asof a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 16px;
}

.pcard {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.pcard:hover, .pcard:focus-visible {
  background: var(--card-hover);
  border-color: rgba(212,163,115,0.28);
  transform: translateY(-2px);
  text-decoration: none;
}
.pcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pcard-photo {
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
}
.pcard-photo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transition: transform 0.35s ease;
}
.pcard:hover .pcard-photo img { transform: scale(1.03); }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-brand { font-size: 13px; color: var(--text-dim); margin: 0; }
.pcard-name {
  font-family: var(--serif);
  font-size: 18px; font-weight: 700; line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}
.pcard-meta { font-size: 13.5px; color: var(--text-secondary); margin: 2px 0 0; }
.pcard-price { margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 700; color: var(--gold-light); }

/* ---- Product page ---- */
.pdp { padding: calc(var(--nav-h) + 40px) 0 56px; }
.pdp-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px; align-items: start;
}
.pdp-photo {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
}
.pdp-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pdp-brand { font-size: 16px; color: var(--text-secondary); margin: 0 0 10px; }
.pdp-brand a { color: var(--gold-light); }
.pdp h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 50px); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.015em;
  margin: 0 0 12px; overflow-wrap: anywhere;
  text-wrap: balance;
}
.pdp-kind { font-size: 17px; color: var(--text-secondary); margin: 0 0 28px; }

.pdp-soldout {
  margin: 0 0 24px; padding: 14px 18px;
  border: 1px solid rgba(212,163,115,0.35);
  border-radius: var(--radius-sm);
  background: var(--gold-glow);
  color: var(--text);
}

.pdp-sizes {
  list-style: none; margin: 0 0 24px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.pdp-sizes li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 18px; background: var(--card);
  font-size: 16px;
}
.pdp-sizes li + li { border-top: 1px solid var(--border-light); }
.pdp-sizes strong { color: var(--gold-light); font-size: 17px; }

.pdp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.pdp-note { font-size: 14px; line-height: 1.65; color: var(--text-dim); margin: 0; max-width: 60ch; }
.pdp-note a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.pdp-body { padding: 0 0 88px; }
.pdp-cols {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px; align-items: start;
}
.pdp-body h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.15;
  margin: 0 0 16px;
}
.pdp-body h2:not(:first-child) { margin-top: 48px; }
.pdp-body p { color: var(--text-secondary); line-height: 1.75; max-width: 68ch; }
.pdp-body p a, .pdp-facts a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.pdp-facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0; border-top: 1px solid var(--border-light); }
.pdp-facts dt, .pdp-facts dd { padding: 13px 0; border-bottom: 1px solid var(--border-light); margin: 0; }
.pdp-facts dt { color: var(--text-dim); font-size: 14.5px; padding-right: 24px; }
.pdp-facts dd { color: var(--text); font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }

.pdp-lab .spec-strip { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }

.pdp-links { list-style: none; margin: 0; padding: 0; }
.pdp-links li + li { border-top: 1px solid var(--border-light); }
.pdp-links a {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 13px 0; min-height: 44px; color: var(--text);
}
.pdp-links a:hover { color: var(--gold-light); text-decoration: none; }
.pdp-links span { color: var(--text-dim); font-size: 14px; white-space: nowrap; }

@media (max-width: 900px) {
  .pdp-grid, .pdp-cols { grid-template-columns: 1fr; gap: 32px; }
  .pdp-photo { max-width: 520px; }
}
@media (max-width: 520px) {
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard-body { padding: 12px 12px 14px; }
  .pcard-name { font-size: 16px; }
  .pdp-actions .btn, .pdp-actions .btn-outline { width: 100%; justify-content: center; }
  .pdp-facts { grid-template-columns: 1fr; }
  .pdp-facts dt { padding-bottom: 2px; border-bottom: 0; }
  .pdp-facts dd { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard, .pcard-photo img { transition: none; }
  .pcard:hover { transform: none; }
  .pcard:hover .pcard-photo img { transform: none; }
}

/* ---- Brand pages (/shop/brands/) ----
   The brand's own name is the one bold element: set large in the
   site's display serif. The directory is a type-led list, not cards. */
.pdp-brand a { color: var(--gold-light); text-decoration: none; }
.pdp-brand a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pdp-facts dd a { color: var(--gold-light); }

.brand-hero { padding: calc(var(--nav-h) + 40px) 0 40px; }
.brand-name {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 84px); font-weight: 700;
  line-height: 1.02; letter-spacing: -0.025em;
  margin: 0 0 20px; max-width: 18ch;
  overflow-wrap: anywhere; text-wrap: balance;
}
.brand-lede { font-size: 18px; line-height: 1.7; color: var(--text-secondary); max-width: 60ch; margin: 0 0 28px; }
.brand-hero .pdp-actions { margin-bottom: 14px; }

.brand-shelf { padding: 8px 0 88px; }
.brand-group + .brand-group { margin-top: 56px; }
.brand-group h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.15;
  margin: 0 0 20px; display: flex; align-items: baseline; gap: 12px;
}
.brand-group-count { font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.brand-group-more { margin: 18px 0 0; }
.brand-group-more a, .brand-about a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.brand-about { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border-light); max-width: 72ch; }
.brand-about h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin: 0 0 14px; }
.brand-about p { color: var(--text-secondary); line-height: 1.75; margin: 0; }

.brand-dir-head, .brand-row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 72px;
  gap: 24px; align-items: baseline;
}
.brand-dir-head {
  padding: 0 0 12px; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-dim);
}
.brand-dir-head span:last-child, .brand-row-count { text-align: right; }
.brand-dir { list-style: none; margin: 0; padding: 0; }
.brand-dir li { border-bottom: 1px solid var(--border-light); }
.brand-row { padding: 18px 0; min-height: 44px; color: var(--text); transition: color 0.2s; }
.brand-row:hover, .brand-row:focus-visible { text-decoration: none; color: var(--gold-light); }
.brand-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.brand-row-name {
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700;
  line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.brand-row-cats { font-size: 15px; color: var(--text-secondary); }
.brand-row-count { font-size: 18px; font-weight: 700; color: var(--gold-light); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .brand-dir-head { display: none; }
  .brand-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .brand-row-cats { grid-column: 1; grid-row: 2; }
  .brand-row-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .brand-hero .pdp-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .brand-row { transition: none; } }
.brand-group .pcard-brand { display: none; }
