/* Блок «Новая коллекция» на главной */

.new-collection {
  padding: 40px var(--pd-gutter) 48px;
  background: #fff;
}

.new-collection__inner {
  max-width: 1880px;
  margin: 0 auto;
}

/* ——— Верх: заголовок и звёзды ——— */
.new-collection__head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 3vw, 24px);
  margin: clamp(28px, 5vw, 60px) 0 clamp(28px, 5vw, 60px);
}

/* .new-collection__star — размеры в page-head.css */

.new-collection__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(20px, 4.5vw, 50px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  color: #141575;
}

/* ——— Средняя: сетка карточек ——— */
.new-collection__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(24px, 4vw, 50px);
  padding: 10px;
  overflow: visible;
  /* Пустые текстовые узлы между {% include %} не занимают ячейки сетки */
  font-size: 0;
  line-height: 0;
}

.new-collection__grid > .collection-card {
  min-width: 0;
  font-size: 16px;
  line-height: 1.2;
}

/* Телефон: только 4 карточки (сетка 2×2) */
@media (max-width: 767.98px) {
  .new-collection__grid > .collection-card:nth-of-type(n + 5) {
    display: none;
  }
}

/* ——— Карточка товара ——— */
.collection-card {
  position: relative;
  transition: transform 0.35s ease;
}

.collection-card:hover,
.collection-card:focus-within {
  transform: translateY(-10px);
  z-index: 2;
}

.collection-card__link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.collection-card__link:focus-visible {
  outline: 2px solid #141575;
  outline-offset: 2px;
}

.collection-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 360 / 400;
  background: #e8eaed;
}

.collection-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.collection-card__img--placeholder {
  object-fit: contain;
  background: #f0f1f3;
}

.collection-card__info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  
  /*background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); 
  border-radius: 5px;
  margin: 5px;*/

}

.collection-card__name {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #212529;
}

.collection-card__price {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: #212529;
}

.collection-card__price-old {
  margin-right: 0.35rem;
  text-decoration: line-through;
  color: rgba(33, 37, 41, 0.55);
}

.collection-card__price-current {
  font-weight: 500;
}

.collection-card__cart-form {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  margin: 0;
}

.collection-card__cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #212529;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collection-card__cart:hover,
.collection-card__cart:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

/* ——— Низ: CTA ——— */
.new-collection__cta-wrap {
  width: 100%;
}

.new-collection__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  background: #141575;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.new-collection__cta:hover,
.new-collection__cta:focus-visible {
  opacity: 0.92;
  color: #fff;
}

/* Планшет 768px+ */
@media (min-width: 768px) {
  .new-collection {
    padding: 80px 20px;
  }

  .new-collection__grid {
    gap: 16px;
  }

  .new-collection__cta {
    min-height: 64px;
    font-size: 10px;
  }

}

/* Ноутбук 1024px: 4 в ряд */
@media (min-width: 1024px) {
  .new-collection {
    padding: 100px 20px;
  }

  .new-collection__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .new-collection__cta {
    min-height: 70px;
  }

}

/* ПК 1440px+: 5 в ряд */
@media (min-width: 1440px) {
  .new-collection {
    padding: 50px 20px;
  }

  .new-collection__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

}

/* Адаптив под телефоны */
@media (max-width: 768px) {
  .collection-card__name {
    font-size: 10px;
  }

  .collection-card__price {
    font-size: 13px;
  }
}


