/*
 * The few rules the row builder needs on top of the Webflow export.
 *
 * Everything else in a row template reuses the export's own classes; this file
 * only covers what the export never had to do: rows placed freely under each
 * other, and a column count chosen by an editor.
 */

.section.is--compact {
  padding-top: 20px;
  padding-bottom: 20px;
}

.section.is--compact .page-content {
  margin-bottom: 0;
}

/* A detail page puts its title in a section of its own and its rows below it;
   these keep the two reading as one block instead of two padded sections. */
.section.is--flush-bottom {
  padding-bottom: 0;
}

.section.is--flush-bottom .page-content {
  margin-bottom: 0;
}

.section.is--flush-top {
  padding-top: 0;
}

.cms-detail-image {
  width: 100%;
  height: 360px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: .3125rem;
}

.cms-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* .flexbox-child_padding pads both sides; pull the outer columns back in line
   with the heading above them. */
.cms-columns {
  width: calc(100% + 50px);
  margin-left: -25px;
  margin-right: -25px;
  row-gap: 35px;
}

.cms-column__image {
  width: 100%;
  height: 220px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: .3125rem;
}

.cms-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.cms-cta .homepage-cta {
  margin-left: auto;
  margin-right: auto;
  padding-top: 0;
}

.cms-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Column text written as "- " lines: a list with the green CoatR check. */
.cms-column__list {
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
}

/* The theme gives every li the CoatR mark as background; the check replaces it here. */
.cms-column__list li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 26px;
  background-image: none;
}

.cms-column__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--groen);
  border-bottom: 2px solid var(--groen);
  transform: rotate(-45deg);
}

/* List columns on a gray section read as white cards, like the export's .box. */
.section.is--gray-bg .cms-columns:has(.cms-column__list) > .cms-column {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: .3125rem;
  padding: 30px;
}

.section.is--gray-bg .cms-columns:has(.cms-column__list) {
  align-items: stretch;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  gap: 20px;
}

.section.is--gray-bg .cms-columns:has(.cms-column__list) > .cms-column {
  flex: 1 1 0;
}

/* The block holding a floated product photo grows with it, so a short text
   never lets the photo stick out into the next section. */
.page-content:has(img.cms-product-image) {
  display: flow-root;
  margin-bottom: 0;
}

/* A product photo inside rich text, beside the text on wide screens. */
.page-content img.cms-product-image {
  float: right;
  width: 140px;
  height: auto;
  margin: 0 0 20px 40px;
}

/* A highlighted remark inside rich text. */
.page-content p.cms-note {
  border-left: 3px solid var(--groen);
  background-color: var(--grijs);
  padding: 12px 18px;
}

@media screen and (max-width: 767px) {
  .page-content img.cms-product-image {
    width: 90px;
    margin-left: 20px;
  }

  .section.is--gray-bg .cms-columns:has(.cms-column__list) > .cms-column {
    flex-basis: 100%;
  }

  .cms-columns {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
