.lpm-latest-products {
  margin-top: 2rem;
}

.lpm-latest-products__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.lpm-latest-products__title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
}

.lpm-latest-products__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ht-surface, #242e3f) 82%, #fff 18%);
  font-size: 1.1rem;
}

.lpm-latest-products__nav {
  display: flex;
  gap: 0.75rem;
}

.lpm-latest-products__btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--ht-border, rgba(255, 255, 255, 0.08));
  background: var(--ht-surface, #242e3f);
  color: var(--ht-text, #e8edf5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lpm-latest-products__btn:hover,
.lpm-latest-products__btn:focus {
  background: color-mix(in srgb, var(--ht-surface, #242e3f) 82%, var(--ht-accent, #17a4dd) 18%);
  border-color: color-mix(in srgb, var(--ht-border, rgba(255, 255, 255, 0.08)) 40%, var(--ht-accent, #17a4dd) 60%);
  transform: translateY(-1px);
}

.lpm-latest-products__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
}

.lpm-latest-products__track::-webkit-scrollbar {
  display: none;
}

.lpm-latest-products__card {
  flex: 0 0 calc((100% - (var(--lpm-mobile, 2) - 1) * 1.25rem) / var(--lpm-mobile, 2));
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ht-surface, #242e3f);
  border: 1px solid var(--ht-border, rgba(255, 255, 255, 0.08));
  border-radius: 0.75rem;
  overflow: hidden;
  scroll-snap-align: start;
}

.lpm-latest-products__image-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

.lpm-latest-products__media {
  position: relative;
  display: block;
  isolation: isolate;
}

.lpm-latest-products__image {
  display: block;
}

.lpm-latest-products__image--fallback {
  color: var(--ht-text, #e8edf5);
}

.lpm-latest-products__top-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  background: #1f9d55;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.2);
  font-size: 0.9rem;
  line-height: 1;
  pointer-events: none;
}

.lpm-latest-products__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 210px;
  flex-direction: column;
  padding: 1.1rem;
}

.lpm-latest-products__brand {
  margin-bottom: 0.65rem;
  color: var(--ht-muted, #98a3b8);
  font-size: 0.95rem;
}

.lpm-latest-products__name {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 700;
  line-height: 1.35;
}

.lpm-latest-products__name a {
  color: inherit;
  text-decoration: none;
}

.lpm-latest-products__actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.lpm-latest-products__cart {
  width: 38px;
  height: 38px;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1363ff;
  color: #fff;
  text-decoration: none;
}

@media (min-width: 768px) {
  .lpm-latest-products__card {
    flex-basis: calc((100% - (var(--lpm-tablet, 3) - 1) * 1.25rem) / var(--lpm-tablet, 3));
  }
}

@media (min-width: 1200px) {
  .lpm-latest-products__card {
    flex-basis: calc((100% - (var(--lpm-desktop, 5) - 1) * 1.25rem) / var(--lpm-desktop, 5));
  }
}
