/* ==========================================================================
   „Új design" — HIRDETÉSOLDAL
   Szakaszok: morzsamenü · cím · galéria · elrendezés · fő adatok · leírás ·
              adatcsoportok · felszereltség · térkép · oldalsáv (ár, ügynök) ·
              ajánlók · mobil alsó sáv · képnézegető · kapcsolatfelvétel ·
              inaktív hirdetés
   ========================================================================== */

.pp { padding-bottom: var(--s-16); }

/* ---------- Morzsamenü ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: var(--s-5); font-size: var(--fs-sm); color: var(--c-text-subtle); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--gray-300); }
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb [aria-current] { color: var(--gray-800); font-weight: 500; }

/* ---------- Cím ---------- */
.pp-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4) var(--s-8); margin: var(--s-4) 0 var(--s-6); }
.pp-head__main { flex: 1 1 520px; min-width: 0; }
.pp-badges { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.pp-title { font-size: var(--fs-4xl); font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pp-loc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); color: var(--c-text-muted); }
.pp-loc .ic { color: var(--brand-700); }
.pp-loc__map { font-size: var(--fs-sm); font-weight: 600; margin-left: var(--s-1); }
.pp-head__actions { display: flex; gap: var(--s-2); }
.pp-fav.is-fav { border-color: var(--accent-200); background: var(--accent-50); }
/* Asztali nézet: a cím a teljes tartalomszélességet kapja, a gombok a hely-sor jobb oldalára kerülnek */
.pp-title { text-wrap: balance; }
@media (min-width: 768px) {
  .pp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 var(--s-8); }
  .pp-head__main { display: contents; }
  .pp-badges, .pp-title, .pp-title-orig { grid-column: 1 / -1; }
  .pp-title { font-size: var(--fs-3xl); }
  .pp-loc { grid-column: 1; }
  .pp-head__actions { grid-column: 2; margin-top: var(--s-3); }
}
/* Német nézet: eredeti magyar cím és a leírás nyelvének jelölése */
.pp-title-orig { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--c-text-subtle); overflow-wrap: anywhere; }
.pp-title-orig > span:first-child { font-weight: 600; color: var(--c-text-muted); }
.pp-desc-orig { display: flex; align-items: center; gap: 6px; margin: calc(-1 * var(--s-2)) 0 var(--s-3); font-size: var(--fs-sm); font-weight: 500; color: var(--c-text-subtle); }

/* ---------- Galéria ---------- */
.gallery {
  position: relative; display: grid; gap: 8px; height: clamp(300px, 40vw, 540px);
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr;
  border-radius: var(--r-2xl); overflow: hidden; background: var(--gray-100);
}
.gallery__item { position: relative; overflow: hidden; background: var(--gray-200); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter var(--t); }
.gallery__item:hover img { transform: scale(1.03); filter: brightness(.94); }
.gallery__item:focus-visible { outline: 3px solid #fff; outline-offset: -6px; box-shadow: inset 0 0 0 6px var(--brand-500); }
.gallery__item img.is-broken { opacity: 0; }
.gallery__item--main { grid-row: 1 / span 2; }
.gallery--n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery--n2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.gallery--n2 .gallery__item--main { grid-row: auto; }
.gallery--n3 { grid-template-columns: 2fr 1fr; }
.gallery--n4 .gallery__item:nth-child(4) { grid-column: 2 / span 2; }
.gallery__all { position: absolute; right: var(--s-4); bottom: var(--s-4); }
.gallery__count { display: none; }
.gallery__empty { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-content: center; justify-items: center; gap: var(--s-2); color: var(--c-text-subtle); }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; height: auto; aspect-ratio: 4 / 3; margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .gallery__item:not(.gallery__item--main) { display: none; }
  .gallery__item--main { grid-row: auto; }
  .gallery__all { display: none; }
  .gallery__count { display: inline-flex; align-items: center; gap: 6px; position: absolute; right: var(--s-3); bottom: var(--s-3); padding: 4px 10px; border-radius: var(--r-full); background: rgb(11 31 51 / .7); color: #fff; font-size: var(--fs-xs); font-weight: 600; pointer-events: none; }
  .gallery__count .ic { width: 15px; height: 15px; }
  .pp-head { margin-bottom: var(--s-4); }
  .pp-head__actions { width: 100%; }
  .pp-head__actions .btn { flex: 1; min-width: 0; padding: 0 var(--s-3); }
  .pp-head__actions .btn span { overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Kéthasábos elrendezés ---------- */
.pp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(2rem, 4vw, 4rem); margin-top: var(--s-8); align-items: start; }
.pp-main { min-width: 0; }
.pp-section { padding: var(--s-8) 0; border-bottom: 1px solid var(--c-border); }
.pp-section:first-child { padding-top: 0; }
.pp-section:last-child { border-bottom: 0; }
.pp-h2 { font-size: var(--fs-2xl); margin-bottom: var(--s-5); }
.pp-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: var(--s-4); min-width: 0; }
@media (max-width: 1023px) {
  .pp-layout { grid-template-columns: 1fr; }
  .pp-side { position: static; order: -1; }
  .pp-side .price-card > [data-open-dialog] { display: none; }
}

/* ---------- Fő adatok ---------- */
.pp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.pp-fact { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--c-border); border-radius: var(--r-lg); background: #fff; }
.pp-fact__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-50); color: var(--brand-700); }
.pp-fact__text { display: grid; line-height: 1.3; min-width: 0; }
.pp-fact__text strong { font-size: var(--fs-base); font-weight: 600; color: var(--gray-900); }
.pp-fact__text span { font-size: var(--fs-xs); color: var(--c-text-subtle); }

/* ---------- Leírás ---------- */
.pp-desc { white-space: pre-line; color: var(--gray-700); line-height: 1.75; overflow-wrap: anywhere; }
.pp-desc.is-collapsed { max-height: 15.75em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.pp-desc__toggle { margin-top: var(--s-3); font-weight: 600; }
.pp-desc__toggle[aria-expanded="true"] .ic { transform: rotate(180deg); }

/* ---------- Adatcsoportok ---------- */
.attr-groups { display: grid; gap: var(--s-6); }
.attr-group__title { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-lg); margin-bottom: var(--s-3); }
.attr-group__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--gray-100); color: var(--gray-700); }
.attr-group__icon .ic { width: 18px; height: 18px; }
.attr-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s-8); margin: 0; }
.attr-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: 11px 0; border-bottom: 1px solid var(--gray-100); font-size: var(--fs-sm); }
.attr-row dt { color: var(--c-text-muted); }
.attr-row dd { margin: 0; font-weight: 600; color: var(--gray-900); text-align: right; }
.pp-ref { margin-top: var(--s-5); font-size: var(--fs-xs); color: var(--c-text-subtle); }
@media (max-width: 640px) { .attr-list { grid-template-columns: 1fr; } }

/* ---------- Felszereltség ---------- */
.extras { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.extra { display: inline-flex; align-items: center; gap: var(--s-2); padding: 8px 14px 8px 10px; border-radius: var(--r-full); background: var(--brand-50); color: var(--brand-900); font-size: var(--fs-sm); font-weight: 500; }
.extra .ic { color: var(--brand-700); width: 18px; height: 18px; }

/* ---------- Térkép, beágyazások ---------- */
.pp-address { display: grid; gap: 2px; margin-bottom: var(--s-4); }
.pp-address p:first-child { display: flex; align-items: center; gap: var(--s-2); font-weight: 500; }
.pp-address .ic { color: var(--brand-700); }
.pp-map { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--c-border); background: var(--gray-100); }
.pp-map__hint { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s-2); color: var(--c-text-subtle); font-size: var(--fs-sm); }
.pp-map__ext { margin-top: var(--s-3); }
@media (max-width: 640px) { .pp-map { aspect-ratio: 1 / 1; } }
.pp-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; background: var(--gray-900); }
.pp-embed--tall { aspect-ratio: 9 / 16; max-width: 360px; }
.pp-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Oldalsáv: ár és ügynök ---------- */
.price-card { display: grid; gap: var(--s-4); padding: var(--s-6); border: 1px solid var(--c-border); border-radius: var(--r-2xl); background: #fff; box-shadow: var(--sh-lg); }
.price-card__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-subtle); margin-bottom: -10px; }
.price-card__price { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--c-price); }
.price-card__price span { font-size: var(--fs-lg); font-weight: 500; margin-left: 2px; }
.price-card__old { display: flex; align-items: center; gap: var(--s-2); margin-top: -8px; font-size: var(--fs-sm); color: var(--c-text-subtle); }
.price-card__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.price-card__meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: var(--gray-50); border: 1px solid var(--gray-100); font-size: var(--fs-sm); color: var(--gray-700); }
.price-card__meta .ic { width: 16px; height: 16px; color: var(--brand-700); }

.agent { display: flex; align-items: center; gap: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--c-border); }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--gray-100); }
.avatar--initials { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-500), var(--brand-800)); color: #fff; font-weight: 700; font-size: var(--fs-lg); }
.avatar--xl { width: 120px; height: 120px; border-radius: 28px; font-size: var(--fs-3xl); }
.agent__text { display: grid; min-width: 0; line-height: 1.35; }
.agent__role { font-size: var(--fs-xs); color: var(--c-text-subtle); }
.agent__name { font-weight: 600; color: var(--gray-900); }
a.agent__name:hover { color: var(--brand-700); }

.phone { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-lg); background: var(--gray-50); }
.phone__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--brand-700); box-shadow: var(--sh-xs); flex: none; }
.phone__icon .ic { width: 18px; height: 18px; }
.phone__num { flex: 1; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone__num a { color: var(--gray-900); }
.phone--stack { flex-direction: column; align-items: stretch; }
.phone__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-subtle); }
.phone__row { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-lg); }
.phone.is-revealed [data-phone-reveal] { display: none; }
.pp-help { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-xs); color: var(--c-text-subtle); padding: 0 var(--s-2); }
.pp-help .ic { color: var(--brand-700); width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Önnek ajánljuk ---------- */
.related { background: var(--c-bg-soft); padding: clamp(3rem, 6vw, 5rem) 0; margin-top: var(--s-8); }
@media (min-width: 1360px) { .related { margin-inline: var(--s-8); border-radius: 40px; } }
.related__nav { display: flex; gap: var(--s-2); }
.related__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, calc((100% - 3 * 24px) / 4)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 4px; padding: 4px 4px var(--s-4); scrollbar-width: thin; }
.related__track > .card { scroll-snap-align: start; }
.related__track:focus-visible { outline-offset: 4px; }
@media (max-width: 1023px) { .related__track { grid-auto-columns: minmax(260px, 45%); } }
@media (max-width: 600px) { .related__track { grid-auto-columns: 82%; } }

/* ---------- Mobil alsó sáv ---------- */
.mobile-bar { display: none; }
@media (max-width: 1023px) {
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
    padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .95); backdrop-filter: blur(10px);
    border-top: 1px solid var(--c-border); box-shadow: 0 -8px 24px -12px rgb(11 31 51 / .2);
  }
  .mobile-bar__price { display: grid; line-height: 1.2; min-width: 0; }
  .mobile-bar__price strong { font-size: var(--fs-xl); color: var(--c-price); white-space: nowrap; }
  .mobile-bar__price strong span { font-size: var(--fs-sm); font-weight: 500; }
  .mobile-bar__price small { font-size: var(--fs-xs); color: var(--c-text-subtle); }
  .page-property:not(.page-property--inactive) { --bar-h: 72px; }
  .mobile-bar { min-height: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---------- Képnézegető ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; background: #0b1120; color: #dfe5ec; display: none; flex-direction: column; }
.lightbox[open] { display: flex; animation: modal-in var(--t) var(--ease); }
.lightbox::backdrop { background: #0b1120; }
.lightbox__bar { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) var(--s-4); }
.lightbox__count { font-size: var(--fs-sm); color: #8fa0b3; white-space: nowrap; }
.lightbox__count strong { font-size: var(--fs-xl); color: #fff; }
.lightbox__title { flex: 1; text-align: center; font-size: var(--fs-sm); color: #c6d0db; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__btn { color: #fff; background: rgb(255 255 255 / .08); width: 44px; height: 44px; }
.lightbox__btn:hover { background: rgb(255 255 255 / .18); }
.lightbox__btn:disabled { opacity: .25; cursor: default; }
.lightbox__stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 72px; touch-action: pan-y; user-select: none; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-md); transition: opacity var(--t); }
.lightbox__img.is-loading { opacity: .25; }
.lightbox__spin { position: absolute; color: #fff; opacity: 0; transition: opacity var(--t); }
.lightbox__img.is-loading + .lightbox__spin { opacity: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox__nav--prev { left: var(--s-4); }
.lightbox__nav--next { right: var(--s-4); }
.lightbox__thumbs { display: flex; gap: 8px; padding: var(--s-4); overflow-x: auto; scrollbar-width: thin; justify-content: safe center; }
.lightbox__thumb { flex: none; width: 84px; height: 60px; border-radius: var(--r-sm); overflow: hidden; opacity: .5; border: 2px solid transparent; transition: opacity var(--t-fast), border-color var(--t-fast); background: #1a2d42; }
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb:hover { opacity: .85; }
.lightbox__thumb[aria-current="true"] { opacity: 1; border-color: var(--brand-400); }
@media (max-width: 767px) {
  .lightbox__stage { padding: 0; }
  .lightbox__nav { top: auto; bottom: var(--s-4); transform: none; background: rgb(11 31 51 / .6); }
  .lightbox__thumbs { display: none; }
  .lightbox__title { display: none; }
  .lightbox__bar { justify-content: space-between; }
}

/* ---------- Kapcsolatfelvétel ---------- */
.contact { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-8); }
.contact__agent { display: grid; justify-items: center; align-content: start; gap: var(--s-2); text-align: center; padding: var(--s-6); border-radius: var(--r-xl); background: var(--gray-50); }
.contact__name { font-weight: 600; font-size: var(--fs-lg); margin-top: var(--s-2); line-height: 1.3; }
.contact__prop { display: flex; gap: var(--s-3); align-items: center; width: 100%; margin-top: var(--s-3); padding: var(--s-3); border-radius: var(--r-lg); background: #fff; text-align: left; }
.contact__prop img { width: 64px; height: 48px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--gray-100); }
.contact__prop > span { display: grid; min-width: 0; font-size: var(--fs-xs); line-height: 1.35; }
.contact__prop strong { color: var(--c-price); font-size: var(--fs-sm); }
.contact__prop > span > span { color: var(--c-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact__agent .phone { width: 100%; margin-top: var(--s-2); background: #fff; }
.contact__nophone { display: flex; gap: var(--s-2); text-align: left; font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: var(--s-2); }
.contact__nophone .ic { color: var(--brand-700); flex: none; margin-top: 2px; }
.contact__h { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.contact__msg [data-contact-guest] { display: grid; gap: var(--s-3); align-content: start; }
.contact-form { display: grid; gap: var(--s-4); }
.contact-form__two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.contact-form__foot { display: flex; justify-content: flex-end; }
.form-msg { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); font-size: var(--fs-sm); background: var(--brand-50); color: var(--brand-900); }
.form-msg.is-error { background: #fef2f2; color: var(--c-danger); }
.field__error { font-size: var(--fs-xs); color: var(--c-danger); }
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; gap: var(--s-6); }
  .contact-form__two { grid-template-columns: 1fr; }
}

/* ---------- Inaktív hirdetés ---------- */
.pp-inactive { padding: clamp(2rem, 6vw, 5rem) 0; min-height: 60vh; }
.pp-inactive__card { max-width: 720px; margin: 0 auto; display: grid; justify-items: center; gap: var(--s-4); text-align: center; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--c-border); border-radius: var(--r-2xl); box-shadow: var(--sh-lg); background: #fff; }
.pp-inactive__card img { width: 100%; max-width: 520px; border-radius: var(--r-xl); }
.pp-inactive__title { font-size: var(--fs-3xl); }
.pp-inactive__card .btn-row { margin-top: var(--s-2); }

/* Kis telefonon a fejléc-gombok csak ikont mutatnak (az akadálymentes név megmarad) */
@media (max-width: 479px) {
  .pp-head__actions .btn span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Tilezza környék-doboz: ha a szkript nem töltődik be (üres) vagy hibát ad, az egész blokk rejtve */
.pp-area-wrap { margin-top: var(--s-6); }
.pp-area-wrap .pp-h3 { margin-bottom: var(--s-3); font-size: var(--fs-lg); font-weight: 600; }
.pp-area-wrap:has(.pp-area:empty), .pp-area-wrap:has(.tza-hiba) { display: none; }
