/*
 * Birtue v40 – Instagram profile-style gallery only.
 * Six equally sized 3:4 thumbnails, edge-to-edge within a 2px grid.
 * Cropping is intentional, matching the Instagram profile grid.
 * The same layout is used on TOP and ABOUT, including static fallbacks.
 */
.boutique-home .instagram .ig-grid,
.about-page-v7 .about-instagram-section .instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  align-items: stretch;
}

/* The TOP gallery starts as six <img>s and is wrapped in <a>s by the live feed. */
.boutique-home .instagram .ig-grid > a.instagram-item,
.about-page-v7 .about-instagram-section .instagram-grid > a.instagram-item,
.boutique-home .instagram .ig-grid > img {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

/* Fill each fixed-size tile: do not introduce letterboxing or unequal heights. */
.boutique-home .instagram .ig-grid > a.instagram-item > img,
.about-page-v7 .about-instagram-section .instagram-grid > a.instagram-item > img {
  display: block;
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

/* TOP static fallback before Instagram replaces the six images. */
.boutique-home .instagram .ig-grid > img {
  height: auto;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 640px) {
  .boutique-home .instagram .ig-grid,
  .about-page-v7 .about-instagram-section .instagram-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v41: Narrow only the ABOUT Instagram section on desktop.
 * TOP and mobile (<781px) retain their v40 layout.
 * Keep the heading and 3:4 image grid aligned in one centered column.
 */
@media (min-width: 781px) {
  .about-page-v7 .about-instagram-section > .container {
    width: min(780px, calc(100% - 56px));
    max-width: 780px;
    margin-inline: auto;
  }
}

/* v42: Match TOP desktop Instagram image-grid width to ABOUT desktop (780px).
 * Keep the TOP heading in its original column, and do not alter tablet/mobile.
 */
@media (min-width: 901px) {
  .boutique-home .instagram .ig-grid {
    width: min(100%, 780px);
    max-width: 780px;
    justify-self: center;
  }
}
