.htpc-recommendations {
  display: block;
  clear: both;
  position: relative;
  z-index: 1;
  width: 100vw;
  margin: -68px 0 34px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 18px 32px 14px;
  border-top: 1px solid #d9e8d3;
  border-bottom: 1px solid #d9e8d3;
  background: var(--htpc-background-color, #f7fbf4);
  box-sizing: border-box;
  overflow: hidden;
}

.htpc-inner {
  max-width: 1360px;
  margin: 0 auto;
}

.htpc-title {
  margin: 0 0 12px;
  color: var(--htpc-title-color, #18336e);
  font-size: 27px;
  line-height: 1.15;
  font-weight: 500;
}

.htpc-list {
  display: flex;
  gap: 14px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 8px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.htpc-list::-webkit-scrollbar { height: 6px; }
.htpc-list::-webkit-scrollbar-track { border-radius: 10px; background: rgba(24,51,110,.08); }
.htpc-list::-webkit-scrollbar-thumb { border-radius: 10px; background: rgba(103,173,24,.55); }
.htpc-list::-webkit-scrollbar-thumb:hover { background: rgba(103,173,24,.78); }

.htpc-card {
  flex: 0 0 calc((100% - 70px) / 6);
  min-width: 0;
  border: 1px solid #e5e5e5;
  border-radius: 11px;
  background: #fff;
  padding: 11px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  box-sizing: border-box;
  overflow: hidden;
}

.htpc-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 116px;
  min-height: 116px;
  margin-bottom: 8px;
}

.htpc-image img {
  display: block;
  max-width: 100%;
  max-height: 112px;
  width: auto;
  height: auto;
}

.htpc-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.htpc-name {
  color: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  min-height: 3.9em;
  max-height: 3.9em;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.htpc-price {
  margin: 7px 0 8px;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 600;
}

.htpc-form { margin-top: auto; }

.htpc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #18336e;
  background: #18336e;
  color: #fff;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: 9px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.htpc-button:hover,
.htpc-button:focus {
  background: #67ad18;
  border-color: #67ad18;
  color: #fff;
  text-decoration: none;
}

/* The theme pulls its product tabs upward. Once our full-width block is inserted,
   give the whole tabs wrapper a clean separation so it can never sit on top of it. */
body#product .htpc-recommendations + .tabs.an-product-page-description.htpc-tabs-anchor,
body#product .htpc-recommendations + .htpc-tabs-anchor {
  position: relative !important;
  z-index: 2 !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin-top: 26px !important;
  clear: both !important;
  background: #fff !important;
}

@media (max-width: 1400px) {
  .htpc-card { flex-basis: calc((100% - 56px) / 5); }
}

@media (max-width: 1100px) {
  .htpc-recommendations {
    margin-top: -36px;
  }
  .htpc-card { flex-basis: calc((100% - 42px) / 4); }
}

@media (max-width: 800px) {
  .htpc-recommendations {
    margin-top: 8px;
    padding: 16px 14px 12px;
  }
  .htpc-title {
    margin-bottom: 10px;
    font-size: 23px;
  }
  .htpc-card { flex-basis: calc((100% - 14px) / 2); }
  body#product .htpc-recommendations + .htpc-tabs-anchor { margin-top: 18px !important; }
}

@media (max-width: 575px) {
  .htpc-card { flex: 0 0 72%; }
  .htpc-image { height: 108px; min-height: 108px; }
  .htpc-image img { max-height: 104px; }
}
