/* --- Заголовок і кнопки (верхня панель) --- */
.sale {
  padding-top: clamp(40px, 5vw, 80px);
  margin-bottom: clamp(40px, 5vw, 80px);
}
.sale__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.sale__header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sale-text {
  font-size: clamp(14px, 1.5vw, 16px);
  text-transform: uppercase;
  color: #8a8a8a;
}

.sale__title {
  color: #333;
}

/* --- Кнопки керування (праворуч від заголовка) --- */
.sale__controls {
  display: flex;
  gap: 10px;
}

.sale__slider-btn {
  background: #790000;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 50%;
  transition:
    background 0.3s,
    transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.9;
}

.sale__slider-btn:hover {
  background: #af0b0b;
  transform: scale(1.05);
}

.sale__slider-btn:active {
  transform: scale(0.95);
}

.sale__slider-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* --- Слайдер --- */
.sale__slider {
  position: relative;
  overflow: hidden;
}

.sale__slider-wrapper {
  display: flex;
  gap: 18px;
  transition: transform 0.5s ease;
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.sale__slider-wrapper:active {
  cursor: grabbing;
}

.sale__slider-item {
  /* ✅ flex прибрано — ширину тепер контролює JS через applyItemWidths() */
  min-width: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.sale__slider-item img {
  width: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.sale__slider-item:hover img {
  transform: scale(1.01);
}

.sale__product-title {
  padding: 12px;
  font-size: 16px;
  color: #222222;
}

/* --- Нижня частина карточки --- */
.sale__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 14px;
  gap: 10px;
}

.sale__price {
  font-weight: 600;
  color: #790000;
  font-size: clamp(16px, 1.5vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.1;
}

.sale__price del {
  color: #999;
  font-size: 14px;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.sale__price ins {
  color: #790000;
  font-weight: 600;
  text-decoration: none;
}

.sale__price-unit {
  display: none;
}

.price-row {
  display: block;
  line-height: 1.2;
}
.price-label {
  font-size: 14px;
  font-weight: 500;
  margin-right: 6px;
  color: #555;
}

/* --- Кнопка "Обрати" --- */
.sale__action-btn {
  background: #790000;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
  white-space: nowrap;
}

.sale__action-btn:hover {
  background: #af0b0b;
}

.sale__action-btn:active {
  transform: scale(0.95);
}

.sale__image-wrap {
  position: relative;
  display: block;
}

.sale__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #b22222;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 1;
}

/* --- Точки --- */
.sale__slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
}

.sale__slider-dot {
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.sale__slider-dot--active {
  background: #e91e63;
}

/* --- Планшет / великий телефон --- */
@media (max-width: 768px) {
  .sale__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .sale__controls {
    align-self: flex-end;
  }
}
/* --- перебудовую кнопку обрати внизу ціни --- */
@media (max-width: 490px) {
  .sale__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .sale__action-btn {
    width: 100%;
    justify-content: center;
  }

  .sale__price {
    align-items: flex-start;
  }
}
/* --- Мобільний --- */
@media (max-width: 480px) {
  /* ✅ flex і padding-right прибрано — JS керує шириною сам */
  .sale__controls {
    display: none;
  }
}
