/* ============ NOVINKI (Новинки) ============ */
.novinki {
  width: 100%;
}

.novinki__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 20px 0;
  border-radius: var(--radius-24);
  overflow: clip;
}

.novinki__title {
  width: 100%;
  margin: 0;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1.092px;
  color: var(--text-primary);
  word-break: break-word;
}

.novinki__content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

/* ---- filter chips ---- */
.novinki__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.novinki__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: 'Geologica', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.novinki__chip:hover {
  color: var(--text-accent);
}

.novinki__chip--active {
  background: var(--bg-accent-subdued);
  border: 1px solid var(--border-accent);
  color: var(--text-accent);
  padding: 11px 15px; /* compensate 1px border to keep size */
}

/* ---- cards grid ---- */
.novinki__cards {
  display: flex;
  gap: 24px;
  align-items: stretch;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
}

.novinki__card {
  flex: 0 0 236px;
  scroll-snap-align: start;
  min-width: 0;
  max-width: 236px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 26px;
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-s);
}

.novinki__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.novinki__photo {
  position: relative;
  width: 100%;
  height: 210px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.novinki__photo img {
  position: absolute;
  left: 10%;
  top: -7.83%;
  width: 79.61%;
  height: 115.22%;
  object-fit: contain;
  pointer-events: none;
}

/* scroll dots */
.novinki__dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.novinki__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(17, 30, 63, 0.18);
}

.novinki__dot--active {
  background: var(--bg-primary);
}

/* ---- card info ---- */
.novinki__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.novinki__about {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.novinki__name {
  margin: 0;
  font-family: 'Geologica', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  height: 2.4em; /* ровно 2 строки, без «выглядывающей» третьей */
  letter-spacing: 0.0053px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novinki__desc {
  position: relative;
  height: 48px;
  overflow: hidden;
  cursor: pointer;
}
/* раскрытое описание по клику */
.novinki__desc.is-open {
  height: auto;
}
.novinki__desc.is-open::after {
  display: none;
}

.novinki__desc p {
  margin: 0;
  font-family: 'Geologica', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.15;
  color: var(--text-secondary);
}

/* white fade at bottom of description */
.novinki__desc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-tertiary));
  pointer-events: none;
}

.novinki__price {
  font-family: 'Geologica', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.0053px;
  color: var(--text-accent);
}

/* ---- buttons ---- */
.novinki__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.novinki__buy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.novinki__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: 'Geologica', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .15s ease, background-color .15s ease;
}

.novinki__btn--cart {
  flex: 1 1 0;
  min-width: 0;
  background: var(--teal);
  color: var(--text-primary-inverse);
}

.novinki__btn--cart:hover {
  filter: brightness(0.94);
}

.novinki__fav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: none;
  border-radius: var(--radius-24);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: background-color .15s ease;
}

.novinki__fav:hover {
  background: rgba(17, 30, 63, 0.1);
}

.novinki__fav img {
  display: block;
  width: 20px;
  height: 20px;
}

.novinki__btn--oneclick {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.novinki__btn--oneclick:hover {
  background: rgba(17, 30, 63, 0.1);
}

/* ---- show all ---- */
.novinki__more {
  display: flex;
  justify-content: center;
  width: 100%;
}

.novinki__see-all {
  width: 147px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-primary);
  color: var(--text-primary-inverse);
  font-family: 'Geologica', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: filter .15s ease;
}

.novinki__see-all:hover {
  filter: brightness(1.4);
}

/* ============ RESPONSIVE ============ */
/* On narrower viewports the 6-up flex row would crush the cards,
   so switch to a horizontal scroller with fixed-width cards. */
@media (max-width: 1024px) {
  .novinki__cards {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* allow cards to bleed to the gutter edges */
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter);
  }
  .novinki__card {
    flex: 0 0 252px;
    width: 252px;
    max-width: 252px;
    scroll-snap-align: start;
  }
}

@media (max-width: 768px) {
  .novinki__card {
    flex-basis: 240px;
    width: 240px;
  }
}

@media (max-width: 480px) {
  .novinki__block {
    gap: 24px;
  }
  /* ~1.4 cards visible -> clear affordance to scroll */
  .novinki__card {
    flex-basis: 70vw;
    width: 70vw;
    max-width: 280px;
  }
}
