/* ================================================
   AC PHOTO GALLERY — Main image + thumbnail strip
   Supports: click, swipe (touch), drag (mouse)
   ================================================ */
.ac-photo-gallery {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Main image ── */
.ac-photo-gallery-main {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.ac-photo-gallery-main.is-dragging {
  cursor: grabbing;
}
.ac-photo-gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ── Thumbnail strip ── */
.ac-photo-gallery-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.ac-photo-gallery-thumbs.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.ac-photo-gallery-thumb {
  flex: 0 0 auto;
  width: 120px;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.ac-photo-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ac-photo-gallery-thumb:hover,
.ac-photo-gallery-thumb.is-active {
  opacity: 1;
}

/* ── Swipe arrows (prev/next on main image) ── */
.ac-photo-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.ac-photo-gallery-main:hover .ac-photo-gallery-arrow {
  opacity: 1;
}
.ac-photo-gallery-arrow:hover {
  background: rgba(0,0,0,0.65);
}
.ac-photo-gallery-arrow--prev { left: 12px; }
.ac-photo-gallery-arrow--next { right: 12px; }

@media (max-width: 600px) {
  .ac-photo-gallery-thumb {
    width: 90px;
  }
  /* Always show arrows on mobile (no hover) */
  .ac-photo-gallery-arrow {
    opacity: 0.7;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}
