/* === Thumb Slider Block === */
.ny-thumbslider {
  max-width: 100%;
  margin: 1.5em 0;
}

/* --- Main slider --- */
.ny-thumbslider__main {
  position: relative;
  margin-bottom: 8px;
}

.ny-thumbslider__main-swiper {
  height: 650px;
  overflow: hidden;
  border-radius: 4px;
}

.ny-thumbslider__main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.ny-thumbslider__main .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Cover mode */
.ny-thumbslider--cover .ny-thumbslider__main .swiper-slide img {
  object-fit: cover;
}

/* Navigation arrows */
.ny-thumbslider__main .swiper-button-prev,
.ny-thumbslider__main .swiper-button-next {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.ny-thumbslider__main .swiper-button-prev::after,
.ny-thumbslider__main .swiper-button-next::after {
  font-size: 22px;
}

/* --- Thumbnail strip --- */
.ny-thumbslider__thumbs {
  overflow: hidden;
}

.ny-thumbslider__thumbs-swiper {
  overflow: visible;
}

.ny-thumbslider__thumbs .swiper-wrapper {
  justify-content: flex-start;
}

.ny-thumbslider__thumbs .swiper-slide {
  width: 120px;
  height: 80px;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  border: 2px solid transparent;
  border-radius: 3px;
  overflow: hidden;
}

.ny-thumbslider__thumbs .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ny-thumbslider__thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--color-primary, #c5a44e);
}

.ny-thumbslider__thumbs .swiper-slide:hover {
  opacity: 0.85;
}

/* --- Lightbox overlay --- */
.ny-thumbslider-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 2rem;
}

.ny-thumbslider-lightbox--active {
  opacity: 1;
}

.ny-thumbslider-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.ny-thumbslider-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.ny-thumbslider-lightbox__close:hover {
  opacity: 1;
}

/* --- Gutenberg editor preview (no Swiper JS) --- */
.editor-styles-wrapper .ny-thumbslider__main-swiper {
  position: relative;
}

.editor-styles-wrapper .ny-thumbslider__main .swiper-wrapper {
  display: block;
}

.editor-styles-wrapper .ny-thumbslider__main .swiper-slide {
  display: none;
}

.editor-styles-wrapper .ny-thumbslider__main .swiper-slide:first-child {
  display: flex;
  height: 650px;
}

.editor-styles-wrapper .ny-thumbslider__main .swiper-button-prev,
.editor-styles-wrapper .ny-thumbslider__main .swiper-button-next {
  display: none;
}

.editor-styles-wrapper .ny-thumbslider__thumbs .swiper-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.editor-styles-wrapper .ny-thumbslider__thumbs .swiper-slide {
  opacity: 0.5;
}

.editor-styles-wrapper .ny-thumbslider__thumbs .swiper-slide:first-child {
  opacity: 1;
  border-color: var(--color-primary, #c5a44e);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ny-thumbslider__main-swiper {
    height: 400px;
  }

  .ny-thumbslider__main .swiper-button-prev,
  .ny-thumbslider__main .swiper-button-next {
    display: none;
  }

  .ny-thumbslider__thumbs .swiper-slide {
    width: 80px;
    height: 55px;
  }

  .ny-thumbslider-lightbox {
    padding: 1rem;
  }
}
