/* Product page suggestions (src/site/suggestions.ts): frequently bought together and
   related products. Sizes follow main.css (1rem = 10px), colours the site's orange. */

.csi-bundle,
.csi-related {
  padding: 3.2rem 0 1rem;
  background: #fff;
}

.csi-suggest__title {
  margin: 0 0 1.8rem;
  font: 700 2.8rem/1.1 Khula, sans-serif;
  text-transform: uppercase;
  color: #000;
}

/* ─── frequently bought together ─── */

.csi-bundle__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.4rem 3.2rem;
}

.csi-bundle__items {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1rem;
  flex: 1 1 56rem;
}

.csi-bundle__item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 19rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
  font-size: 1.5rem;
  line-height: 1.35;
  transition: opacity 0.15s, border-color 0.15s;
}

.csi-bundle__item.is-off {
  opacity: 0.45;
}

.csi-bundle__tick {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.35rem;
  color: #555;
  cursor: pointer;
}

.csi-bundle__tick input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #f57920;
  cursor: pointer;
}

.csi-bundle__picture {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12rem;
}

.csi-bundle__picture img {
  max-width: 100%;
  max-height: 12rem;
  object-fit: contain;
}

.csi-bundle__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.csi-bundle__name a {
  color: #000;
}

.csi-bundle__name a:hover {
  color: #f57920;
}

.csi-bundle__price {
  margin-top: auto;
  font: 700 2rem/1 Khula, sans-serif;
  color: #000;
}

.csi-bundle__plus {
  align-self: center;
  font-size: 3rem;
  line-height: 1;
  color: #9e9e9e;
}

.csi-bundle__total {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 0 1 28rem;
  font-size: 1.8rem;
}

.csi-bundle__total strong {
  font: 700 2.6rem/1 Khula, sans-serif;
}

.csi-bundle__total .button {
  text-align: center;
  font-size: 2rem;
}

.csi-bundle__total .button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.csi-bundle__note {
  margin: 0;
  font-size: 1.35rem;
  color: #666;
}

/* ─── related products ─── */

.csi-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}

.csi-related__nav {
  display: flex;
  gap: 0.8rem;
}

.csi-related__nav button {
  width: 4rem;
  height: 4rem;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
  font-size: 2.6rem;
  line-height: 1;
  color: #333;
  cursor: pointer;
}

.csi-related__nav button:hover {
  border-color: #f57920;
  color: #f57920;
}

.csi-related__track {
  display: flex;
  gap: 2.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1.6rem;
  -webkit-overflow-scrolling: touch;
}

.csi-related__track .products_item,
.csi-related__track .products_item:nth-child(3n + 1) {
  flex: 0 0 22rem;
  width: 22rem;
  margin: 0;
  scroll-snap-align: start;
}

/* The cards' title box fits 3 lines: end long names there instead of showing half a 4th line. */
.csi-related__track .products_title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

@media (max-width: 767px) {
  .csi-bundle__item {
    width: calc(50% - 0.5rem);
  }

  .csi-bundle__plus {
    display: none;
  }

  .csi-bundle__total {
    flex-basis: 100%;
  }

  .csi-related__nav {
    display: none;
  }

  .csi-related__track .products_item,
  .csi-related__track .products_item:nth-child(3n + 1) {
    flex-basis: 70%;
    width: 70%;
  }
}
