.collection-page {
  min-height: 100vh;
  background: var(--warm-white);
}

.collection-header {
  border-bottom: 1px solid rgba(59, 32, 7, 0.08);
}

.collection-header .nav-link[aria-current="page"]::after {
  width: 100%;
}

.collection-hero {
  min-height: 78vh;
  padding: calc(var(--header-height) + clamp(70px, 11vw, 150px)) 8vw clamp(70px, 10vw, 130px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  background: var(--linen-light);
  border-bottom: 1px solid rgba(59, 32, 7, 0.08);
}

.collection-hero-copy {
  max-width: 920px;
}

.collection-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(5.5rem, 13vw, 12rem);
  line-height: 0.72;
  letter-spacing: -0.035em;
  color: var(--chocolate);
}

.collection-hero h1 span {
  display: block;
  font-size: 0.48em;
  font-style: italic;
  letter-spacing: 0.01em;
  transform: translateX(0.06em);
}

.collection-hero-copy > p {
  max-width: 560px;
  margin: 56px 0 0 20%;
  color: var(--text-light);
  font-size: clamp(0.82rem, 1.2vw, 0.98rem);
  line-height: 1.9;
}

.collection-hero-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  color: var(--text-lighter);
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 86px);
  row-gap: clamp(100px, 14vw, 210px);
  padding: clamp(90px, 12vw, 180px) 7vw clamp(110px, 15vw, 220px);
}

.dress-card {
  width: min(100%, 620px);
}

.dress-card--offset {
  justify-self: end;
  margin-top: clamp(70px, 10vw, 150px);
}

.dress-card--wide {
  width: min(100%, 720px);
}

.dress-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--linen-dark);
  cursor: pointer;
}

.dress-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(27, 13, 4, 0.32));
  opacity: 0;
  transition: opacity 0.45s ease;
}

.dress-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.dress-card-image:hover img,
.dress-card-image:focus-visible img {
  transform: scale(1.025);
}

.dress-card-image:hover::after,
.dress-card-image:focus-visible::after {
  opacity: 1;
}

.dress-card-view {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 1;
  color: var(--warm-white);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dress-card-view span,
.text-link span {
  margin-left: 9px;
}

.dress-card-image:hover .dress-card-view,
.dress-card-image:focus-visible .dress-card-view {
  opacity: 1;
  transform: translateY(0);
}

.dress-card-copy {
  position: relative;
  padding: 30px 0 0 54px;
}

.dress-number {
  position: absolute;
  top: 39px;
  left: 0;
  color: var(--text-lighter);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.dress-card h2 {
  margin-bottom: 13px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4.2rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.015em;
  color: var(--chocolate);
}

.dress-card-copy p {
  max-width: 520px;
  color: var(--text-light);
  font-size: 0.78rem;
  line-height: 1.8;
}

.text-link {
  margin-top: 20px;
  color: var(--chocolate);
  font-family: var(--font-body);
  font-size: 0.61rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(59, 32, 7, 0.28);
  padding-bottom: 5px;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--chocolate-light);
  border-color: var(--chocolate-light);
}

.collection-appointment {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(100px, 14vw, 190px) 7vw;
  text-align: center;
  background: var(--linen);
  border-top: 1px solid rgba(59, 32, 7, 0.06);
}

.collection-appointment h2 {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 8vw, 7.5rem);
  font-weight: 300;
  line-height: 0.86;
  letter-spacing: -0.025em;
}

.collection-appointment > p {
  max-width: 560px;
  margin: 32px 0;
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.8;
}

.collection-footer {
  padding: 70px 7vw 26px;
  background: var(--linen);
}

.dress-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  color: var(--text);
  background: var(--warm-white);
  overflow: hidden;
}

.dress-dialog::backdrop {
  background: rgba(27, 13, 4, 0.72);
  backdrop-filter: blur(5px);
}

.dress-dialog[open] {
  animation: gallery-in 0.42s ease both;
}

.dress-dialog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.65fr);
  height: 100%;
}

.dress-gallery {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 28px;
  background: #ded8d0;
}

.gallery-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.gallery-stage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.gallery-stage > img.is-changing {
  opacity: 0;
}

.gallery-close {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(250, 247, 243, 0.92);
  box-shadow: 0 4px 22px rgba(27, 13, 4, 0.09);
}

.gallery-close span {
  position: absolute;
  top: 21px;
  left: 13px;
  width: 18px;
  height: 1px;
  background: var(--chocolate);
}

.gallery-close span:first-child { transform: rotate(45deg); }
.gallery-close span:last-child { transform: rotate(-45deg); }

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(250, 247, 243, 0.9);
  color: var(--chocolate);
  font-size: 1rem;
  box-shadow: 0 4px 22px rgba(27, 13, 4, 0.08);
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible,
.gallery-close:hover,
.gallery-close:focus-visible {
  background: var(--white);
}

.gallery-arrow--previous { left: 18px; }
.gallery-arrow--next { right: 18px; }

.gallery-count {
  position: absolute;
  right: 20px;
  bottom: 16px;
  padding: 7px 10px 6px;
  color: var(--text-light);
  background: rgba(250, 247, 243, 0.88);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding-top: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery-thumbnail {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 76px;
  overflow: hidden;
  background: var(--linen-dark);
  opacity: 0.48;
  transition: opacity 0.25s ease;
}

.gallery-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
}

.gallery-thumbnail.is-active,
.gallery-thumbnail:hover,
.gallery-thumbnail:focus-visible {
  opacity: 1;
}

.gallery-thumbnail.is-active::after {
  border-color: var(--chocolate);
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dress-dialog-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(42px, 5vw, 86px);
  background: var(--warm-white);
}

.dress-dialog-copy h2 {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 6vw, 6.5rem);
  font-weight: 300;
  line-height: 0.9;
  color: var(--chocolate);
}

.dress-dialog-copy > p:not(.dress-dialog-note) {
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.85;
}

.dress-dialog-copy .cta-button {
  margin-top: 32px;
}

.dress-dialog-note {
  margin-top: 22px;
  color: var(--text-lighter);
  font-size: 0.64rem;
  line-height: 1.7;
}

@keyframes gallery-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 901px) {
  .collection-hero {
    min-height: clamp(520px, 58vh, 640px);
    padding: calc(var(--header-height) + clamp(36px, 4vw, 58px)) 7vw clamp(56px, 5vw, 76px);
    align-items: center;
    gap: clamp(40px, 6vw, 88px);
  }

  .collection-hero h1 {
    font-size: clamp(5rem, 10vw, 9rem);
    line-height: 0.78;
  }

  .collection-hero-copy > p {
    margin: 36px 0 0;
  }

  .collection-grid {
    max-width: 1500px;
    margin: 0 auto;
    padding: clamp(84px, 7vw, 110px) 7vw clamp(120px, 10vw, 160px);
    column-gap: clamp(32px, 4vw, 64px);
    row-gap: clamp(84px, 7vw, 110px);
    align-items: start;
  }

  .dress-card,
  .dress-card--wide,
  .dress-card--offset {
    width: 100%;
    max-width: none;
    margin-top: 0;
    justify-self: stretch;
  }
}

@media (max-width: 900px) {
  .collection-hero {
    min-height: 68vh;
    padding-right: 7vw;
    padding-left: 7vw;
  }

  .collection-hero-copy > p {
    margin-left: 10%;
  }

  .collection-grid {
    column-gap: 24px;
  }

  .dress-dialog-shell {
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  }

  .dress-gallery {
    padding: 18px;
  }

  .dress-dialog-copy {
    padding: 34px;
  }
}

@media (max-width: 768px) {
  .collection-hero {
    min-height: 72svh;
    padding-top: calc(var(--header-height) + 74px);
    padding-bottom: 54px;
    align-items: flex-start;
    justify-content: flex-end;
    flex-direction: column;
    gap: 44px;
  }

  .collection-hero h1 {
    font-size: clamp(5.2rem, 29vw, 8rem);
  }

  .collection-hero-copy > p {
    margin: 38px 0 0;
  }

  .collection-hero-note {
    align-items: flex-start;
  }

  .collection-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 100px;
    padding: 80px 6vw 120px;
  }

  .dress-card,
  .dress-card--wide {
    width: 100%;
  }

  .dress-card--offset {
    margin-top: 0;
  }

  .dress-card-image::after {
    opacity: 0.35;
  }

  .dress-card-view {
    right: 18px;
    bottom: 16px;
    opacity: 1;
    transform: none;
  }

  .dress-card-copy {
    padding: 24px 0 0 42px;
  }

  .dress-number {
    top: 32px;
  }

  .dress-card-copy p {
    font-size: 0.76rem;
  }

  .collection-footer {
    padding-right: 6vw;
    padding-left: 6vw;
  }

  .dress-dialog {
    overflow-y: auto;
  }

  .dress-dialog-shell {
    display: block;
    height: auto;
    min-height: 100%;
  }

  .dress-gallery {
    height: 74svh;
    min-height: 520px;
    padding: 12px 12px 0;
  }

  .gallery-close {
    top: 18px;
    left: 18px;
  }

  .gallery-arrow {
    width: 42px;
    height: 42px;
  }

  .gallery-arrow--previous { left: 12px; }
  .gallery-arrow--next { right: 12px; }

  .gallery-thumbnails {
    padding: 10px 6px 8px;
  }

  .gallery-thumbnail {
    flex-basis: 52px;
    width: 52px;
    height: 68px;
  }

  .dress-dialog-copy {
    min-height: 380px;
    padding: 54px 7vw 72px;
  }
}

@media (max-width: 520px) {
  .collection-hero {
    min-height: 660px;
  }

  .collection-hero h1 {
    font-size: clamp(5rem, 30vw, 7rem);
  }

  .collection-appointment h2 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

  .collection-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .collection-footer .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .collection-footer .footer-legal {
    align-items: flex-start;
  }
}
