/* EF 2026-11-27: блок «Вы недавно смотрели» — визуально отделённая компактная лента.
   Подключается после style.min.css, перекрывает старые правила .show-recent__*. */

section.show-recent.show-recent--ribbon,
.show-recent.show-recent--ribbon {
  --ef-recent-bg: #f3f4f6;
  background-color: var(--ef-recent-bg);
  margin-top: 40px;
  margin-bottom: 0;
  padding: 28px 0 32px;
  border-top: 1px solid #d0d4dc;
  box-shadow: inset 0 6px 10px -8px rgba(0, 0, 0, 0.08);
  width: 100%;
}

.show-recent--ribbon .show-recent__wrapper {
  max-width: 1344px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.show-recent--ribbon .show-recent__title {
  margin: 0 0 16px;
  font: 500 18px/26px "Roboto", Arial, Helvetica;
  color: #555555;
}

.show-recent--ribbon .show-recent__scroller {
  position: relative;
}

.show-recent--ribbon .show-recent__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  margin: 0;
  padding: 2px 2px 10px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #c5c9d1 transparent;
}

.show-recent--ribbon .show-recent__list::-webkit-scrollbar {
  height: 6px;
}
.show-recent--ribbon .show-recent__list::-webkit-scrollbar-thumb {
  background: #c5c9d1;
  border-radius: 3px;
}
.show-recent--ribbon .show-recent__list::-webkit-scrollbar-track {
  background: transparent;
}

.show-recent--ribbon .show-recent__item {
  flex: 0 0 168px;
  width: 168px;
  max-width: 168px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  box-sizing: border-box;
  background: transparent;
  scroll-snap-align: start;
  transition: none;
}

.show-recent--ribbon .show-recent__item:hover {
  box-shadow: none !important;
}

.show-recent--ribbon .show-recent__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  padding: 10px 10px 12px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  text-decoration: none;
  color: #333333;
  box-sizing: border-box;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.show-recent--ribbon .show-recent__card:hover {
  border-color: #cfd3da;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #333333;
}

.show-recent--ribbon .show-recent__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  margin: 0 0 8px;
}

.show-recent--ribbon .show-recent__image {
  display: block;
  max-width: 100%;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 1px;
}

.show-recent--ribbon .show-recent__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font: 400 13px/18px "Roboto Condensed", Arial, Helvetica;
  color: #333333;
  margin: 0 0 8px;
  min-height: 36px;
}

.show-recent--ribbon .show-recent__card:hover .show-recent__name {
  color: #e42122;
}

.show-recent--ribbon .show-recent__prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}

.show-recent--ribbon .show-recent__price {
  font: 500 16px/20px "Roboto", Arial, Helvetica;
  color: #333333;
}

.show-recent--ribbon .show-recent__old-price {
  font: 400 13px/16px "Roboto", Arial, Helvetica;
  color: #999999;
  text-decoration: line-through;
}

/* Кнопки покупки в ленте не должны появиться, даже если разметка сменится */
.show-recent--ribbon .product-block__buttons,
.show-recent--ribbon .product-block__buy,
.show-recent--ribbon .product-block__num,
.show-recent--ribbon .js_shop_buy,
.show-recent--ribbon .product-block__to-favorites,
.show-recent--ribbon .to-favorites,
.show-recent--ribbon .product-block__parameters-list,
.show-recent--ribbon .product-block__description {
  display: none !important;
}

@media screen and (max-width: 767px) {
  section.show-recent.show-recent--ribbon,
  .show-recent.show-recent--ribbon {
    margin-top: 28px;
    padding: 20px 0 24px;
  }

  .show-recent--ribbon .show-recent__title {
    font: 500 16px/22px "Roboto", Arial, Helvetica;
    margin-bottom: 12px;
  }

  .show-recent--ribbon .show-recent__item {
    flex-basis: 140px;
    width: 140px;
    max-width: 140px;
  }

  .show-recent--ribbon .show-recent__image-wrap {
    height: 88px;
  }

  .show-recent--ribbon .show-recent__image {
    max-height: 88px;
  }

  .show-recent--ribbon .show-recent__name {
    font: 400 12px/16px "Roboto Condensed", Arial, Helvetica;
  }

  .show-recent--ribbon .show-recent__price {
    font: 500 14px/18px "Roboto", Arial, Helvetica;
  }
}
