/* =========================================================
   HOMER PRODUCT LIGHTBOX
========================================================= */

.product-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;

  background: rgba(0, 0, 0, 0.14);
  color: #fff;

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.product-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}


/* =========================================================
   SLIDER
========================================================= */

.product-lightbox__slider {
  position: absolute;
  inset: 82px 100px 54px;
}

.product-lightbox .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}


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

.product-lightbox img {
  display: block;

  width: auto;
  height: auto;

  max-width: 82vw;
  max-height: 74vh;

  margin: auto;

  object-fit: contain;
  user-select: none;

  border-radius: 10px;

  box-shadow:
          0 24px 65px rgba(0, 0, 0, 0.22);
}


/* =========================================================
   GENERAL BUTTONS
========================================================= */

.product-lightbox button {
  position: absolute;
  z-index: 20;

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

  width: 48px;
  height: 48px;

  padding: 0;
  margin: 0;

  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;

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

  color: #fff;

  cursor: pointer;

  box-shadow:
          0 7px 24px rgba(0, 0, 0, 0.18);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
          background-color 0.2s ease,
          border-color 0.2s ease,
          box-shadow 0.2s ease;
}

.product-lightbox button:hover {
  background: rgba(0, 0, 0, 0.74);
  border-color: rgba(255, 255, 255, 0.42);
}


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

.product-lightbox__close {
  top: 20px;
  right: 24px;

  font-size: 0;
}

.product-lightbox__close::before,
.product-lightbox__close::after {
  content: "";

  position: absolute;

  width: 18px;
  height: 1.5px;

  background: #fff;
  border-radius: 2px;
}

.product-lightbox__close::before {
  transform: rotate(45deg);
}

.product-lightbox__close::after {
  transform: rotate(-45deg);
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.product-lightbox__prev,
.product-lightbox__next {
  top: 50%;

  width: 50px;
  height: 50px;

  font-size: 0 !important;

  background: rgba(0, 0, 0, 0.55) !important;

  border:
          1px solid rgba(255, 255, 255, 0.24) !important;

  transform: translateY(-50%) !important;

  transition:
          background-color 0.2s ease,
          border-color 0.2s ease,
          box-shadow 0.2s ease !important;
}


/* LEFT */
.product-lightbox__prev {
  left: 26px;
  right: auto;
}


/* RIGHT */
.product-lightbox__next {
  right: 26px;
  left: auto;
}


/* remove original content */
.product-lightbox__prev > *,
.product-lightbox__next > * {
  opacity: 0 !important;
}


/* custom arrows */
.product-lightbox__prev::before,
.product-lightbox__next::before {
  content: "";

  width: 10px;
  height: 10px;

  display: block;

  border-top: 1.8px solid #fff;
  border-right: 1.8px solid #fff;

  position: absolute;
  top: 50%;
  left: 50%;
}


/* Previous arrow */
.product-lightbox__prev::before {
  transform:
          translate(-42%, -50%)
          rotate(-135deg);
}


/* Next arrow */
.product-lightbox__next::before {
  transform:
          translate(-58%, -50%)
          rotate(45deg);
}


/* =========================================================
   IMPORTANT:
   NO MOVEMENT ON HOVER / ACTIVE / FOCUS
========================================================= */

.product-lightbox__prev:hover,
.product-lightbox__next:hover {
  transform: translateY(-50%) !important;

  background: rgba(0, 0, 0, 0.78) !important;

  border-color:
          rgba(255, 255, 255, 0.45) !important;

  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.22) !important;
}


.product-lightbox__prev:focus,
.product-lightbox__next:focus,
.product-lightbox__prev:active,
.product-lightbox__next:active,
.product-lightbox__prev:focus-visible,
.product-lightbox__next:focus-visible {
  transform: translateY(-50%) !important;
}


.product-lightbox__prev:hover::before {
  transform:
          translate(-42%, -50%)
          rotate(-135deg) !important;
}


.product-lightbox__next:hover::before {
  transform:
          translate(-58%, -50%)
          rotate(45deg) !important;
}


/* =========================================================
   COUNTER
========================================================= */

.product-lightbox__counter {
  position: absolute;

  top: 28px;
  left: 28px;

  z-index: 20;

  min-width: 54px;
  height: 34px;

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

  padding: 0 12px;

  border:
          1px solid rgba(255, 255, 255, 0.18);

  border-radius: 50px;

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

  color:
          rgba(255, 255, 255, 0.92);

  font-size: 13px;

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}


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

@media (max-width: 767px) {

  .product-lightbox {
    background:
            rgba(0, 0, 0, 0.10);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .product-lightbox::backdrop {
    background:
            rgba(0, 0, 0, 0.58);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .product-lightbox__slider {
    inset: 74px 54px 68px;
  }

  .product-lightbox img {
    max-width: 84vw;
    max-height: 67vh;

    border-radius: 8px;
  }

  .product-lightbox button {
    width: 42px;
    height: 42px;
  }

  .product-lightbox__close {
    top: 14px;
    right: 14px;
  }

  .product-lightbox__counter {
    top: 18px;
    left: 14px;

    height: 32px;

    font-size: 12px;
  }

  .product-lightbox__prev {
    left: 8px;
  }

  .product-lightbox__next {
    right: 8px;
  }

  .product-lightbox__prev,
  .product-lightbox__next {
    width: 44px;
    height: 44px;

    transform:
            translateY(-50%) !important;
  }

  .product-lightbox__prev:hover,
  .product-lightbox__next:hover,
  .product-lightbox__prev:focus,
  .product-lightbox__next:focus,
  .product-lightbox__prev:active,
  .product-lightbox__next:active {
    transform:
            translateY(-50%) !important;
  }

  .product-lightbox__prev::before,
  .product-lightbox__next::before {
    width: 9px;
    height: 9px;
  }
}