/* Compact list layout for product cards on category pages. */
.product-grid[data-catalog-grid] {
  grid-template-columns: 1fr;
  gap: 12px;
}

.product-grid[data-catalog-grid] > .product-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 144px;
}

.product-grid[data-catalog-grid] > .product-card--external {
  max-width: 1160px;
  width: 100%;
  margin-inline: auto;
}

.product-grid[data-catalog-grid] > .product-card > a:first-child {
  display: grid;
  flex: 0 0 156px;
  place-items: center;
  padding: 12px;
  background: #fff;
}

.product-grid[data-catalog-grid] > .product-card--external > a:first-child {
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  background: #f8fbff;
  box-shadow: 0 3px 12px rgba(23, 50, 79, .09);
}

.product-grid[data-catalog-grid] .product-card-image {
  width: 100%;
  height: 120px;
  padding: 0;
}

.product-grid[data-catalog-grid] .product-card--external .product-card-image {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  object-fit: cover;
}

.product-grid[data-catalog-grid] .product-card-body {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 0 22px;
  padding: 18px 22px;
}

.product-grid[data-catalog-grid] .product-card h3 {
  grid-column: 1;
  margin: 0 0 8px;
}

.product-grid[data-catalog-grid] .product-card p {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
}

.product-grid[data-catalog-grid] .product-card-icons {
  display: flex;
  grid-column: 1;
  grid-row: 3;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-grid[data-catalog-grid] .product-card-printers-group {
  display: flex;
  flex: 1 1 280px;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid #cbd6e2;
}

.product-grid[data-catalog-grid] .product-card-printers-label {
  flex: 0 0 auto;
  padding-top: 8px;
  color: #53687f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.product-grid[data-catalog-grid] .product-card-printers-list {
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.product-grid[data-catalog-grid] .product-card-printer-icon {
  position: relative;
  z-index: 0;
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d9e5f1;
  border-radius: 8px;
  background: #fff;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.product-grid[data-catalog-grid] .product-card-printer-icon:hover,
.product-grid[data-catalog-grid] .product-card-printer-icon:focus-visible {
  z-index: 8;
  border-color: #205887;
  background: #edf5fc;
  box-shadow: 0 8px 22px rgb(23 50 79 / 24%);
  transform: translateY(-2px) scale(3.5);
}

.product-grid[data-catalog-grid] .product-card-printer-icon:focus-visible {
  outline: 3px solid #87b7e6;
  outline-offset: 2px;
}

.product-grid[data-catalog-grid] .product-card-printer-icon img,
.product-grid[data-catalog-grid] .product-card-printer-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.product-grid[data-catalog-grid] .product-card-printer-icon svg {
  fill: none;
  stroke: #205887;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.product-grid[data-catalog-grid] .product-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e5ebf2;
  border-radius: 9px;
  background: #fff;
  position: relative;
  cursor: help;
}

.product-grid[data-catalog-grid] .product-card-icon::after {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(280px, 75vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #17324f;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}

.product-grid[data-catalog-grid] .product-card-icon:hover::after,
.product-grid[data-catalog-grid] .product-card-icon:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.product-grid[data-catalog-grid] .product-card-icon:focus-visible {
  outline: 3px solid #87b7e6;
  outline-offset: 2px;
}

.product-grid[data-catalog-grid] .product-card-icon img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.product-grid[data-catalog-grid] .product-card .product-price {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0 0 8px;
  color: #17324f;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.product-grid[data-catalog-grid] .product-card .text-link {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .product-grid[data-catalog-grid] > .product-card > a:first-child {
    flex-basis: 92px;
    padding: 9px;
  }

  .product-grid[data-catalog-grid] .product-card-image {
    height: 88px;
  }

  .product-grid[data-catalog-grid] .product-card-body {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 12px;
  }

  .product-grid[data-catalog-grid] .product-card h3 {
    grid-column: 1 / -1;
    font-size: 14px;
  }

  .product-grid[data-catalog-grid] .product-card p {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 12px;
  }

  .product-grid[data-catalog-grid] .product-card-icons {
    grid-column: 1;
    grid-row: 3;
    margin-top: 4px;
  }

  .product-grid[data-catalog-grid] .product-card .product-price {
    grid-column: 1;
    grid-row: 4;
    align-self: end;
    font-size: 19px;
    white-space: normal;
  }

  .product-grid[data-catalog-grid] .product-card .text-link {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
    font-size: 13px;
  }
}
