.product-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background-color: #f8fafc;
  background-image:
    linear-gradient(rgba(8, 27, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 27, 44, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.product-hero__grid {
  display: grid;
  min-height: 440px;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  align-items: center;
  gap: 64px;
  padding-block: 64px 40px;
}

.product-hero__content h1,
.detail-hero h1 {
  max-width: 720px;
  margin: 16px 0 20px;
  color: var(--navy);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
}

.product-hero__description {
  max-width: 650px;
  margin: 0 0 30px;
  color: #53606d;
  font-size: 18px;
  line-height: 1.85;
}

.product-hero__visual {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #d8e1e9;
  border-radius: var(--radius);
  background: var(--white);
}

.product-hero__visual::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  content: "";
  pointer-events: none;
}

.product-hero__visual img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  object-position: 68% center;
}

.category-section {
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.category-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-tab {
  position: relative;
  min-width: 180px;
  flex: 1 0 auto;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 21px 24px 19px;
  color: #4d5964;
  text-align: left;
}

.category-tab:first-child {
  border-left: 1px solid var(--border);
}

.category-tab span,
.category-tab small {
  display: block;
}

.category-tab span {
  font-size: 14px;
  font-weight: 800;
}

.category-tab small {
  margin-top: 4px;
  color: #8b959e;
  font-size: 10px;
}

.category-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--blue);
  content: "";
  opacity: 0;
}

.category-tab:hover,
.category-tab[aria-selected="true"] {
  background: #f7faff;
  color: var(--blue);
}

.category-tab[aria-selected="true"]::after {
  opacity: 1;
}

.catalog-section {
  background: var(--background);
  padding-block: 70px 84px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.catalog-heading h2,
.wire-cable-intro h2,
.detail-section h2 {
  margin: 10px 0 0;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.25;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}

.filter-sidebar {
  position: sticky;
  top: 94px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.filter-header,
.filter-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 20px;
}

.filter-header span,
.filter-drawer__header span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-header h3,
.filter-drawer__header h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 18px;
}

.clear-filters {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  font-size: 12px;
  font-weight: 700;
}

.clear-filters:hover {
  color: var(--blue);
}

.filter-group {
  border: 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
  padding: 19px 20px;
}

.filter-group:last-child {
  border-bottom: 0;
}

.filter-group legend {
  width: 100%;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #52606d;
  font-size: 13px;
  cursor: pointer;
}

.filter-option input,
.compare-control input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--blue);
}

.product-results {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.grade-search {
  display: flex;
  width: min(100%, 390px);
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  padding: 0 14px;
  color: var(--muted);
}

.grade-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(17, 103, 216, 0.1);
}

.grade-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

#result-count {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.data-notice {
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.active-filters:empty {
  display: none;
}

.active-filter {
  border: 1px solid #cbd8e7;
  border-radius: 999px;
  background: #edf5ff;
  padding: 6px 10px;
  color: #1a5ca9;
  font-size: 11px;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  min-width: 0;
  min-height: 475px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.product-card:hover {
  border-color: #b9c9d9;
  box-shadow: 0 10px 24px rgba(8, 27, 44, 0.07);
  transform: translateY(-4px);
}

.product-card__top {
  border-bottom: 1px solid var(--border);
  padding: 22px 22px 18px;
}

.product-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-grade {
  margin: 11px 0 6px;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.1;
}

.product-subtitle {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 22px 20px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-tag {
  border: 1px solid #d9e1e8;
  border-radius: 4px;
  background: #f8fafb;
  padding: 5px 8px;
  color: #4d5964;
  font-size: 10px;
  font-weight: 800;
}

.product-tag--hardness {
  border-color: #bcd6f7;
  background: #edf5ff;
  color: var(--blue);
}

.product-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.product-fact {
  min-width: 0;
  padding: 13px 4px 13px 0;
}

.product-fact + .product-fact {
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.product-fact dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-fact dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 17px 0 20px;
  padding: 0;
  color: #4d5964;
  font-size: 12px;
  line-height: 1.45;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 15px;
}

.feature-list li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--cyan);
  content: "";
}

.product-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.product-card__actions .button {
  min-width: 0;
  padding-inline: 10px;
  font-size: 12px;
}

.compare-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed #bdc8d2;
  border-radius: var(--radius);
  background: var(--white);
  padding: 70px 30px;
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  color: var(--navy);
}

.empty-state p {
  margin: 12px 0 22px;
  color: var(--muted);
}

.filter-trigger {
  display: none;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  padding: 8px 13px;
  color: var(--navy);
  font-weight: 800;
}

.filter-trigger strong {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 10px;
}

.drawer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(8, 27, 44, 0.52);
}

.filter-drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--white);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.filter-drawer.is-open {
  transform: translateX(0);
}

.filter-drawer__header button,
.comparison-dialog__header button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-size: 24px;
}

.filter-drawer__body {
  height: calc(100% - 150px);
  overflow-y: auto;
}

.filter-drawer__footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 14px;
}

.compare-tray {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--navy);
  padding: 13px 14px 13px 18px;
  color: var(--white);
  box-shadow: 0 14px 32px rgba(8, 27, 44, 0.24);
}

.compare-tray > div {
  display: grid;
}

.compare-tray strong {
  color: var(--cyan);
  font-size: 16px;
}

.compare-tray span {
  color: #9eabb7;
  font-size: 10px;
}

.compare-tray > button:not(.button) {
  border: 0;
  background: transparent;
  color: #b9c3cc;
  font-size: 12px;
}

.comparison-dialog {
  width: min(1180px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--text);
}

.comparison-dialog::backdrop {
  background: rgba(8, 27, 44, 0.72);
}

.comparison-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.comparison-dialog__header h2 {
  margin: 6px 0 0;
  color: var(--navy);
}

.comparison-content {
  max-height: calc(100vh - 145px);
  overflow: auto;
  padding: 0 24px 24px;
}

.comparison-table,
.property-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 13px;
}

.comparison-table {
  min-width: 760px;
}

.comparison-table th,
.comparison-table td,
.property-table th,
.property-table td {
  border-bottom: 1px solid var(--border);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th,
.property-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #eef3f7;
  color: var(--navy);
  font-size: 11px;
  text-transform: uppercase;
}

.comparison-table th:first-child {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 190px;
  background: #f7f9fb;
  color: var(--navy);
  font-weight: 900;
}

.comparison-table thead th:first-child {
  z-index: 4;
  background: #e8eef3;
}

.wire-cable-section {
  background: var(--navy);
  padding-block: 80px;
  color: var(--white);
}

.wire-cable-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 72px;
}

.wire-cable-intro h2 {
  color: var(--white);
}

.wire-cable-intro > p:last-child {
  margin: 20px 0 0;
  color: #aab6c1;
  line-height: 1.85;
}

.material-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.material-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 28px;
}

.material-card > span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.material-card h3 {
  margin: 16px 0 20px;
  font-size: 20px;
}

.material-card h3 small {
  display: block;
  margin-top: 5px;
  color: #8fa0af;
  font-size: 12px;
}

.material-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #bec7cf;
  font-size: 13px;
}

/* Product detail template */
.detail-hero {
  border-bottom: 1px solid var(--border);
  background: var(--background);
  padding-block: 64px;
}

.detail-back {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.detail-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 70px;
  align-items: start;
}

.detail-hero h1 {
  margin-bottom: 12px;
}

.detail-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.spec-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.spec-summary h2 {
  margin: 0;
  border-bottom: 1px solid var(--border);
  padding: 20px 22px;
  color: var(--navy);
  font-size: 16px;
}

.spec-summary dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.spec-summary div {
  border-bottom: 1px solid var(--border);
  padding: 15px 22px;
}

.spec-summary div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.spec-summary dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.spec-summary dd {
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.detail-section {
  padding-block: 66px;
}

.detail-section:nth-child(odd) {
  background: var(--background);
}

.detail-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  color: #4f5c68;
  list-style: none;
}

.detail-list li {
  border-bottom: 1px solid var(--border);
  padding: 0 0 12px 18px;
  position: relative;
}

.detail-list li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  content: "";
}

.property-groups {
  display: grid;
  gap: 34px;
  margin-top: 28px;
}

.property-group {
  overflow-x: auto;
}

.property-group h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 17px;
}

.property-table {
  min-width: 650px;
  border: 1px solid var(--border);
}

.property-table td:last-child {
  color: var(--navy);
  font-weight: 900;
}

.property-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

.detail-not-found {
  padding-block: 100px;
  text-align: center;
}

@media (max-width: 1199px) {
  .product-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    gap: 40px;
  }

  .catalog-layout {
    display: block;
  }

  .filter-sidebar {
    display: none;
  }

  .filter-trigger {
    display: inline-flex;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .product-hero__grid,
  .wire-cable-layout,
  .detail-hero__grid {
    grid-template-columns: 1fr;
  }

  .product-hero__grid {
    gap: 30px;
    padding-block: 52px 34px;
  }

  .product-hero__visual,
  .product-hero__visual img {
    min-height: 280px;
  }

  .wire-cable-layout {
    gap: 40px;
  }

  .detail-hero__grid {
    gap: 36px;
  }
}

@media (max-width: 767px) {
  .product-hero__grid {
    min-height: 0;
    padding-block: 42px 24px;
  }

  .product-hero__content h1,
  .detail-hero h1 {
    font-size: 38px;
  }

  .product-hero__description {
    font-size: 16px;
  }

  .product-hero__visual,
  .product-hero__visual img {
    min-height: 220px;
  }

  .category-tab {
    min-width: 158px;
    padding-inline: 18px;
  }

  .catalog-section,
  .wire-cable-section {
    padding-block: 54px;
  }

  .catalog-heading h2,
  .wire-cable-intro h2,
  .detail-section h2 {
    font-size: 25px;
  }

  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .grade-search {
    width: 100%;
  }

  .results-meta {
    justify-content: space-between;
  }

  .product-grid,
  .material-types,
  .detail-two-column {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 0;
  }

  .compare-tray {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: space-between;
  }

  .compare-tray .button {
    padding-inline: 12px;
  }

  .comparison-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .comparison-dialog__header,
  .comparison-content {
    padding-inline: 16px;
  }

  .comparison-content {
    max-height: calc(100vh - 125px);
  }

  .detail-hero,
  .detail-section {
    padding-block: 48px;
  }

  .spec-summary dl {
    grid-template-columns: 1fr;
  }

  .spec-summary div:nth-last-child(2) {
    border-bottom: 1px solid var(--border);
  }
}
