/* IZETA: внутренние страницы — коллекции и каталог. Подключается после izeta.css. */

.t-page,
.t-name,
.t-sub,
.t-cta-s {
  letter-spacing: -0.02em;
}

.t-page {
  font-size: clamp(3rem, 15vw, 5.5rem);
  line-height: 0.94;
}

.t-name {
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 1.02;
}

.t-sub {
  font-size: clamp(1.6rem, 6.5vw, 2.2rem);
  line-height: 1.08;
}

.t-cta-s {
  font-size: clamp(2rem, 8.5vw, 3rem);
  line-height: 1.02;
}

@media (min-width: 768px) {
  .t-page {
    font-size: clamp(4.5rem, 9vw, 9.5rem);
  }

  .t-name {
    font-size: clamp(2.4rem, 3.4vw, 3.8rem);
  }

  .t-sub {
    font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  }

  .t-cta-s {
    font-size: clamp(2.6rem, 4.4vw, 4.8rem);
  }
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Появление блоков. Без скрипта (нет класса .js) всё видно сразу. */
.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Карточки каталога и образы коллекций */
.card,
.look {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card[hidden] {
  display: none;
}

.card-img img {
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card-img img,
.card:focus-visible .card-img img,
.look:hover .card-img img,
.look:focus-visible .card-img img {
  transform: scale(1.04);
}

.look {
  cursor: zoom-in;
}

/* Фильтры каталога */
.chip {
  border: 1px solid rgba(22, 21, 20, 0.35);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: transparent;
  color: #161514;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.chip:hover {
  border-color: #161514;
}

.chip[aria-pressed="true"] {
  border-color: #161514;
  background: #161514;
  color: #f5f3ee;
}

/* Кнопки */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #161514;
  border-radius: 999px;
  padding: 1.05rem 1.6rem;
  background: #161514;
  color: #f5f3ee;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-pill:hover {
  background: transparent;
  color: #161514;
}

.btn-pill-light {
  border-color: #fff;
  background: #fff;
  color: #8e2c26;
}

.btn-pill-light:hover {
  background: transparent;
  color: #fff;
}

/* Галерея товара: два столбца, при нечётном числе фото первое — на всю ширину */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 6 / 7;
  background: #f5f3ee;
  cursor: zoom-in;
}

.gallery-item img {
  object-position: top;
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-wide {
  grid-column: 1 / -1;
}

@media (max-width: 1023px) {
  .gallery {
    display: flex;
    gap: 0.5rem;
    margin-inline: -5vw;
    padding-inline: 5vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

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

  .gallery-item,
  .gallery-item-wide {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }

  .gallery-item:only-child {
    flex-basis: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .gallery {
    margin-inline: -4vw;
    padding-inline: 4vw;
  }

  .gallery-item,
  .gallery-item-wide {
    flex-basis: 46%;
  }
}

/* Просмотр фото */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #100f0e;
  color: #f1ede6;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  min-width: 0;
  margin: 0;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 6.5rem);
  max-height: calc(100dvh - 6.5rem);
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  z-index: 2;
  width: 3.5rem;
  height: 3.5rem;
}

.lightbox-nav {
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid rgba(241, 237, 230, 0.45);
  border-radius: 999px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.lightbox-nav:hover {
  background: #f1ede6;
  color: #161514;
}

.lightbox-nav[hidden] {
  display: grid;
  visibility: hidden;
}

@media (max-width: 767px) {
  .lightbox {
    grid-template-columns: minmax(0, 1fr);
    padding: 3.75rem 0.75rem 5rem;
  }

  .lightbox-figure img {
    max-height: calc(100vh - 11rem);
    max-height: calc(100dvh - 11rem);
  }

  .lightbox-nav {
    position: absolute;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
  }

  .lightbox-prev {
    left: calc(50% - 3.5rem);
  }

  .lightbox-next {
    right: calc(50% - 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card-img img,
  .gallery-item img {
    transition: none;
  }
}
