/* =========================================================
   PRODUCT HIGHLIGHTS SLIDER
   COMPLETELY ISOLATED
   ========================================================= */

.ph-carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 30px auto 0;
}

/* ---------------------------------------------------------
   SLIDER IMAGE CONTAINER
   --------------------------------------------------------- */

.ph-carousel .ph-carousel-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  height: 360px;
  margin: 0 auto;

  overflow: hidden;

  border-radius: 16px;

  background: #f5f5f5;
}

/* ---------------------------------------------------------
   INDIVIDUAL SLIDE
   --------------------------------------------------------- */

.ph-carousel .ph-slide {
  display: none;

  width: 100%;
  height: 100%;

  position: relative;
}

/* Active slide */

.ph-carousel .ph-slide.ph-active {
  display: block;
}

/* ---------------------------------------------------------
   IMAGE
   --------------------------------------------------------- */

.ph-carousel .ph-slide img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  border-radius: 16px;
}

/* ---------------------------------------------------------
   FADE / ZOOM EFFECT
   --------------------------------------------------------- */

.ph-carousel .ph-slide.ph-animate {
  animation: phSlideFade 0.7s ease-in-out;
}

@keyframes phSlideFade {
  from {
    opacity: 0;
    transform: scale(1.03);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================================
   PRODUCT HIGHLIGHTS — DOTS
   ========================================================= */

.ph-carousel .ph-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin-top: 16px;
  min-height: 14px;
}

/* NORMAL DOTS */

.ph-carousel .ph-dot {
  width: 13px;
  height: 13px;

  padding: 0;
  margin: 0;

  border: none;
  outline: none;

  border-radius: 50%;

  background: #2864b8;

  cursor: pointer;

  transition:
    width 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

/* =========================================================
   ACTIVE DOT — CLEAR GREEN → CYAN GRADIENT
   ========================================================= */

.ph-carousel .ph-dot.ph-active {
  width: 34px;
  height: 13px;

  border-radius: 20px;

  background: linear-gradient(
    90deg,
    #43d76b 0%,
    #24cfa0 45%,
    #18b9e9 100%
  ) !important;

  box-shadow: 0 2px 6px rgba(24, 185, 233, 0.3);
}

/* Prevent hover from changing gradient */

.ph-carousel .ph-dot.ph-active:hover {
  background: linear-gradient(
    90deg,
    #43d76b 0%,
    #24cfa0 45%,
    #18b9e9 100%
  ) !important;
}

/* Normal dot hover */

.ph-carousel .ph-dot:not(.ph-active):hover {
  background: #3474c8;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
  .ph-carousel .ph-dots-container {
    gap: 7px;
    margin-top: 13px;
  }

  .ph-carousel .ph-dot {
    width: 10px;
    height: 10px;
  }

  .ph-carousel .ph-dot.ph-active {
    width: 28px;
    height: 10px;
  }
}

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 767px) {
  .ph-carousel {
    width: 100%;
    padding: 0 10px;
  }

  .ph-carousel .ph-carousel-container {
    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;

    border-radius: 12px;
  }

  .ph-carousel .ph-slide img {
    border-radius: 12px;
  }

  .ph-carousel .ph-dots-container {
    margin-top: 13px;
    gap: 7px;
  }
}

/* =========================================================
   PRODUCT HIGHLIGHTS — IMAGE CLICK
   ========================================================= */

.ph-carousel .ph-slide img {
  cursor: zoom-in;
}

/* =========================================================
   FULL IMAGE LIGHTBOX
   ========================================================= */

.ph-lightbox {
  position: fixed;

  inset: 0;

  width: 100%;
  height: 100%;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(0, 0, 0, 0.88);

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  z-index: 99999;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

/* =========================================================
   OPEN STATE
   ========================================================= */

.ph-lightbox.ph-lightbox-open {
  opacity: 1;
  visibility: visible;

  pointer-events: auto;
}

/* =========================================================
   FULL IMAGE
   ========================================================= */

.ph-lightbox .ph-lightbox-image {
  display: block;

  max-width: 95vw;
  max-height: 92vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 4px;

  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.45);

  transform: scale(0.94);

  transition: transform 0.3s ease;
}

/* Image animation when opened */

.ph-lightbox.ph-lightbox-open .ph-lightbox-image {
  transform: scale(1);
}

/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.ph-lightbox .ph-lightbox-close {
  position: absolute;

  top: 18px;
  right: 22px;

  width: 44px;
  height: 44px;

  padding: 0;

  border: none;
  outline: none;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.15);

  color: #ffffff;

  font-size: 32px;
  font-weight: 300;

  line-height: 40px;

  cursor: pointer;

  z-index: 2;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.ph-lightbox .ph-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);

  transform: rotate(90deg);
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
  .ph-lightbox {
    padding: 15px;
  }

  .ph-lightbox .ph-lightbox-image {
    max-width: 96vw;
    max-height: 88vh;

    border-radius: 3px;
  }

  .ph-lightbox .ph-lightbox-close {
    top: 10px;
    right: 10px;

    width: 40px;
    height: 40px;

    font-size: 28px;
  }
}

/* =========================================================
   2px GRADIENT BORDER — IMAGE ONLY
   ========================================================= */

.ph-carousel .ph-carousel-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  height: 360px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #fff;
}

/* 2px gradient border on all sides */
.ph-carousel .ph-carousel-container::before {
  content: "";

  position: absolute;
  inset: 0;

  padding: 1px;

  opacity: 0.25;

  border-radius: 18px 18px 0 0;

  background: linear-gradient(135deg, #43d76b 0%, #20c9c0 48%, #2864b8 100%);

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);

  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events: none;
  z-index: 20;
}
