*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #1a5c34;
  --brand-dark: #134428;
  --brand-soft: #e8f2eb;
  --text: #1c1c1c;
  --muted: #555;
  --border: #e0e0e0;
  --bg: #fff;
  --section-bg: #f6f7f6;
  --max: 1120px;
  --radius: 4px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* —— Header —— */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem 1.5rem;
  flex-wrap: nowrap;
}

.logo {
  font-size: clamp(1.1rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.15;
  flex: 0 1 auto;
  min-width: 0;
}

.logo span { color: var(--brand); }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  margin-left: 0.25rem;
}

.site-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
  margin-left: auto;
  flex: 0 1 auto;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.header-canada {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.header-canada .flag {
  font-size: 1.2rem;
  line-height: 1;
}

/* Mobile menu button — hidden on desktop (min-width), shown only under 641px */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.15s, opacity 0.15s;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop / tablet landscape: never show hamburger */
@media (min-width: 641px) {
  .nav-toggle {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .nav-toggle-bar {
    display: none !important;
  }

  .site-nav {
    display: flex !important;
  }
}

/* —— RoHS Compliant badge (green leaf) —— */
.rohs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #0f5c22;
  line-height: 1.15;
  max-width: 100%;
}

.rohs-leaf {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.rohs-badge-sm .rohs-leaf {
  width: 22px;
  height: 22px;
}

.rohs-badge-md .rohs-leaf {
  width: 32px;
  height: 32px;
}

.rohs-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.rohs-text strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #147a2e;
}

.rohs-badge-sm .rohs-text strong {
  font-size: 0.72rem;
}

.rohs-badge-md .rohs-text strong {
  font-size: 0.88rem;
}

.rohs-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: #3d6b48;
}

.rohs-badge-sm .rohs-sub {
  display: none; /* keep header compact */
}

.rohs-badge-md .rohs-sub {
  font-size: 0.75rem;
}

.footer-rohs {
  max-width: var(--max);
  margin: 0 auto 1rem;
  padding: 0 0 0.25rem;
  display: flex;
  justify-content: center;
}

/* —— Hero video (top of home) —— */
.hero-video {
  width: 100%;
  background: #0a0e16; /* dark fill while video loads — no old slideshow flash */
  overflow: hidden;
}

.hero-video-wrap {
  position: relative;
  width: 100%;
  height: min(56vw, 480px);
  min-height: 240px;
  max-height: 520px;
  background: #0a0e16;
}

.hero-video-el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a0e16;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.08) 50%, transparent 100%);
  pointer-events: none;
}

.hero-video-caption {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  color: #fff;
}

.hero-video-caption h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.hero-video-caption p {
  margin: 0;
  font-size: 1rem;
  max-width: 36rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* —— Slideshow —— */
.slideshow {
  position: relative;
  width: 100%;
  background: #111;
  overflow: hidden;
}

.slideshow-bottom {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.hero-video-bottom {
  margin-top: 0;
  border-top: 1px solid var(--border);
}

.hero-video-bottom .hero-video-wrap {
  height: min(48vw, 400px);
  min-height: 220px;
  max-height: 440px;
}

.slideshow-track {
  position: relative;
  width: 100%;
  height: min(52vw, 420px);
  min-height: 220px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.05) 55%, transparent 100%);
  pointer-events: none;
}

.slideshow-caption {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  color: #fff;
  pointer-events: auto;
}

.slideshow-caption h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.slideshow-caption p {
  margin: 0 0 1rem;
  font-size: 1rem;
  max-width: 36rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.slideshow-controls {
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slide-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.slide-btn:hover { background: #fff; }

.slide-dots {
  display: flex;
  gap: 0.35rem;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
}

.slide-dot.is-active { background: #fff; }

/* —— Content layout —— */
.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.85rem;
  color: var(--text);
}

.section-heading:first-child { margin-top: 0; }

.blurb {
  max-width: 720px;
  font-size: 1rem;
  color: var(--text);
}

.blurb p { margin: 0 0 1rem; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

/* —— Home —— */
.home-intro {
  max-width: 720px;
  margin: 0 0 1.5rem;
}

.home-intro p {
  color: var(--muted);
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.home-intro-centered {
  max-width: 720px;
  margin: 2rem auto 0.5rem;
  text-align: center;
}

.home-intro-centered .page-title {
  font-size: 1.45rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.home-intro-centered p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
  justify-content: center;
}

.home-intro-centered .home-actions {
  margin-top: 1.35rem;
  justify-content: center;
}

.home-products {
  margin-top: 0;
  margin-bottom: 2rem;
  scroll-margin-top: 4.5rem;
}

.home-products-heading {
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.page-home .content {
  padding-top: 1.75rem;
}

.home-products-lead {
  color: var(--muted);
  margin: 0 0 0.25rem;
  max-width: 640px;
}

.home-catalogs {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.home-catalogs .catalog-grid {
  margin-top: 1rem;
}

/* —— Buttons —— */
.btn-primary,
.btn-contact {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.02em;
  border: 2px solid var(--brand);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.btn-primary:hover,
.btn-contact:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-secondary {
  display: inline-block;
  background: #fff;
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid var(--brand);
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-secondary.on-dark {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-secondary.on-dark:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

.btn-secondary.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.contact-prominent {
  text-align: center;
  margin: 2.5rem 0 1rem;
}

/* —— Product cards —— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
  margin: 1.5rem 0 2rem;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border-color: #c8c8c8;
  color: var(--text);
}

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--section-bg);
}

.product-card-body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-card-body strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.product-card-body span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* —— Category page —— */
.category-hero {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px);
  gap: 2rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.category-hero-img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--section-bg);
}

.category-hero-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.resources-section {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.resource-placeholder {
  color: var(--muted);
  background: var(--section-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 0.5rem;
  max-width: 640px;
}

/* Catalog list (legacy text list still available) */
.catalog-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 640px;
}

.catalog-list li { border-bottom: 1px solid var(--border); }

.catalog-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  color: var(--text);
  text-decoration: none;
}

.catalog-list a:hover { color: var(--brand); }

.catalog-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* E-catalog cards with cover */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  gap: 1.15rem;
  margin: 0 0 2rem;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.catalog-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-color: #c8c8c8;
  color: var(--text);
}

.catalog-cover {
  background: var(--section-bg);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  max-height: 320px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
}

.catalog-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* full cover art, not cropped */
  object-position: center;
}

.catalog-cover-placeholder {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--muted);
  min-height: 180px;
}

.catalog-card-body {
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.catalog-card-body strong {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Catalog family cards — packed tightly, thumbs side-by-side inside each card */
.catalog-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  align-items: stretch;
}

.catalog-group {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.7rem 0.75rem 0.8rem;
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 140px;
}

.catalog-group-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  color: var(--text);
  line-height: 1.25;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

/* Supplier catalog cards side by side (Amtek | Morethanall) */
.page-category .catalog-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.85rem;
}

.page-category .catalog-group {
  flex: 1 1 auto;
  min-width: min(100%, 280px);
  max-width: 100%;
}

.catalog-thumb-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  align-items: flex-start;
}

/* Force horizontal thumbnails inside every catalog card */
.catalog-group .catalog-thumb-grid {
  flex-direction: row;
  flex-wrap: wrap;
}

/* Flat list outside group cards (e.g. single Amtek B2B catalog) */
.resources-section > .catalog-thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.catalog-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--section-bg);
  padding: 0.4rem 0.35rem 0.45rem;
  transition: box-shadow 0.12s, border-color 0.12s, background 0.12s;
  width: 110px;
  flex: 0 0 auto;
}

.catalog-thumb:hover {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  color: var(--text);
}

.catalog-thumb img {
  width: 96px;
  height: 124px;
  object-fit: contain;
  background: #fff;
  border-radius: 2px;
}

.catalog-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 124px;
  background: #fff;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.catalog-thumb-name {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.catalog-thumb:hover .catalog-thumb-name {
  color: var(--brand);
}

@media (max-width: 600px) {
  .catalog-group {
    width: 100%;
  }

  .catalog-group-title {
    white-space: normal;
  }

  .catalog-thumb {
    width: 96px;
  }

  .catalog-thumb img,
  .catalog-thumb-placeholder {
    width: 84px;
    height: 108px;
  }
}

/* Datasheet section lead */
.series-lead {
  color: var(--muted);
  margin: 0 0 1.15rem;
  max-width: 720px;
  font-size: 0.95rem;
}

/* On-page datasheet viewer */
.datasheet-viewer {
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.datasheet-viewer-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  min-height: 560px;
}

.datasheet-list-panel {
  border-right: 1px solid var(--border);
  background: var(--section-bg);
  display: flex;
  flex-direction: column;
  max-height: 720px;
}

.datasheet-list-label {
  display: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.75rem 0.9rem 0.35rem;
  color: var(--muted);
}

.datasheet-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  overflow-y: auto;
  flex: 1;
}

.datasheet-list li { margin: 0; }

.datasheet-list-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.datasheet-list-item:hover {
  background: rgba(26, 92, 52, 0.06);
  color: var(--brand-dark);
}

.datasheet-list-item.is-active {
  background: #fff;
  border-left-color: var(--brand);
  color: var(--brand);
}

.datasheet-select-mobile {
  display: none;
  width: calc(100% - 1.5rem);
  margin: 0.75rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.datasheet-frame-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.datasheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.datasheet-current-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.datasheet-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
}

.datasheet-frame-wrap {
  flex: 1;
  min-height: 480px;
  background: #525659;
}

.datasheet-frame {
  display: block;
  width: 100%;
  height: min(70vh, 640px);
  min-height: 480px;
  border: none;
  background: #525659;
}

.datasheet-fallback {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fafafa;
}

@media (max-width: 800px) {
  .datasheet-viewer-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .datasheet-list-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }

  .datasheet-list {
    display: none;
  }

  .datasheet-list-label {
    display: block;
  }

  .datasheet-select-mobile {
    display: block;
  }

  .datasheet-frame,
  .datasheet-frame-wrap {
    min-height: 420px;
    height: 60vh;
  }
}

/* —— Contact form block (on every page) —— */
.contact-block {
  background: var(--section-bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem 3rem;
}

.contact-block-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.contact-block-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
}

.contact-block-lead {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
}

.content-narrow-top {
  padding-bottom: 0;
}

.page-contact .contact-block {
  border-top: none;
  padding-top: 0.5rem;
}

/* —— Contact form —— */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 2.5rem;
  align-items: start;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.contact-form .field {
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-message {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.form-message.success {
  background: var(--brand-soft);
  border: 1px solid #b7d4c0;
  color: var(--brand-dark);
}

.form-message.error {
  background: #fdf0f0;
  border: 1px solid #e8b4b4;
  color: #8a2a2a;
}

.contact-aside {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.contact-aside h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.contact-aside p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.contact-aside a { font-weight: 600; }

/* —— Suppliers —— */
.suppliers-section {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 2.75rem 1.25rem 3rem;
}

.suppliers-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.suppliers-heading {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  scroll-margin-top: 4.5rem;
}

.suppliers-lead {
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 520px;
  font-size: 1rem;
}

.suppliers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  align-items: stretch;
}

.supplier-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, border-color 0.15s;
  box-sizing: border-box;
}

.supplier-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  border-color: #c8c8c8;
  color: var(--text);
}

.supplier-card img {
  width: 100%;
  max-width: 260px;
  max-height: 72px;
  height: auto;
  object-fit: contain;
}

.supplier-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  background: #fff;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.footer-col strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.footer-col p { margin: 0 0 0.5rem; }

.footer-cta a { font-weight: 600; }

.footer-copy {
  max-width: var(--max);
  margin: 1.5rem auto 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
}

/* —— Responsive: tablet —— */
@media (max-width: 800px) {
  .category-hero {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .category-hero-img img { height: 200px; }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .product-card img {
    height: 120px;
  }

  .content {
    padding: 1.5rem 1rem 2.25rem;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .home-intro-centered {
    margin-top: 1.5rem;
  }

  .home-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-actions .btn-primary,
  .home-actions .btn-secondary {
    text-align: center;
    width: 100%;
  }

  .catalog-groups,
  .page-category .catalog-groups {
    gap: 0.65rem;
  }

  .catalog-group,
  .page-category .catalog-group {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 100%;
  }

  .catalog-thumb-grid {
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .suppliers-grid {
    gap: 0.75rem;
    max-width: none;
  }

  .supplier-card {
    padding: 1.1rem 1rem;
  }
}

/* —— Responsive: phone —— */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.65rem 0.9rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
  }

  .header-right {
    margin-left: auto;
  }

  .header-canada .flag-label {
    display: none;
  }

  .nav-toggle {
    display: inline-flex !important;
    visibility: visible;
    position: static;
    pointer-events: auto;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    overflow: visible;
  }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0;
    padding: 0.35rem 0 0.5rem;
    border-top: 1px solid var(--border);
    margin: 0.35rem 0 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 0.85rem 0.15rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a.active {
    border-bottom-color: var(--brand);
  }

  .hero-video-wrap {
    height: min(58vw, 280px);
    min-height: 180px;
    max-height: 300px;
  }

  .hero-video-bottom .hero-video-wrap {
    height: min(52vw, 240px);
    min-height: 160px;
    max-height: 260px;
  }

  .hero-video-caption {
    padding: 1rem 0.9rem 1.15rem;
  }

  .hero-video-caption h1 {
    font-size: 1.2rem;
  }

  .hero-video-caption p {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-card {
    flex-direction: row;
    align-items: stretch;
  }

  .product-card img {
    width: 38%;
    min-width: 120px;
    max-width: 150px;
    height: auto;
    min-height: 100px;
    object-fit: cover;
  }

  .product-card-body {
    justify-content: center;
    padding: 0.85rem 1rem;
  }

  .product-card-body strong {
    font-size: 0.95rem;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .section-heading,
  .home-products-heading {
    font-size: 1.15rem;
  }

  .home-intro-centered p {
    font-size: 0.95rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-contact {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }

  .contact-block {
    padding: 1.75rem 0.9rem 2rem;
  }

  .contact-block-title {
    font-size: 1.25rem;
  }

  .contact-block-lead {
    font-size: 0.92rem;
    margin-bottom: 1.15rem;
  }

  /* Prevent iOS zoom on focus */
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    font-size: 16px;
    padding: 0.8rem 0.85rem;
  }

  .contact-aside {
    padding: 1.1rem 1.15rem;
  }

  .catalog-group-title {
    white-space: normal;
    font-size: 0.9rem;
  }

  .catalog-thumb {
    width: 100px;
  }

  .catalog-thumb img,
  .catalog-thumb-placeholder {
    width: 88px;
    height: 112px;
  }

  .catalog-thumb-name {
    font-size: 0.68rem;
  }

  .category-hero-img img {
    height: 160px;
  }

  .breadcrumb {
    font-size: 0.8rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .site-footer {
    padding: 1.5rem 1rem 1.25rem;
  }

  .footer-copy {
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .suppliers-section {
    padding: 1.75rem 1rem 2rem;
  }

  .suppliers-heading {
    font-size: 1.2rem;
  }

  /* Keep Amtek + Morethanall side by side even on phones */
  .suppliers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .supplier-card {
    padding: 0.9rem 0.65rem;
  }

  .supplier-card img {
    max-height: 48px;
  }

  .supplier-name {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .datasheet-viewer-layout {
    grid-template-columns: 1fr;
  }

  .datasheet-frame,
  .datasheet-frame-wrap {
    min-height: 360px;
    height: 55vh;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .logo {
    font-size: 1.05rem;
  }

  .product-card img {
    min-width: 100px;
    max-width: 120px;
  }

  .catalog-thumb {
    width: 88px;
  }

  .catalog-thumb img,
  .catalog-thumb-placeholder {
    width: 76px;
    height: 98px;
  }
}
