/* "Ähnliche Produkte" - own-brand alternatives offered while a customer looks at an
   article. The panel appears in two very different places (under the buy box of the
   detail page, and under a full-width classic product row), so the cards are laid out
   on a grid that gives one column in a narrow spot and two or three in a wide one. */

.similar-products {
  position: relative;
  clear: both;
  margin-top: 10px;
}

/* The trigger: a small preview of the cheapest alternative. A plain outlined button
   here was overlooked next to the gold cart button. */
.similar-products-teaser {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ccae6a;
  background: #fffdf5;
  border-radius: 4px;
  padding: 8px 12px 8px 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.similar-products-teaser:hover {
  background: #fdf6e4;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.spt-image {
  flex: 0 0 44px;
  width: 44px;
  height: 54px;
  background: #fff;
  border: 1px solid #eee;
  overflow: hidden;
}

.spt-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.spt-text {
  display: block;
  min-width: 0;
  line-height: 1.35;
}

.spt-head {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #8a6d2f;
}

.spt-price {
  display: block;
  font-size: 13px;
  color: #333;
}

.spt-saving {
  color: #197b30;
  white-space: nowrap;
}

.spt-more {
  display: block;
  font-size: 11px;
  color: #888;
  text-decoration: underline;
}

/* The one-liner under the price */
.similar-products-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 13px;
  color: #197b30;
  cursor: pointer;
  border-bottom: 1px dotted #197b30;
  padding-bottom: 1px;
}

.similar-products-hint:hover {
  color: #145f26;
}

.sph-arrow {
  font-size: 16px;
  line-height: 1;
}

.similar-products-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.similar-products-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.similar-products-box {
  position: relative;
  background: #fff;
  border-top: 3px solid #ccae6a;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 18px 20px 22px;
  width: 100%;
  max-width: 880px;
  max-height: 86vh;
  overflow-y: auto;
}

.similar-products-head {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #555;
  margin-bottom: 14px;
  padding-right: 28px;
  position: relative;
}

.similar-products-close {
  position: absolute;
  right: -6px;
  top: -6px;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 0 6px;
}

.similar-products-close:hover {
  color: #333;
}

.similar-products-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

/* The cards carry the page's own .related-product-item classes, so they inherit its
   look. Only what differs here is set below. */
.similar-products-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* .rp-image crops to fill (cover), which beheads these full-body shots. In a panel whose
   job is to sell the alternative, the whole garment should be visible. */
.similar-products-card .rp-image {
  background: #fff;
}

.similar-products-card .rp-image img {
  object-fit: contain;
}

.similar-products-card .rp-info {
  padding: 10px;
}

.similar-products-card .rp-brand {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #999;
  margin-bottom: 2px;
}

.similar-products-card .rp-name {
  font-size: 13px;
  margin-bottom: 5px;
}

.similar-products-card .rp-price {
  font-size: 14px;
}

.spc-saving {
  display: block;
  font-size: 11px;
  font-weight: normal;
  color: #197b30;
  margin-top: 2px;
}

@media screen and (max-width: 600px) {
  .similar-products-overlay {
    padding: 10px;
  }

  .similar-products-box {
    padding: 14px 14px 18px;
    max-height: 92vh;
  }

  .similar-products-list {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
  }
}
