/* Property listing page */
.page-property { padding-top: var(--header-height); }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 2rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.pv-page {
  padding: 1.5rem 0 4rem;
  background: var(--bg);
}
.pv-wrap { display: flex; flex-direction: column; gap: 2rem; }
.pv-breadcrumb { margin-bottom: 0; }

.pv-gallery__grid {
  display: grid;
  gap: 0.5rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
}
.pv-gallery__main {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #ffffff;
  cursor: zoom-in;
}
.pv-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.pv-gallery__main:hover img { transform: scale(1.02); }
.pv-gallery__count {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.pv-gallery--compact { margin-bottom: 0; }
.pv-gallery--compact .pv-gallery__grid {
  border-radius: 18px;
}
.pv-gallery--compact .pv-gallery__main {
  aspect-ratio: 4 / 3;
  max-height: 200px;
}

.pv-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 992px) {
  .pv-layout { grid-template-columns: 1fr 360px; gap: 2.5rem; }
}
.pv-main { min-width: 0; }
.pv-head { margin-bottom: 2rem; }
.pv-badges { margin-bottom: 1rem; }
.pv-title {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.pv-address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.pv-complex {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.98rem;
}
.pv-complex:hover { color: #5eead4; }

.pv-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.pv-head-meta__item {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 5.5rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.pv-head-meta__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.pv-head-meta__label.icon-inline .ui-icon {
  width: 0.85rem;
  height: 0.85rem;
  font-size: 0.85rem;
  color: var(--accent);
}
.pv-head-meta__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.pv-details__groups {
  display: grid;
  gap: 1rem;
}
.pv-details__group {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.pv-details__group-title {
  margin: 0;
  padding: 0.8rem 1.25rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.pv-details__list {
  margin: 0;
  background: var(--surface);
}
.pv-details__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1rem 1.5rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.pv-details__row:last-child { border-bottom: none; }
.pv-details__row dt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.pv-details__row dt.icon-inline .ui-icon {
  width: 0.95rem;
  height: 0.95rem;
  font-size: 0.95rem;
  color: var(--accent);
}
.pv-details__row dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
@media (max-width: 599px) {
  .pv-details__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .pv-details__row dd { text-align: left; }
}

.pv-details__preview { margin-bottom: 0; }
.pv-details__list--card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.pv-details__toggle { margin-top: 1rem; }
.pv-details.is-expanded .pv-details__preview { display: none; }
.pv-details.is-expanded .pv-details__full { display: block; }
.pv-details.is-expanded .pv-details__full[hidden] { display: block; }

.pv-section {
  scroll-margin-top: calc(var(--header-height) + 3.25rem);
}
body.page-property.is-header-hidden .pv-section {
  scroll-margin-top: 3.25rem;
}

.pv-subnav {
  position: sticky;
  top: 0.35rem;
  z-index: 120;
  margin: 0 0 1.75rem;
  transition: top 0.3s ease;
}
body.page-property:not(.is-header-hidden) .pv-subnav {
  top: calc(var(--header-height) + 0.25rem);
}
.pv-subnav__track {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.45rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  scrollbar-width: none;
}
html[data-theme="dark"] .pv-subnav__track,
html:not([data-theme]) .pv-subnav__track {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}
.pv-subnav__track::-webkit-scrollbar { display: none; }
.pv-subnav__link {
  flex: 0 0 auto;
  padding: 0.52rem 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pv-subnav__link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.pv-subnav__link.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

@media (min-width: 992px) {
  .pv-aside {
    z-index: 30;
  }
}

.pv-block { margin-bottom: 3rem; }
.pv-block__title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.pv-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.pv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.pv-tag {
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}
.pv-videos { display: grid; gap: 1.25rem; }
.pv-video {
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
}
.pv-video iframe,
.pv-video video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.pv-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  height: 420px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.pv-map .leaflet-container {
  height: 100% !important;
  width: 100% !important;
  z-index: 0 !important;
}
.pv-map .leaflet-pane,
.pv-map .leaflet-map-pane,
.pv-map .leaflet-tile-pane,
.pv-map .leaflet-overlay-pane,
.pv-map .leaflet-shadow-pane,
.pv-map .leaflet-marker-pane,
.pv-map .leaflet-tooltip-pane,
.pv-map .leaflet-popup-pane,
.pv-map .leaflet-top,
.pv-map .leaflet-bottom {
  z-index: 1 !important;
}

.pv-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: stretch;
}
@media (min-width: 992px) {
  .pv-card {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
  }
}
.pv-card {
  padding: 1.75rem;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .pv-card,
html:not([data-theme]) .pv-card {
  box-shadow: none;
}
[data-theme="light"] .pv-card {
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}
.pv-card__price-wrap { margin-bottom: 1.25rem; }
.pv-card__price {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  color: var(--sand);
  line-height: 1.1;
}
.pv-card__price--request { color: var(--text); font-size: 1.75rem; }
.pv-card__mortgage {
  margin-top: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.pv-card__m2 {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.pv-card__specs {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
}
.pv-card__specs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.pv-card__spec-label.icon-inline .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
  font-size: 0.9rem;
  color: var(--accent);
}
.pv-card__specs strong { color: var(--text); font-weight: 700; }
.pv-card__actions { display: grid; gap: 0.75rem; }
.pv-card__actions .messenger-link { justify-content: center; }

.pv-photos {
  scroll-margin-top: calc(var(--header-height) + 3.25rem);
}
body.page-property.is-header-hidden .pv-photos {
  scroll-margin-top: 3.25rem;
}
.pv-photos__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.pv-photos__head .pv-block__title { margin-bottom: 0; }
.pv-photos__single-label {
  margin: -0.5rem 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}
.pv-photos__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.pv-photos__tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pv-photos__tab:hover { color: var(--text); }
.pv-photos__tab.is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] .pv-photos__tab.is-active,
html:not([data-theme]) .pv-photos__tab.is-active {
  box-shadow: none;
  border: 1px solid var(--border);
}
.pv-photos__panel { display: none; }
.pv-photos__panel.is-active { display: block; }
.pv-photos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 600px) {
  .pv-photos__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .pv-photos__grid { grid-template-columns: repeat(4, 1fr); }
}
.pv-photos__item {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
}
.pv-photos__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease, opacity 0.3s;
  opacity: 0.94;
}
.pv-photos__item:hover img { transform: scale(1.04); opacity: 1; }

.pv-photos__grid--plan {
  grid-template-columns: 1fr;
  gap: 1rem;
}
.pv-photos__item--plan {
  aspect-ratio: auto;
  width: 100%;
  border-radius: 18px;
  background: #ffffff;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: none;
}
.pv-photos__item--plan img {
  position: static;
  width: 100%;
  height: auto;
  max-height: min(85vh, 820px);
  object-fit: contain;
  object-position: center;
  opacity: 1;
}
.pv-photos__item--plan:hover img { transform: none; }

@media (max-width: 991px) {
  .pv-gallery--compact .pv-gallery__main { max-height: 220px; }
  .pv-aside { order: -1; }
}
