.collection {
  padding-top: 131px;
}

/* ---------- Photo stacks (full-bleed, no gaps, normal scroll) ---------- */
.collection-photos {
  display: flex;
  flex-direction: column;
}

.collection-photos img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Photo carousel (hyphen-named photo sets): plain horizontal
   native scroll-snap, swipe left/right to see the next photo. Fully
   independent of the page's own vertical scroll — no listeners block or
   intercept anything, so none of the vertical pin/lock issues apply. */
.photo-carousel {
  position: relative;
}

.photo-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.photo-carousel__track::-webkit-scrollbar {
  display: none;
}

.photo-carousel__img {
  flex: 0 0 100vw;
  width: 100vw;
  display: block;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Overlap adjacent photos by 1px to hide the hairline seam Safari
   renders at the boundary between horizontally scroll-snapped elements
   (a compositing artifact, not a width-rounding issue). */
.photo-carousel__img:not(:first-child) {
  margin-left: -1px;
  width: calc(100vw + 1px);
}

.photo-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.photo-carousel__dot {
  width: 9px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.photo-carousel__dot.is-active {
  background: #fff;
}

/* ---------- Text sections ---------- */
.collection-text {
  padding: 48px 26px;
}

.collection-text__title {
  font-family: 'Forum', 'Songti TC', 'Noto Serif TC', serif;
  font-size: 15px;
  letter-spacing: 0.025em;
  text-align: left;
  margin-bottom: 20px;
}

.collection-text__title:last-child {
  margin-bottom: 0;
}

.collection-text__body {
  font-family: 'Noto Serif TC', serif;
  font-weight: 200;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.025em;
  color: #333;
  text-align: left;
}

.collection-text__body + .collection-text__body {
  margin-top: 20px;
}

.collection-text__highlight {
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.025em;
  color: #1a1a1a;
}

.collection-text__inline-note {
  font-family: 'Noto Serif TC', serif;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.025em;
  color: #999;
  margin-left: 8px;
}

.collection-text__note {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.collection-text__note p {
  font-family: 'Noto Serif TC', serif;
  font-weight: 200;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.025em;
  color: #999;
  text-align: left;
}

/* ---------- "Collection" divider heading before the style section ---------- */
.collection-heading {
  padding: 64px 26px;
  text-align: center;
}

.collection-heading p {
  font-family: 'Forum', 'Songti TC', 'Noto Serif TC', serif;
  font-size: 18px;
  letter-spacing: 0.05em;
}

/* ---------- Style section (clickable tabs switch photo + features) ---------- */
.cs-style__hero {
  position: relative;
  width: 100%;
  aspect-ratio: 838 / 555;
  overflow: hidden;
  background: #f2f2f0;
}

.cs-style__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-style__hero-img[hidden] {
  display: none;
}

.cs-style__photos {
  width: 100%;
  height: auto;
  display: block;
}

.cs-style__tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #e4e4e4;
  padding: 32px 26px;
}

.cs-style__tab {
  flex: none;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Forum', serif;
  font-size: 14px;
  letter-spacing: 0.025em;
  color: #999;
  cursor: pointer;
}

.cs-style__tab.is-active {
  color: #1a1a1a;
}

.cs-style__panel {
  display: none;
}

.cs-style__panel.is-active {
  display: block;
}

.cs-style__features {
  display: flex;
  padding: 40px 26px;
  gap: 12px;
}

.cs-style__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-style__col p {
  font-family: 'Noto Serif TC', serif;
  font-weight: 200;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.025em;
  color: #333;
}

/* ---------- CTA link ---------- */
.collection-cta {
  padding: 40px 26px 88px;
  text-align: center;
}

.collection-cta__btn {
  display: inline-block;
  font-family: 'Noto Serif TC', serif;
  font-weight: 200;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 700px) {
  .collection-text__title {
    font-size: 17px;
  }

  .collection-text__body {
    font-size: 14px;
  }

  .cs-style__col p {
    font-size: 13px;
  }
}

/* ---------- Desktop collection: split-screen pinned layout, one group
   per "page" of scroll (mirrors the homepage .split-hero pattern) — left
   text crossfades, right side shows an auto-playing photo carousel per
   group. Below 1024px this entire block does nothing; the mobile layout
   (.collection--mobile) is what actually renders. ---------- */
.split-collection {
  display: none;
}

@media (min-width: 1024px) {
  .collection--mobile {
    display: none;
  }

  .split-collection {
    display: block;
    position: relative;
    height: 700vh; /* 7 groups × 100vh */
  }

  .split-collection__pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 100vh;
    overflow: hidden;
    background: #fff;
  }

  .split-collection__text {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 64px;
    opacity: 0;
    pointer-events: none;
  }

  .split-collection__text[data-group="7"] .cs-style__tab {
    pointer-events: auto;
  }

  .split-collection__text[data-group="1"] {
    opacity: 1;
  }

  .split-collection__photo {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    opacity: 0;
  }

  .split-collection__photo[data-group="1"] {
    opacity: 1;
  }

  .split-collection .collection-text__title {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: left;
  }

  .split-collection .collection-text__body {
    font-size: 14px;
    line-height: 22px;
    text-align: left;
  }

  .split-collection .collection-text__note {
    margin-top: 24px;
  }

  .split-collection .collection-text__note p {
    font-size: 13px;
    line-height: 22px;
  }

  .split-collection .photo-carousel,
  .split-collection .photo-carousel__track,
  .split-collection .photo-carousel__img {
    width: 100%;
    height: 100%;
  }

  .split-collection .photo-carousel__img {
    object-fit: cover;
  }

  .photo-carousel__dots--corner {
    position: absolute;
    left: auto;
    right: 32px;
    bottom: 32px;
    justify-content: flex-end;
  }

  /* ---------- Group 7: style tabs, reusing the mobile cs-style classes
     but laid out for the desktop split panel. ---------- */
  .split-collection .cs-style__tabs--desktop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    background: none;
    padding: 0 0 40px;
  }

  .split-collection .cs-style__tab {
    font-size: 22px;
  }

  .split-collection .cs-style__features {
    flex-direction: column;
    padding: 0;
    gap: 8px;
  }

  .split-collection .cs-style__col p {
    font-size: 13px;
    line-height: 22px;
  }

  .split-collection__photo[data-group="7"] {
    background: #fff;
  }

  .split-collection__photo[data-group="7"] .cs-style__hero-img {
    inset: auto;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    transform: none;
    width: auto;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: unset;
  }
}

/* ---------- Scroll-snap: one stop per group, scoped to only when the
   split-collection section is near the viewport (collection.js toggles
   this class), so it never affects scrolling anywhere else on the page —
   same scoping technique already proven working on the homepage. ---------- */
html.collection-snap-zone {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 76px;
}

.split-collection__snap-marker {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  pointer-events: none;
}

/* ---------- Nav color adapts when a light-background photo is showing
   behind it (group 2's first photo specifically). ---------- */
.site-header.nav-light .desktop-nav .nav-link {
  color: #b3b3b3;
}
