/* Tour 360 — layout-2 property gallery (split + embed) */

.property-gallery--split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .property-gallery--split {
    grid-template-columns: 1fr;
  }
}

.property-gallery__tour-col,
.property-gallery__photos-col {
  min-width: 0;
}

.property-gallery__main--tour {
  cursor: default;
  display: flex;
  flex-direction: column;
  background: var(--global-gray-900);
  aspect-ratio: auto;
  min-height: clamp(280px, 42vw, 520px);
  height: 100%;
}

.property-gallery__main--tour .property-tour360__viewer-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
}

.property-gallery__main--tour .property-tour360__viewer {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.property-gallery__main--tour .property-tour360__embed {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
}

.property-gallery__tour-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  padding: 0.4rem 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: var(--global-white);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.property-gallery__tour-rooms {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.5rem;
  padding-bottom: 1rem;
  pointer-events: none;
}

.property-gallery__tour-rooms > * {
  pointer-events: auto;
}

.property-gallery__tour-rooms-toggle {
  margin-left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  color: var(--global-white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition);
}

.property-gallery__tour-rooms-toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}

.property-gallery__tour-rooms-toggle:hover,
.property-gallery__tour-rooms-toggle:focus-visible {
  background: rgba(0, 0, 0, 0.75);
}

.property-gallery__tour-rooms-panel.property-tour360__gallery-overlay--bottom {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  pointer-events: auto;
  scrollbar-width: thin;
}

.property-tour360__gallery-overlay--bottom {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.property-tour360__gallery-track {
  display: flex;
  gap: 14px;
  width: max-content;
  min-width: 0;
}

.property-tour360__gallery-item {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: 132px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--global-gray-900);
  text-align: left;
  cursor: pointer;
}

.property-tour360__gallery-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.property-tour360__gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-tour360__gallery-label {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--global-gray-800);
}

.property-tour360__gallery-item:hover .property-tour360__gallery-thumb,
.property-tour360__gallery-item:focus-visible .property-tour360__gallery-thumb,
.property-tour360__gallery-item.is-active .property-tour360__gallery-thumb {
  border-color: var(--global-gray-900);
  box-shadow: var(--shadow-md);
}

.property-tour360__empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 1.5rem;
  color: var(--global-gray-300);
  text-align: center;
}

/* Coluna de fotos */
.property-gallery__photos-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: clamp(280px, 42vw, 520px);
}

.property-gallery__main--photo {
  flex: 1;
  min-height: 0;
}

.property-gallery__expand {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: var(--global-white);
  cursor: pointer;
}

.property-gallery__expand svg {
  width: 1rem;
  height: 1rem;
}

.property-gallery__expand:hover {
  background: rgba(0, 0, 0, 0.75);
}

.property-gallery__thumbs--grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0;
  overflow: visible;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .property-gallery__thumbs--grid {
    grid-template-columns: repeat(6, 1fr);
    overflow-x: auto;
  }
}

.property-gallery:not(.property-gallery--split) .property-gallery__photos-col {
  min-height: auto;
}

body.property-tour-iframe-fs {
  overflow: hidden;
}

.property-gallery__main--tour-fs {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  aspect-ratio: auto !important;
}

.property-gallery__main--tour-fs .property-tour360__viewer-wrap,
.property-gallery__main--tour-fs .property-tour360__viewer,
.property-gallery__main--tour-fs .property-tour360__embed {
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
}

.property-gallery--tour-disabled .property-gallery__tour-col,
.property-gallery--tour-disabled .property-gallery__main--tour {
  display: none !important;
}

.property-gallery--tour-disabled .property-gallery__photos-col {
  grid-column: 1 / -1;
}
