/* Boat detail gallery */

.op-boat-gallery {
  padding: 10rem 9rem;
  background: var(--white);
}

.op-boat-gallery__inner {
  max-width: var(--container-size-xl);
  margin: 0 auto;
}

.op-boat-gallery__title {
  margin: 0 0 10rem;
  color: var(--black);
  text-align: left;
  font-family: var(--font-primary);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.9rem;
  letter-spacing: 0.56rem;
  text-transform: uppercase;
}

.op-boat-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.op-boat-gallery__thumb,
.op-boat-gallery__count {
  position: relative;
  border-radius: 0.5rem;
  aspect-ratio: 1 / 1;
}

.op-boat-gallery__thumb {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: visible;
}

.op-boat-gallery__thumb::after {
  content: "";
  position: absolute;
  inset: -0.8rem;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  border-radius: 0.8rem;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: opacity 0.35s ease, backdrop-filter 0.35s ease;
  pointer-events: none;
}

.op-boat-gallery__thumb:hover::after {
  opacity: 1;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.op-boat-gallery__thumb-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0.5rem;
}

.op-boat-gallery__count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 3rem 3rem 0;
  text-align: right;
}

.op-boat-gallery__count-number {
  color: var(--black);
  font-family: var(--font-secondary);
  font-style: italic;
  font-weight: 500;
  font-size: 3rem;
  line-height: 4.2rem;
  letter-spacing: 0.6rem;
}

.op-boat-gallery__count-button {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  border: none;
  background: transparent;
  color: var(--black);
  text-align: right;
  font-family: var(--font-primary);
  font-style: normal;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.6rem;
  letter-spacing: 0.12rem;
  cursor: pointer;
  transition: gap 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.op-boat-gallery__count-button:hover {
  gap: 2rem;
}

.op-boat-gallery__data {
  display: none;
}

.op-boat-gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.op-boat-gallery__lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.op-boat-gallery__lightbox-frame {
  width: min(120rem, 80vw);
  height: min(70vh, 70rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.op-boat-gallery__lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.op-boat-gallery__lightbox-arrow,
.op-boat-gallery__lightbox-close {
  position: absolute;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.op-boat-gallery__lightbox-close {
  top: 4rem;
  right: 4rem;
}

.op-boat-gallery__lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem;
}

.op-boat-gallery__lightbox-arrow--prev {
  left: 4rem;
}

.op-boat-gallery__lightbox-arrow--next {
  right: 4rem;
}

.op-boat-gallery__lightbox-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.op-lightbox-open {
  overflow: hidden;
}

@media (max-width: 1200px) {
  .op-boat-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .op-boat-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .op-boat-gallery {
    padding: 8rem 4rem;
  }

  .op-boat-gallery__title {
    margin-bottom: 6rem;
  }

  .op-boat-gallery__count {
    height: 11rem;
    width: 100%;
    display: block;
    padding: 3rem 0 0 0;
  }

  .op-boat-gallery__grid {
    grid-template-columns: 1fr;
  }

  .op-boat-gallery__lightbox-frame {
    width: min(90vw, 90rem);
    height: min(60vh, 60rem);
  }
}
