/* Par Excellence Image Gallery - scoped to avoid theme / Elementor conflicts. */
.pig-gallery {
  --pig-arrow-color: #fff;
  --pig-arrow-bg: #0876c9;
  --pig-arrow-hover-color: #fff;
  --pig-arrow-hover-bg: #055a9d;
  --pig-selected-color: #171717;
  --pig-frame-color: #101010;
  --pig-frame-width: 10px;
  --pig-main-ratio: 4/3;
  --pig-image-fit: cover;
  --pig-thumbs-desktop: 6;
  --pig-thumbs-tablet: 4;
  --pig-thumbs-mobile: 2;
  --pig-gap: 11px;
  --pig-thumbs-visible: var(--pig-thumbs-desktop);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
}
.pig-gallery *, .pig-gallery *::before, .pig-gallery *::after { box-sizing: border-box; }
.pig-gallery .pig-main {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: var(--pig-main-ratio);
  background: var(--pig-frame-color);
  border: var(--pig-frame-width) solid var(--pig-frame-color);
  overflow: hidden;
  outline-offset: 2px;
  touch-action: pan-y;
}
.pig-gallery .pig-main-track {
  display: flex;
  height: 100%;
  width: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 340ms cubic-bezier(.2,.65,.25,1);
  will-change: transform;
}
.pig-gallery .pig-slide {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: var(--pig-frame-color);
  overflow: hidden;
}
.pig-gallery .pig-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: var(--pig-image-fit);
  object-position: center;
  border-radius: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.pig-gallery .pig-thumbs {
  margin-top: 15px;
  position: relative;
  min-width: 0;
}
.pig-gallery .pig-thumbs-track {
  display: flex;
  gap: var(--pig-gap);
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.pig-gallery .pig-thumbs-track:active { cursor: grabbing; }
.pig-gallery .pig-thumbs-track::-webkit-scrollbar { display: none; }
.pig-gallery .pig-thumb {
  appearance: none;
  display: block;
  flex: 0 0 calc((100% - (var(--pig-thumbs-visible) - 1) * var(--pig-gap)) / var(--pig-thumbs-visible));
  width: calc((100% - (var(--pig-thumbs-visible) - 1) * var(--pig-gap)) / var(--pig-thumbs-visible));
  aspect-ratio: 1.55;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 13px;
  outline: 0 solid transparent;
  outline-offset: 0;
  background: #ececec;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: none;
  transition: outline-color 150ms, box-shadow 150ms;
}
.pig-gallery .pig-thumb.is-active {
  outline: 3px solid var(--pig-selected-color);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 3px white;
}
.pig-gallery .pig-thumb:focus-visible { outline: 3px solid var(--pig-arrow-bg); outline-offset: -3px; }
.pig-gallery .pig-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  margin: 0;
  padding: 0;
  border-radius: inherit;
  pointer-events: none;
}
.pig-gallery .pig-thumb.is-active::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 3px;
  border: 2px solid #fff;
  border-radius: 10px;
}
.pig-gallery .pig-arrow {
  appearance: none;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 4px;
  background: var(--pig-arrow-bg);
  color: var(--pig-arrow-color);
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  line-height: 1;
  box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(.94);
  transition: opacity 170ms ease, visibility 170ms ease, background-color 170ms ease, color 170ms ease, transform 170ms ease;
  z-index: 2;
  cursor: pointer;
  text-decoration: none;
}
.pig-gallery .pig-arrow:focus-visible { outline: 3px solid #101010; outline-offset: 2px; }
.pig-gallery .pig-arrow:not(:disabled):hover { background: var(--pig-arrow-hover-bg); color: var(--pig-arrow-hover-color); transform: translateY(-50%) scale(1.045); }
.pig-gallery .pig-arrow:disabled { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
.pig-gallery .pig-arrow svg { width: 24px; height: 24px; display: block; flex: none; }
.pig-gallery .pig-arrow--main { top: 50%; width: 58px; height: 60px; }
.pig-gallery .pig-arrow--previous { left: 10px; }
.pig-gallery .pig-arrow--next { right: 10px; }
.pig-gallery .pig-arrow--thumb { top: 50%; width: 39px; height: 43px; }
.pig-gallery .pig-arrow--thumb.pig-arrow--previous { left: 4px; }
.pig-gallery .pig-arrow--thumb.pig-arrow--next { right: 4px; }
.pig-gallery .pig-main:hover .pig-arrow,
.pig-gallery .pig-main:focus-within .pig-arrow,
.pig-gallery .pig-thumbs:hover .pig-arrow,
.pig-gallery .pig-thumbs:focus-within .pig-arrow {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.pig-gallery .pig-screenreader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* Natural-size option: width remains responsive, height follows largest image; use in similar-sized galleries. */
.pig-gallery--natural .pig-main { aspect-ratio: auto; }
.pig-gallery--natural .pig-slide img { height: auto; }
.pig-gallery--natural .pig-main-track { height: auto; align-items: flex-start; }
.pig-gallery--natural .pig-slide { height: auto; }
@media (max-width: 980px) {
  .pig-gallery { --pig-thumbs-visible: var(--pig-thumbs-tablet); }
  .pig-gallery .pig-arrow--main { width: 48px; height: 52px; }
}
@media (max-width: 600px) {
  .pig-gallery { --pig-thumbs-visible: var(--pig-thumbs-mobile); --pig-gap: 9px; }
  .pig-gallery .pig-arrow--main { width: 38px; height: 45px; }
  .pig-gallery .pig-arrow--main svg { width: 21px; height: 21px; }
  .pig-gallery .pig-arrow--previous { left: 6px; }
  .pig-gallery .pig-arrow--next { right: 6px; }
  .pig-gallery .pig-thumbs { margin-top: 11px; }
  .pig-gallery .pig-thumb { border-radius: 9px; }
  .pig-gallery .pig-thumb.is-active::after { border-radius: 7px; }
  .pig-gallery .pig-arrow--thumb { width: 33px; height: 38px; }
}
/* Devices without hover should still have navigation controls. */
@media (hover: none) {
  .pig-gallery .pig-arrow:not(:disabled) {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pig-gallery .pig-main-track, .pig-gallery .pig-thumbs-track, .pig-gallery .pig-arrow { transition: none; scroll-behavior: auto; }
}
