/* --- ГЛОБАЛЬНІ СТИЛІ СТОРІНКИ МОДЕЛІ --- */
.model-profile-page {
  background-color: #f2f3f5;
  padding: 15px 0 60px;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden; /* Глобальний захист від горизонтального скролу */
}

.model-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Хлібні крихти (ВИПРАВЛЕНО РОЗРИВ ЕКРАНА) */
.breadcrumbs {
  font-size: 12px;
  color: #666;
  margin-bottom: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Довгий текст обріжеться трьома крапками "..." */
  display: block;
  width: 100%;
}
.breadcrumbs a {
  color: #333;
  text-decoration: underline;
}

/* Сітка сторінки: ліва частина (контент) і права (сайдбар) */
.model-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

/* Білі картки-блоки */
.v-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden; /* Захист від контенту, що вилазить з картки */
}

/* Заголовок і бейджі (ВИПРАВЛЕНО РОЗРИВ ЕКРАНА) */
.m-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.m-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.m-badge-18 {
  border: 1px solid #68a614;
  color: #68a614;
  font-size: 13px;
  font-weight: bold;
  border-radius: 3px;
}
.m-title {
  font-size: 22px;
  color: #222;
  margin: 0 0 10px 0;
  font-weight: bold;
  line-height: 1.3;
  overflow-wrap: break-word; /* Змушує довгі слова переноситись */
  word-wrap: break-word;
}
.m-meta {
  font-size: 12px;
  color: #666;
  margin-bottom: 20px;
}
.m-meta-price {
  font-weight: bold;
  color: #333;
}

/* Галерея */
.m-gallery-wrap {
  position: relative;
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden; /* Для стрічки NEW */
  box-sizing: border-box;
  width: 100%;
}
.m-ribbon-new {
  position: absolute;
  top: 10px;
  left: -35px;
  background: #ff7b00;
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 5px 40px;
  transform: rotate(-45deg);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.m-main-photo-box {
  position: relative;
  width: 100%;
  max-width: 450px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.m-main-photo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.m-photo-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.m-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
  justify-content: flex-start;
  overflow-x: auto; /* Дозволяє скрол всередині */
  padding-bottom: 5px; /* Щоб скроллбар не перекривав картинки */
  min-width: 0; /* Важливо для flex-контейнерів */
}
.m-thumbs-wrapper-card {
  width: 70px;
  height: 70px;
  flex-shrink: 0; /* ЗАБОРОНЯЄ картинкам ставати меншими за 70px */
  border: 1px solid #ddd;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 4px; /* Опціонально для кращого вигляду */
  overflow: hidden;
}
.m-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.m-thumbs-wrapper-card.active,
.m-thumbs-wrapper-card:hover {
  opacity: 1;
  border-color: #68a614;
}
/* Додай це до .m-thumbs */
.m-thumbs {
  -webkit-overflow-scrolling: touch; /* Плавний скрол на iOS */
  scrollbar-width: none; /* Для Firefox */
  -ms-overflow-style: none; /* Для IE/Edge */
}
.m-thumbs::-webkit-scrollbar {
  display: none; /* Приховує скролбар у Chrome/Safari */
}
.modal-content img {
  user-select: none;
  -webkit-user-drag: none;
}
.m-rates-table td:not(:first-child) {
  min-width: 70px;
}
/* Таблиці характеристик */
.m-details-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  row-gap: 15px;
}
.m-detail-wrapper-info{
    display: flex;
    justify-content: space-between;
    align-items: center;
  font-size: 15px;
}
.m-detail-wrapper-info > div{
     color: #888;
}
.m-detail-wrapper-info > div.m-detail-label {
  font-weight: 700;
  color: #222;
      font-size: 14px;
}
/* Блок Services */
.m-section-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 15px 0;
  color: #222;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}
.m-services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 14px;
  color: #555;
}
.m-services-list span::before {
  content: "✔";
  color: #68a614;
  margin-right: 8px;
  font-weight: bold;
}

/* Таблиця цін */
.m-rates-table {
  width: 100%;
  font-size: 14px;
  text-align: left;
  border-collapse: collapse;
}
.m-rates-table th {
  padding: 10px 0;
  font-weight: bold;
  color: #222;
}
.m-rates-table td {
  padding: 10px 0;
  color: #555;
}

/* Опис (ВИПРАВЛЕНО РОЗРИВ ЕКРАНА) */
.m-description {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.m-description strong {
  color: #222;
}

/* Правий сайдбар */
.sidebar-contact-btn {
  display: block;
  width: 100%;
  background: #68a614;
  color: white;
  text-align: center;
  padding: 12px 0;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  box-sizing: border-box;
}
.sidebar-contact-btn:hover {
  background: #558a0f;
}

.s-safety-list {
  font-size: 13px;
  color: #555;
  padding-left: 20px;
  line-height: 1.5;
  margin: 15px 0;
}
.btn-report {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
  font-size: 14px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  border-radius: 4px;
  box-sizing: border-box;
      display: flex;
    justify-content: center;
}
.btn-report:hover {
  background: #f9f9f9;
}

/* Схожі оголошення у сайдбарі */
.s-ad-item {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  text-decoration: none;
  color: #333;
}
.s-ad-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.s-ad-title {
  font-size: 13px;
  margin: 0 0 5px 0;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.s-ad-meta {
  font-size: 11px;
  color: #888;
}

/* =========================================
   1. СТИЛІ ДЛЯ МОДАЛКИ (ПОВНОЕКРАННЕ ФОТО)
   ========================================= */
.photo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}
.photo-modal.show {
  display: flex;
}
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.modal-container {
  position: relative;
  z-index: 100001;
  width: 100%;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
}
.modal-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.modal-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 35px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.modal-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}
.modal-prev {
  left: 10px;
}
.modal-next {
  right: 10px;
}
.modal-counter {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  font-weight: bold;
}

/* =========================================
   2. АДАПТИВНІСТЬ (МЕДІА ЗАПИТИ ОБ'ЄДНАНІ)
   ========================================= */

@media (max-width: 900px) {
  .model-layout {
    grid-template-columns: 1fr; /* Сайдбар падає вниз */
  }
  .m-main-photo-box {
    height: 500px;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .model-profile-page {
    padding-top: 5px;
  }
  .v-card {
    padding: 15px;
  }
  .m-title {
    font-size: 18px;
  }
  .m-main-photo-box {
    height: 380px;
  }

  .m-details-grid {
    grid-template-columns: 1fr;
    row-gap: 5px;
  }
  .m-detail-label {
    margin-top: 10px;
    color: #888;
    font-size: 12px;
  }
  .m-services-list {
    grid-template-columns: 1fr;
  }
  .modal-nav {
    font-size: 24px;
    padding: 8px 12px;
  }
  .modal-close {
    top: -35px;
  }
}

@media (max-width: 400px) {
  .m-main-photo-box {
    height: 320px;
  }
  .m-rates-table th,
  .m-rates-table td {
    font-size: 12px;
    padding: 8px 0;
  }
}
.m-thumbs-wrapper-block {
  position: relative;
  width: 100%;
  height: 100px;
}
/* Фікс для плавного скролу прев'ю */
.m-thumbs {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory; /* Додає "магнітний" ефект при скролі */
  padding-bottom: 5px;
}

.m-thumbs-wrapper-card {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Захист модалки від випадкового виділення тексту */
.photo-modal {
  user-select: none;
}

/* Щоб кнопки навігації не "пливли" на дрібних екранах */
@media (max-width: 480px) {
  .modal-nav {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 10px;
  }
}
.m-badge {
  position: absolute;
  top: -1px;
  right: 0px;
  background: #fff;
  color: #71b524;
  border: 1px solid #71b524;
  font-size: 13px;
  font-weight: bold;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
}

.m-badge-18 span {
  background: #71b524;
  color: #fff;
  padding: 2px 6px;
}

.buttons-main-model {
  display: flex;
    gap: 15px;
    width: 100%;
    margin: 20px 0;

}
.buttons-main-model-link {
    flex: 1; /* Кнопки ділять ширину навпіл */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #68a614; /* Зелений колір зі скріншота */
    color: #ffffff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 6px;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
    position: relative;
}
.buttons-main-model-link:hover {
    background-color: #558a0f;
}

.buttons-main-model-link:active {
    transform: scale(0.98);
}
.buttons-main-model-link svg {
    width: 20px;
    height: 20px;
        position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.buttons-main-model-link-telegram {
}
.buttons-main-model-link-whatsapp {
}
@media (max-width: 400px) {
    .buttons-main-model {
        flex-direction: column; /* Стають одна під одною, якщо екран замалий */
        gap: 10px;
    }
}