.hotbyproduct-slider {
  position: relative;
  width: 100%;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
}

.hotbyproduct-slider .hotbyproduct-track-wrapper {
  order: 1;
}

.hotbyproduct-slider .hotbyproduct-scroll-indicator {
  order: 2;
}

.hotbyproduct-slider .hotbyproduct-bottom-bar {
  order: 3;
}

.hotbyproduct-slider .hotbyproduct-more-button {
  order: 4;
}

.hotbyproduct-more-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  --hotbyproduct-more-arrow-size: 30px;
  padding: 10px 54px 10px 48px;
  min-height: calc(var(--hotbyproduct-more-arrow-size) + 20px);
  border-radius: 12px;
  border: 1px solid #E5E5E5;
  color: #000000;
  font-size: 18px;
  font-family: Roboto, sans-serif;
  text-decoration: none;
  box-sizing: border-box;
  margin-top: 12px;
}

.hotbyproduct-more-button:hover {
  text-decoration: none;
}

.hotbyproduct-more-button .hotbyproduct-more-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--hotbyproduct-more-arrow-size);
  height: var(--hotbyproduct-more-arrow-size);
  border-radius: 50%;
  border: 1px solid #E5E5E5;
  background-color: #ffffff;
  background-image: url("https://hot.by/content/carousel/images/sl2.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
  pointer-events: none;
}

.hotbyproduct-slider .hotbyproduct-track-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Скрываем скроллбар на десктопе */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE и Edge */
}

.hotbyproduct-slider .hotbyproduct-track-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.hotbyproduct-slider .hotbyproduct-track {
  --hotbyproduct-gap: 12px;
  display: flex;
  gap: var(--hotbyproduct-gap);
}


.hotbyproduct-slider .hotbyproduct-card {
  flex: 0 0 calc(
    (100% - (var(--hotbyproduct-gap) * 4)) / 5
  );
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hotbyproduct-slider .hotbyproduct-image-wrap {
  position: relative;
  width: 100%;
  max-width: 200px;
  margin: 0 auto 12px;
}

.hotbyproduct-slider .hotbyproduct-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.hotbyproduct-slider .hotbyproduct-link:hover {
  text-decoration: none;
}

.hotbyproduct-slider .hotbyproduct-image {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
}

.hotbyproduct-slider .hotbyproduct-badges {
  position: absolute;
  left: 4px;
  bottom: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: calc(100% - 6px);
  pointer-events: none;
}

.hotbyproduct-slider .hotbyproduct-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
  font-family: Roboto, sans-serif;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--hotbyproduct-badge-color, #ffffff);
  background-color: var(--hotbyproduct-badge-bg, #EA0B18);
  white-space: nowrap;
}

.hotbyproduct-slider .hotbyproduct-availability {
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  font-family: Roboto, sans-serif;
  margin-bottom: 3px;
}

/* В наличии */
.hotbyproduct-slider .hotbyproduct-availability--in {
  color: #2FAE00;
}

/* Нет на складе */
.hotbyproduct-slider .hotbyproduct-availability--out {
  color: #EA0B18;
}

.hotbyproduct-slider .hotbyproduct-prices {
  margin-bottom: 3px;
}

.hotbyproduct-slider .hotbyproduct-price-current {
  color: #EA0B18;
  font-weight: 700;
  font-size: 20px;
  font-family: Roboto, sans-serif;
  margin-right: 2px;
}

.hotbyproduct-slider .hotbyproduct-price-old {
  color: #757576;
  font-size: 13px;
  text-decoration: line-through;
  font-weight: 400;
  font-family: Roboto, sans-serif;
}

.hotbyproduct-slider .hotbyproduct-title {
  color: #000000;
  font-size: 14px;
  font-weight: 700;
  font-family: Roboto, sans-serif;
  margin-bottom: 12px;
  flex-grow: 1;
  cursor: pointer;

}

.hotbyproduct-slider .hotbyproduct-title:hover {
  color: #3f3e3e;
}

.hotbyproduct-slider .hotbyproduct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  font-family: Roboto, sans-serif;

  align-self: stretch;
  width: 100%;
  box-sizing: border-box;

  padding: 10px 16px;
  border-radius: 6px;
  background-color: #2FAE00;
  color: #ffffff;
  font-weight: 400;
  border: none;
  cursor: pointer;
}

.hotbyproduct-slider .hotbyproduct-btn::after {
  content: "";
  width: 20px;
  height: 20px;
  background-image: url("https://hot.by/content/product/icons/icon.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  flex-shrink: 0;
}


.hotbyproduct-slider .hotbyproduct-btn:hover {
  background-color: #233748;
}

/* Состояние "Уже в корзине" */
.hotbyproduct-slider .hotbyproduct-btn--in-cart {
  background-color: #233748;
}

.hotbyproduct-slider .hotbyproduct-btn--in-cart::after {
  display: none;
}

/* Кнопка "Уже в корзине" как ссылка */
.hotbyproduct-btn--in-cart {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hotbyproduct-btn--in-cart:hover {
    text-decoration: none;
}


/* Навигация */
.hotbyproduct-slider .hotbyproduct-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E5E5E5;
  background-color: #ffffff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  cursor: pointer;
  z-index: 10;
  /* чтобы символы не "мигали", если вдруг есть текст */
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.hotbyproduct-slider .hotbyproduct-nav:disabled {
  opacity: 0.50;
  pointer-events: none;
  transform: translateY(-50%);
  cursor: default;
}

/* Левая стрелка */
.hotbyproduct-slider .hotbyproduct-prev {
  left: -22px;   /* заезжает на карточку */
  background-image: url("https://hot.by/content/carousel/images/sl1.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

/* Правая стрелка */
.hotbyproduct-slider .hotbyproduct-next {
  right: -22px;  /* заезжает на карточку */
  background-image: url("https://hot.by/content/carousel/images/sl2.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

/* Адаптив до 992px — 4 карточки */
@media (max-width: 992px) {
  .hotbyproduct-slider .hotbyproduct-card {
    flex: 0 0 calc(
      (100% - (var(--hotbyproduct-gap) * 3)) / 4
    );
  }
}

/* Планшеты 1399px–769px: уменьшаем текст в кнопке на 2px */
@media (max-width: 1399px) and (min-width: 992px) {
  .hotbyproduct-slider .hotbyproduct-btn {
    font-size: 16px;
  }
}

@media (max-width: 991px) and (min-width: 769px) {
  .hotbyproduct-slider .hotbyproduct-btn {
    font-size: 15px;
  }
}


/* Мобилка до 768px */
@media (max-width: 768px) {
  .hotbyproduct-slider .hotbyproduct-track-wrapper {
    scroll-snap-type: none;
  }

  .hotbyproduct-slider .hotbyproduct-card {
    flex: 0 0 calc(
      (100% - var(--hotbyproduct-gap)) / 2
    );
  }

  .hotbyproduct-slider .hotbyproduct-nav {
    display: none;
  }

  .hotbyproduct-slider .hotbyproduct-price-old {
    display: block;
    margin-top: 2px;
  }

  .hotbyproduct-more-button {
    font-size: 18px;
    padding: 8px 54px 8px 20px;
    justify-content: flex-start;
    text-align: left;
  }
}

/* 404px: контроль текста */
@media (max-width: 404px) {
  .hotbyproduct-slider .hotbyproduct-btn {
    font-size: 14px;
  }
}

/* Индикатор скролла (по умолчанию скрыт) */
.hotbyproduct-slider .hotbyproduct-scroll-indicator {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -14px;

  height: 3px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);

  pointer-events: none;
  overflow: hidden;

  display: none;
}

.hotbyproduct-slider .hotbyproduct-scroll-indicator-thumb {
  display: block;
  height: 100%;
  width: 30%;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  transition: transform 0.1s linear;
  transform: translateX(0);
}

/* Показываем индикатор только на тач-устройствах и только когда активен */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
  .hotbyproduct-slider {
    margin-bottom: 0;
  }
  .hotbyproduct-more-button {
    -webkit-tap-highlight-color: transparent;
  }
  .hotbyproduct-more-button:hover {
    background-color: transparent;
    color: #000000;
  }
  .hotbyproduct-more-button:active {
    background-color: #233748;
    color: #ffffff;
  }
  .hotbyproduct-slider .hotbyproduct-scroll-indicator.hotbyproduct-scroll-indicator--active {
    display: block;
  }
  .hotbyproduct-slider .hotbyproduct-more-button {
    order: 2;
  }
  .hotbyproduct-slider .hotbyproduct-scroll-indicator {
    order: 3;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    margin-left: 8px;
    margin-right: 8px;
    margin-top: 10px;
  }
  .hotbyproduct-more-button {
    margin-top: 12px;
  }
}

/* Нижняя панель навигации (для устройств с курсором до 768px) */
.hotbyproduct-slider .hotbyproduct-bottom-bar {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .hotbyproduct-more-button:hover {
    background-color: #233748;
    color: #ffffff;
  }
}

@media (max-width: 768px) and (hover: hover) and (pointer: fine) {
  .hotbyproduct-slider .hotbyproduct-bottom-bar {
    margin-top: 12px;
    padding: 8px 12px 8px 20px;
    border-radius: 12px;
    border: 1px solid #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    will-change: transform;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicator {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background-color: #000000;
    opacity: 0.6;
    transition: width 0.15s ease, height 0.15s ease, border-radius 0.15s ease, opacity 0.15s ease;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicator--active {
    width: 24px;
    height: 6px;
    border-radius: 4px;
    opacity: 1;
    background-color: #000000;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-next {
    animation: hotbyproductBottomIndicatorsFlowNext 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-prev {
    animation: hotbyproductBottomIndicatorsFlowPrev 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-next .hotbyproduct-bottom-indicator--active {
    animation: hotbyproductBottomActiveFlowNext 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-prev .hotbyproduct-bottom-indicator--active {
    animation: hotbyproductBottomActiveFlowPrev 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-next {
    --hotbyproduct-flow-dir: -1;
    animation: hotbyproductBottomIndicatorsFlowCenter 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-prev {
    --hotbyproduct-flow-dir: 1;
    animation: hotbyproductBottomIndicatorsFlowCenter 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-next .hotbyproduct-bottom-indicator:nth-child(1),
  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-prev .hotbyproduct-bottom-indicator:nth-child(1) {
    animation: hotbyproductBottomCenterFlowDot1 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-next .hotbyproduct-bottom-indicator:nth-child(2),
  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-prev .hotbyproduct-bottom-indicator:nth-child(2) {
    animation: hotbyproductBottomCenterFlowDot2 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-next .hotbyproduct-bottom-indicator:nth-child(3),
  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-prev .hotbyproduct-bottom-indicator:nth-child(3) {
    animation: hotbyproductBottomCenterFlowDot3 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-next .hotbyproduct-bottom-indicator:nth-child(4),
  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-prev .hotbyproduct-bottom-indicator:nth-child(4) {
    animation: hotbyproductBottomCenterFlowDot4 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-next .hotbyproduct-bottom-indicator:nth-child(5),
  .hotbyproduct-slider .hotbyproduct-bottom-indicators--flow-center-prev .hotbyproduct-bottom-indicator:nth-child(5) {
    animation: hotbyproductBottomCenterFlowDot5 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  @keyframes hotbyproductBottomIndicatorsFlowNext {
    0%,
    50% {
      transform: translateX(0);
    }
    78% {
      transform: translateX(-3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  @keyframes hotbyproductBottomIndicatorsFlowPrev {
    0%,
    50% {
      transform: translateX(0);
    }
    78% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  @keyframes hotbyproductBottomIndicatorsFlowCenter {
    0% {
      transform: translateX(0);
    }
    56% {
      transform: translateX(calc(var(--hotbyproduct-flow-dir) * -3px));
    }
    100% {
      transform: translateX(0);
    }
  }

  @keyframes hotbyproductBottomActiveFlowNext {
    0% {
      transform: translateX(0);
      width: 24px;
      border-radius: 4px;
    }
    52% {
      transform: translateX(8px);
      width: 10px;
      border-radius: 8px;
    }
    100% {
      transform: translateX(0);
      width: 24px;
      border-radius: 4px;
    }
  }

  @keyframes hotbyproductBottomActiveFlowPrev {
    0% {
      transform: translateX(0);
      width: 24px;
      border-radius: 4px;
    }
    52% {
      transform: translateX(-8px);
      width: 10px;
      border-radius: 8px;
    }
    100% {
      transform: translateX(0);
      width: 24px;
      border-radius: 4px;
    }
  }

  @keyframes hotbyproductBottomCenterFlowDot1 {
    0% {
      transform: translateX(0);
      width: 4px;
      height: 4px;
      opacity: 0.4;
    }
    48% {
      transform: translateX(calc(var(--hotbyproduct-flow-dir) * 9px));
      opacity: 0;
    }
    100% {
      transform: translateX(0);
      width: 4px;
      height: 4px;
      opacity: 0.4;
    }
  }

  @keyframes hotbyproductBottomCenterFlowDot2 {
    0% {
      transform: translateX(0);
      width: 6px;
      height: 6px;
      border-radius: 50%;
      opacity: 0.6;
    }
    48% {
      transform: translateX(calc(var(--hotbyproduct-flow-dir) * 7px));
      width: 4px;
      height: 4px;
      border-radius: 50%;
      opacity: 0.4;
    }
    100% {
      transform: translateX(0);
      width: 6px;
      height: 6px;
      border-radius: 50%;
      opacity: 0.6;
    }
  }

  @keyframes hotbyproductBottomCenterFlowDot3 {
    0% {
      transform: translateX(0);
      width: 24px;
      height: 6px;
      border-radius: 4px;
      opacity: 1;
    }
    48% {
      transform: translateX(calc(var(--hotbyproduct-flow-dir) * 7px));
      width: 6px;
      height: 6px;
      border-radius: 50%;
      opacity: 0.6;
    }
    100% {
      transform: translateX(0);
      width: 24px;
      height: 6px;
      border-radius: 4px;
      opacity: 1;
    }
  }

  @keyframes hotbyproductBottomCenterFlowDot4 {
    0% {
      transform: translateX(0);
      width: 6px;
      height: 6px;
      border-radius: 50%;
      opacity: 0.6;
    }
    48% {
      transform: translateX(calc(var(--hotbyproduct-flow-dir) * 7px));
      width: 24px;
      height: 6px;
      border-radius: 4px;
      opacity: 1;
    }
    100% {
      transform: translateX(0);
      width: 6px;
      height: 6px;
      border-radius: 50%;
      opacity: 0.6;
    }
  }

  @keyframes hotbyproductBottomCenterFlowDot5 {
    0% {
      transform: translateX(0);
      width: 4px;
      height: 4px;
      border-radius: 50%;
      opacity: 0.4;
    }
    48% {
      transform: translateX(calc(var(--hotbyproduct-flow-dir) * 7px));
      width: 6px;
      height: 6px;
      border-radius: 50%;
      opacity: 0.6;
    }
    100% {
      transform: translateX(0);
      width: 4px;
      height: 4px;
      border-radius: 50%;
      opacity: 0.4;
    }
  }

  .hotbyproduct-slider .hotbyproduct-bottom-indicator--small {
    width: 4px;
    height: 4px;
    opacity: 0.4;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-arrows {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #E5E5E5;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
    cursor: pointer;
  }

  .hotbyproduct-slider .hotbyproduct-bottom-prev {
    background-image: url("https://hot.by/content/carousel/images/sl1.png");
  }

  .hotbyproduct-slider .hotbyproduct-bottom-next {
    background-image: url("https://hot.by/content/carousel/images/sl2.png");
  }

  .hotbyproduct-slider .hotbyproduct-bottom-arrow:disabled {
    opacity: 0.5;
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotbyproduct-slider .hotbyproduct-track-wrapper {
    scroll-behavior: auto;
  }

  .hotbyproduct-slider .hotbyproduct-scroll-indicator-thumb,
  .hotbyproduct-slider .hotbyproduct-bottom-indicators,
  .hotbyproduct-slider .hotbyproduct-bottom-indicator {
    transition: none !important;
    animation: none !important;
  }
}
