/* Основний фон та контейнер */

body {
  padding-bottom: 70px;
}

.v3-profile-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 30px;
  margin-top: 20px;
}

/* Г-ПОДІБНА ГАЛЕРЕЯ */
.v3-l-shape-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: auto 110px;
  gap: 12px;
}

.v3-thumbs-vertical {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-main-photo {
  cursor: zoom-in;
}

.v3-main-photo img {
  transition: opacity 0.2s;
}

.v3-thumbs-horizontal {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
}

/* ІНФОРМАЦІЙНА КАРТКА */
.v3-card {
  background: #1a1a1e;
  padding: 25px;
  border-radius: 15px;
  border: 1px solid #333;
}

.v3-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.v3-top-row h1 {
  font-size: 32px;
  text-transform: uppercase;
  margin: 0;
  font-weight: 800;
}
.v3-age {
  color: #666;
  font-weight: 300;
}

.v3-meta-info {
  display: flex;
  gap: 15px;
  margin: 10px 0 20px;
  color: #aaa;
  font-size: 14px;
}
.v3-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.v3-description {
  margin-bottom: 25px;
  border-top: 1px solid #333;
  padding-top: 20px;
}
.v3-description h3 {
  color: #ba3e62;
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.v3-description p {
  color: #ccc;
  line-height: 1.6;
  font-size: 15px;
}

.v3-attrs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 25px;
}
.v3-attr {
  background: #222;
  padding: 10px 15px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.v3-attr span {
  color: #777;
}

/* ТАРИФИ ПЛИТКОЮ */
.v3-rates h3 {
  font-size: 16px;
  color: #fff;
  margin-bottom: 12px;
}
.v3-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.v3-rate-box {
  background: #25252b;
  border: 1px solid #333;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.v3-rate-box.active {
  border-color: #ba3e62;
  background: #2a1a1f;
}
.v3-r-dur {
  display: block;
  color: #ba3e62;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}
.v3-r-val {
  font-size: 18px;
  font-weight: 800;
}

.v3-main-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}
.v3-btn-wa {
  background: #25d366;
  flex: 1;
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.v3-btn-tg {
  background: #0088cc;
  flex: 1;
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

/* ВІДЕО */
.v3-video-section {
  margin-top: 50px;
  text-align: center;
}
.v3-video-box {
  border-radius: 15px;
  overflow: hidden;
  background: #000;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.v3-video-box video {
  width: 100%;
  max-height: 550px;
}

/* МОДАЛКА */
.v3-modal {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}
.v3-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}
.v3-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
}
.v3-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

.v3-modal-nav button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

/* ==========================================
   МОДАЛКА (Fullscreen Gallery Fix)
   ========================================== */
.v3-modal {
  position: fixed;
  z-index: 999999; /* Поверх усього сайту і хедера */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.v3-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain; /* Щоб фото не обрізалося */
}

.v3-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 45px;
  cursor: pointer;
  z-index: 100000;
  line-height: 1;
}

.v3-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
   background: rgba(186, 62, 98,0.4);
  border: none;
  color: #fff;
}

.v3-modal-nav:hover {
  background: rgba(0, 0, 0,0.4);
}
.v3-prev {
  left: 20px;
}
.v3-next {
  right: 20px;
}

.v3-zoom-icon {
  position: absolute;
  z-index: 10;
  right: 20px;
  bottom: 20px;
  font-size: 22px;
}
/* ==========================================
   Мобільна адаптація (Fix Thumbnail Scroll)
   ========================================== */
@media (max-width: 992px) {
  .v3-profile-grid {
    grid-template-columns: 1fr;
  }

  /* Змінюємо Г-сітку на вертикальну структуру */
  .v3-gallery-l-shape {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 10px;
  }

  /* Головне фото першим */
  .v3-main-photo-container {
    order: 1;
    height: 450px;
    width: 100%;
    max-height: none;
  }

  /* ПОВЕРТАЄМО бокові фото і робимо їх горизонтальними */
  .v3-thumbs-vertical {
    display: flex !important; /* Обов'язково повертаємо видимість */
    flex-direction: row;
    order: 2;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  /* Нижні фото йдуть третіми */
  .v3-thumbs-horizontal {
    order: 3;
    padding-bottom: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Задаємо жорстку ширину мініатюрам, щоб вони не стискалися */
  .v3-t-wrapper {
    flex: 0 0 90px;
    height: 110px;
  }

  .v3-t-img {
    width: 100%;
    height: 100%;
  }

  /* Ховаємо повзунок скролу для краси */
  .v3-thumbs-vertical::-webkit-scrollbar,
  .v3-thumbs-horizontal::-webkit-scrollbar {
    display: none;
  }

  /* Кнопки модалки на мобільному робимо трохи меншими */
  .v3-modal-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .v3-prev {
    left: 10px;
  }
  .v3-next {
    right: 10px;
  }
  .v3-modal-content img {
    max-width: 100vw;
    border-radius: 0;
  }

  .v3-main-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 20px);
    background: rgba(17, 17, 17, 0.95);
    padding: 10px;
    z-index: 100;
    border-top: 1px solid #333;
    margin-top: 0;
  }
}
/* 1. Виправлення для кнопок та основного фото (Desktop) */
.v3-main-photo-container {
  grid-column: 2;
  grid-row: 1;
  position: relative; /* Обов'язково для кнопок всередині */
  height: 650px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.v3-main-photo {
  width: 100%;
  height: 100%;
}

.v3-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Змінено з contain на cover для заповнення */
}

.v3-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15; /* Вище за фото */
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: 0.3s;
}

.v3-nav-btn:hover {
  background: #ba3e62;
}

/* Стабільна Г-подібна сітка */
.v3-gallery-l-shape {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: 650px auto; /* Чітко задана висота */
  gap: 15px;
}

@media (max-width: 768px) {
  .v3-gallery-l-shape {
    grid-template-columns: 75px 1fr;
    gap: 5px;
  }
  .v3-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 615px;
  }
}
/* Контейнер для бокових мініатюр */
.v3-thumbs-vertical {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.v3-t-wrapper {
  flex: 1;
  height: 0; /* Дозволяє flex-grow працювати рівномірно */
  min-height: 110px;
}

.v3-t-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;

  transition: 0.3s;
}

.v3-t-img.active,
.v3-t-img:hover {
  opacity: 1;
  border-color: #ba3e62;
}

/* Головне фото та КНОПКИ */
.v3-main-photo-container {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  height: 100%;
  max-height: fit-content;
}

.v3-main-photo {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1e;
}

/* Стиль кнопок перемикання */
.v3-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3-nav-btn:hover {
  background: rgba(186, 62, 98, 0.8);
}
.v3-prev-btn {
  left: 15px;
}
.v3-next-btn {
  right: 15px;
}

/* Нижні мініатюри */
.v3-thumbs-horizontal {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 5px;
}
.v3-thumbs-horizontal::-webkit-scrollbar {
  display: none;
}

/* Для Firefox та старих версій IE/Edge */
.v3-thumbs-horizontal {
  -ms-overflow-style: none; /* IE та Edge */
  scrollbar-width: none; /* Firefox */
}

.v3-thumbs-horizontal .v3-t-wrapper {
  max-width: 110px;
  height: 100px;
  min-width: 110px;
}

.v3-video-section {
  clear: both;
  margin-top: 40px;
  border-top: 1px solid #333;
  padding-top: 30px;
}

/* Підсвічування вибраного блоку з ціною */
.v3-rate-box {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* Анімація постійної червоної пульсації для вибраної ціни */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.v3-rate-box.active {
    border-color: #ff0000 !important; /* Червона рамка */
    background-color: rgba(255, 0, 0, 0.1) !important; /* Легкий червоний фон */
    transform: translateY(-2px);
    animation: pulse-red 1.5s infinite; /* Нескінченна пульсація */
}

/* Анімація привернення уваги до самих кнопок (спрацьовує 1 раз при кліку) */
@keyframes pulse-buttons {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.v3-main-actions.highlight-pulse > * {
    /* animation: pulse-buttons 0.4s ease-in-out; */
     animation: pulse-red 4s ease-in-out ,pulse-buttons 0.4s ease-in-out; ;
}