/*
 * Chipstock.com palette: true black + neon chartreuse “lime” (not emerald).
 * CTA / highlights align with their ~#C1FF22 / #BFFF00 range; buttons use black type.
 */
:root {
  --cs-bg: #000000;
  --cs-bg-card: #0d0d0d;
  --cs-bg-elevated: #141414;
  --cs-text: #ffffff;
  /* Muted: labels / nav — light enough for #000 (was #8a8a8a, too dark) */
  --cs-text-muted: #b8b8b8;
  /* Long paragraphs & sidebar bullets on near-black cards */
  --cs-text-reading: #eaeaea;
  --cs-accent: #c4ff22;
  --cs-accent-soft: rgba(196, 255, 34, 0.16);
  --cs-accent-border: rgba(196, 255, 34, 0.5);
  --cs-btn-text: #0a0a0a;
  --cs-border: rgba(255, 255, 255, 0.09);
  /* Links on true black: brighter than old lime for contrast */
  --cs-link: #eeff99;
  /* Light stage behind product photos (supplier PDP; unchanged) */
  --cs-img-stage: #eef2f7;
  --cs-radius: 0px;
  --cs-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  /* Full-width like chipstock.com — edge gutters only, no narrow centered max column */
  --cs-page-gutter: clamp(0.85rem, 2.4vw, 2.5rem);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--cs-font);
  background: var(--cs-bg);
  color: var(--cs-text);
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cs-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Chipstock-style masthead (chipstock.com) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #000000;
  border-bottom: 1px solid var(--cs-border);
  padding-top: env(safe-area-inset-top, 0px);
}

.header_wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0.95rem max(var(--cs-page-gutter), env(safe-area-inset-right, 0px))
    0.95rem max(var(--cs-page-gutter), env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.header_logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.header_logo a {
  display: inline-block;
  line-height: 0;
}

/* Match chipstock.com main.css: logo by width (16.1458vw), not tiny max-height */
.header_logo img {
  display: block;
  width: clamp(10rem, 16.1458vw, 19rem);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.btn_open,
.btn_close {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
}

.btn_open {
  display: none;
}

.btn_close {
  display: none; /* only in mobile drawer; otherwise shows before nav */
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

.header_menu {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.header_nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem clamp(0.5rem, 1.9791vw, 1.85rem);
  counter-reset: hdr-menu;
}

.header_nav li {
  counter-increment: hdr-menu;
}

.header_nav a {
  color: #ffffff;
  font-size: clamp(0.875rem, 1.0445vw, 1.125rem);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header_nav a:hover {
  color: var(--cs-accent);
  text-decoration: none;
}

.header_nav a::before {
  content: counter(hdr-menu, decimal-leading-zero) " / ";
  color: #7d7d80;
  font-weight: 500;
  font-size: 0.95em;
}

.header_mob_link {
  display: none;
  margin-top: auto;
  padding-top: 1.5rem;
  width: 100%;
}

.header_link {
  flex-shrink: 0;
}

.header_backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

body.cs-header-menu-open .header_backdrop {
  display: block;
}

@media (min-width: 1024px) {
  .header_backdrop {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .btn_open {
    display: block;
  }

  .btn_close {
    display: block;
  }

  .header_menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(22rem, 92vw);
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: max(1rem, env(safe-area-inset-top, 0px)) max(1.1rem, env(safe-area-inset-right, 0px))
      max(1.5rem, env(safe-area-inset-bottom, 0px)) max(1.1rem, env(safe-area-inset-left, 0px));
    background: #0a0a0a;
    border-left: 1px solid var(--cs-border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .site-header.is-menu-open .header_menu {
    transform: translateX(0);
  }

  .header_nav ul {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .header_nav a {
    font-size: 1.08rem;
    padding: 0.35rem 0;
    white-space: normal;
  }

  .header_link {
    display: none;
  }

  .header_mob_link {
    display: block;
  }

  .header_logo img {
    width: auto;
    max-width: min(52vw, 220px);
    max-height: 52px;
  }
}

/* Desktop: align with chipstock.com main.css (header ~5.99vw, nav 1.0445vw, wider logo) */
@media (min-width: 1024px) {
  .header_wrap {
    padding: clamp(0.6rem, 0.85vw, 1rem) max(clamp(0.75rem, 1.25vw, 1.75rem), env(safe-area-inset-right, 0px))
      clamp(0.6rem, 0.85vw, 1rem)
      max(clamp(0.75rem, 1.25vw, 1.75rem), env(safe-area-inset-left, 0px));
    gap: 0.75rem clamp(0.65rem, 1.4vw, 1.5rem);
    min-height: clamp(4.25rem, 5.9895vw, 6.75rem);
    align-items: center;
  }

  .header_logo {
    gap: 0.55rem;
  }

  .header_logo img {
    width: clamp(11rem, 16.1458vw, 19rem);
    height: auto;
    max-height: none;
    max-width: min(19rem, 36vw);
  }

  .header_menu {
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header_nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem clamp(0.55rem, 1.9791vw, 1.85rem);
    max-width: 100%;
  }

  .header_nav li {
    flex-shrink: 0;
  }

  .header_nav a {
    font-size: clamp(0.9rem, 1.0445vw, 1.125rem);
    font-weight: 500;
  }

  .header_nav a::before {
    color: #7d7d80;
    font-size: 0.95em;
  }

  .header_link .button_basic {
    padding: clamp(0.55rem, 0.9635vw, 0.9rem) clamp(0.7rem, 1.0416vw, 1.15rem);
    min-height: clamp(2.55rem, 3.1vw, 3rem);
    font-size: clamp(0.875rem, 1.0445vw, 1.0625rem);
  }
}

@media (min-width: 1440px) {
  .header_logo img {
    width: clamp(12rem, 16.1458vw, 20rem);
    max-width: min(20rem, 38vw);
  }

  .header_nav a {
    font-size: clamp(0.9375rem, 1.0445vw, 1.1875rem);
  }

  .header_nav ul {
    gap: 0.25rem clamp(0.65rem, 1.9791vw, 2rem);
  }

  .header_link .button_basic {
    padding: clamp(0.6rem, 0.9635vw, 1rem) clamp(0.85rem, 1.0416vw, 1.25rem);
    min-height: clamp(2.65rem, 3.15vw, 3.15rem);
  }
}

.cs-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2rem) max(var(--cs-page-gutter), env(safe-area-inset-right, 0px))
    clamp(2rem, 5vw, 4rem) max(var(--cs-page-gutter), env(safe-area-inset-left, 0px));
}

.cs-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  background: var(--cs-bg-card);
  margin-bottom: 2rem;
}

.cs-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
}

.cs-hero p {
  margin: 0;
  color: var(--cs-text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cs-panel {
  background: var(--cs-bg-card);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cs-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cs-accent);
}

.cs-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.cs-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--cs-text-muted);
  margin-bottom: 0.35rem;
}

.cs-select,
.cs-input,
.cs-btn {
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: var(--cs-radius);
  border: 1px solid var(--cs-border);
  background: var(--cs-bg-elevated);
  color: var(--cs-text);
  padding: 0.55rem 1rem;
  min-width: 200px;
}

.cs-input {
  min-width: 0;
  width: 100%;
}

.cs-input::placeholder {
  color: var(--cs-text-muted);
  opacity: 0.85;
}

.cs-input:focus {
  outline: 2px solid var(--cs-accent-border);
  outline-offset: 1px;
}

/* WebKit adds a clear (×) on type="search" that can look like a stray mark in dark panels */
.cs-input[type="search"]::-webkit-search-decoration,
.cs-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Primary CTAs: lime default; gray expands from center on hover (Chipstock-style) */
.cs-btn:not(.cs-btn-ghost) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--cs-accent);
  border-color: var(--cs-accent);
  color: var(--cs-btn-text);
  cursor: pointer;
  font-weight: 700;
  min-width: auto;
}

.cs-btn:not(.cs-btn-ghost)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: max(240%, 17rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d4d4d4;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 1.05s cubic-bezier(0.33, 0, 0.2, 1);
  pointer-events: none;
}

.cs-btn:not(.cs-btn-ghost):hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.cs-btn:not(.cs-btn-ghost):hover {
  border-color: #d4d4d4;
  color: #0a0a0a;
}

.cs-btn-label {
  position: relative;
  z-index: 1;
}

.cs-btn:focus-visible {
  outline: 2px solid var(--cs-accent-border);
  outline-offset: 2px;
}

.cs-btn:disabled,
.cs-btn:disabled:hover {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.cs-btn:not(.cs-btn-ghost):disabled,
.cs-btn:not(.cs-btn-ghost):disabled:hover {
  background: var(--cs-accent);
  border-color: var(--cs-accent);
  color: var(--cs-btn-text);
}

.cs-btn:not(.cs-btn-ghost):disabled::before,
.cs-btn:not(.cs-btn-ghost):disabled:hover::before {
  transform: translate(-50%, -50%) scale(0);
}

.cs-btn-ghost {
  background: transparent;
  color: var(--cs-text);
  border-color: var(--cs-border);
}
.cs-btn-ghost:hover {
  border-color: var(--cs-accent);
  color: var(--cs-accent);
  filter: none;
}

.cs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cs-products-header {
  margin-bottom: 1rem;
}

.cs-products-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cs-products-header h2 {
  margin: 0;
}

/* Home: left sidebar + four category preview rows (same card/grid language as listing) */
.cs-home-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.cs-home-sidebar {
  flex: 0 0 min(300px, 100%);
  position: sticky;
  top: 1rem;
  align-self: flex-start;
}

.cs-home-sidebar .cs-filter-bar-title {
  margin-top: 0;
}

.cs-home-sidebar-hint {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}

.cs-home-sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.cs-home-sidebar .cs-select,
.cs-home-sidebar .cs-input {
  width: 100%;
  min-width: 0;
}

.cs-home-sidebar-btn {
  width: 100%;
}

.cs-home-sidebar-divider {
  margin: 0.35rem 0;
  border: 0;
  border-top: 1px solid var(--cs-border);
}

.cs-home-sidebar-filter-heading {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.95rem;
}

.cs-home-sidebar-filter-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cs-home-sidebar-filter-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cs-home-sidebar-filter-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.cs-home-main {
  flex: 1;
  min-width: 0;
}

.cs-home-intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 600;
  color: var(--cs-text);
}

.cs-home-intro p {
  margin: 0;
  max-width: none;
  color: var(--cs-text-muted);
}

/* Main-column part search (home + listing) — same logic as sidebar q= */
.cs-catalog-part-search {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--cs-border);
}

.cs-home-intro .cs-catalog-part-search {
  margin-top: 1.35rem;
}

.cs-part-search-bar {
  margin-bottom: 1rem;
}

.cs-part-search-bar .cs-catalog-part-search {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.cs-catalog-part-search-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cs-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.cs-catalog-part-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
}

.cs-home-intro .cs-catalog-part-search-row {
  background: #1f1f1f;
  border: 1px solid var(--cs-accent);
  padding: 0.55rem;
}

.cs-home-intro .cs-catalog-part-search-row .cs-input,
.cs-home-intro .cs-catalog-part-search-row .cs-catalog-part-search-cat {
  background: #f0f0f0;
  color: #111111;
  border-color: var(--cs-accent);
}

.cs-home-intro .cs-catalog-part-search-row .cs-input::placeholder {
  color: #5a5a5a;
  opacity: 1;
}

.cs-catalog-part-search-row .cs-input {
  flex: 1 1 12rem;
  min-width: min(100%, 12rem);
}

.cs-catalog-part-search-row .cs-catalog-part-search-cat {
  flex: 0 1 11rem;
  min-width: min(100%, 10rem);
}

.cs-catalog-part-search-submit {
  flex: 0 0 auto;
}

.cs-catalog-part-search-hint {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.cs-home-category-block {
  margin-top: 1.75rem;
}

.cs-home-intro + .cs-home-category-block {
  margin-top: 1.25rem;
}

.cs-home-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.cs-home-row-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cs-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cs-see-all {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cs-accent);
  text-decoration: none;
  white-space: nowrap;
}

.cs-see-all:hover {
  text-decoration: underline;
  color: var(--cs-accent);
}

.cs-home-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.cs-home-count {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .cs-home-layout {
    flex-direction: column;
  }

  .cs-home-sidebar {
    position: static;
    width: 100%;
    flex: none;
  }
}

/* Listing: filters + sort above the product grid */
.cs-filter-bar {
  margin-top: 0;
  margin-bottom: 0;
}

.cs-filter-bar-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cs-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cs-filter-bar-hint {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  max-width: 56rem;
}

.cs-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.cs-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.cs-filter-input {
  min-width: 0;
  width: 100%;
}

.cs-meta {
  color: var(--cs-text-muted);
  font-size: 0.9rem;
}

/* Product detail: breadcrumb + key facts as bordered chips (easier to see than plain text) */
.cs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.cs-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cs-text);
  text-decoration: none;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  background: var(--cs-bg-elevated);
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

/* Match .cs-btn-ghost hover: lime border + lime text */
.cs-breadcrumb__link:hover {
  border-color: var(--cs-accent);
  color: var(--cs-accent);
  background: transparent;
  text-decoration: none;
}

.cs-breadcrumb__link:focus-visible {
  outline: 2px solid var(--cs-accent-border);
  outline-offset: 2px;
}

.cs-breadcrumb__sep {
  color: var(--cs-text-muted);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  user-select: none;
}

.cs-detail-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0 0 0.15rem;
}

.cs-detail-fact {
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--cs-text);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  background: var(--cs-bg-elevated);
  max-width: 100%;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

.cs-detail-fact strong {
  display: inline;
  color: var(--cs-accent);
  font-weight: 600;
  margin-right: 0.35rem;
  transition: color 0.15s ease;
}

.cs-detail-fact:hover {
  border-color: var(--cs-accent);
  color: var(--cs-accent);
  background: transparent;
}

.cs-detail-fact:hover strong {
  color: var(--cs-accent);
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 1.5vw, 1.5rem);
}

.cs-card {
  position: relative;
  isolation: isolate;
  background: var(--cs-bg-elevated);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.4s ease,
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Diagonal lime sweep: starts below, moves up across the card (premium hover) */
.cs-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -25%;
  right: -25%;
  top: -20%;
  bottom: -20%;
  background: linear-gradient(
    118deg,
    transparent 0%,
    transparent 36%,
    rgba(196, 255, 34, 0.07) 44%,
    rgba(196, 255, 34, 0.26) 50%,
    rgba(196, 255, 34, 0.14) 56%,
    transparent 64%,
    transparent 100%
  );
  transform: translate3d(0, 108%, 0) rotate(-10deg) scale(1.15);
  opacity: 0.95;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cs-card:hover::before,
.cs-card:focus-visible::before {
  transform: translate3d(0, -8%, 0) rotate(-10deg) scale(1.15);
}

.cs-card:hover,
.cs-card:focus-visible {
  border-color: rgba(196, 255, 34, 0.42);
  box-shadow:
    0 0 0 1px rgba(196, 255, 34, 0.28),
    0 20px 56px rgba(196, 255, 34, 0.2),
    0 10px 36px rgba(0, 0, 0, 0.55);
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .cs-card {
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
  }

  .cs-card::before {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .cs-card:hover,
  .cs-card:focus-visible {
    transform: none;
  }

  .cs-card:hover .cs-card-img img,
  .cs-card:focus-visible .cs-card-img img {
    transform: none;
  }

  .cs-card-img img {
    transition: none;
  }
}

a.cs-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.cs-card-more {
  font-size: 0.8rem;
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--cs-accent);
  font-weight: 600;
}

a.cs-card-link:hover .cs-card-more,
a.cs-card-link:focus-visible .cs-card-more {
  text-decoration: underline;
}

.cs-card-img {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 3;
  background: var(--cs-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cs-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.cs-card:hover .cs-card-img img,
.cs-card:focus-visible .cs-card-img img {
  transform: scale(1.03);
}

.cs-card-body {
  position: relative;
  z-index: 2;
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cs-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
  color: var(--cs-text);
}

.cs-card-brand {
  font-size: 0.8rem;
  color: var(--cs-text-muted);
}

.cs-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cs-border);
}

.cs-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--cs-radius);
  border: 1px solid var(--cs-border);
  background: var(--cs-bg-elevated);
  color: var(--cs-text);
  font-size: 0.9rem;
}
.cs-page-link:hover {
  border-color: var(--cs-accent);
  color: var(--cs-accent);
  text-decoration: none;
}
.cs-page-link.active {
  background: var(--cs-accent-soft);
  border-color: var(--cs-accent);
  color: var(--cs-accent);
  font-weight: 600;
}

.cs-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cs-text-muted);
}

/* Chipstock-style site footer (chipstock.com colophon) */
.site-footer {
  background: #000000;
  color: #ffffff;
  border-top: 1px solid var(--cs-border);
  margin-top: auto;
}

.footer_wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 3.15rem max(var(--cs-page-gutter), env(safe-area-inset-right, 0px))
    max(2.65rem, env(safe-area-inset-bottom, 0px)) max(var(--cs-page-gutter), env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr);
  gap: 2.65rem 3rem;
  align-items: start;
}

.footer_logo a {
  display: inline-block;
  line-height: 0;
}

.footer_logo img {
  display: block;
  max-width: min(380px, 100%);
  width: auto;
  height: auto;
  max-height: clamp(54px, 5.8vw, 92px);
}

.footer_copyright {
  margin-top: 2.15rem;
}

.footer_copyright p,
.footer_mob_copyright p {
  margin: 0;
  font-size: clamp(0.85rem, 0.3vw + 0.76rem, 0.98rem);
  color: #9a9a9a;
  letter-spacing: 0.02em;
}

.footer_right {
  min-width: 0;
}

.footer_nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem clamp(0.85rem, 1.85vw, 2rem);
  counter-reset: footer-menu;
}

.footer_nav li {
  counter-increment: footer-menu;
}

.footer_nav a {
  color: #ffffff;
  font-size: clamp(1rem, 0.48vw + 0.86rem, 1.22rem);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.footer_nav a:hover {
  color: var(--cs-accent);
  text-decoration: none;
}

.footer_nav a::before {
  content: counter(footer-menu, decimal-leading-zero) " / ";
  color: #a3a3a3;
  font-weight: 500;
  font-size: 0.94em;
}

.footer_wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer_contacts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: clamp(1.02rem, 0.38vw + 0.9rem, 1.14rem);
}

.footer_tel a,
.footer_email a {
  color: #ffffff;
  text-decoration: none;
}

.footer_tel a:hover,
.footer_email a:hover {
  color: var(--cs-accent);
  text-decoration: none;
}

.footer_address {
  margin: 0.5rem 0 0;
  font-size: clamp(0.92rem, 0.32vw + 0.82rem, 1.05rem);
  color: #9a9a9a;
  max-width: 22rem;
  line-height: 1.45;
}

.footer_link .button_basic,
.header_link .button_basic,
.header_mob_link .button_basic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  min-height: 3rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--cs-accent);
  color: var(--cs-btn-text);
  font-size: clamp(1rem, 0.35vw + 0.94rem, 1.08rem);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0;
  border: none;
  white-space: nowrap;
}

/* Gray disk expands from center on hover */
.footer_link .button_basic::before,
.header_link .button_basic::before,
.header_mob_link .button_basic::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: max(240%, 17rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d4d4d4;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 1.05s cubic-bezier(0.33, 0, 0.2, 1);
  pointer-events: none;
}

.footer_link .button_basic:hover::before,
.header_link .button_basic:hover::before,
.header_mob_link .button_basic:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.footer_link .button_basic_label,
.header_link .button_basic_label,
.header_mob_link .button_basic_label {
  position: relative;
  z-index: 1;
}

.footer_link .button_basic:hover,
.header_link .button_basic:hover,
.header_mob_link .button_basic:hover {
  color: #0a0a0a;
  text-decoration: none;
}

.footer_link .button_basic:focus-visible,
.header_link .button_basic:focus-visible,
.header_mob_link .button_basic:focus-visible {
  outline: 2px solid var(--cs-accent-border);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .footer_link .button_basic::before,
  .header_link .button_basic::before,
  .header_mob_link .button_basic::before,
  .cs-btn:not(.cs-btn-ghost)::before {
    transition: none;
  }
}

.footer_mob_copyright {
  display: none;
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .footer_wrap {
    padding: 3.65rem max(clamp(1rem, 2.6vw, 2.85rem), env(safe-area-inset-right, 0px))
      max(3.15rem, env(safe-area-inset-bottom, 0px)) max(clamp(1rem, 2.6vw, 2.85rem), env(safe-area-inset-left, 0px));
    gap: 3rem 3.5rem;
  }

  .footer_logo img {
    max-width: min(440px, 100%);
    max-height: clamp(68px, 6.8vw, 118px);
  }

  .footer_copyright {
    margin-top: 2.35rem;
  }

  .footer_copyright p,
  .footer_mob_copyright p {
    font-size: clamp(0.92rem, 0.32vw + 0.8rem, 1.05rem);
  }

  .footer_nav ul {
    gap: 0.5rem clamp(1rem, 2.1vw, 2.35rem);
  }

  .footer_nav a {
    font-size: clamp(1.08rem, 0.52vw + 0.88rem, 1.42rem);
  }

  .footer_nav a::before {
    color: #b0b0b0;
    font-size: clamp(0.95rem, 0.38vw + 0.82rem, 1.1rem);
  }

  .footer_wrapper {
    margin-top: 2.5rem;
    padding-top: 2.25rem;
    gap: 1.75rem 2.5rem;
  }

  .footer_contacts {
    font-size: clamp(1.08rem, 0.42vw + 0.94rem, 1.26rem);
    gap: 0.45rem;
  }

  .footer_address {
    font-size: clamp(1rem, 0.34vw + 0.88rem, 1.12rem);
    max-width: 26rem;
  }

  .footer_link .button_basic {
    padding: 1.05rem 2.65rem;
    min-height: 3.45rem;
    font-size: clamp(1.05rem, 0.42vw + 0.95rem, 1.24rem);
  }
}

@media (min-width: 1440px) {
  .footer_logo img {
    max-width: min(480px, 100%);
    max-height: clamp(76px, 7vw, 128px);
  }

  .footer_nav a {
    font-size: clamp(1.12rem, 0.48vw + 0.95rem, 1.5rem);
  }

  .footer_nav ul {
    gap: 0.55rem clamp(1.1rem, 2.3vw, 2.55rem);
  }

  .footer_contacts {
    font-size: clamp(1.1rem, 0.4vw + 0.98rem, 1.32rem);
  }
}

@media (max-width: 900px) {
  .footer_wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2.25rem;
  }

  .footer_copyright_desktop {
    display: none;
  }

  .footer_mob_copyright {
    display: block;
  }

  .footer_wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer_link {
    width: 100%;
  }

  .footer_link .button_basic,
  .header_mob_link .button_basic {
    width: 100%;
  }
}

/*
 * Product detail: gallery | buy | sidebar on row 1; prose spans cols 1–2 only;
 * sidebar spans rows 1–2 — removes the “black void” under short buy text beside a tall gallery.
 */
.cs-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.08fr) minmax(240px, 1fr) minmax(270px, 300px);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.cs-detail-gallery {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 100%;
}

.cs-detail-buy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.cs-detail-layout > .cs-side-stack {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
}

.cs-detail-layout > .cs-prose-wrap {
  grid-column: 1 / 3;
  grid-row: 2;
  margin-top: 0;
  min-width: 0;
}

@media (max-width: 1100px) {
  .cs-detail-layout {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
    grid-template-rows: auto auto auto;
  }

  .cs-detail-gallery {
    grid-column: 1;
    grid-row: 1;
  }

  .cs-detail-buy {
    grid-column: 2;
    grid-row: 1;
  }

  .cs-detail-layout > .cs-side-stack {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cs-detail-layout > .cs-side-stack .cs-side-card {
    flex: 1 1 240px;
    min-width: min(100%, 240px);
  }

  .cs-detail-layout > .cs-prose-wrap {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

@media (max-width: 720px) {
  .cs-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .cs-detail-layout > .cs-side-stack {
    flex-direction: column;
  }

  .cs-detail-layout > .cs-side-stack .cs-side-card {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Buy column: primary CTA to Chipstock contact */
.cs-buy-panel {
  margin-top: 1.35rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--cs-border);
  background: var(--cs-bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cs-buy-panel a.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.65rem;
  text-decoration: none;
  box-sizing: border-box;
}

.cs-buy-panel a.cs-btn:hover {
  text-decoration: none;
}

/* Fixed “back to top” (supplier-style) */
.cs-back-top {
  position: fixed;
  z-index: 60;
  left: max(1.25rem, env(safe-area-inset-left, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--cs-radius);
  background: var(--cs-accent);
  color: var(--cs-btn-text);
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cs-back-top:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.cs-back-top:focus-visible {
  outline: 2px solid var(--cs-accent);
  outline-offset: 3px;
}

/* Fixed-height stage so small source bitmaps scale up inside the box (supplier-style) */
.cs-detail-main-img {
  background: var(--cs-img-stage);
  border-radius: var(--cs-radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  width: 100%;
  max-width: 100%;
  height: clamp(300px, min(56vw, 60vh), 580px);
  display: block;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.cs-detail-main-img img {
  position: absolute;
  left: clamp(10px, 2.5vw, 22px);
  top: clamp(10px, 2.5vw, 22px);
  width: calc(100% - 2 * clamp(10px, 2.5vw, 22px));
  height: calc(100% - 2 * clamp(10px, 2.5vw, 22px));
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}

.cs-detail-no-img {
  color: var(--cs-text-muted);
  font-size: 0.95rem;
}

/* One row: thumbs share the full width of the gallery (same as main image) — no scrollbar */
.cs-detail-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: clamp(4px, 1.2vw, 10px);
  margin-top: 0.85rem;
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
  padding: 2px 0 4px;
  box-sizing: border-box;
}

.cs-thumb-btn {
  margin: 0;
  padding: clamp(3px, 0.8vw, 6px);
  border: 2px solid rgba(15, 23, 42, 0.18);
  border-radius: var(--cs-radius);
  background: #fff;
  cursor: pointer;
  line-height: 0;
  flex: 1 1 0;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cs-thumb-btn:hover {
  border-color: var(--cs-accent);
}

.cs-thumb-btn.is-active {
  border-color: var(--cs-accent);
  box-shadow: 0 0 0 2px var(--cs-accent-soft);
}

.cs-thumb-btn:focus-visible {
  outline: 2px solid var(--cs-accent);
  outline-offset: 2px;
}

.cs-thumb-btn img {
  display: block;
  width: 100%;
  height: clamp(48px, 12vw, 88px);
  object-fit: contain;
  pointer-events: none;
}

/* Very narrow phones: allow horizontal scroll so taps stay usable */
@media (max-width: 360px) {
  .cs-detail-thumbs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .cs-thumb-btn {
    flex: 0 0 22%;
    min-width: 56px;
  }
}

.cs-detail-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 4.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.cs-detail-sub {
  margin: 0 0 1rem;
  color: #d0d0d0;
  font-size: 0.95rem;
  word-break: break-word;
}

.cs-detail-line {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

/* Overview — tighter typography, supplier-style section treatment */
.cs-prose-wrap {
  margin-top: 0;
}

.cs-prose {
  background: linear-gradient(180deg, var(--cs-bg-elevated) 0%, var(--cs-bg-card) 100%);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  border-left: 5px solid var(--cs-accent);
  padding: 1.5rem 1.6rem 1.75rem;
  color: var(--cs-text-reading);
  font-size: 1rem;
  line-height: 1.75;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.4);
}

.cs-prose h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cs-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--cs-border);
}

.cs-prose .cs-prose-body {
  word-break: break-word;
  max-width: 75ch;
  font-size: 0.98rem;
}

.cs-prose .cs-prose-body:not(.cs-prose-structured) {
  white-space: pre-wrap;
}

.cs-prose .cs-prose-body:empty::before {
  content: "No overview text was provided for this item.";
  color: var(--cs-text-muted);
  font-style: italic;
}

/* Structured description (sections + key / value like supplier overview) */
.cs-prose-structured .cs-desc-plain {
  margin: 0 0 1.15rem;
  color: var(--cs-text-reading);
  font-size: 0.98rem;
  line-height: 1.65;
}

.cs-prose-structured .cs-desc-plain:last-child {
  margin-bottom: 0;
}

/* All spec block titles (SPECIFICATIONS, Performance, …) — same lime; title + “:” match */
.cs-prose-structured .cs-desc-section {
  margin: 1.35rem 0 0.65rem;
  padding: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cs-accent);
  border-bottom: 1px solid rgba(196, 255, 34, 0.25);
}

.cs-prose-structured .cs-desc-section:first-child {
  margin-top: 0;
}

.cs-prose-structured .cs-desc-section::after {
  content: ":";
  color: inherit;
}

/* Only extra top spacing for mid-page groups; color/weight same as SPECIFICATIONS */
.cs-prose-structured .cs-desc-section.cs-desc-cat {
  margin-top: 1.5rem;
}

.cs-prose-structured .cs-desc-kv {
  display: grid;
  grid-template-columns: minmax(9rem, 38%) 1fr;
  gap: 0.35rem 1rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  line-height: 1.45;
}

.cs-prose-structured .cs-desc-kv:last-of-type {
  border-bottom: none;
}

/* Softer than section titles so Manufacturer / Part Number do not compete with SPECIFICATIONS */
.cs-prose-structured .cs-desc-k {
  font-weight: 500;
  color: #bdbdbd;
}

.cs-prose-structured .cs-desc-v {
  color: var(--cs-text-reading);
}

@media (max-width: 520px) {
  .cs-prose-structured .cs-desc-kv {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }

  .cs-prose-structured .cs-desc-k {
    margin-bottom: 0.1rem;
  }
}

/* Sidebar: delivery, returns, warranty (same copy for every product) */
.cs-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cs-side-card {
  background: var(--cs-bg-card);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  padding: 1rem 1.1rem;
}

.cs-side-card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cs-accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cs-side-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--cs-text-reading);
  line-height: 1.55;
}

.cs-side-card li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.5rem;
}

.cs-side-card li:last-child {
  margin-bottom: 0;
}

.cs-side-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cs-accent);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Sub-lines under bullets: neutral light grey (lime link was muddy on #0d0d0d) */
.cs-side-card .cs-side-muted {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: #d6d6d6;
  line-height: 1.45;
}

/* Related products */
.cs-related-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cs-border);
}

.cs-related-section h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cs-accent);
}

.cs-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

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

.cs-related-card:hover {
  border-color: var(--cs-accent-border);
  box-shadow: 0 0 0 1px var(--cs-accent-soft);
}

.cs-related-card .cs-related-img {
  background: var(--cs-img-stage);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.cs-related-card .cs-related-img img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.cs-related-card .cs-related-body {
  padding: 0.75rem 0.85rem 0.9rem;
  flex: 1;
}

.cs-related-card .cs-related-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  color: var(--cs-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-related-card .cs-related-meta {
  font-size: 0.75rem;
  color: var(--cs-text-muted);
  margin: 0;
}

/* ——— Responsive polish: phones, notches, touch ——— */
.btn_open,
.btn_close,
.cs-btn,
.cs-btn-ghost,
.cs-page-link,
.cs-thumb-btn,
.cs-back-top,
button {
  touch-action: manipulation;
}

@media (max-width: 480px) {
  .header_logo {
    min-width: 0;
  }

  .header_logo img {
    max-height: 48px;
    width: auto;
    max-width: min(200px, 52vw);
  }

  .cs-panel {
    padding: 1.1rem 1rem;
  }

  .cs-prose {
    padding: 1.15rem 1rem 1.35rem;
  }

  .cs-related-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  }
}

@media (max-width: 900px) {
  .footer_wrap {
    padding-top: max(2.25rem, env(safe-area-inset-top, 0px));
  }
}
