/* Быстрый просмотр проектов (core/quick_view.php, js/qv.js), 09.11.2026 */
/* карточка: фото открывает просмотр — поднимаем его над ссылкой заголовка, растянутой на всю карточку */
.project-card--qv .project-card__media {
  z-index: 2;
  cursor: zoom-in;
}
.project-card__count .fa {
  margin-right: 2px;
}
.project-card__qv {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(40, 25, 15, 0.72);
  color: #ffffff;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.project-card--qv .project-card__media:hover .project-card__qv,
.project-card--qv .project-card__media:focus .project-card__qv {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
/* окно */
html.qv-lock,
html.qv-lock body {
  overflow: hidden;
}
/* форма «Хочу такой проект» (fancybox, 8010–8060) открывается поверх просмотра */
html.qv-lock .fancybox-overlay {
  z-index: 10010;
}
html.qv-lock .fancybox-wrap {
  z-index: 10020;
}
html.qv-lock .fancybox-opened {
  z-index: 10030;
}
html.qv-lock #fancybox-loading {
  z-index: 10060;
}
.qv {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10001; /* выше выпадающих меню (9999) и плашки cookie (10000); форма fancybox поднимается выше — ниже */
  display: flex;
  flex-direction: column;
  background: #180f0a;
  overscroll-behavior: contain;
  color: #f3ece0;
  font-family: 'PT Serif', Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.qv[hidden] {
  display: none;
}
.qv button {
  font-family: inherit;
  cursor: pointer;
}
/* у сайта общий стиль button (высота 40px, отступы, синий фон) — у кнопок окна задаём свои */
.qv__arrow,
.qv__proj,
.qv__thumb {
  height: auto;
}
.qv__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  min-height: 44px;
}
.qv__counter {
  flex: 0 0 auto;
  min-width: 90px;
  font-size: 14px;
  color: #cbbfa9;
}
.qv__projnav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}
.qv__proj {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  padding: 6px 14px;
  border: 1px solid rgba(224, 194, 122, 0.45);
  border-radius: 18px;
  background: transparent;
  color: #e0c27a;
  font-size: 14px;
  line-height: 20px;
}
.qv__proj span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qv__proj:hover,
.qv__proj:focus {
  background: rgba(224, 194, 122, 0.14);
  border-color: #e0c27a;
}
.qv__proj[disabled] {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}
.qv__projpos {
  flex: 0 0 auto;
  font-size: 13px;
  color: #a39782;
  white-space: nowrap;
}
.qv__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: -4px -8px -4px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f3ece0;
  font-size: 34px;
  line-height: 44px;
}
.qv__close:hover,
.qv__close:focus {
  background: rgba(255, 255, 255, 0.1);
}
.qv__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 72px;
  touch-action: pan-y pinch-zoom;
}
.qv__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}
.qv--loading .qv__img {
  opacity: 0.25;
}
.qv__spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(224, 194, 122, 0.25);
  border-top-color: #e0c27a;
  border-radius: 50%;
  animation: qv-spin 0.8s linear infinite;
  display: none;
}
.qv--loading .qv__spin {
  display: block;
}
@keyframes qv-spin {
  to {
    transform: rotate(360deg);
  }
}
.qv__err {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #cbbfa9;
  font-size: 15px;
}
.qv__arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f3ece0;
  font-size: 54px;
  opacity: 0.75;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.qv__arrow:hover,
.qv__arrow:focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}
.qv__arrow--prev {
  left: 0;
}
.qv__arrow--next {
  right: 0;
}
.qv__flash {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: 80%;
  padding: 8px 18px;
  border-radius: 18px;
  background: rgba(90, 27, 36, 0.92);
  color: #ffffff;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.qv__flash--on {
  opacity: 1;
}
.qv__thumbs {
  display: flex;
  gap: 6px;
  padding: 10px 16px 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  justify-content: safe center;
}
.qv__thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #3a2a20;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.qv__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qv__thumb:hover,
.qv__thumb:focus {
  opacity: 0.9;
}
.qv__thumb--on {
  opacity: 1;
  border-color: #e0c27a;
}
.qv__panel {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(224, 194, 122, 0.18);
}
.qv__info {
  flex: 1 1 auto;
  min-width: 0;
}
.qv__title {
  font-size: 19px;
  line-height: 24px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qv__sub {
  margin-top: 2px;
  font-size: 14px;
  line-height: 20px;
  color: #cbbfa9;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qv__sub b {
  color: #e0c27a;
  font-weight: 700;
}
.qv__price {
  margin-top: 4px;
}
.qv__price .pc-price {
  margin: 0;
  color: #ffffff;
}
.qv__price .pc-price__now,
.qv__price .pc-price__now b {
  color: #ffffff;
}
.qv__price .pc-price__old {
  color: #a39782;
}
.qv__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qv__order,
.qv__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  height: 44px;
  border-radius: 22px;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.qv__order {
  background: #a07d2b;
  border: 1px solid #a07d2b;
  color: #ffffff;
}
.qv__order:hover,
.qv__order:focus {
  background: #b8922f;
  border-color: #b8922f;
  color: #ffffff;
}
.qv__more {
  border: 1px solid rgba(243, 236, 224, 0.4);
  color: #f3ece0;
}
.qv__more:hover,
.qv__more:focus {
  border-color: #f3ece0;
  color: #ffffff;
}
.qv__more[hidden] {
  display: none;
}
/* форма заявки из просмотра: выбранный кадр */
.order__pick {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
.order__pick img {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
}
.order__pick span {
  font-size: 13px;
  line-height: 18px;
  color: #565656;
}
/* телефон (мобильная вёрстка сайта — width=device-width) */
@media (max-width: 760px) {
  .qv__top {
    padding: 4px 8px 4px 12px;
  }
  .qv__projnav {
    display: none;
  }
  .qv__counter {
    flex: 1 1 auto;
  }
  .qv__stage {
    padding: 0;
  }
  .qv__img {
    border-radius: 0;
    box-shadow: none;
  }
  .qv__arrow {
    width: 48px;
    font-size: 40px;
    opacity: 0.6;
  }
  .qv__thumbs {
    padding: 8px 8px 2px;
    gap: 4px;
    justify-content: flex-start;
  }
  .qv__thumb {
    width: 56px;
    height: 42px;
  }
  .qv__panel {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 12px 12px;
  }
  .qv__title {
    font-size: 16px;
    line-height: 20px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 40px;
  }
  .qv__sub {
    font-size: 13px;
  }
  .qv__actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .qv__order {
    flex: 1 1 100%;
    height: 44px;
  }
  .qv__more {
    flex: 1 1 100%;
    height: 38px;
    font-size: 14px;
  }
  .qv__mnav {
    display: flex !important;
    gap: 8px;
  }
  .qv__mnav .qv__proj {
    flex: 1 1 50%;
    justify-content: center;
    max-width: none;
    font-size: 13px;
    padding: 6px 8px;
  }
}
.qv__mnav {
  display: none;
}
