/* Основные стили Swiper */
.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #f7f7f7; /* если цвет статичен, лучше без !important */
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform; /* помогает с оптимизацией анимации */
  transform: translateZ(0); /* включает аппаратное ускорение */
}

.swiper-slide img {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  transform: translate(-50%, -50%);
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  will-change: transform; /* если изображения анимируются */
}

.swiper-slide::before {
  content: "";
  position: absolute;
  top: -10px; /* уменьшить область */
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-color: var(--bg-color);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(10px); /* уменьшить размытие */
  opacity: 0.8;
  z-index: 0;
  will-change: transform, filter; /* предупредить браузер об анимации */
}

/* Стили для миниатюр */
.mySwiper .swiper-slide {
  max-height: 50px;
  max-width: 70px;
  width: 20% !important;
  min-width: 70px !important;
  margin-top: 5px;
  background: transparent !important;
  height: 50px !important;
}

.mySwiper .swiper-slide img {
  border-radius: 5px;
  width: 100%;
  height: 100%;
  position: static;
  transform: none;
}

/* Активная миниатюра */
.swiper-slide.swiper-slide-visible.swiper-slide-fully-visible.swiper-slide-thumb-active img {
  border: 2px solid #09f;
}

/* Пагинация */
.swiper-pagination-bullet-inactive {
  background-color: #f9f9f9 !important;
}

.swiper-pagination-bullet-inactive-opacity {
  opacity: 1 !important;
}

.swiper-pagination-bullet-active {
  background-color: #09f !important;
}

span.swiper-pagination-bullet.swiper-pagination-bullet-active.swiper-pagination-bullet-active-main {
  width: 15px;
  border-radius: 10px;
  background: linear-gradient(-21deg, #dd03e4, #5611ec) !important;
  height: 5px;
}

/* Кнопки навигации */
.swiper-button-disabled {
  display: none;
}

.swiper-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 0.3s ease;
}

.swiper-nav-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.05);
}

.swiper-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
  animation: pulse 0.4s;
}

.swiper-nav-btn::after {
  content: '';
  width: 12px;
  height: 12px;
  border-top: 2px solid #333;
  border-right: 2px solid #333;
  transition: all 0.3s ease;
}

.swiper-nav-btn:hover::after {
  border-color: #0066cc;
}

.swiper-button-prev {
  left: 20px;
}

.swiper-button-prev::after {
  transform: rotate(-135deg);
}

.swiper-button-next {
  right: 20px;
}

.swiper-button-next::after {
  transform: rotate(45deg);
}

/* Анимация */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1); }
  70% { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* Медиазапросы */
@media (max-width: 800px) {
  .swiper-slide {
    min-height: 280px !important;
    border-radius: 0;
  }

  .swiper-slide img {
    object-fit: contain;
  }
}

@media (min-width: 801px) {
  .swiper-slide {
    min-height: 400px !important;
  }

  .swiper-slide img {
    object-fit: none;
  }
}

@media (min-width: 769px) {
  .mySwiper2 .swiper-slide {
    width: 100% !important;
  }

  .mySwiper2 {
    border-radius: 20px;
  }

  #gallery .mySwiper2 .swiper-slide:only-child {
      width: 100% !important;
  }

  .mySwiper2 .swiper-slide:nth-child(1) {
    width: 60% !important;
  }

  .mySwiper2 .swiper-slide:nth-child(2),
  .mySwiper2 .swiper-slide:nth-child(3) {
    width: 20% !important;
  }

  .mySwiper2 .swiper-slide:nth-child(n+4) {
    width: 100% !important;
  }
}

/* Галерея и контент */
#gallery {
  margin-bottom: -20px !important;
}

.gallery-wrapper {
  position: relative;
  height: auto;
}

.gallery-container {
  position: sticky;
  top: 0;
  z-index: 1;
  background: white;
  transition: z-index 0.3s ease;
}

.gallery-container.active {
  z-index: 0;
}

.content-block {
  position: relative;
  z-index: 2;
  background: white;
  margin-top: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
}

.image-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.image-center img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

/* Общие стили */
body {
  overflow-x: hidden;
  overflow-y: auto !important;
}

.mfp-container {
  z-index: 10000 !important;
}

/*pricelist*/
.price-list-wrapper, .properties-wrapper:after {
    position: relative;
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.price-list-wrapper:after, .properties-wrapper:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 100%);
    pointer-events: none;
}

.price-list-wrapper.expanded, .properties-wrapper.expanded {
    max-height: none;
}

.price-list-wrapper.expanded:after, .properties-wrapper.expanded:after {
    display: none;
}

.hidden-item {
    display: none;
}

.show-more-container {
    text-align: left;
    margin-top: 20px;
}

.show-full-price, .show-full-properties {
  padding: 10px 20px;
      background: #a505cc;
      border: none;
      border-radius: 12px;
      cursor: pointer;
      color: #ffffff;
      font-size: 15px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      transition: all 0.3s ease;
}

.show-full-price:hover, .show-full-properties:hover {
    background: #76106d;
}

.price-list-container {
    margin: 20px 0;
    font-family: Arial, sans-serif;
}
.price-group {
    margin-bottom: 30px;
}
.price-group h3 {
    color: #000;
    font-size:18px;
}
.price-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 5px;
    padding: 5px 0;
    align-items: center;
    gap: 10px;
}
.price-line {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: baseline;
    overflow: hidden;
}
.price-name {
    font-weight: 500;
    margin-right: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size:16px;
}
.price-dots {
    flex: 1;
    border-bottom: 1px dotted #ccc;
    margin: 0 5px;
    height: 1em;
}
.price-value {
    color: #333;
    font-weight: bold;
    white-space: nowrap;
    font-size:16px;
}
.price-prefix {
    color: #666;
    font-size: 0.9em;
    margin-right: 5px;
}
.price-photos {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}
.price-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    .price-line {
        min-width: 100%;
    }
    .price-photos {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}
