/* Scalable pattern catalogue. Scoped to preserve the approved hero. */
.collection {
  max-width: 1440px;
  margin-inline: auto;
  padding: 76px 6% 84px;
}

.collection > .section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
  margin: 0 0 32px;
}

.collection .section-title small { font-size: 10px; }
.collection .section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.045em;
}

.collection .section-title > a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}
.collection .section-title > a::after { content: '↗'; }

.collection .pattern-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 28px;
}

.collection .pattern-gallery .pattern-item.shot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  direction: inherit;
  background: transparent;
}

.collection .pattern-gallery .pattern-item > * { direction: inherit; }
.collection .pattern-item figure {
  position: relative;
  min-height: 0;
  height: auto;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1.14;
  overflow: hidden;
  background: var(--soft);
  border-radius: 3px;
}
.collection .pattern-gallery .pattern-item img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center 63%;
  border-radius: 0;
}
.collection .pattern-item figure figcaption {
  inset-inline-start: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 3px;
  background: #fffdf9ed;
  color: #51495a;
  font-size: 9px;
  line-height: 1.5;
}

.collection .pattern-gallery .pattern-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  padding: 21px 0 0;
}
.collection .pattern-info h3 {
  margin: 0 0 11px;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.collection .pattern-info p {
  margin: 0 0 23px;
  max-width: 34ch;
  min-height: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.collection .pattern-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.collection .pattern-bottom > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.collection .pattern-bottom > span::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}
.collection .shop-button {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 3px;
  font-size: 11px;
}

@media (max-width: 1000px) {
  .collection .pattern-gallery { gap: 20px; }
  .collection .pattern-bottom { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 700px) {
  .collection { padding: 48px 22px 54px; }
  .collection > .section-title { align-items: flex-start; margin-bottom: 26px; }
  .collection .section-title h2 { max-width: 10ch; font-size: 33px; }
  .collection .section-title > a { margin-top: 19px; white-space: normal; }
  .collection .pattern-gallery { grid-template-columns: 1fr; gap: 38px; }
  .collection .pattern-item figure { aspect-ratio: 1 / 1.04; }
  .collection .pattern-gallery .pattern-info { padding-top: 18px; }
  .collection .pattern-info h3 { font-size: 26px; }
  .collection .pattern-info p { max-width: none; margin-bottom: 18px; }
  .collection .pattern-bottom { flex-direction: row; align-items: center; }
}
