.property-header {
  /* Top/bottom only — the side padding comes from .container (a `padding: … 0 …` shorthand here
     used to wipe it out, putting the page flush against the screen edge on phones). */
  padding-top: var(--space-5);
  padding-bottom: var(--space-3);
}
.property-skeleton {
  padding-top: var(--space-2);
}
.skeleton-block {
  background: var(--color-cream-dim);
  border-radius: var(--radius-md);
  animation: skeletonPulse 1.3s ease-in-out infinite;
}
.skeleton-gallery {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
}
.skeleton-line {
  border-radius: var(--radius-sm);
}
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-block {
    animation: none;
  }
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: var(--space-3);
}
.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--color-ink);
}
/* The title and the price sit side by side, price on the right. This was a wrapping flex row,
   so as soon as the title and the price block were together wider than the page — a long title,
   a long address, the colón conversion box — the price wrapped onto its own line and landed on
   the LEFT, under the title, with the whole right half of the page empty. A grid cannot wrap:
   the title column takes what is left (minmax(0, …) so the heading wraps its text instead of
   forcing the column wide) and the price keeps its own column at its natural width. */
.property-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-4);
}
/* The heading has to be allowed to wrap, or it sets the column's minimum and squeezes the price. */
.property-top > div {
  min-width: 0;
}
.property-top h1 {
  overflow-wrap: anywhere;
}
.property-top .property-price {
  font-size: 1.8rem;
}
.property-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}
.property-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
/* Narrow enough that two columns would leave the title a sliver: stack them, price first-left. */
@media (max-width: 760px) {
  .property-top { grid-template-columns: minmax(0, 1fr); }
  .property-price-block { align-items: flex-start; max-width: 100%; }
  .price-conversion { max-width: 100%; }
}
@media (max-width: 640px) {
  .property-top .property-price { font-size: 1.5rem; }
}
/* Valor de avalúo under the price (property.html appraisalHTML): label, amount, an ⓘ bubble that
   explains it, and how the asking price compares. Wraps at any width; the bubble opens below and
   toward the inside of the screen, so it never runs off the edge. */
.property-appraisal {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  max-width: 100%;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-white);
  font-size: 0.9rem;
}
.property-appraisal-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.property-appraisal-value { font-weight: 700; color: var(--color-ink); }
/* The bubble is placed against the whole row (not the small icon), so it can't leave the screen. */
.property-appraisal-info { margin-left: 0; position: static; }
.property-appraisal-info .field-info-trigger { width: 24px; height: 24px; border-radius: 50%; }
.property-appraisal-info:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; border-radius: 50%; }
.property-appraisal-info .field-info-text {
  top: calc(100% + 8px);
  bottom: auto;
  left: auto;
  right: 0;
  transform: none;
  width: min(320px, calc(100vw - 32px));
  max-width: none;
  text-align: left;
}
.property-appraisal-info .field-info-text strong { display: block; margin-bottom: 2px; }
.property-appraisal-diff {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--color-cream-dim);
  color: var(--color-ink);
  white-space: nowrap;
}
.property-appraisal-diff.is-below { background: #e3f3e8; color: #1e6b34; }
@media (max-width: 760px) {
  .property-appraisal { justify-content: flex-start; }
  .property-appraisal-info .field-info-text { right: auto; left: 0; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .property-appraisal-diff.is-below { background: rgba(46, 160, 90, .18); color: #8fd6a6; }
}
:root[data-theme="dark"] .property-appraisal-diff.is-below { background: rgba(46, 160, 90, .18); color: #8fd6a6; }
.price-was {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.price-was s {
  text-decoration-thickness: 1.5px;
}
.price-conversion {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--color-cream-dim);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.price-conversion[hidden] {
  display: none;
}
.price-conversion-amount {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-ink);
}
.price-conversion-amount svg {
  width: 16px;
  height: 16px;
  color: var(--color-gold);
  flex-shrink: 0;
}
.price-conversion-hint {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  max-width: 340px;
}
.price-conversion-hint a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.favorite-btn svg {
  width: 20px;
  height: 20px;
}
.favorite-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}
.favorite-btn.is-active {
  color: #c0392b;
  border-color: #f3c8c5;
  background: #fbeceb;
}

/* One large hero cell + up to four smaller thumbnails — clicking any of them opens the same
   full lightbox (below) at that cell's own index. */
.gallery-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-4) 0;
}
.gallery-hero-grid--solo {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.gallery-cell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  background: var(--color-ink);
}
.gallery-cell img,
.gallery-cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 200ms ease;
}
.gallery-cell:hover img,
.gallery-cell:hover video {
  transform: scale(1.04);
}
.cell-hero {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.gallery-hero-grid--solo .cell-hero {
  grid-column: 1;
  grid-row: 1;
}
.cell-t1 {
  grid-column: 3;
  grid-row: 1;
}
.cell-t2 {
  grid-column: 4;
  grid-row: 1;
}
.cell-t3 {
  grid-column: 3;
  grid-row: 2;
}
.cell-t4 {
  grid-column: 4;
  grid-row: 2;
}
.gallery-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  pointer-events: none;
}
.gallery-play-badge svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.6));
}
.gallery-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 59, 52, 0.62);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.gallery-more-overlay span {
  font-size: 0.78rem;
  opacity: 0.85;
}
.gallery-more-overlay strong {
  font-size: 1rem;
}
/* Phones: a swipeable carousel, one photo at a time (as in real-estate apps), so the price and
   title are on the first screen instead of under five stacked photos. Tapping a photo still
   opens the full lightbox; "See all N photos" is the last slide. */
@media (max-width: 560px) {
  .gallery-hero-grid:not(.gallery-hero-grid--solo) {
    display: flex !important;
    height: auto;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }
  .gallery-hero-grid:not(.gallery-hero-grid--solo)::-webkit-scrollbar { display: none; }
  /* The next photo peeks in at the edge: the sign there is more to swipe. */
  .gallery-hero-grid:not(.gallery-hero-grid--solo) > .gallery-cell {
    flex: 0 0 90%;
    border-radius: var(--radius-lg);
    aspect-ratio: 4 / 3 !important;
    height: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .gallery-cell:hover img, .gallery-cell:hover video { transform: none; }
}
@media (max-width: 720px) {
  .gallery-hero-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto repeat(2, 1fr);
    height: auto;
  }
  .cell-hero {
    grid-column: 1 / -1;
    grid-row: 1;
    aspect-ratio: 4 / 3;
  }
  .cell-t1 {
    grid-column: 1;
    grid-row: 2;
    aspect-ratio: 1 / 1;
  }
  .cell-t2 {
    grid-column: 2;
    grid-row: 2;
    aspect-ratio: 1 / 1;
  }
  .cell-t3 {
    grid-column: 1;
    grid-row: 3;
    aspect-ratio: 1 / 1;
  }
  .cell-t4 {
    grid-column: 2;
    grid-row: 3;
    aspect-ratio: 1 / 1;
  }
}

/* Full-screen lightbox the grid above opens into — reuses the same slider markup/logic that
   used to be the whole gallery, just presented over a dark backdrop instead of inline. */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.gallery-modal[hidden] {
  display: none;
}
.gallery-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.gallery-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.gallery-modal .gallery-slider {
  width: 100%;
  max-width: 1000px;
  margin: 0;
}
.gallery-modal .gallery-slide-img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #000;
}
.gallery-slider {
  margin: var(--space-4) 0;
  outline: none;
}
.gallery-viewport {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-ink);
}
.gallery-slide-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.gallery-slide-img[hidden] {
  display: none;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(47, 59, 52, 0.55);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
}
.gallery-nav:hover {
  background: rgba(47, 59, 52, 0.8);
}
.gallery-nav svg {
  width: 20px;
  height: 20px;
}
.gallery-prev {
  left: var(--space-3);
}
.gallery-next {
  right: var(--space-3);
}
.gallery-nav[hidden] {
  display: none;
}
.gallery-counter {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  background: rgba(47, 59, 52, 0.65);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.gallery-360-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-gold);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.gallery-360-badge[hidden] {
  display: none;
}
.gallery-caption {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
}
@media (max-width: 720px) {
  .gallery-slide-img {
    aspect-ratio: 4 / 3;
  }
  .gallery-nav {
    width: 34px;
    height: 34px;
  }
}

.detail-layout {
  display: grid;
  /* minmax(0, …): a column may shrink below its widest content. Without it, the booking widget's
     row of day buttons (which scrolls sideways inside its card) forced the right column to ~850px
     and squeezed the description into a narrow strip. */
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-6);
  padding-bottom: var(--space-7);
}
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.spec-strip {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: var(--space-4) 0;
  flex-wrap: wrap;
}
.spec-strip .spec {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-weight: 600;
}
.spec-strip svg {
  width: 20px;
  height: 20px;
  color: var(--color-gold);
}

.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

/* Virtual tour card (property.html initVirtualTour): tabs, a 16:9 stage that shows a poster with
   a play button until the visitor starts the tour, and a footer naming the provider. */
.tour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}
.tour-head h3 {
  margin: 0;
}
.tour-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--color-cream);
}
.tour-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.tour-tab svg {
  width: 15px;
  height: 15px;
}
.tour-tab:hover {
  color: var(--color-ink);
}
.tour-tab[aria-selected="true"] {
  background: var(--color-white);
  color: var(--color-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.tour-tab:focus-visible,
.tour-facade:focus-visible,
.tour-pill:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}
.tour-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-ink);
}
.tour-stage iframe,
.tour-stage video,
.tour-pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--color-ink);
}
.tour-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  background: var(--color-ink);
}
/* A tour that opens at the provider (Insta360) is a real link, not a button, so a visitor can
   middle-click or long-press it like any other. It carries the same facade styling. */
a.tour-facade {
  display: block;
  text-decoration: none;
  color: inherit;
}
.tour-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.tour-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(47, 59, 52, 0.05) 30%, rgba(47, 59, 52, 0.6));
}
/* Insta360, Kuula and CloudPano publish no preview image for a shared panorama, and borrowing a
   photo of the house only made the tour look like a photo the visitor had already scrolled past.
   So the stage draws its own: the brand's deep green lit by two soft gold lights, a faint globe
   of latitude and longitude lines, and the call to action in the middle — a panel that looks made
   rather than empty. The globe is CSS gradients masked into a circle; nothing to download.
   The pieces that move it off the shared facade layout are further down, after the rules they
   override. */
.tour-facade.is-blank {
  background:
    radial-gradient(52% 78% at 90% 0%, rgba(201, 162, 39, 0.24), transparent 58%),
    radial-gradient(60% 90% at 6% 100%, rgba(201, 162, 39, 0.09), transparent 62%),
    linear-gradient(152deg, #3a4840 0%, #28312c 52%, #191f1c 100%);
}
.tour-facade.is-blank::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72%, 420px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.075) 0 1px, transparent 1px 11%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 11%);
  -webkit-mask-image: radial-gradient(circle at center, #000 44%, rgba(0, 0, 0, 0.3) 68%, transparent 78%);
  mask-image: radial-gradient(circle at center, #000 44%, rgba(0, 0, 0, 0.3) 68%, transparent 78%);
  transition: transform 500ms ease;
  pointer-events: none;
}
.tour-facade.is-blank:hover::before {
  transform: translate(-50%, -50%) scale(1.05);
}
/* The scrim exists to keep a label legible over a photo. There is no photo and no label at the
   bottom here, so it only muddied the panel — a whisper of vignette is enough. */
.tour-facade.is-blank::after {
  background: radial-gradient(118% 100% at 50% 44%, transparent 52%, rgba(20, 25, 22, 0.42));
}
.tour-facade-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  /* The label is pinned to the bottom-left of the stage, so the watermark sits above it: on a
     phone the stage is barely 180px tall and a centred glyph would have run through the text. */
  padding-bottom: clamp(44px, 13%, 96px);
  color: var(--color-white);
  opacity: 0.16;
  pointer-events: none;
}
.tour-facade-art svg {
  width: clamp(48px, 20%, 140px);
  height: auto;
}
.tour-facade:hover img {
  transform: scale(1.03);
}
.tour-facade-cta {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-white);
  text-align: left;
}
.tour-facade-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* A circle, always: as a flex item it would otherwise be squashed into an ellipse whenever the
     call to action is taller than the stage (a phone's stage is barely 180px). */
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 150ms ease;
}
.tour-facade:hover .tour-facade-icon {
  transform: scale(1.06);
}
.tour-facade-icon svg {
  width: 24px;
  height: 24px;
}
.tour-facade-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.tour-facade-label small {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.9;
}
/* The blank panel's own layout. These come after the shared .tour-facade-* rules on purpose:
   with no photo to work around, the call to action belongs in the middle of the stage rather
   than tucked into a corner — the corner placement exists to keep a poster's subject visible. */
.tour-facade.is-blank .tour-facade-cta {
  inset: 0;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  text-align: center;
}
.tour-facade.is-blank .tour-facade-label {
  align-items: center;
  gap: 8px;
  text-shadow: none;
}
/* The provider reads as a marker rather than a caption. */
.tour-facade.is-blank .tour-facade-label small {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
/* Rings around the button, so the icon sits on something instead of floating. */
.tour-facade.is-blank .tour-facade-icon {
  width: 64px;
  height: 64px;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.4), 0 0 0 10px rgba(201, 162, 39, 0.12), 0 10px 28px rgba(0, 0, 0, 0.4);
}
.tour-facade.is-blank:hover .tour-facade-icon {
  transform: scale(1.07);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.55), 0 0 0 16px rgba(201, 162, 39, 0.16), 0 12px 32px rgba(0, 0, 0, 0.45);
}
.tour-facade.is-blank .tour-facade-icon svg {
  width: 28px;
  height: 28px;
}
/* The watermark glyph is for a facade with no design of its own; the globe replaces it here. */
.tour-facade.is-blank .tour-facade-art {
  display: none;
}
@media (max-width: 600px) {
  .tour-facade.is-blank .tour-facade-icon {
    width: 52px;
    height: 52px;
    /* A tighter ring: the stage is only ~180px tall here and the wide one reached the top edge. */
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.4), 0 0 0 7px rgba(201, 162, 39, 0.12), 0 8px 20px rgba(0, 0, 0, 0.38);
  }
  .tour-facade.is-blank .tour-facade-cta {
    gap: var(--space-2);
  }
  .tour-facade.is-blank .tour-facade-icon svg {
    width: 23px;
    height: 23px;
  }
  .tour-facade.is-blank .tour-facade-label {
    font-size: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tour-facade.is-blank::before {
    transition: none;
  }
  .tour-facade.is-blank:hover::before {
    transform: translate(-50%, -50%);
  }
}

/* Several videos: a row of thumbnails under the player (scrolls sideways when it doesn't fit). */
.tour-playlist {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  min-width: 0;
}
.tour-playlist[hidden] {
  display: none;
}
.tour-playlist-item {
  flex: 0 0 auto;
  width: clamp(6.5rem, 28%, 10rem);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}
.tour-playlist-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #1f2622;
  border: 2px solid transparent;
  color: #fff;
}
.tour-playlist-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tour-playlist-thumb svg {
  position: relative;
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
}
.tour-playlist-item[aria-pressed="true"] .tour-playlist-thumb {
  border-color: var(--color-gold);
}
.tour-playlist-item:focus-visible {
  outline: none;
}
.tour-playlist-item:focus-visible .tour-playlist-thumb {
  box-shadow: 0 0 0 3px var(--color-gold);
}
.tour-playlist-label {
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
/* A tour that opens at the provider has no footer at all (property.html renderIdle); .tour-foot
   sets display:flex, which beats [hidden]'s UA display:none at equal specificity, so hiding it
   has to be said here or an empty row would keep its margin. */
.tour-foot[hidden] {
  display: none;
}
.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.tour-foot:empty {
  display: none;
}
.tour-foot a,
.tour-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.tour-foot a svg {
  width: 13px;
  height: 13px;
}

/* Buttons on the main photo that jump into each tour. */
.gallery-wrap {
  position: relative;
}
.tour-pills {
  position: absolute;
  top: calc(var(--space-4) + 14px);
  left: 14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 28px);
}
.tour-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px 0 11px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: background-color 150ms ease;
}
.tour-pill svg {
  width: 15px;
  height: 15px;
  color: var(--color-gold);
}
.tour-pill:hover {
  background: var(--color-white);
}
.tour-pill-3d {
  background: var(--color-ink);
  color: var(--color-white);
}
.tour-pill-3d:hover {
  background: #3a4840;
}
@media (max-width: 600px) {
  .tour-facade-icon {
    width: 46px;
    height: 46px;
  }
  .tour-facade-label {
    font-size: 0.95rem;
  }
  .tour-pill {
    height: 30px;
    padding: 0 11px 0 9px;
    font-size: 0.76rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tour-facade img,
  .tour-facade-icon {
    transition: none;
  }
}

.property-ids {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.price-per-m2 {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.amenity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-cream-dim);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.85rem;
}
.amenity-tag svg {
  width: 15px;
  height: 15px;
  color: var(--color-success);
  flex-shrink: 0;
}
.detail-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
  margin: 0;
}
.detail-rows dt {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.detail-rows dd {
  margin: 0;
  font-size: 0.92rem;
}
.info-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-2);
}
/* A card's title with the m² / sqft switch at its top right (areaUnitToggleHTML in app.js). The
   switch wraps under a long title rather than squeezing it. */
.info-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 12px;
  min-width: 0;
  margin-bottom: var(--space-2);
}
.info-card-head h3 { margin-bottom: 0; min-width: 0; flex: 1 1 auto; }
/* In the strip under the price the switch sits at the right end. */
.spec-strip .spec-strip-unit { margin-left: auto; display: flex; align-items: center; }
#property-mini-map {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
}

.contact-owner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-2);
}

.agent-profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.agent-profile-photo-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}
.agent-profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-gold);
  display: block;
}
.agent-profile-role {
  display: inline-block;
  color: var(--color-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
  margin: 0 0 6px;
}
.agent-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.agent-stat-card {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  color: inherit;
  text-decoration: none;
}
a.agent-stat-card {
  cursor: pointer;
}
a.agent-stat-card:hover {
  border-color: var(--color-gold);
  background: var(--color-cream-dim);
}
.agent-stat-card strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--color-ink);
}
.agent-stat-card span {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.agent-sold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}
.agent-sold-card {
  display: flex;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: inherit;
  text-decoration: none;
}
a.agent-sold-card:hover {
  border-color: var(--color-gold);
}
.agent-sold-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.agent-sold-card div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.agent-sold-card strong {
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-sold-card span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.contact-owner-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.contact-owner-name {
  font-weight: 600;
  color: var(--color-ink);
  margin: 0;
  text-decoration: none;
}
a.contact-owner-name:hover,
a.property-owner-link:hover {
  color: var(--color-gold);
  text-decoration: underline;
}
.property-owner-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 0;
}
.contact-line svg {
  width: 16px;
  height: 16px;
  color: var(--color-gold);
  flex-shrink: 0;
}
.contact-line:hover {
  color: var(--color-gold);
}

.contact-card-note {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

.contact-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-3);
}
.contact-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: filter 150ms ease;
}
.contact-social-btn:hover {
  filter: brightness(0.92);
}
.contact-social-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.contact-social-btn--whatsapp {
  background: #25d366;
}
.contact-social-btn--messenger {
  background: #0084ff;
}
.contact-social-btn--instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.translation-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: var(--space-2);
}
.translation-note svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.translation-note[hidden] {
  display: none;
}

/* Public "Book a visit" widget (public/js/booking-widget.js) — property sidebar + agent profile. */
.booking-card h3 { display: flex; align-items: center; gap: 8px; }
.booking-card h3 svg { width: 20px; height: 20px; flex-shrink: 0; }
.booking-days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin: 8px 0 4px; scrollbar-width: thin; }
.booking-day, .booking-time {
  flex-shrink: 0; border: 1px solid var(--color-border); background: #fff; color: var(--color-ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.9rem; cursor: pointer;
  text-transform: capitalize; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.booking-day:hover, .booking-time:hover { border-color: var(--color-gold); }
.booking-day.is-selected, .booking-time.is-selected { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }
.booking-label { margin: 8px 0 6px; font-weight: 600; font-size: 0.9rem; }
.booking-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.booking-time { border-radius: var(--radius-sm, 6px); text-align: center; }
.booking-tz { margin: 8px 0 0; font-size: 0.8rem; }
.booking-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.booking-picked { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; text-transform: capitalize; }
.booking-picked svg { width: 18px; height: 18px; color: var(--color-gold); }
.booking-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.booking-done h3 { color: #2e7d32; align-items: flex-start; }
.booking-done a { word-break: break-all; }

/* ---------- Open contact card (property.html contactCardHTML / initInquiry) ---------- */
.contact-owner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.contact-owner-text small {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}
.contact-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: var(--space-3) 0 var(--space-2);
}
.contact-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
  transition: border-color 150ms ease, filter 150ms ease;
}
.contact-quick-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-quick-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-gold);
}
.contact-quick-btn:hover {
  border-color: var(--color-gold);
}
.contact-quick-btn--whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}
.contact-quick-btn--whatsapp svg {
  color: #fff;
}
.contact-quick-btn--whatsapp:hover {
  border-color: #25d366;
  filter: brightness(0.93);
}
.contact-quick-btn:focus-visible,
.inquiry-again:focus-visible,
.contact-sticky-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}
.contact-quick-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.inquiry-form {
  margin-top: var(--space-2);
}
.inquiry-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--space-3) 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inquiry-divider::before,
.inquiry-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.inquiry-form .field {
  margin-bottom: var(--space-2);
}
.inquiry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.inquiry-row .field {
  min-width: 0;
}
.inquiry-form textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}
.inquiry-hint {
  margin: -2px 0 var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.78rem;
}
.inquiry-error {
  margin: 0 0 var(--space-2);
  color: var(--color-error);
  font-size: 0.85rem;
  font-weight: 600;
}
.inquiry-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.inquiry-submit svg {
  width: 17px;
  height: 17px;
}
.inquiry-note {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-align: center;
}
.inquiry-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-sm);
  background: #eef4ea;
  text-align: center;
  outline: none;
}
.inquiry-sent[hidden] {
  display: none;
}
.inquiry-sent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
}
.inquiry-sent-icon svg {
  width: 22px;
  height: 22px;
}
.inquiry-sent strong {
  color: var(--color-success);
  font-size: 1.05rem;
}
.inquiry-sent p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text);
}
.inquiry-sent-more {
  color: var(--color-text-muted) !important;
  font-size: 0.82rem !important;
}
.inquiry-sent-more a {
  font-weight: 700;
  color: var(--color-ink);
}
.inquiry-again {
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Phones: contact bar pinned to the bottom of the screen (hidden while the card is visible). */
.contact-sticky {
  display: none;
}
@media (max-width: 900px) {
  .contact-sticky:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  }
  .contact-sticky-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
  }
  .contact-sticky-btn svg {
    width: 18px;
    height: 18px;
  }
  .contact-sticky-btn--whatsapp {
    background: #25d366;
    color: #fff;
  }
  .contact-sticky-btn--message {
    background: var(--color-ink);
    color: var(--color-white);
  }
  /* Room so the bar never covers the end of the page. */
  .site-footer {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 380px) {
  .inquiry-row,
  .contact-quick {
    grid-template-columns: 1fr;
  }
}

/* Agent profile social buttons (agent-profile.html): grow a little on hover. */
.agent-social-btn:hover { transform: scale(1.05); }

/* The agent's name and the Verified star on one row, star always on the right (property.html
   ownerNameLinkHTML). A name too long for the room shrinks (app.js fitAgentNames); past 70% it
   ends in "…" rather than ever pushing the star below. */
.owner-name-row {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  vertical-align: bottom;
}
.owner-name-row > :first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.owner-name-row > .verified-badge {
  flex: none;
}
