/* Σελίδα ακινήτου (el/en). Τα ids/κλάσεις της Cloud Function (propertyPage) δεν μετονομάζονται:
   .card-badge.sale/.rent · .gallery-thumb(.active) · .price-old · #propSpecs > div > span + strong · .pd-group h4 + .pd-chips > .pd-chip */

[hidden] { display: none !important; }
html:has(dialog[open]) { overflow: hidden; }

.pp { padding-bottom: clamp(48px, 6vw, 96px); }
.pp-top { padding-top: 22px; }
.pp .breadcrumb { margin-bottom: 18px; }
.pp .breadcrumb li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pp .breadcrumb li:last-child { flex: 1 1 0; min-width: 0; }
#breadcrumbTitle { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--navy-900); }

/* ---------------- Φόρτωση / δεν βρέθηκε ---------------- */
.pp-loading { display: grid; gap: 18px; padding-bottom: 80px; }
.pp-skel { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--bg-deep) 0 40%, #f3ede5 50%, var(--bg-deep) 60% 100%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@media (min-width: 768px) { .pp-skel { aspect-ratio: 21 / 9; } }
.pp-loading p { margin: 0; color: var(--muted); font-weight: 600; }
.pp-missing { min-height: 50vh; justify-content: center; }

/* ---------------- Μη διαθέσιμο ---------------- */
.pp-notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 14px 18px; border-radius: var(--r-md); background: var(--warning-bg); color: var(--warning); font-size: var(--fs-sm); }
.pp-notice p { margin: 0; }
.pp-notice a { color: inherit; font-weight: 700; }

/* ---------------- Gallery ---------------- */
.pp-gallery { display: grid; gap: 10px; }
.pp-stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-deep); }
@media (min-width: 768px) { .pp-stage { aspect-ratio: 16 / 10; } }
@media (min-width: 1024px) {
  .pp-gallery { grid-template-columns: minmax(0, 1fr) 176px; }
  .pp-gallery.is-single { grid-template-columns: 1fr; }
  .pp-stage { aspect-ratio: auto; height: min(66vh, 600px); min-height: 420px; }
}
.pp-stage-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pp-stage-btn:focus-visible { outline-offset: -4px; }
#mainImage { width: 100%; height: 100%; object-fit: cover; }
.pp-nav, .pp-all, .pp-count { position: absolute; z-index: 2; }
.pp-nav { top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: var(--navy-900); box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease); }
.pp-nav:hover { transform: scale(1.06); }
.pp-prev { left: 12px; }
.pp-next { right: 12px; }
.pp-count { left: 14px; bottom: 14px; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(11,27,43,.62); color: #fff; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
.pp-all { right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: rgba(255,255,255,.94); color: var(--navy-900); font-size: var(--fs-xs); font-weight: 700; box-shadow: var(--shadow-sm); }
.pp-all:hover { background: #fff; }
.pp-all .i { width: 16px; height: 16px; }
.is-single .pp-nav, .is-single .pp-count, .is-single .pp-thumbs-wrap { display: none; }

.pp-thumbs-wrap { position: relative; min-width: 0; }
.pp-thumbs { position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 4px; }
.gallery-thumb { flex: 0 0 auto; display: block; width: 96px; aspect-ratio: 4 / 3; height: auto; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-deep); object-fit: cover; opacity: .62; cursor: pointer; scroll-snap-align: start; transition: opacity var(--dur-fast), border-color var(--dur-fast); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: .9; }
.gallery-thumb.active { opacity: 1; border-color: var(--terra); }
@media (min-width: 1024px) {
  .pp-thumbs { position: absolute; inset: 0; flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 0 4px 0 0; }
  .gallery-thumb { width: 100%; }
}

/* ---------------- Διάταξη 8/4 ---------------- */
.pp-layout { display: grid; gap: 40px; margin-top: clamp(28px, 3vw, 44px); }
@media (min-width: 1024px) {
  .pp-layout { grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr); gap: clamp(40px, 5vw, 80px); }
  .pp-aside { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
}

/* Κεφαλίδα αγγελίας */
.pp-head { padding-bottom: 36px; }
.pp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 16px; }
.pp-code { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.pp-code #propCode { color: var(--navy-900); }
.pp-head h1 { font-size: clamp(1.875rem, 1.35rem + 2vw, 2.75rem); max-width: 24ch; margin-bottom: 12px; }
.pp-loc { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 22px; color: var(--muted); font-weight: 600; }
.pp-loc .i { margin-top: 2px; color: var(--terra-ink); }
.pp-price-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pp-price { font-family: var(--font-display); font-size: clamp(1.875rem, 1.5rem + 1.3vw, 2.5rem); font-weight: 600; line-height: 1.1; color: var(--navy-900); }
.pp-price small { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.pp-head-actions { display: flex; gap: 8px; }
.pp-fav[aria-pressed="true"] { color: var(--terra); border-color: var(--terra-tint); background: var(--terra-soft); }
.pp-fav[aria-pressed="true"] .i { fill: currentColor; }

/* Βασικά στοιχεία (key facts) */
.pp-facts { list-style: none; margin: 26px 0 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
@media (min-width: 640px) { .pp-facts { display: flex; flex-wrap: wrap; gap: 18px 36px; } }
.pp-facts li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; min-width: 0; }
.pp-facts .i { grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--terra-ink); }
.fact-v { font-weight: 800; color: var(--navy-900); line-height: 1.25; }
.fact-l { font-size: var(--fs-xs); color: var(--muted); line-height: 1.25; }

/* Ενότητες */
.pp-section { padding-block: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.pp-section > h2 { font-size: var(--fs-xl); margin-bottom: 20px; }
.pp-sub { font-size: var(--fs-md); margin: 28px 0 12px; }
.pp-sub:first-of-type { margin-top: 0; }
.pp-desc { margin: 0; white-space: pre-line; line-height: 1.85; max-width: 68ch; color: var(--text); }

/* Στοιχεία (property-details.js) */
#propSpecs { display: grid; column-gap: 40px; }
@media (min-width: 640px) { #propSpecs { grid-template-columns: 1fr 1fr; } }
#propSpecs > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
#propSpecs > div > span { color: var(--muted); }
#propSpecs > div > span + strong { color: var(--navy-900); font-weight: 700; text-align: right; }

/* Χαρακτηριστικά */
#propFeatures { display: grid; gap: 22px; }
.pd-group h4 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 14px 0 12px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 600; color: var(--navy-900); }
.pd-chip::before { content: ""; width: 5px; height: 9px; margin-top: -3px; border: solid var(--terra-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Τοποθεσία + αποστάσεις */
.pp-map { height: 340px; }
@media (min-width: 768px) { .pp-map { height: 420px; } }
#propertyLocationMap { position: absolute; inset: 0; }
.pp-map-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; }
.pp-dist { margin-top: 32px; }
.pp-dist h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.pp-dist-note { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.pp-dist-list { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 36px; }
@media (min-width: 640px) { .pp-dist-list { grid-template-columns: 1fr 1fr; } }
.pp-dist-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pp-dist-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--terra-soft); color: var(--terra-ink); }
.pp-dist-name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.pp-dist-val { display: grid; justify-items: end; text-align: right; line-height: 1.3; }
.pp-dist-val strong { color: var(--navy-900); font-variant-numeric: tabular-nums; }
.pp-dist-val small { font-size: var(--fs-xs); color: var(--muted); }

/* Κόστος: δάνειο (πώληση) / μηνιαίο κόστος (ενοίκιο) */
.pp-calc { display: grid; gap: 24px; padding: clamp(20px, 3vw, 32px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
@media (min-width: 768px) { .pp-calc-mortgage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.pp-calc h3 { grid-column: 1 / -1; margin: 0; }
.calc-form { display: grid; gap: 22px; }
.calc-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-label-row output { font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.range { width: 100%; height: 44px; margin: 0; accent-color: var(--terra); cursor: pointer; }
.pp-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pp-fieldset legend { padding: 0; margin-bottom: 6px; }
.calc-years { display: flex; flex-wrap: wrap; }
.calc-years label { padding: 0 14px; flex: 1 0 auto; }
.calc-result { display: grid; gap: 16px; align-content: start; padding: 24px; border-radius: var(--r-md); background: var(--navy-900); color: #D7DEE5; }
.calc-main { margin: 0; display: grid; gap: 4px; }
.calc-main span { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #F2B79B; }
.calc-main strong { font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.5vw, 2.75rem); font-weight: 500; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.calc-main small { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; color: #B8C4CF; }
.calc-dl { margin: 0; display: grid; gap: 8px; }
.calc-dl div { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); font-size: var(--fs-sm); }
.calc-dl dt { color: #B8C4CF; }
.calc-dl dd { margin: 0; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.calc-note { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.calc-result .calc-note { color: #8FA0B1; }

.cost-list { margin: 0; display: grid; }
.cost-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cost-list dt { color: var(--muted); }
.cost-list dd { margin: 0; font-weight: 700; color: var(--navy-900); text-align: right; font-variant-numeric: tabular-nums; }
.cost-list .cost-total { border-bottom: 0; border-top: 1.5px solid var(--navy-900); margin-top: -1px; }
.cost-list .cost-total dt { color: var(--navy-900); font-weight: 700; }
.cost-list .cost-total dd { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; }
.cost-meta { display: grid; gap: 12px; }
.cost-meta p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); }
.cost-meta .i { color: var(--terra-ink); }
.cost-meta .chip { min-height: 30px; }

/* Ραντεβού */
.pp-book { display: grid; gap: 20px; }
.book-fields { display: grid; gap: 18px; }
@media (min-width: 640px) { .book-fields { grid-template-columns: 1fr 1fr; } .book-fields .pp-fieldset { grid-column: 1 / -1; } }
.slot-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: var(--r-md); }
.slot-seg label { flex-direction: column; gap: 0; min-height: 60px; padding: 8px 12px; border-radius: var(--r-sm); line-height: 1.25; text-align: center; }
.slot-seg small { font-size: var(--fs-xs); font-weight: 600; }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.book-actions .btn { flex: 1 1 150px; }

/* ---------------- Κάρτα επικοινωνίας ---------------- */
.pp-card { display: grid; gap: 16px; padding: clamp(22px, 2.5vw, 30px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.pp-card .eyebrow { margin: 0; }
.pp-card-title { font-size: var(--fs-xl); margin: 0; }
.pp-card-text { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.pp-card-text strong { color: var(--navy-900); }
.pp-card-actions { display: grid; gap: 10px; }
.pp-card-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.pp-card-pair .btn { padding-inline: 14px; }
.pp-share { justify-self: center; }
.pp-card-foot { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
.pp-card-foot p, .pp-card-foot a { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 32px; }
.pp-card-foot a { color: var(--navy-900); font-weight: 700; text-decoration: none; }
.pp-card-foot a:hover { color: var(--terra-ink); text-decoration: underline; text-underline-offset: 4px; }
.pp-card-foot .i { width: 16px; height: 16px; color: var(--navy-300); }

/* ---------------- Παρόμοια ---------------- */
.pp-similar { border-top: 1px solid var(--line); margin-top: clamp(24px, 3vw, 40px); }
.pp-similar .section-head h2 { font-size: var(--fs-xl); }

/* ---------------- Lightbox (<dialog>: top layer, πάνω από nav & cookie banner) ---------------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,16,26,.97); color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(8,16,26,.9); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; }
.lb-count { font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.lb-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(11,27,43,.6); color: #fff; }
.lb-btn:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.lightbox :focus-visible { outline-color: var(--ring-dark); }
.lb-stage { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#lightboxImage { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 24px); max-height: 100%; width: auto; height: auto; transform-origin: center; transition: transform 120ms var(--ease); cursor: zoom-in; -webkit-user-drag: none; }
#lightboxImage.is-zoomed { cursor: grab; transition: none; }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -24px; z-index: 2; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-tip { margin: 0; padding: 10px 16px 16px; text-align: center; font-size: var(--fs-xs); color: #8FA0B1; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 8px; margin: 0; } .lb-tip { padding-inline: 72px; } }

/* ---------------- Κινητό: σταθερή μπάρα ενεργειών ---------------- */
.pp-bar { display: none; }
@media (max-width: 1023px) {
  .pp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px -20px rgba(16,38,59,.45); }
  .pp-bar-price { flex: none; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.1; color: var(--navy-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pp-bar-price .price-old { font-size: .62em; }
  .pp-bar-price small { display: block; margin: 0; font-family: var(--font-body); font-size: var(--fs-xs); color: var(--muted); }
  .pp-bar .btn { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 12px; }
  body.has-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body.has-bar .toast-region { bottom: calc(86px + env(safe-area-inset-bottom)); }
  /* Όσο φαίνεται το cookie banner (επίσης fixed κάτω), η μπάρα κρύβεται */
  body:has(#cookie-consent-banner[style*="flex"]) .pp-bar { display: none; }
}
@media (max-width: 399px) { .pp-bar .btn .i { display: none; } }
