/* Replaces Squarespace's ImageLoader runtime for banner-thumbnail-wrapper
   so the header image fills its container as cover (matching chouhayda.com)
   regardless of the YUI/Squarespace bootstrap not initializing. */

.banner-thumbnail-wrapper {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-thumbnail-wrapper > .desc-wrapper {
  position: relative;
  z-index: 100;
  width: 100%;
  text-align: center;
  padding: 0 24px;
}

.banner-thumbnail-wrapper #thumbnail.content-fill,
.banner-thumbnail-wrapper figure#thumbnail {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  z-index: 1;
}

.banner-thumbnail-wrapper #thumbnail img,
.banner-thumbnail-wrapper figure#thumbnail img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  font-size: 0 !important;
}

/* Gallery tiles on /swap — same cover-fit treatment.
   Each .slide is sized by Squarespace's autocolumns layout;
   we just need the img inside to fill it. */
.sqs-gallery-design-autocolumns-slide {
  cursor: zoom-in;
}
.sqs-gallery-design-autocolumns-slide img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  display: block !important;
}

/* Vanilla lightbox: minimal chrome — image dominates, arrows + close fade in on hover */
.ch-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 4, 0.96);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.ch-lightbox.open { display: flex; }
.ch-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
}
.ch-lightbox button {
  position: absolute;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease;
  letter-spacing: 0.05em;
  line-height: 1;
}
.ch-lightbox:hover button { opacity: 0.55; }
.ch-lightbox button:hover { opacity: 1; }
.ch-lightbox .ch-close {
  top: 14px;
  right: 18px;
  font-size: 26px;
  padding: 6px 10px;
}
.ch-lightbox .ch-prev,
.ch-lightbox .ch-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  padding: 20px 18px;
}
.ch-lightbox .ch-prev { left: 4px; }
.ch-lightbox .ch-next { right: 4px; }
.ch-lightbox .ch-count { display: none; }

/* Touch devices: always show controls (no hover) */
@media (hover: none) {
  .ch-lightbox button { opacity: 0.55; }
  .ch-lightbox .ch-close { font-size: 22px; }
  .ch-lightbox .ch-prev, .ch-lightbox .ch-next { font-size: 32px; padding: 14px 12px; }
}
