/* Shared PFE carousel: layout, image loading states */
.pfe-carousel .pfe-track {
  display: flex;
  height: 100%;
  transition: transform 420ms ease;
  will-change: transform;
}

.pfe-carousel .pfe-slide {
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.pfe-carousel .pfe-slide img {
  display: block;
  width: auto;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  margin: auto;
}

.pfe-carousel .pfe-slide img.is-loading {
  opacity: 0.55;
  background: linear-gradient(135deg, #f4f9ff 0%, #eaf2fb 100%);
  min-height: 160px;
}

.pfe-carousel .pfe-slide img.is-ready {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.pfe-carousel .pfe-slide img.is-error {
  opacity: 1;
}

/* Nav buttons — CSS chevrons avoid encoding issues with raw Unicode in PHP templates */
.pfe-carousel button.pfe-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0d73d4;
  font-size: 0;
  line-height: 0;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(7, 29, 51, 0.2);
  z-index: 2;
  text-align: center;
  white-space: nowrap;
}

.pfe-carousel button.pfe-nav::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  box-sizing: border-box;
}

.pfe-carousel .pfe-prev::before {
  transform: translateX(2px) rotate(-135deg);
}

.pfe-carousel .pfe-next::before {
  transform: translateX(-2px) rotate(45deg);
}

.pfe-carousel button.pfe-nav:hover,
.pfe-carousel button.pfe-nav:active {
  background: rgba(255, 255, 255, 0.94) !important;
  color: #0d73d4 !important;
  border: 0 !important;
  box-shadow: 0 8px 18px rgba(7, 29, 51, 0.2) !important;
  transform: translateY(-50%) !important;
}

.pfe-carousel button.pfe-nav:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.65);
  outline-offset: 2px;
}

.pfe-carousel .pfe-prev {
  left: 14px;
}

.pfe-carousel .pfe-next {
  right: 14px;
}

@media (max-width: 640px) {
  .pfe-carousel button.pfe-nav {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .pfe-carousel .pfe-prev {
    left: 10px;
  }

  .pfe-carousel .pfe-next {
    right: 10px;
  }
}
