/* checkboost-templo - Product Gallery */

.cb-gallery {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: start;
}

.cb-gallery__thumbs-wrap {
  display: grid;
  grid-template-rows: 34px 1fr 34px;
  gap: 10px;
  align-items: center;
  width: 76px;
}

.cb-gallery__thumb-nav {
  width: 100%;
  height: 34px;
  border: 1px solid #e7e7e7;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.cb-gallery__thumbs {
  height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 10px;
  padding: 6px;
  border-radius: 14px;
  outline: none;
  scrollbar-width: none;
}

.cb-gallery__thumbs:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.cb-gallery__thumbs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.cb-gallery__thumb {
  border: 1px solid #efefef;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.cb-gallery__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.cb-gallery__thumb.is-active {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 1px #1a1a1a inset;
}

.cb-gallery__dots {
  display: none;
}

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

.cb-gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.cb-gallery-lightbox.is-open {
  display: flex;
}

.cb-gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.cb-gallery-lightbox__content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  max-width: 92vw;
  max-height: 92vh;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.cb-gallery-lightbox__img {
  display: block;
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
}

.cb-gallery-lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.cb-gallery__stage {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.cb-gallery__main-link {
  display: block;
  width: 100%;
  height: 100%;
}

.cb-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (min-width: 901px) {
  .st-product-hero {
    gap: 32px;
  }

  .st-product-media {
    flex: 0 0 52%;
    max-width: 52%;
  }

  .st-product-info {
    flex: 0 0 48%;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .cb-gallery {
    grid-template-columns: 1fr;
    grid-template-areas:
      "stage"
      "dots";
  }

  .cb-gallery__stage {
    grid-area: stage;
  }

  .cb-gallery__thumbs-wrap {
    display: none;
  }

  .cb-gallery__dots {
    grid-area: dots;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 10px;
  }

  .cb-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d9d9d9;
  }

  .cb-gallery__dot.is-active {
    background: #1a1a1a;
  }

  .cb-gallery__thumbs-wrap,
  .cb-gallery__thumbs,
  .cb-gallery__thumb {
    display: none;
  }
}
