/* Collections rail — homepage redesign ("Shop by room").
   Horizontal scroll of room cards. See design_handoff_homepage/README.md §8. */

.cr {
  background: var(--cr-bg, #ffffff);
  color: #1f1f1f;
  padding: 80px 0;
}

/* Header */
.cr__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  padding: 0 24px;
}

.cr__eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6b6357;
}

.cr__heading {
  margin: 0;
  font-family: "Urbanist", sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cr__link {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #1f1f1f;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  white-space: nowrap;
}

/* Track */
.cr__track {
  display: flex;
  gap: 14px;
  padding: 0 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

/* Card */
.cr-card {
  position: relative;
  flex: 0 0 clamp(260px, 78vw, 320px);
  aspect-ratio: 320 / 420;
  scroll-snap-align: start;
  overflow: hidden;
  color: #f2efe8;
  text-decoration: none;
}

.cr-card__media,
.cr-card__img,
.cr-card__overlay {
  position: absolute;
  inset: 0;
}

.cr-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.02, 0.01, 0, 0.95);
}

.cr-card:hover .cr-card__img {
  transform: scale(1.04);
}

.cr-card__overlay {
  background: linear-gradient(180deg, transparent 50%, rgba(20, 18, 14, 0.4) 100%);
}

.cr-card__label {
  position: absolute;
  bottom: 24px;
  left: 24px;
}

.cr-card__num {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cr-card__name {
  font-family: "Urbanist", sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
}

.cr-card__arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(242, 239, 232, 0.6);
  background: rgba(20, 18, 14, 0.2);
  transition: background-color 0.2s ease;
}

.cr-card:hover .cr-card__arrow {
  background: rgba(20, 18, 14, 0.5);
}

/* Desktop */
@media screen and (min-width: 990px) {
  .cr {
    padding: 110px 0;
  }

  .cr__header {
    margin-bottom: 40px;
    padding: 0 96px;
  }

  .cr__track {
    padding: 0 0 0 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cr-card__img {
    transition: none;
  }
}
