/* Catalogue page components. Layout and component styling only — heading and
   body typography is defined once in site.css. */

/* ---- Hero --------------------------------------------------------------- */
.cat-hero { background: linear-gradient(180deg, var(--surface-alt) 0%, #fff 100%); padding-block: clamp(2rem, 1.5rem + 3vw, 4rem); border-bottom: 1px solid var(--border); }
.cat-hero h1 { margin-top: 0; }
.cat-brands { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin: var(--space-5) 0 var(--space-3); }
.cat-brands__label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.cat-brands__list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); list-style: none; }
.cat-brands__list img { display: block; width: auto; }
.logo-siemens { height: 22px; }
.logo-mitsubishi { height: 34px; }
.logo-schneider { height: 32px; }
.logo-abb { height: 26px; }
.logo-invt { height: 28px; }
.cat-note { max-width: 70ch; font-size: 0.9375rem; color: var(--text-muted); }
.cat-stats { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-7); list-style: none; padding-top: var(--space-5); border-top: 1px solid var(--border); margin-top: var(--space-5); }
.cat-stat-val { display: block; font-size: 1.75rem; font-weight: 800; line-height: 1.1; color: var(--navy-800); }
.cat-stat-label { display: block; margin-top: 4px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }

/* ---- Controls ----------------------------------------------------------- */
:root { --controls-h: 96px; }
.controls-bar { position: sticky; top: var(--header-h); z-index: 100; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); padding: var(--space-3) var(--gutter); background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--border); }
.search-wrap { flex: 1 1 260px; min-width: 220px; }
.search-wrap input { width: 100%; min-height: 44px; padding: 0.55rem 0.9rem; font: 400 1rem/1.4 var(--font-body); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.search-wrap input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(27, 100, 214, 0.25); }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.filter-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.filter-btn { min-height: 40px; padding: 0.4rem 0.9rem; font: 600 0.875rem/1.2 var(--font-body); color: var(--navy-800); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.filter-btn:hover { border-color: var(--navy-800); }
.filter-btn.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.results-count { margin-left: auto; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
.filter-selects { display: none; gap: var(--space-3); width: 100%; }
.filter-select-wrap { flex: 1; }
.filter-select-label { display: block; margin-bottom: 4px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.filter-select { width: 100%; min-height: 44px; padding: 0.5rem 0.75rem; font: 500 1rem/1.3 var(--font-body); color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }

/* ---- Layout + sidebar --------------------------------------------------- */
.catalogue-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
.cat-sidebar { position: sticky; top: calc(var(--header-h) + var(--controls-h)); max-height: calc(100vh - var(--header-h) - var(--controls-h)); overflow-y: auto; background: var(--surface-alt); border-right: 1px solid var(--border); padding: var(--space-4) 0; }
.sidebar-head { padding: 0 var(--space-4) var(--space-3); margin-bottom: var(--space-2); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.sidebar-link { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-4); font-size: 0.9375rem; font-weight: 600; color: var(--text); text-decoration: none; border-left: 4px solid transparent; transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.sidebar-link:hover { background: #fff; border-left-color: var(--border-strong); color: var(--navy-800); }
.sidebar-link.active { background: #fff; border-left-color: var(--amber-500); color: var(--navy-800); }
.sidebar-count { min-width: 26px; padding: 1px 8px; font-size: 0.75rem; font-weight: 700; text-align: center; color: var(--text-muted); background: #fff; border: 1px solid var(--border); border-radius: 999px; }

/* ---- Products ----------------------------------------------------------- */
.products-area { padding: var(--space-6) var(--gutter) var(--space-8); }
.cat-section { margin-bottom: var(--space-7); scroll-margin-top: calc(var(--header-h) + var(--controls-h) + 8px); }
.cat-section-header { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-5); background: var(--surface-alt); border: 1px solid var(--border); border-left: 4px solid var(--amber-500); border-radius: var(--radius); }
.cat-section-name { margin: 0; }
.cat-section-count { margin-left: auto; padding: 3px 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--amber-700); background: var(--surface-tint); border: 1px solid #f0d9ae; border-radius: 999px; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--space-5); }
.product-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.product-card.hidden { display: none; }

/* product media: official product image where we hold one, otherwise the brand mark */
.prod-media { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; padding: var(--space-6) var(--space-5) var(--space-5); background: #fff; border-bottom: 1px solid var(--border); }
.prod-media.is-dark { background: #0a0b29; }
.prod-media--brand { background: var(--surface-alt); }
.prod-photo { width: 100%; max-height: 220px; object-fit: contain; }
.prod-brandmark { width: auto; max-width: 160px; height: 44px; object-fit: contain; }
.prod-brandmark--own { mix-blend-mode: multiply; } /* client-owned mark is opaque white; blends into the tile */
.prod-cat-tag, .prod-brand-badge { position: absolute; top: 12px; padding: 3px 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; border-radius: 999px; }
.prod-cat-tag { left: 12px; color: var(--navy-800); background: #fff; border: 1px solid var(--border-strong); }
.prod-brand-badge { right: 12px; color: var(--navy-900); background: var(--amber-500); }

.prod-body { display: flex; flex-direction: column; flex: 1; padding: var(--space-5); }
.prod-name { margin-bottom: 4px; }
.prod-model { overflow-wrap: anywhere; margin-bottom: var(--space-3); font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); }
.prod-desc { margin-bottom: var(--space-4); font-size: 0.9375rem; color: var(--text-muted); }
.label-title { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-2) 0 var(--space-3); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-700); }
.label-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.specs-table { width: 100%; margin-bottom: var(--space-4); border-collapse: collapse; font-size: 0.875rem; }
.specs-table tr:nth-child(even) { background: var(--surface-alt); }
.specs-table td { overflow-wrap: anywhere; padding: 7px 10px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.specs-table td:first-child { width: 42%; font-weight: 700; color: var(--navy-800); }
.features-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-4); }
.features-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; line-height: 1.5; }
.feat-check { flex: 0 0 18px; height: 18px; margin-top: 2px; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 800; color: var(--amber-700); background: var(--surface-tint); border: 1px solid #f0d9ae; border-radius: 50%; }
.apps-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-5); }
.app-chip { padding: 4px 12px; font-size: 0.8125rem; font-weight: 600; color: var(--navy-700); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; }
.prod-enquire { margin-top: auto; width: 100%; }

.no-results { padding: var(--space-8) var(--space-5); text-align: center; color: var(--text-muted); }
.no-results-text { font-size: 1.125rem; font-weight: 700; color: var(--navy-800); }

/* ---- Footer CTA --------------------------------------------------------- */
.footer-cta { padding-block: var(--space-7); text-align: center; background: var(--navy-800); color: var(--text-on-dark-muted); }
.footer-cta h2 { margin: 0 0 var(--space-3); color: #fff; }
.footer-cta p { max-width: 62ch; margin-inline: auto; margin-bottom: var(--space-5); }
.cta-btns { justify-content: center; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .catalogue-layout { grid-template-columns: 1fr; }
  .cat-sidebar { display: none; }
  .controls-bar { position: static; flex-direction: column; align-items: stretch; }
  .filter-group { display: none; }
  .filter-selects { display: flex; }
  .results-count { margin-left: 0; text-align: right; }
}
@media (max-width: 560px) {
  .cat-section-header { flex-wrap: wrap; }
  .specs-table td:first-child { width: 48%; }
}
