/* Hotel guest gallery: preview grid on /hotel/, full grid on /hotel/gallery/, shared lightbox.
   Data: /app/api/hotel-gallery (assets/js/imy-gallery.js). */

.gl-section[hidden] { display: none; }
.gl-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .gl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 900px) { .gl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gl-item { margin: 0; }
.gl-tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--imy-radius-media); background: var(--imy-platinum);
}
.gl-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--imy-ease); }
.gl-tile:hover img { transform: scale(1.04); }
.gl-tile:focus-visible { outline: none; box-shadow: var(--imy-focus); }
.gl-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px;
  background: linear-gradient(to top, rgba(0, 20, 50, .62), rgba(0, 20, 50, 0));
  color: #fff; font-size: .82rem; text-align: left; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* last preview tile: "+24 รูป" */
.gl-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 56, 131, .72); color: #fff; font-family: var(--imy-font-head); font-weight: 500; font-size: 1.35rem; }
.gl-foot { margin-top: var(--imy-space-6, 28px); text-align: center; }
.gl-empty { color: var(--imy-ink-soft); text-align: center; padding: 40px 0; }

/* Mobile preview shows 6 tiles, desktop 8 (JS renders 8; CSS hides 7–8 on narrow screens) */
@media (max-width: 899px) { .gl-grid--preview .gl-item:nth-child(n+7) { display: none; } }

/* Lightbox */
.gl-box { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  background: rgba(8, 14, 26, .94); color: #fff; overscroll-behavior: contain; }
.gl-box::backdrop { background: rgba(8, 14, 26, .94); }
.gl-box__stage { position: absolute; inset: 56px 0 64px; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.gl-box__img { max-width: min(94vw, 1400px); max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.gl-box__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 0 16px; font-size: .95rem; }
.gl-box__count { color: rgba(255, 255, 255, .6); font-size: .82rem; }
.gl-box__btn { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.gl-box__btn:hover { background: rgba(255, 255, 255, .22); }
.gl-box__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gl-box__btn svg { width: 22px; height: 22px; }
.gl-box__close { top: 8px; right: 10px; }
.gl-box__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.gl-box__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .gl-box__prev, .gl-box__next { display: none; } } /* swipe on phones */
html.gl-lock { overflow: hidden; }

/* /hotel/gallery/ page */
.gl-crumb { font-size: .85rem; color: var(--imy-ink-soft); margin-bottom: var(--imy-space-4, 16px); }
.gl-crumb a { color: var(--imy-navy); }
.gl-cta { text-align: center; }
.gl-cta .imy-lead { margin-left: auto; margin-right: auto; max-width: 52ch; }
.gl-cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: var(--imy-space-5, 20px); }
