/* ============================================================
   Product catalog — dark navy, matches single-product for a
   consistent "one product family" feel. One gold accent (active
   filter pill + primary buttons).
   ============================================================ */

.catalog { background: var(--navy-900); padding-top: calc(var(--header-h, 210px) + var(--space-5)); padding-bottom: var(--space-9); min-height: 100vh; }

.catalog-head { max-width: 640px; margin-bottom: var(--space-7); }
.catalog-eyebrow { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--space-3); }
.catalog-title { font-family: var(--font-heading); font-size: 40px; color: var(--white); line-height: 1.05; }
.catalog-sub { color: rgba(255,255,255,0.6); font-size: 15px; margin-top: var(--space-3); }

/* ---------- Category cards (browse mode) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.category-card {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dark);
  background: var(--navy-700);
  overflow: hidden;
  isolation: isolate;
}

/* Clickable face: photo + label. */
.category-card-main {
  position: absolute; inset: 0; z-index: 1;
  display: block; text-decoration: none;
}
.category-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.55;
  transform: scale(1.02);
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-slow) var(--ease-out-quart);
}
.category-card-main::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,21,34,0.15) 0%, rgba(11,21,34,0.55) 55%, rgba(11,21,34,0.92) 100%);
}
.category-card:hover .category-card-bg { opacity: 0.75; transform: scale(1.08); }

.category-card-label {
  position: absolute; left: var(--space-5); right: var(--space-5); bottom: var(--space-5);
  z-index: 2; display: flex; flex-direction: column; gap: 4px;
}
.category-card-name {
  font-family: var(--font-heading); font-size: 24px; letter-spacing: 0.02em;
  color: var(--white); line-height: 1.05; text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.category-card-count {
  font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold);
}

/* Hover / focus reveal: product list overlays the card. */
.category-card-reveal {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(11,21,34,0.97);
  border-top: 2px solid var(--gold);
  display: flex; flex-direction: column;
  padding: var(--space-4) var(--space-4) 0;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}
.category-card:hover .category-card-reveal,
.category-card:focus-within .category-card-reveal {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.category-card-reveal-head {
  font-family: var(--font-heading); font-size: 15px; letter-spacing: 0.04em;
  color: var(--gold); text-transform: uppercase;
  padding-bottom: var(--space-2); margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-dark); flex: none;
}
.category-card-list {
  list-style: none; margin: 0; padding: 0;
  overflow-y: auto; flex: 1 1 auto;
  scrollbar-width: thin;
}
.category-card-list li + li { border-top: 1px solid rgba(255,255,255,0.06); }
.category-card-list a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 6px 8px; text-decoration: none; border-radius: 6px;
  color: rgba(255,255,255,0.85); font-size: 13.5px; line-height: 1.3;
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.category-card-list a:hover { background: var(--navy-700); color: var(--gold); }

/* Product thumbnail in the hover list — lets an engineer recognise the product
   by sight instead of reading every name. Fixed square so the rows stay on a
   consistent rhythm whatever the source image aspect ratio. */
.category-card-list-thumb {
  flex: none;
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--navy-700);
  border: 1px solid rgba(255,255,255,0.10);
  transition: border-color var(--duration-fast) var(--ease-standard);
}
.category-card-list a:hover .category-card-list-thumb { border-color: var(--gold); }
/* Products with no photo yet: an empty tile, never a broken image. */
.category-card-list-thumb.is-empty {
  display: block;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.04) 0 4px,
    transparent 4px 8px
  );
}

/* The name takes the leftover width; the arrow is pushed to the far right. */
.category-card-list-name { flex: 1 1 auto; min-width: 0; }
.category-card-list-arrow { flex: none; margin-left: auto; color: rgba(255,255,255,0.35); font-size: 16px; }
.category-card-list a:hover .category-card-list-arrow { color: var(--gold); }
.category-card-viewall {
  flex: none; text-align: center; text-decoration: none;
  color: var(--gold); font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: var(--space-3) 0; margin-top: var(--space-2);
  border-top: 1px solid var(--border-dark);
}
.category-card-viewall:hover { color: var(--white); }

/* No-hover devices: show a subtle hint that the whole card is tappable. */
@media (hover: none) {
  .category-card-reveal { display: none; }
}

/* ---------- Back link (filtered mode) ---------- */
.catalog-back-row { margin-bottom: var(--space-6); }
.catalog-back {
  display: inline-block; color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 13.5px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-dark); background: var(--navy-700);
  transition: border-color var(--duration-base), color var(--duration-base);
}
.catalog-back:hover { border-color: var(--gold); color: var(--gold); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

/* Compact card: image (with hover-reveal) + title + action. */
.catalog .product-card {
  background: var(--navy-700);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-out-quart);
}
.catalog .product-card:hover { border-color: rgba(227,167,18,0.5); transform: translateY(-3px); }

.product-card-media {
  position: relative; display: block;
  aspect-ratio: 4 / 3; background: var(--navy-900); overflow: hidden;
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease-out-quart); }
.catalog .product-card:hover .product-card-media img { transform: scale(1.06); }
.product-card-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.35); font-size: 12px; }

.product-card-badge {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 3;
  padding: 4px 9px; border-radius: 6px; font-family: var(--font-heading);
  font-size: 12px; letter-spacing: 0.06em;
  background: var(--gold); color: var(--navy-900);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Hover-reveal panel over the image: properties + open CTA. */
.product-card-reveal {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-2);
  padding: var(--space-4);
  background: linear-gradient(180deg, rgba(11,21,34,0.15) 0%, rgba(11,21,34,0.82) 55%, rgba(11,21,34,0.96) 100%);
  opacity: 0; transition: opacity var(--duration-base) var(--ease-standard);
}
.product-card-media:hover .product-card-reveal,
.product-card-media:focus-visible .product-card-reveal { opacity: 1; }

.product-card-temp {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(227,167,18,0.15); border: 1px solid rgba(227,167,18,0.5);
  color: var(--gold); font-size: 12px; font-weight: 600;
}
.product-card-temp svg { flex: none; }
.product-card-props { color: rgba(255,255,255,0.9); font-size: 12.5px; line-height: 1.45; }
.product-card-industries { display: flex; flex-wrap: wrap; gap: 5px; }
.product-card-ind {
  padding: 3px 9px; border-radius: 999px; font-size: 11px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85);
}
.product-card-open {
  margin-top: 2px; color: var(--gold); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.02em;
}

.product-card-body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.catalog .product-card h3 { font-size: 17px; line-height: 1.25; }
.catalog .product-card h3 a { color: var(--white); text-decoration: none; }
.catalog .product-card h3 a:hover { color: var(--gold); }
.catalog .product-card-btn {
  margin-top: auto; width: 100%; padding-block: 10px; font-size: 13px;
  border-color: rgba(255,255,255,0.3); color: var(--white);
}
.catalog .product-card-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.catalog .product-card--3d .product-card-btn { border-color: rgba(227,167,18,0.55); color: var(--gold); }
.catalog .product-card--3d .product-card-btn:hover { background: var(--gold); color: var(--navy-900); }

/* Touch devices: reveal has no hover — keep it hidden, the card is tappable. */
@media (hover: none) {
  .product-card-reveal { display: none; }
}

.catalog-pagination { display: flex; justify-content: center; }
.catalog-pagination .nav-links { display: flex; gap: var(--space-3); }
.catalog-pagination a, .catalog-pagination span {
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-dark); color: rgba(255,255,255,0.7);
  text-decoration: none; font-size: 13.5px;
}
.catalog-pagination a:hover { border-color: var(--gold); color: var(--gold); }
.catalog-pagination .current { background: var(--gold); border-color: var(--gold); color: var(--navy-900); font-weight: 600; }

.catalog-empty { color: rgba(255,255,255,0.6); font-size: 15px; }
