/**
 * Products Hub (/products/) — page-scoped styles.
 *
 * Loaded only on this route by functions.php (assets/css/pages/products.css).
 * Shared tokens come from assets/css/tokens.css; shared classes used here
 * (.site-container, .page-hero, .page-hero-title, .page-hero-lead, .tech-eyebrow,
 * .section-header, .section-title, .section-sub, .btn, .btn-primary,
 * .btn-secondary, .btn-light, .image-frame, .ratio-*, .media-placeholder,
 * .link-arrow) come from style.css. Every class declared in this file is prefixed
 * .prod- and is used only by page-products.php.
 *
 * The gun, component-category, equipment and model blocks are rendered from the
 * content model (inc/content-model.php), so the rules below carry the chrome all
 * of them share: process tags, technology chips, the supply flags a record
 * actually sets, quiet meta lines, the restrained empty note, and the local gray
 * placeholder a card shows while its image has not been published.
 */

/* -------------------------------------------------------------
   01 Hero and the route strip that sends buyers to a section
------------------------------------------------------------- */
.prod-hero {
  padding-bottom: 72px;
}

.prod-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.prod-hero-grid > * {
  min-width: 0;
}

.prod-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.prod-hero-media {
  margin: 0;
}

.prod-route-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.prod-route-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  color: var(--color-ink);
}

.prod-route-card:hover {
  border-color: var(--color-accent);
  color: var(--color-ink);
}

.prod-route-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-copper);
}

.prod-route-title {
  font-size: 1.0625rem;
  font-weight: 700;
}

.prod-route-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-body);
}

/* -------------------------------------------------------------
   02 Section shells (white and soft bands for rhythm)
------------------------------------------------------------- */
.prod-section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.prod-guns,
.prod-equipment {
  background-color: #ffffff;
}

.prod-consumables,
.prod-models {
  background-color: var(--color-surface-soft);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* -------------------------------------------------------------
   03 Spray gun cards and the parts-only panel
------------------------------------------------------------- */
.prod-gun-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.prod-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.prod-card .image-frame {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
}

.prod-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 32px;
}

.prod-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.prod-card-title {
  font-size: 1.375rem;
  margin-bottom: 12px;
}

.prod-card-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-body);
  margin-bottom: 20px;
}

/* Card chrome shared by every data-driven block on this page. */
.prod-card-link {
  color: inherit;
}

.prod-card-link:hover {
  color: var(--color-accent);
}

.prod-card-meta {
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* Technology chips: the processes a record is filed under. */
.prod-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px 0;
  padding: 0;
}

.prod-chip {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-ink);
  background-color: var(--color-surface-gray);
  border-radius: 4px;
  padding: 3px 9px;
}

/* Supply flags: one entry per flag the record actually sets. */
.prod-flags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px 0;
  padding: 0;
}

.prod-flag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background-color: rgba(23, 110, 166, 0.07);
  border-radius: 4px;
  padding: 3px 9px;
}

/* The local gray placeholder a card shows while its image is unpublished. */
.prod-card .media-placeholder {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
}

/* The one restrained line a block prints when nothing is published for it. */
.prod-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 0;
  padding: 24px 26px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-copper);
  border-radius: var(--radius-card);
}

.prod-empty-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-body);
}

.prod-empty .link-arrow {
  margin: 0;
}

.prod-card .link-arrow {
  margin-top: auto;
  align-self: flex-start;
}

.prod-secondary {
  margin-top: 40px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-copper);
  border-radius: var(--radius-card);
  padding: 32px;
}

.prod-secondary-head {
  margin-bottom: 24px;
}

.prod-secondary-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.prod-secondary-note {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-body);
  margin-bottom: 0;
}

.prod-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.prod-mini-card {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 20px;
}

.prod-mini-title {
  font-size: 1.0625rem;
  margin-bottom: 10px;
}

.prod-mini-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-body);
  margin-bottom: 0;
}

.prod-mini-card .prod-card-tag {
  margin-bottom: 8px;
}

.prod-mini-card .prod-flags {
  margin: 12px 0 0 0;
}

.prod-crossref {
  margin-top: 28px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-body);
}

/* -------------------------------------------------------------
   04 Key consumables: one numbered card per product_category term
------------------------------------------------------------- */
.prod-consumable-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.prod-consumable-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 26px 22px;
}

.prod-card-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 14px;
}

.prod-consumable-title {
  font-size: 1.0625rem;
  margin-bottom: 10px;
}

.prod-consumable-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-body);
  margin-bottom: 0;
}

/* A category card: full-bleed term image, then the numbered name and intro. */
.prod-cat-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.prod-cat-card .image-frame,
.prod-cat-card .media-placeholder {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
}

.prod-cat-card .image-frame {
  margin: 0;
}

.prod-cat-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 24px;
}

.prod-cat-body .prod-card-index {
  margin-bottom: 10px;
}

.prod-cat-body .prod-cat-more {
  margin-top: auto;
  padding-top: 14px;
  align-self: flex-start;
}

/* -------------------------------------------------------------
   05 Equipment: one wide row per system, image alternating sides
------------------------------------------------------------- */
.prod-equipment-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.prod-equipment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px;
}

.prod-equipment-row > * {
  min-width: 0;
}

.prod-equipment-row.is-flipped .prod-equipment-media {
  order: 2;
}

.prod-equipment-media {
  margin: 0;
}

/* Row body: title, process chips, short description, gun count, one route out. */
.prod-equipment-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prod-equipment-placeholder {
  margin: 0;
}

/* The count of guns the equipment_guns relationship holds; printed only when it has one. */
.prod-equipment-guns {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--color-copper);
  margin-bottom: 20px;
}

/* -------------------------------------------------------------
   06 Find by gun model: model is the discovery entry point
------------------------------------------------------------- */
.prod-model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.prod-model-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius-card);
  padding: 26px 24px;
}

.prod-model-code {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-ink);
  margin-bottom: 10px;
}

/* The model card holds the gun title as its own link, with the process chips below. */
.prod-model-code a {
  color: inherit;
}

.prod-model-code a:hover {
  color: var(--color-accent);
}

.prod-model-card .prod-chips {
  margin-bottom: 20px;
}

.prod-model-card .link-arrow {
  margin-top: auto;
  align-self: flex-start;
}

.prod-model-note {
  margin-top: 28px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted);
}

/* The unlisted-model route out: the part number, a drawing or a photo. */
.prod-model-note-link {
  color: var(--color-accent);
  font-weight: 600;
}

.prod-model-note-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* -------------------------------------------------------------
   07 Final CTA: part numbers that are not listed
------------------------------------------------------------- */
.prod-cta {
  background-color: var(--color-ink);
  padding-top: 88px;
  padding-bottom: 88px;
}

.prod-cta-box {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.prod-cta-title {
  color: #ffffff;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  margin-bottom: 18px;
}

.prod-cta-lead {
  color: #b5c3cb;
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 32px;
}

.prod-cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.prod-cta .btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.prod-cta .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.prod-cta-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
  padding: 28px 0 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 820px;
  text-align: left;
}

.prod-cta-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-cta-list strong {
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.prod-cta-list span {
  color: #9ab0bc;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* -------------------------------------------------------------
   08 Responsive: 2 columns on tablet, 1 column on mobile
------------------------------------------------------------- */
@media (max-width: 1024px) {
  .prod-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .prod-route-strip {
    grid-template-columns: 1fr 1fr;
    margin-top: 44px;
  }

  .prod-gun-grid,
  .prod-secondary-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .prod-consumable-grid,
  .prod-model-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .prod-equipment-row {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px;
  }

  .prod-equipment-row.is-flipped .prod-equipment-media {
    order: 0;
  }

  .prod-cta-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .prod-hero {
    padding-bottom: var(--space-section-mobile);
  }

  /* .page-hero already switches its own top/bottom padding at this width. */
  .prod-section,
  .prod-cta {
    padding-top: var(--space-section-mobile);
    padding-bottom: var(--space-section-mobile);
  }

  .prod-route-strip,
  .prod-consumable-grid,
  .prod-model-grid {
    grid-template-columns: 1fr;
  }

  .prod-card-body {
    padding: 24px 20px;
  }

  .prod-secondary {
    padding: 24px 20px;
  }

  .prod-equipment-row {
    padding: 20px;
  }

  .prod-empty {
    padding: 20px;
  }

  .prod-cta-actions {
    margin-bottom: 32px;
  }

  .prod-cta-actions .btn {
    width: 100%;
  }
}