/* Show the entire source photograph in every gallery thumbnail. */
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: start;
}
.gallery-grid .gallery-item {
  grid-row: auto;
  min-width: 0;
  display: block;
}
.gallery-grid .gallery-item img,
.home-gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.instagram-gallery {
  position: relative;
  display: block;
  min-height: 180px;
}
.instagram-gallery-track {
  /* Keep carousel coordinates physical so controls work consistently in RTL. */
  direction: ltr;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 48px;
}
.instagram-gallery-track::-webkit-scrollbar { display: none; }
.instagram-gallery-item {
  position: relative;
  display: block; flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start;
  overflow: hidden;
  border-radius: 16px;
  background: #f6eee9;
  aspect-ratio: 1 / 1;
}
.instagram-gallery-arrow { position:absolute; z-index:2; top:50%; transform:translateY(-50%); width:38px; height:38px; border:1px solid #e8cbc3; border-radius:50%; background:#fffefd; color:#a55b58; font-size:27px; line-height:1; cursor:pointer; box-shadow:0 6px 16px rgba(79,47,41,.12); }
.instagram-gallery-arrow.previous { left:0; }.instagram-gallery-arrow.next { right:0; }
.instagram-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f6eee9;
  object-position: center;
  transition: transform .25s ease;
}
.instagram-gallery-item:hover img { transform: scale(1.035); }
.instagram-gallery-item span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #7a3f3b;
  font: 700 12px/1 system-ui, sans-serif;
}
.instagram-gallery-status {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 0;
  border: 1px dashed #e8cbc3;
  border-radius: 16px;
  color: #826d65;
  text-align: center;
}
.instagram-gallery-link { margin-top: 18px; }
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .instagram-gallery-track { padding-inline:38px; gap:10px; }
  .instagram-gallery-item { flex-basis:82%; }
  .instagram-gallery-arrow { width:31px; height:31px; font-size:23px; }
}
