.perco-category-page,
.perco-product-page {
  max-width: 1520px;
  margin-inline: auto;
}

.product-breadcrumbs {
  margin: 0 0 28px;
}

.perco-category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.perco-category-head h1,
.perco-product-buybox h1 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 42px;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: 0;
}

.perco-category-head p {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

.perco-category-head p strong { color: var(--ink); }

.perco-category-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.perco-category-index-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 82px;
  padding: 16px;
  align-items: center;
  color: var(--ink);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease;
}

.perco-category-index-card:hover,
.perco-category-index-card:focus-visible {
  border-color: var(--accent);
  background: var(--surface-soft);
}

.perco-category-index-card > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.perco-category-index-card strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
}

.perco-category-index-card small {
  color: var(--muted);
  font-size: 12px;
}

.perco-category-index-card > b {
  color: var(--accent);
  font-size: 17px;
  font-weight: 500;
}

.perco-category-icon {
  width: 28px;
  height: 28px;
}

.perco-product-toolbar {
  display: grid;
  grid-template-columns: auto minmax(280px, 560px) 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.perco-product-toolbar > label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.perco-product-toolbar > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.perco-product-toolbar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
}

.perco-product-toolbar > span {
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
}

.perco-product-toolbar-all {
  grid-template-columns: auto minmax(280px, 1fr) minmax(230px, 330px) auto;
}

.perco-category-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.perco-category-select select {
  width: 100%;
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-weight: 450;
}

.perco-product-search-icon { width: 22px; height: 22px; }

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

.perco-product-card {
  display: grid;
  grid-template-rows: 212px minmax(0, 1fr) auto auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}

.perco-product-card:hover {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  transform: translateY(-2px);
}

.perco-product-card[hidden] { display: none; }

.perco-product-card-media {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.perco-product-card-media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
}

.perco-product-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  align-content: start;
}

.perco-product-card-meta {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.perco-product-card-meta span + span::before {
  margin-right: 8px;
  content: "·";
}

.perco-product-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.25;
  letter-spacing: 0;
}

.perco-product-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.perco-product-card h3 a:hover,
.perco-product-card h3 a:focus-visible { color: var(--accent); }

.perco-product-card-body > p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.perco-product-card-specs {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.perco-product-card-specs li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.perco-product-card-specs strong {
  max-width: 150px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.perco-product-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.perco-product-price {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.perco-product-price strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
}

.perco-product-price small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perco-product-add {
  display: inline-flex;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  color: #fff;
  background: #08775f;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.perco-product-add:hover,
.perco-product-add:focus-visible { background: #06634f; }

.perco-product-add.is-added { color: #08775f; background: transparent; }

.perco-product-cart-icon { width: 20px; height: 20px; color: currentColor; }

.perco-product-card-status,
.perco-product-status {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.perco-product-card-status:not(:empty) { padding: 0 16px 12px; }

.perco-product-empty {
  padding: 32px;
  color: var(--muted);
  border: 1px solid var(--line);
  text-align: center;
}

.perco-product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr);
  gap: 42px;
  align-items: start;
}

.perco-product-gallery {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.perco-product-main-image {
  display: grid;
  min-height: 520px;
  padding: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.perco-product-main-image img {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}

.perco-product-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  order: -1;
}

.perco-product-thumb {
  flex: 0 0 68px;
  width: 82px;
  height: 68px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.perco-product-thumb.is-active { border-color: #08775f; box-shadow: inset 0 0 0 1px #08775f; }

.perco-product-thumb img { width: 100%; height: 100%; object-fit: contain; }

.perco-product-buybox {
  position: sticky;
  top: 138px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.perco-product-identity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.perco-product-identity span + span::before { margin-right: 8px; content: "·"; }

.perco-product-code,
.perco-product-summary { margin: 0; }

.perco-product-code { color: var(--muted); font-size: 13px; }
.perco-product-code strong { color: var(--text); font-weight: 550; }

.perco-product-summary {
  max-width: 68ch;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.perco-product-key-specs {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.perco-product-key-specs > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.perco-product-key-specs dt { color: var(--muted); font-size: 12px; }
.perco-product-key-specs dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 550; text-align: right; }

.perco-product-commercial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 0;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.perco-product-commercial > div { display: grid; gap: 4px; }
.perco-product-commercial strong { color: var(--ink); font-size: 30px; font-weight: 650; }
.perco-product-commercial small { max-width: 44ch; color: var(--muted); font-size: 11px; line-height: 1.35; }
.perco-product-commercial > span { max-width: 180px; color: var(--text); font-size: 11px; line-height: 1.35; text-align: right; }

.perco-product-order {
  display: grid;
  grid-template-columns: 132px minmax(180px, 1fr);
  gap: 10px;
}

.perco-quantity {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.perco-quantity button,
.perco-quantity input {
  min-width: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: center;
}

.perco-quantity button { cursor: pointer; font-size: 18px; }
.perco-quantity input { width: 100%; appearance: textfield; font-size: 14px; font-weight: 600; }
.perco-quantity input::-webkit-inner-spin-button { appearance: none; }

.perco-product-primary-action,
.perco-product-spec-action { width: 100%; }

.perco-product-information {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.perco-product-tabs {
  position: sticky;
  top: 100px;
  z-index: 4;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.perco-product-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}

.perco-product-tabs button span { margin-left: 5px; color: var(--muted); font-size: 11px; }

.perco-product-tabs button.is-active { color: var(--ink); }
.perco-product-tabs button.is-active::after {
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.perco-product-panel {
  padding: 32px 0 8px;
}

.perco-product-panel[hidden] { display: none; }

.perco-product-description {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 32px;
}

.perco-product-description h2,
.perco-product-kit-intro h2 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 620; }
.perco-product-description p,
.perco-product-kit-intro p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.6; }

.perco-product-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.perco-product-facts > div {
  min-height: 116px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.perco-product-facts dt { margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.perco-product-facts dd { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.45; }
.perco-product-facts a { color: var(--accent); }

.perco-spec-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.perco-spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .8fr);
  gap: 18px;
  min-height: 58px;
  padding: 12px 14px;
  align-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.perco-spec-row dt { color: var(--muted); font-size: 12px; line-height: 1.35; }
.perco-spec-row dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 550; line-height: 1.35; }

.perco-document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }

.perco-document-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  align-items: center;
  color: var(--ink);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.perco-document-row:hover,
.perco-document-row:focus-visible { background: var(--surface-soft); }
.perco-document-row > span { display: grid; gap: 4px; }
.perco-document-row strong { font-size: 13px; font-weight: 550; line-height: 1.35; }
.perco-document-row small { color: var(--muted); font-size: 10px; }
.perco-document-row > b { color: var(--accent); font-weight: 500; }
.perco-document-icon { width: 28px; height: 28px; }

.perco-product-kit-intro { display: grid; grid-template-columns: 320px minmax(0, 700px); gap: 32px; margin-bottom: 24px; }
.perco-kit-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); list-style: none; }
.perco-kit-list li { display: grid; gap: 8px; min-height: 112px; padding: 16px; align-content: start; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.perco-kit-list strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.perco-kit-list span { color: var(--text); font-size: 12px; line-height: 1.45; }

html[data-view-mode="kinetic"] .perco-product-card-media,
html[data-view-mode="kinetic"] .perco-product-main-image,
html[data-view-mode="kinetic"] .perco-product-thumb { background: #f6f7f4; }

html[data-view-mode="kinetic"] .perco-product-add { color: #0d0f0a; background: var(--accent); }
html[data-view-mode="kinetic"] .perco-product-add:hover,
html[data-view-mode="kinetic"] .perco-product-add:focus-visible { background: var(--accent-strong); }
html[data-view-mode="kinetic"] .perco-product-add.is-added { color: var(--accent); background: transparent; }
html[data-view-mode="kinetic"] .perco-product-facts a { color: var(--accent); }

.perco-catalog-terminal {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 34px;
  padding-block: 24px;
}

.perco-catalog-terminal h2 { font-size: clamp(26px, 2.3vw, 34px); }

.perco-catalog-terminal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1180px) {
  .perco-category-index-grid,
  .perco-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perco-product-hero { grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr); gap: 28px; }
  .perco-product-main-image { min-height: 430px; }
  .perco-product-facts,
  .perco-kit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .perco-category-head { grid-template-columns: 1fr; gap: 12px; }
  .perco-product-toolbar { grid-template-columns: 1fr auto; }
  .perco-product-toolbar-all { grid-template-columns: 1fr; }
  .perco-product-toolbar > label { grid-column: 1 / -1; }
  .perco-product-toolbar-all > label { grid-column: auto; }
  .perco-product-toolbar > div { min-width: 0; }
  .perco-product-hero { grid-template-columns: 1fr; }
  .perco-product-buybox { position: static; }
  .perco-product-description,
  .perco-product-kit-intro { grid-template-columns: 1fr; gap: 12px; }
  .perco-spec-table,
  .perco-document-list { grid-template-columns: 1fr; }
  .perco-catalog-terminal { grid-template-columns: 1fr; }
  .perco-catalog-terminal-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .perco-category-page,
  .perco-product-page { padding-inline: 16px; }
  .product-breadcrumbs { margin-bottom: 20px; overflow-x: auto; white-space: nowrap; }
  .perco-category-head h1,
  .perco-product-buybox h1 { font-size: 32px; }
  .perco-category-index-grid,
  .perco-product-grid { grid-template-columns: 1fr; }
  .perco-product-toolbar { grid-template-columns: 1fr; }
  .perco-category-select { grid-template-columns: 1fr; }
  .perco-product-toolbar > span { justify-self: start; }
  .perco-product-card { grid-template-rows: 200px minmax(0, 1fr) auto auto; }
  .perco-product-card-specs strong { max-width: 132px; }
  .perco-product-gallery { grid-template-columns: 1fr; gap: 8px; }
  .perco-product-main-image { min-height: 330px; margin-inline: -16px; padding: 18px; border-right: 0; border-left: 0; border-radius: 0; }
  .perco-product-thumbs { flex-direction: row; max-height: none; order: initial; overflow-x: auto; }
  .perco-product-commercial { grid-template-columns: 1fr; align-items: start; }
  .perco-product-commercial > span { max-width: none; text-align: left; }
  .perco-product-order { grid-template-columns: 118px minmax(0, 1fr); }
  .perco-product-tabs { top: 74px; margin-inline: -16px; padding-inline: 4px; }
  .perco-product-tabs button { min-height: 50px; padding-inline: 14px; }
  .perco-product-panel { padding-top: 24px; }
  .perco-product-facts,
  .perco-kit-list { grid-template-columns: 1fr; }
  .perco-spec-row { grid-template-columns: minmax(0, 1fr) minmax(110px, .8fr); gap: 12px; }
  .perco-catalog-terminal-actions,
  .perco-catalog-terminal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .perco-product-card { transition: none; }
}
