main.ap-catalog-page,
main.ap-product-page {
  width: min(1760px, calc(100% - 48px));
  max-width: none;
  margin-inline: auto;
}

.ap-category-grid,
.ap-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ap-catalog-page .ap-category-grid,
.ap-catalog-page .ap-product-grid {
  padding-left: 0;
}

.ap-category-grid li,
.ap-product-card {
  min-width: 0;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.ap-category-grid a {
  display: grid;
  grid-template-rows: 220px auto auto;
  height: 100%;
  padding: 16px;
  color: #17191c;
  text-decoration: none;
}

.ap-category-grid a > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.ap-category-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ap-category-grid strong {
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.25;
}

.ap-category-grid small {
  margin-top: 5px;
  color: #616975;
  font-size: 15px;
  font-weight: 700;
}

.ap-product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ap-product-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  color: #17191c;
  text-decoration: none;
}

.ap-product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  padding: 18px;
  border-bottom: 1px solid #e4e7eb;
  background: #fff;
  overflow: hidden;
}

.ap-product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ap-product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 18px;
}

.ap-product-copy strong {
  color: #b40e18;
  font-size: 18px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.ap-product-copy > span {
  color: #343b45;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ap-product-copy b {
  margin-top: auto;
  color: #c91327;
  font-size: 22px;
}

.ap-product-copy em {
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
}

.ap-product-copy em.is-in-stock,
.ap-product-page .is-in-stock {
  color: #16823d;
}

.ap-product-copy em.is-out-of-stock,
.ap-product-page .is-out-of-stock {
  color: #bf1320;
}

.ap-product-copy small {
  color: #5b6470;
  font-size: 14px;
  font-weight: 700;
}

.ap-product-card > .button {
  width: calc(100% - 36px);
  margin: 0 18px 18px;
}

.ap-product-detail {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(340px, 0.9fr);
  gap: 36px;
  margin-top: 24px;
  padding: 28px 0;
  border-top: 1px solid #dde1e6;
  border-bottom: 1px solid #dde1e6;
}

.ap-product-detail-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  margin: 0;
  padding: 24px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.ap-product-detail-media img {
  width: 100%;
  height: 520px;
  object-fit: contain;
}

.ap-product-purchase {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ap-product-meta {
  margin: 0;
  border-top: 1px solid #dfe3e8;
}

.ap-product-meta > div,
.ap-technical > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #dfe3e8;
}

.ap-product-meta dt,
.ap-technical dt {
  color: #5a626d;
  font-weight: 700;
}

.ap-product-meta dd,
.ap-technical dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ap-product-buy {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
}

.ap-product-buy > span {
  color: #5a626d;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.ap-product-buy > strong {
  color: #c91327;
  font-size: 34px;
  line-height: 1.1;
}

.ap-description {
  margin-top: 34px;
  padding-top: 6px;
}

.ap-description h2 {
  margin-bottom: 14px;
}

.ap-description p,
.ap-applications {
  max-width: 1120px;
  color: #343b45;
  font-size: 17px;
  line-height: 1.65;
}

.ap-technical {
  max-width: 900px;
  margin: 0;
}

.ap-applications {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  margin: 0;
  padding-left: 22px;
}

.ap-applications li {
  break-inside: avoid;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .ap-category-grid,
  .ap-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  main.ap-catalog-page,
  main.ap-product-page {
    width: min(100% - 28px, 760px);
  }

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

  .ap-product-detail {
    grid-template-columns: 1fr;
  }

  .ap-product-detail-media {
    min-height: 420px;
  }

  .ap-product-detail-media img {
    height: 380px;
  }
}

@media (max-width: 560px) {
  .ap-category-grid,
  .ap-product-grid,
  .ap-applications {
    grid-template-columns: 1fr;
  }

  .ap-category-grid a {
    grid-template-rows: 190px auto auto;
  }

  .ap-product-media {
    height: 300px;
  }

  .ap-product-copy strong {
    font-size: 19px;
  }

  .ap-product-detail {
    gap: 22px;
  }

  .ap-product-detail-media {
    min-height: 340px;
    padding: 14px;
  }

  .ap-product-detail-media img {
    height: 320px;
  }

  .ap-product-meta > div,
  .ap-technical > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
