.jt-shot-carousel {
  --jt-gap: 18px;
  --jt-radius: 16px;
  --jt-shadow: 0 10px 30px rgba(0,0,0,.10);
  --jt-shadow-soft: 0 6px 18px rgba(0,0,0,.08);
  --jt-border: rgba(0,0,0,.08);

  /* Fade target background (fallback if your WP var isn't set) */
  --jt-fade-bg: var(--wp--preset--color--canvas, #ffffff);

  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

.jt-shot-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--jt-radius);
  padding: 8px 0;
}

/* Filmstrip track */
.jt-shot-track {
  display: flex;
  align-items: center;
  gap: var(--jt-gap);
  will-change: transform;
  transition: transform 520ms cubic-bezier(.2,.85,.2,1);
  padding: 8px 10px;
}

/*
  IMPORTANT: fixed, consistent slide width so you ALWAYS see:
  previous | active | next
*/
.jt-shot-slide {
  flex: 0 0 78%;
  max-width: 78%;
  min-width: 78%;
  box-sizing: border-box;

  position: relative;
  transform: scale(.94);
  opacity: .55;
  filter: saturate(.95);
  transition: transform 520ms cubic-bezier(.2,.85,.2,1), opacity 520ms, filter 520ms;
}

@media (min-width: 900px) {
  .jt-shot-slide {
    flex-basis: 72%;
    max-width: 72%;
    min-width: 72%;
  }
}

.jt-shot-slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: none;
}

.jt-shot-card {
  border-radius: var(--jt-radius);
  border: 1px solid var(--jt-border);
  background: #fff;
  box-shadow: var(--jt-shadow);
  overflow: hidden;
}

.jt-shot-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Optional: uncomment if you want perfectly consistent heights too */
/*
.jt-shot-card { aspect-ratio: 16 / 9; }
.jt-shot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
*/

.jt-shot-caption {
  padding: 12px 14px;
  font-size: 13px;
  opacity: .85;
}

.jt-shot-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.jt-shot-btns {
  display: inline-flex;
  gap: 10px;
}

.jt-shot-btn {
  appearance: none;
  border: 1px solid var(--jt-border);
  background: #fff;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--jt-shadow-soft);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  line-height: 1;
}

.jt-shot-btn:hover { transform: translateY(-1px); }
.jt-shot-btn:active { transform: translateY(0); }
.jt-shot-btn:disabled { opacity: .45; cursor: default; transform: none; }

.jt-shot-dots {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.jt-shot-dot {  
  width: 9px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--jt-border);
  background: rgba(0,0,0,.12);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.jt-shot-dot[aria-current="true"] {
  background: rgba(0,0,0,.55);
  transform: scale(1.15);
}

.jt-shot-sr {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Soft edge fades so the filmstrip doesn't hard-cut at the ends */
.jt-shot-viewport::before,
.jt-shot-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px; /* fade size */
  pointer-events: none;
  z-index: 5;
}
/*
.jt-shot-viewport::before {
  left: 0;
  background: linear-gradient(to right, var(--jt-fade-bg) 0%, rgba(255,255,255,0) 100%);
}*/

.jt-shot-viewport::after {
  right: 0;
  background: linear-gradient(to left, var(--jt-fade-bg) 0%, rgba(255,255,255,0) 100%);
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .jt-shot-track,
  .jt-shot-slide {
    transition: none !important;
  }
}
 
.wp-lightbox-overlay .lightbox-image-container {
  max-width: 100% !important; 
  max-height: 100% !important;
  min-height: auto !important;
}

.wp-lightbox-overlay .wp-block-image img {
  width: calc(100%) !important; 
  max-width: calc(100% - 10px) !important; 
  max-height: calc(100% - 10px) !important;
  min-height: auto !important;
  height: auto!important;
}

/* WP Core Lightbox – make mobile sizing sane (no side clipping) */
@media (max-width: 820px) {  
  :root {
    --wp--lightbox-image-width: calc(100vw - 32px);
    --wp--lightbox-container-width: calc(100vw - 32px);
  }
  
  /* The overlay container */
  .wp-lightbox-container {
    padding: 16px !important;
  }

  /* The image wrapper inside lightbox */
  .wp-lightbox-container .lightbox-image-container,
  .wp-lightbox-container .lightbox-image-container img,
  .wp-lightbox-container img[aria-label="Enlarged image"] {
    max-width: calc(100vw - 32px) !important;
  }

  /* Ensure the image never crops */
  .wp-lightbox-container img[aria-label="Enlarged image"],
  .wp-lightbox-container .lightbox-image-container img {
    width: auto !important;
    height: auto !important;
    max-height: calc(100vh - 96px) !important; /* leave room for close button */
    object-fit: contain !important;
  }

  /* If WP sets a fixed container width/height, relax it */
  .wp-lightbox-overlay .lightbox-image-container {
    width: 100%;
    height: auto !important;
    max-height: calc(100vh - 96px) !important;
    overflow: auto !important;
  }
}