/* Гостиница — карточки объектов (scoped).
 * Раскладка 0.5.25: вертикальные карточки в ряд + горизонтальная прокрутка
 * со снапом. Шаг прокрутки считает JS (om-objects.js: metrics()/scrollToPage()),
 * поэтому трек — прокручиваемая лента, а не transform-карусель.
 */
.ombe-objects,
.ombe-objects *,
.ombe-objects *::before,
.ombe-objects *::after {
  box-sizing: border-box;
}

.ombe-objects {
  --ombe-objects-accent: #8f4a3a;
  --ombe-objects-card-bg: #fffaf6;
  --ombe-objects-gap: 24px;
  --ombe-objects-media-height: 260px;
  --ombe-objects-rail: 56px;
  position: relative;
  width: 100%;
  /* Жёлоб под круглые стрелки: они стоят в нём, а не вылезают за виджет */
  padding-inline: var(--ombe-objects-rail);
  color: #1c2828;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ---------- Шапка блока ---------- */

.ombe-objects__head {
  margin-bottom: 20px;
  text-align: center;
}

.ombe-objects__head:empty {
  display: none;
}

.ombe-objects__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
  color: #1c2828;
}

.ombe-objects__sub {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #4a4a4a;
}

/* ---------- Лента карточек ---------- */

.ombe-objects__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  outline: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ombe-objects__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.ombe-objects__viewport:focus-visible {
  outline: 2px solid var(--ombe-objects-accent, #8f4a3a);
  outline-offset: 4px;
  border-radius: 28px;
}

.ombe-objects__track {
  display: flex;
  align-items: stretch;
  gap: var(--ombe-objects-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ombe-objects__slide {
  flex: 0 0 calc((100% - 2 * var(--ombe-objects-gap)) / 3);
  width: auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
  scroll-snap-align: start;
}

/* ---------- Карточка: фото сверху, текст снизу ---------- */

.ombe-object {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  border: 1px solid rgba(28, 40, 40, 0.1);
  border-radius: 28px;
  background: var(--ombe-objects-card-bg, #fffaf6);
  overflow: hidden;
}

.ombe-object__media {
  position: relative;
  flex: 0 0 var(--ombe-objects-media-height);
  width: 100%;
  height: var(--ombe-objects-media-height);
  min-height: 0;
  background: #e6ddd0;
}

.ombe-object__gallery {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ombe-object__gallery-track {
  display: flex;
  height: 100%;
  transition: margin-left 0.3s ease;
  will-change: margin-left;
}

.ombe-object__gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ombe-object__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #e6ddd0;
  color: #4a4a4a;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ombe-object__gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(28, 40, 40, 0.15);
  border-radius: 50%;
  background: rgba(255, 250, 246, 0.92);
  color: #1c2828;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.ombe-object__gallery-nav--prev {
  left: 10px;
}

.ombe-object__gallery-nav--next {
  right: 10px;
}

.ombe-object__gallery-nav:hover {
  border-color: var(--ombe-objects-accent, #8f4a3a);
  color: var(--ombe-objects-accent, #8f4a3a);
}

.ombe-object__gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.ombe-object__gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.ombe-object__gallery-dot.is-active {
  background: var(--ombe-objects-accent, #8f4a3a);
}

.ombe-object__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

.ombe-object__number {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a4a4a;
}

.ombe-object__name {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  color: #1c2828;
}

.ombe-object__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #4a4a4a;
}

.ombe-object__works-done {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
  color: #1c2828;
}

.ombe-object__features {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ombe-object__features li {
  position: relative;
  padding: 6px 0;
  font: 400 12px Inter, sans-serif;
  color: #4a4a4a;
  border-bottom: 1px solid rgba(28, 40, 40, 0.08);
}

.ombe-object__features li:last-child {
  border-bottom: 0;
}

/* Кнопка «Подробнее» — контурная пилюля под характеристиками */
.ombe-object__more {
  align-self: flex-start;
  margin-top: 4px;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--ombe-objects-accent, #8f4a3a);
  border-radius: 999px;
  background: none;
  color: var(--ombe-objects-accent, #8f4a3a);
  font: 500 12px Inter, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ombe-object__more:hover {
  background: rgba(143, 74, 58, 0.08);
}

.ombe-object__price {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.ombe-object__price span {
  font-size: 18px;
  font-weight: 600;
  color: var(--ombe-objects-accent, #8f4a3a);
}

.ombe-object__price small {
  font-size: 12px;
  font-weight: 400;
  color: #4a4a4a;
}

.ombe-object__book {
  align-self: flex-start;
  height: 38px;
  margin-top: 4px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ombe-objects-accent, #8f4a3a);
  color: #fff;
  font: 500 13px Inter, sans-serif;
  cursor: pointer;
}

.ombe-object__book:hover {
  opacity: 0.92;
}

/* ---------- Стрелки и точки блока (в жёлобе, не за виджетом) ---------- */

.ombe-objects__nav {
  position: absolute;
  /* По центру фото-зоны: там стрелка читается как листалка карточек */
  top: calc(var(--ombe-objects-media-height) / 2);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(28, 40, 40, 0.15);
  border-radius: 50%;
  background: #fffaf6;
  color: #1c2828;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 3;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ombe-objects__nav--prev {
  left: 6px;
}

.ombe-objects__nav--next {
  right: 6px;
}

.ombe-objects__nav:hover:not(:disabled) {
  border-color: var(--ombe-objects-accent, #8f4a3a);
  color: var(--ombe-objects-accent, #8f4a3a);
}

.ombe-objects__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.ombe-objects__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.ombe-objects__dots:empty {
  display: none;
}

.ombe-objects__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(28, 40, 40, 0.2);
  cursor: pointer;
}

.ombe-objects__dot.is-active {
  background: var(--ombe-objects-accent, #8f4a3a);
}

.ombe-objects__phone {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: #1c2828;
}

.ombe-objects__phone[hidden] {
  display: none;
}

.ombe-objects__phone a {
  color: var(--ombe-objects-accent, #8f4a3a);
  font-weight: 600;
  text-decoration: none;
}

.ombe-objects__phone a:hover {
  text-decoration: underline;
}

/* ---------- Окно «Подробнее» ---------- */

.ombe-objects__modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #1c2828;
}

.ombe-objects__modal[hidden] {
  display: none;
}

.ombe-objects__modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 63, 0.55);
  backdrop-filter: blur(4px);
  animation: ombe-fade 0.18s ease;
}

.ombe-objects__modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  width: min(980px, 100%);
  max-height: 86vh;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ombe-objects-card-bg, #fffaf6);
  box-shadow: 0 30px 80px rgba(9, 20, 63, 0.35);
  animation: ombe-pop 0.2s ease;
}

.ombe-objects__modal-panel--solo {
  grid-template-columns: 1fr;
  width: min(620px, 100%);
}

.ombe-objects__modal-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #efe6da;
  min-height: 0;
}

.ombe-objects__modal-panel--solo .ombe-objects__modal-media {
  display: none;
}

.ombe-objects__modal-photo {
  width: 100%;
  height: 100%;
  max-height: 62vh;
  object-fit: cover;
  border-radius: 16px;
}

.ombe-objects__modal-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ombe-objects__modal-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
}

.ombe-objects__modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ombe-objects__modal-thumb.is-active {
  border-color: var(--ombe-objects-accent, #8f4a3a);
}

.ombe-objects__modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 30px;
  min-height: 0;
  overflow: hidden;
}

.ombe-objects__modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.ombe-objects__modal-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  color: #1c2828;
}

.ombe-objects__modal-details {
  font-size: 14px;
  line-height: 1.55;
  color: #4a4a4a;
}

.ombe-objects__modal-details p {
  margin: 0 0 10px;
}

.ombe-objects__modal-details h5 {
  margin: 14px 0 4px;
  font: 600 13px Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1c2828;
}

.ombe-objects__modal-details ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.ombe-objects__modal-details li {
  margin-bottom: 4px;
}

.ombe-objects__modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 40, 40, 0.1);
}

.ombe-objects__modal-foot .ombe-object__price {
  margin-top: 0;
}

.ombe-objects__modal-foot .ombe-object__book {
  margin-top: 0;
}

.ombe-objects__modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 246, 0.92);
  color: #1c2828;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ombe-objects__modal-close:hover {
  color: var(--ombe-objects-accent, #8f4a3a);
}

@keyframes ombe-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ombe-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Адаптив ---------- */

/* Планшет: две карточки в ряд */
@media (min-width: 768px) and (max-width: 1199px) {
  .ombe-objects {
    --ombe-objects-rail: 48px;
  }

  .ombe-objects__slide {
    flex-basis: calc((100% - var(--ombe-objects-gap)) / 2);
  }
}

/* Телефон: одна карточка в ряд */
@media (max-width: 767px) {
  .ombe-objects {
    --ombe-objects-gap: 16px;
    --ombe-objects-rail: 40px;
    --ombe-objects-media-height: 240px;
  }

  .ombe-objects__nav {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .ombe-objects__nav--prev {
    left: 4px;
  }

  .ombe-objects__nav--next {
    right: 4px;
  }

  .ombe-objects__slide {
    flex-basis: 100%;
  }

  .ombe-objects__modal {
    padding: 12px;
  }

  .ombe-objects__modal-panel,
  .ombe-objects__modal-panel--solo {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 92vh;
  }

  .ombe-objects__modal-media {
    display: flex;
    padding: 12px;
  }

  .ombe-objects__modal-photo {
    max-height: 34vh;
  }

  .ombe-objects__modal-body {
    padding: 18px;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ombe-objects__gallery-track {
    transition: none;
  }

  .ombe-objects__modal-backdrop,
  .ombe-objects__modal-panel {
    animation: none;
  }
}
