/* Post-snapshot fixes: things the Squarespace runtime JS used to handle. */

/* Scroll-reveal animations are disabled (no Squarespace JS to trigger them);
   make sure nothing stays hidden at opacity 0. */
[data-animation-role],
.animation-segment-wrapper,
.animation-segment-parent-hidden > *,
.product-list-item,
.products .grid-item {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

/* Lazy images: show immediately. */
img[data-loader],
.sqs-image-content img {
  opacity: 1;
}

/* Simple lightbox for gallery images (replaces Squarespace's). */
.sh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}
.sh-lightbox.open { display: flex; }
.sh-lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}
.sh-lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 1rem;
  opacity: 0.8;
}
.sh-lightbox button:hover { opacity: 1; }
.sh-lightbox-close { top: 0.5rem; right: 0.5rem; }
.sh-lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.sh-lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

/* Buy button is now an <a>; keep the button look from site.css and make sure
   it doesn't inherit link underlines. */
a.stripe-buy { text-decoration: none; display: inline-block; text-align: center; }

/* Section background images with the "parallax" effect: Squarespace's
   BackgroundImageFXParallax controller reveals and moves them; without it
   they stay visibility:hidden. Show them oversized (120% tall) so main.js
   can slide them slowly as you scroll without exposing gaps. */
.section-background-content[data-controller*="Parallax"] img.background-image-fx {
  visibility: visible !important;
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}

/* Fixed header turns opaque black once scrolled (main.js toggles .shrink,
   the class Squarespace's JS uses; site.css already handles the transition
   and forces transparency while .shrink is absent). */
.header.shrink {
  /* translucent black, like the live site's scrolled header */
  background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Gallery reel: Squarespace's GalleryReel JS measures and transforms each
   item; without it items collapse to 0x0. Recreate the look as a horizontal
   scroll strip (main.js wires the prev/next buttons to scrollBy). */
.gallery-reel .gallery-reel-wrapper { height: 100%; }
.gallery-reel .gallery-reel-list {
  display: flex;
  gap: 10px;
  height: calc(100% - 70px);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery-reel .gallery-reel-list::-webkit-scrollbar { display: none; }
.gallery-reel .gallery-reel-item {
  position: static !important;
  transform: none !important;
  flex: 0 0 auto;
  height: 100%;
  width: auto !important;
  margin: 0;
}
.gallery-reel .gallery-reel-item-wrapper,
.gallery-reel .gallery-reel-item-src {
  position: static !important;
  display: block !important; /* their JS stamps data-visible; we show all slides */
  height: 100%;
  width: auto;
  opacity: 1 !important;
  visibility: visible !important;
}
.gallery-reel .gallery-reel-item img {
  position: static !important;
  height: 100%;
  width: auto !important;
  max-width: none !important;
  display: block;
}

/* Product page gallery: their JS toggles the active slide; show slide 1. */
.product-gallery .product-gallery-slides-item {
  display: block !important;
  opacity: 1 !important;
  position: relative !important;
  width: 100%;
  height: 100%;
}
.product-gallery .product-gallery-slides-item-image {
  display: block;
  opacity: 1 !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-gallery .product-image-zoom-duplicate { display: none !important; }

/* imageFluid "content-fit" blocks: Squarespace's JS sets the container height
   from the image's native aspect ratio; without it the image stretches to the
   whole grid cell. Reproduce the computed result in CSS. */
.sqs-block[data-definition-name="website.components.imageFluid"]
  .design-layout-fluid
  .fluid-image-container:has(.content-fit) {
  width: 100%;
  height: auto;
  aspect-ratio: var(--image-component-native-aspect-ratio);
}
