/* Portfolio product modal image gallery */
.product-modal__gallery {
  position: relative;
  width: 100%;
}

.product-modal-gallery.swiper-container {
  width: 100%;
  overflow: hidden;
}

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

.product-modal-gallery .swiper-slide img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

.product-modal-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-gallery__nav:hover {
  opacity: 0.7;
}

.product-modal-gallery__nav:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.product-modal-gallery__prev {
  left: 6px;
}

.product-modal-gallery__next {
  right: 6px;
}

.product-modal-gallery__nav svg {
  display: block;
  width: 22px;
  height: 40px;
  pointer-events: none;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85));
}

@media (max-width: 991.98px) {
  .product-modal-gallery__nav {
    width: 36px;
    height: 36px;
  }

  .product-modal-gallery__nav svg {
    width: 16px;
    height: 30px;
  }
}

/* Catalog product modal: click-to-enlarge */
.product-modal__image:not(:has(.product-modal__gallery)) {
  cursor: zoom-in;
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
}

.product-modal__image:not(:has(.product-modal__gallery)) img {
  cursor: zoom-in;
  width: 420px;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.product-modal__image:not(:has(.product-modal__gallery))::after {
  content: "\043F\0440\0438\0020\043A\043B\0438\043A\0435\0020\0444\043E\0442\043E\0020\0443\0432\0435\043B\0438\0447\0438\0442\0441\044F";
  display: block;
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.1;
  color: #010101;
  text-align: center;
}

.product-modal__image:has(.product-modal__gallery)::after {
  content: "\043F\0440\0438\0020\043A\043B\0438\043A\0435\0020\0444\043E\0442\043E\0020\0443\0432\0435\043B\0438\0447\0438\0442\0441\044F";
  display: block;
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.1;
  color: #010101;
  text-align: center;
}

.product-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  cursor: zoom-out;
}

.product-image-lightbox.is-open {
  display: flex;
}

.product-image-lightbox__img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  cursor: default;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}

.product-image-lightbox__close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.product-image-lightbox__nav {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
}

.product-image-lightbox.has-nav .product-image-lightbox__nav {
  display: flex;
}

.product-image-lightbox__prev {
  left: 16px;
}

.product-image-lightbox__next {
  right: 16px;
}

.product-image-lightbox__nav svg {
  display: block;
  width: 10px;
  height: 21px;
  pointer-events: none;
}

.product-image-lightbox__nav:hover {
  opacity: 0.88;
}

@media (max-width: 767.98px) {
  .product-image-lightbox__prev {
    left: 8px;
  }

  .product-image-lightbox__next {
    right: 8px;
  }

  .product-image-lightbox__nav {
    width: 42px;
    height: 42px;
  }
}

body.product-image-lightbox-open {
  overflow: hidden;
}

/* Portfolio gallery modal */
.is-portfolio-gallery .objects-scroll-button {
  display: none !important;
}

.product-modal__description {
  margin: 0 0 24px;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.4;
  color: #010101;
}

/* Catalog category cards */
#catalog .category-block__image {
  display: block;
  overflow: hidden;
}

#catalog .category-block__image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 991.98px) {
  #catalog .category-block__image img {
    max-height: 360px;
  }
  .product-modal__image:not(:has(.product-modal__gallery)) img {
    max-height: 360px;
  }
}

/* Ideas slider */
.ideas-slider-wrapper {
  position: relative;
  z-index: 2;
}

.ideas-slider {
  position: relative;
}

.ideas-slider .swiper-slide {
  border-radius: 3px;
}

.ideas-slider .swiper-wrapper {
  align-items: stretch;
}

.ideas-slider__image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.ideas-slider__image img {
  display: block;
  width: 100%;
  height: clamp(320px, 42vw, 600px);
  object-fit: cover;
}

.ideas-slider__controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
}

.ideas-slider-prev,
.ideas-slider-next {
  display: flex;
  align-items: center;
  color: #EFBE10;
  width: 100px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ideas-slider-prev {
  justify-self: start;
}

.ideas-slider-next {
  justify-self: end;
  transform: rotate(180deg);
}

.ideas-slider-prev:hover,
.ideas-slider-next:hover {
  opacity: 0.85;
}

.ideas-slider-prev.swiper-button-disabled,
.ideas-slider-next.swiper-button-disabled {
  color: #DADADA;
}

.ideas-slider__more {
  min-width: 220px;
  padding: 14px 34px;
  border: 0;
  border-radius: 999px;
  background: #efbe10;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.ideas-slider__more:hover {
  opacity: 0.85;
}

.ideas-gallery-modal .modal-content {
  border: 0;
  border-radius: 0;
}

.ideas-gallery-modal .modal-body {
  position: relative;
  padding: 48px 50px 50px;
}

.ideas-gallery-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #fff;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}



.ideas-gallery-modal__close svg {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.ideas-gallery-modal__close:hover {
  background: #e2e2e1;
}

@media (max-width: 991.98px) {
  .ideas-gallery-modal__close {
    width: 30px;
    height: 30px;
  }
  .ideas-gallery-modal__close svg {
    width: 16px;
    height: 16px;
  }
}

.ideas-gallery-modal__title {
  margin: 0 0 28px;
  color: #010101;
  font-size: 52px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.ideas-gallery-modal__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ideas-gallery-modal__item {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #eee;
  cursor: zoom-in;
}

.ideas-gallery-modal__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .ideas-slider-prev,
  .ideas-slider-next {
    width: 70px;
  }

  .ideas-gallery-modal .modal-body {
    padding: 44px 24px 30px;
  }
}

@media (max-width: 575.98px) {
  .ideas-slider__controls {
    gap: 12px;
  }

  .ideas-slider-prev,
  .ideas-slider-next {
    width: 44px;
  }

  .ideas-slider__more {
    min-width: 0;
    padding: 13px 22px;
    font-size: 14px;
  }

  .ideas-gallery-modal__title {
    margin-bottom: 20px;
    font-size: 24px;
  }

  .ideas-gallery-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
