.iwps {
  --iwps-gap: 16px;
  margin: 16px 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.iwps,
.iwps * {
  box-sizing: border-box;
}

.iwps__title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.iwps__frame {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}

.iwps__viewport {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.iwps__viewport::-webkit-scrollbar {
  display: none;
}

.iwps__track {
  display: flex;
  gap: var(--iwps-gap);
  width: 100%;
  min-width: 0;
}

.iwps__slide {
  flex: 0 0 calc((100% - (var(--iwps-gap) * 3)) / 4);
  min-width: 0;
  max-width: 100%;
  scroll-snap-align: start;
}

.iwps__card {
  display: block;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  height: 100%;
}

.iwps__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #f8f8f8;
}

.iwps__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iwps__name {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.3;
  min-height: 2.5em;
  overflow-wrap: anywhere;
}

.iwps__price {
  font-size: 1rem;
  font-weight: 600;
}

.iwps__nav {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #d9d9d9;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.iwps__nav[disabled] {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 1024px) {
  .iwps__slide {
    flex-basis: calc((100% - var(--iwps-gap)) / 2);
  }
}

@media (max-width: 767px) {
  .iwps__frame {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .iwps__slide {
    flex-basis: 100%;
  }

  .iwps__nav {
    display: none;
  }
}
