/* Material catalog — /material/ listing and detail pages.
   (The /eshko-material/ order-funnel pages use material.css.) */

.material-list {
  /* clear: the legacy #content-header floats left at full width, and a grid
     container placed beside a float gets squeezed to zero width. */
  clear: both;
  list-style: none;
  margin: 35px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 12%;
}

.material-list-empty {
  margin-top: 30px;
}

.material-card__cover {
  float: left;
  margin: 0 15px 0 0;
}

.material-card__cover img {
  border: solid 1px #787878;
}

.material-card__title {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 15px;
}

.material-card__price {
  margin: 0 0 15px;
}

/* The legacy reset strips default paragraph margins; the old page restored
   them via #product-list p — BEM wrappers must restore them themselves. */
.material-card__announce p,
.material-detail__description p,
.material-detail__content p {
  margin: 0 0 15px;
}

.material-detail {
  clear: both; /* same #content-header float as .material-list */
  /* padding, not margin: clearance past the float swallows a top margin */
  padding-top: 25px;
}

/* Bordered box with a vertical divider, as the legacy #v-top-table cells
   drew it (1px #ccc on each cell, 300px cover cell, ~4px cell padding). */
.material-detail__summary {
  display: flex;
  align-items: stretch;
  border: 1px solid #ccc;
}

.material-detail__cover {
  flex: 0 0 300px;
  max-width: 300px;
  padding: 4px;
  border-right: 1px solid #ccc;
}

.material-detail__info {
  flex: 1 1 auto;
  padding: 4px 10px;
}

.material-detail__price {
  margin: 0 0 15px;
}

.material-detail__description-heading {
  margin: 25px 0 15px;
}

.material-detail__order {
  margin-top: 15px;
}

.material-detail__order-link {
  background: linear-gradient(to bottom, #438bc9, #034d83);
  border: solid 1px #034d83;
  border-radius: 0.5em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: 14px/100% Arial, Helvetica, sans-serif;
  padding: 0.5em 2em 0.55em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.material-detail__order-link:hover {
  background: linear-gradient(to bottom, #5baadb, #0467a2);
  text-decoration: none;
}

.material-detail__content {
  margin-top: 25px;
}

@media (max-width: 760px) {
  .material-list {
    grid-template-columns: 1fr;
  }

  .material-detail__summary {
    flex-direction: column;
  }
}
