/* Страницы /collections и /collections/<адрес> */
.collections-heading h1 {
  font-size: 22px;
  font-weight: 400;
}
.collections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
}
.collection-tile {
  display: block;
  color: inherit;
}
.collection-tile:hover {
  text-decoration: none;
}
.collection-tile-picture {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--stone);
}
.collection-tile-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.collection-tile:hover img {
  transform: scale(1.03);
}
.collection-tile-picture .no-photo {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  letter-spacing: 0.2em;
}
.collection-tile-picture .no-photo small {
  display: block;
  letter-spacing: 0;
  color: #777;
}
.collection-tile-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 24px 40px;
  font-size: 13px;
}
.collection-tile-caption strong {
  font-weight: 400;
  font-size: 15px;
}
.collection-tile:hover strong {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.collection-tile-caption span {
  color: #6b6b6b;
}
.collections-empty {
  text-align: center;
  padding: 20px 24px 120px;
  color: #6b6b6b;
}
.collections-empty a {
  display: inline-block;
  margin-left: 6px;
  color: var(--ink);
}

.collection-preview-note {
  margin: 0;
  padding: 12px 24px;
  text-align: center;
  background: var(--stone);
}
.collection-cover {
  margin: 0;
  height: min(88svh, 1100px);
  min-height: 420px;
  background: var(--stone);
  overflow: hidden;
}
.collection-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: collection-cover-in 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes collection-cover-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}
.collection-intro {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 48px;
  text-align: center;
}
.collection-crumbs {
  font-size: 12px;
  color: #6b6b6b;
  margin-bottom: 14px;
}
.collection-intro h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 400;
}
.collection-subtitle {
  margin: 0 0 18px;
  font-size: 15px;
}
.collection-description {
  margin: 0;
  color: #444;
  line-height: 1.8;
  white-space: pre-line;
}
.collection-count {
  margin: 0;
  padding: 0 32px 14px;
  font-size: 12px;
  color: #6b6b6b;
}

@media (min-width: 900px) {
  .cover-split .collection-hero.has-cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    margin-bottom: 56px;
  }
  .cover-split .collection-hero.has-cover .collection-cover {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: calc(100svh - var(--header));
    width: 100%;
  }
  .cover-split .collection-hero.has-cover .collection-intro {
    padding: 48px clamp(32px, 6vw, 96px);
  }
}
@media (max-width: 767px) {
  .collections-grid {
    grid-template-columns: 1fr;
  }
  .collection-tile-caption {
    padding: 14px 20px 32px;
  }
  .collection-cover {
    height: 72svh;
    min-height: 360px;
  }
  .collection-intro {
    padding: 40px 20px 36px;
  }
  .collection-count {
    padding: 0 20px 12px;
  }
}

/* =====================================================================
   Обновление 11: обложки и вставки фото/видео для пяти стилей
   ===================================================================== */

/* ---------- Обложка «на весь экран» (Журнал, Лукбук) ---------- */
.cover-full .collection-cover {
  position: relative;
  height: calc(100svh - var(--header));
  min-height: 480px;
  max-height: none;
}
.cover-full .collection-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.45), rgb(0 0 0 / 0) 55%);
  pointer-events: none;
}
.collection-cover-title {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: clamp(36px, 9vh, 96px);
  padding: 0 24px;
  color: #fff;
  text-align: center;
  animation: collection-title-in 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s both;
}
.collection-cover-title h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 48px);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.collection-cover-title p {
  margin: 0 0 14px;
  font-size: 15px;
}
.collection-cover-more {
  display: inline-block;
  padding: 6px 2px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 6px;
}
@keyframes collection-title-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.collection-intro-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Обложка «широкий кадр» (Диптих) ---------- */
.cover-wide .collection-cover {
  height: auto;
  min-height: 0;
  aspect-ratio: 21 / 9;
  max-height: calc(100svh - var(--header));
}

/* ---------- Лента коллекции ---------- */
.collection-flow {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 80px;
}
.cm {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--stone);
}
.cm img,
.cm video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cm figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px clamp(20px, 3vw, 40px) clamp(18px, 3vw, 32px);
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  background: linear-gradient(to top, rgb(0 0 0 / 0.5), rgb(0 0 0 / 0));
}

/* Появление при прокрутке (включает collection.js) */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s ease,
    transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
.js-reveal [data-reveal].is-visible img {
  animation: cm-settle 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes cm-settle {
  from {
    transform: scale(1.06);
  }
}

/* На всю ширину */
.cb-full .cm {
  height: min(100svh, 62vw);
  min-height: 360px;
}
/* Две рядом */
.cb-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}
.cb-pair .cm {
  aspect-ratio: 4 / 5;
}
/* Смещённая */
.cb-offset {
  display: flex;
  padding: clamp(40px, 8vw, 120px) clamp(20px, 6vw, 96px);
  background: #fff;
}
.cb-offset.side-right {
  justify-content: flex-end;
}
.cb-offset .cm {
  width: min(60%, 820px);
  aspect-ratio: 4 / 5;
  overflow: visible;
  background: none;
}
.cb-offset .cm img,
.cb-offset .cm video {
  background: var(--stone);
}
.cb-offset .cm figcaption {
  position: absolute;
  top: 50%;
  bottom: auto;
  left: calc(100% + clamp(24px, 4vw, 64px));
  right: auto;
  width: clamp(160px, 22vw, 320px);
  padding: 0;
  color: var(--ink);
  background: none;
  transform: translateY(-50%);
}
.cb-offset.side-right .cm figcaption {
  left: auto;
  right: calc(100% + clamp(24px, 4vw, 64px));
  text-align: right;
}

/* Вставка среди товаров: широкая (2 колонки) и плитка 2×2 */
.cb-wide,
.cb-tile {
  grid-auto-flow: dense;
}
.cb-wide .cb-media {
  grid-column: span 2;
}
.cb-wide.side-left .cb-media {
  grid-column: 1 / span 2;
}
.cb-wide.side-right .cb-media {
  grid-column: 3 / span 2;
  grid-row: 1;
}
.cb-tile .cb-media {
  grid-row: span 2;
  grid-column: span 2;
}
.cb-tile.side-left .cb-media {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}
.cb-tile.side-right .cb-media {
  grid-column: 3 / span 2;
  grid-row: 1 / span 2;
}
.cb-wide .cb-media,
.cb-tile .cb-media {
  min-height: 100%;
}

/* Горизонтальная лента */
.cb-strip {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.cb-strip .cm {
  flex: 0 0 clamp(260px, 30vw, 480px);
  aspect-ratio: 4 / 5;
  scroll-snap-align: start;
}
.cb-heading {
  margin: 0;
  padding: 72px 24px 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.style-lookbook .collection-flow {
  gap: 0;
}
.style-lookbook .cb-pair {
  gap: clamp(8px, 1vw, 16px);
  padding: 0 clamp(8px, 1vw, 16px);
}
.style-diptych .cb-pair {
  margin: 0;
}

@media (max-width: 899px) {
  .cb-wide.side-right .cb-media,
  .cb-wide.side-left .cb-media,
  .cb-tile.side-right .cb-media,
  .cb-tile.side-left .cb-media {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 4 / 5;
  }
  .cb-offset .cm {
    width: 72%;
  }
}
@media (max-width: 767px) {
  .cb-full .cm {
    height: auto;
    aspect-ratio: 4 / 5;
    min-height: 0;
  }
  .cb-pair {
    grid-template-columns: 1fr;
  }
  .cb-offset {
    padding: 32px 20px;
    flex-direction: column;
  }
  .cb-offset .cm {
    width: 100%;
  }
  .cb-offset .cm figcaption,
  .cb-offset.side-right .cm figcaption {
    position: static;
    width: auto;
    padding-top: 14px;
    text-align: left;
    transform: none;
  }
  .cover-full .collection-cover {
    height: calc(100svh - var(--header));
    min-height: 420px;
  }
  .cover-wide .collection-cover {
    aspect-ratio: 4 / 5;
  }
  .cm figcaption {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
