/* ფონტები: url("fonts/...") — ბრაუზერი ააგებს გზას styles.css-ის საქაღალდიდან (იგივე პროექტის ფესვის fonts/) */
@font-face {
  font-family: "Avaza";
  src: url("fonts/avaza.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Avazam";
  src: url("fonts/AVAZAM.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Avazam SP";
  src: url("fonts/avazamsp.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AvantGarde Gothic";
  src: url("fonts/AVGARDN.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AvantGarde Gothic";
  src: url("fonts/AVGARDNI.TTF") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ფაილებში OS/2 usWeightClass=400; დიაპაზონი — რომ CSS-ის 500–700 იყენებდეს სწორ ფაილს */
@font-face {
  font-family: "AvantGarde Gothic";
  src: url("fonts/AVGARDM.TTF") format("truetype");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AvantGarde Gothic";
  src: url("fonts/AVGARDMI.TTF") format("truetype");
  font-weight: 500 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "AvantGarde Alt";
  src: url("fonts/AVANT-M.TTF") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-geo: "Avaza", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Avazam", "Avaza Mtavruli", "Avaza", system-ui, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display-sp: "Avazam SP", "Avaza Mtavruli SP", "Avazam", "Avaza", system-ui, sans-serif;
  --font-avant: "AvantGarde Gothic", "Avaza", system-ui, sans-serif;
  --font-avant-alt: "AvantGarde Alt", "AvantGarde Gothic", "Avaza", system-ui, sans-serif;
  --danger: #ff4d6a;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --container-max: 1160px;
  --viewer-iframe-height: min(70vh, 620px);
  /* ლანდშაფტში 0; max-width 860px + landscape-ზე სქროლის ზონა მარჯვნივ (clamp, წინა ზომის ~60%) */
  --tour-landscape-page-gutter: 0px;
  --viewer-stack-gap: 12px;
  --motion-panel: 0.48s;
  --motion-panel-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-modal: 0.32s;
  --motion-modal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/*
 * მუქი ტოკენები :root-ზე აღარაა — ნათელ თემაზე F5/გადასვლისას აღარ „შერევა“ მუქი მნიშვნელობებით.
 */
html:not([data-theme="light"]) {
  color-scheme: only dark;
  --bg: #1d2026;
  --bg-alt: #252831;
  --card: #2b2e38;
  --panel-bg: #1b1e24;
  --panel-bg-alt: #20232c;
  --accent: #4dd0e1;
  --accent-soft: rgba(77, 208, 225, 0.16);
  --text: #f5f7fa;
  --text-muted: #b8bcc7;
  --border-subtle: #383d48;
  --border-ui: rgba(255, 255, 255, 0.1);
  --border-ui-soft: rgba(255, 255, 255, 0.08);
  --border-ui-mid: rgba(255, 255, 255, 0.12);
  --border-ui-strong: rgba(255, 255, 255, 0.16);
  --border-ui-input: rgba(255, 255, 255, 0.18);
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.48);
  --bg-facade-stripes: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 72px,
    rgba(130, 138, 158, 0.065) 72px,
    rgba(130, 138, 158, 0.065) 73px
  );
  --app-bg:
    linear-gradient(
      178deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 48%,
      rgba(60, 63, 78, 0.2) 85%,
      rgba(41, 43, 56, 0.16) 100%
    ),
    radial-gradient(1180px 500px at 50% 6%, rgba(96, 101, 122, 0.17), transparent 58%),
    radial-gradient(920px 440px at 50% 12%, rgba(62, 66, 82, 0.26), transparent 65%),
    radial-gradient(
      circle at 50% 0,
      #2b2e37 0,
      #242731 32%,
      #1f222b 52%,
      #1a1d26 72%,
      #161820 100%
    );
  --header-bg: linear-gradient(to bottom, rgba(31, 34, 48, 0.96), rgba(31, 34, 48, 0.9), transparent);
  --header-border: rgba(255, 255, 255, 0.04);
  --viewer-frame-bg: radial-gradient(circle at 50% 0, #2e323f, #1f222b 58%);
  --flat-project-bg: linear-gradient(180deg, rgba(32, 34, 44, 0.96), rgba(28, 30, 40, 0.94));
  --flat-title-color: #c8f7ff;
  --unit-title-color: #9dff8f;
  --unit-title-shadow: 0 0 8px rgba(157, 255, 143, 0.3);
  --section-alt-bg: radial-gradient(circle at top, rgba(70, 74, 90, 0.22), #1b1e26 56%);
  --btn-primary-text: #040509;
  --btn-ghost-bg: rgba(40, 43, 57, 0.94);
  --btn-primary-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  --btn-primary-shadow-hover: 0 16px 46px rgba(0, 0, 0, 0.9);
  --favorite-btn-color: #dce4f4;
  --favorites-title-color: #eaf2ff;
  --filter-control-bg: rgba(27, 29, 39, 0.96);
  --filter-control-fg: #eaf2ff;
  --filter-option-bg: #20242e;
  --surface-mute-1: rgba(255, 255, 255, 0.06);
  --surface-mute-2: rgba(255, 255, 255, 0.05);
  --surface-mute-3: rgba(255, 255, 255, 0.04);
  --surface-mute-4: rgba(255, 255, 255, 0.03);
  --icon-btn-fg: #fff;
  --close-btn-bg: rgba(23, 25, 33, 0.92);
  --close-btn-fg: #fff;
  --modal-scrim: rgba(0, 0, 0, 0.64);
  --site-alert-scrim: rgba(2, 4, 10, 0.7);
  --plan-modal-scrim: rgba(2, 4, 12, 0.78);
  --site-alert-card-bg: radial-gradient(circle at top, rgba(77, 208, 225, 0.08), #1d2028 62%);
  --site-alert-card-border: rgba(77, 208, 225, 0.35);
  --input-bg-soft: rgba(255, 255, 255, 0.04);
  --input-text-plain: #fff;
  --copy-toast-bg: rgba(27, 29, 39, 0.97);
  --copy-toast-fg: #dff9ff;
  --copy-toast-border: rgba(77, 208, 225, 0.45);
  --favorites-block-border: rgba(255, 255, 255, 0.12);
  --theme-switch-bg: #23262f;
  --theme-switch-border: rgba(148, 163, 184, 0.42);
  --theme-switch-text: rgba(226, 232, 240, 0.88);
  --theme-switch-active-bg: rgba(77, 208, 225, 0.14);
  --theme-switch-active-border: rgba(77, 208, 225, 0.55);
  --skyline-stroke: rgba(185, 195, 215, 0.2);
  --skyline-stroke-far: rgba(160, 170, 195, 0.11);
  --skyline-fill-far: rgba(25, 27, 37, 0.34);
  --skyline-fill-near: rgba(20, 22, 32, 0.42);
}

html[data-theme="light"] {
  color-scheme: only light;
  /* ჩაქრობილი, მოლურჯო-ცისფერი ტონი — თეთრისა და მკვეთი კონტრასტის ნაკლებობა */
  --bg: #e2eaf4;
  --bg-alt: #eef4fb;
  --card: #f1f6fc;
  --panel-bg: #eaeff8;
  --panel-bg-alt: #e4ecf6;
  --accent: #0a7c91;
  --accent-soft: rgba(35, 120, 145, 0.16);
  --text: #273548;
  --text-muted: #5c6e82;
  --border-subtle: #b9cadb;
  --border-ui: rgba(36, 62, 92, 0.11);
  --border-ui-soft: rgba(36, 62, 92, 0.07);
  --border-ui-mid: rgba(36, 62, 92, 0.13);
  --border-ui-strong: rgba(36, 62, 92, 0.17);
  --border-ui-input: rgba(36, 62, 92, 0.19);
  --shadow-soft: 0 22px 48px rgba(34, 58, 82, 0.09);
  --shadow-card: 0 14px 36px rgba(34, 58, 82, 0.07);
  --bg-facade-stripes: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 76px,
    rgba(55, 95, 130, 0.09) 76px,
    rgba(55, 95, 130, 0.09) 77px
  );
  --app-bg:
    linear-gradient(
      178deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 55%,
      rgba(150, 180, 210, 0.28) 91%,
      rgba(130, 165, 200, 0.16) 100%
    ),
    radial-gradient(900px 480px at 50% -2%, rgba(120, 185, 215, 0.22), transparent 58%),
    radial-gradient(640px 380px at 88% 12%, rgba(150, 195, 225, 0.18), transparent 50%),
    radial-gradient(520px 320px at 8% 70%, rgba(100, 175, 195, 0.1), transparent 55%),
    linear-gradient(185deg, #e8f1f8 0%, #dbe7f2 42%, #d0e0ed 72%, #c8d9e8 100%);
  --header-bg: linear-gradient(
    to bottom,
    rgba(233, 241, 249, 0.94),
    rgba(228, 238, 248, 0.88),
    transparent
  );
  --header-border: rgba(52, 88, 118, 0.1);
  --viewer-frame-bg: linear-gradient(180deg, #d8e6f2 0%, #cbdcea 52%, #c0d4e4 100%);
  --flat-project-bg: linear-gradient(180deg, #e8f0f8, #dce8f2);
  --flat-title-color: #0d5f6f;
  --unit-title-color: #1a5c38;
  --unit-title-shadow: none;
  --section-alt-bg: radial-gradient(circle at 50% 0%, rgba(110, 165, 205, 0.2), transparent 50%),
    linear-gradient(180deg, #dde8f3 0%, #d4e0ee 100%);
  --btn-primary-text: #ffffff;
  --btn-ghost-bg: rgba(232, 241, 250, 0.92);
  --btn-primary-shadow: 0 10px 26px rgba(28, 105, 130, 0.22);
  --btn-primary-shadow-hover: 0 14px 32px rgba(28, 105, 130, 0.28);
  --favorite-btn-color: #2a3e52;
  --favorites-title-color: #314559;
  --filter-control-bg: #e8f1fa;
  --filter-control-fg: #273548;
  --filter-option-bg: #dde8f4;
  --surface-mute-1: rgba(36, 62, 92, 0.07);
  --surface-mute-2: rgba(36, 62, 92, 0.055);
  --surface-mute-3: rgba(36, 62, 92, 0.045);
  --surface-mute-4: rgba(36, 62, 92, 0.038);
  --icon-btn-fg: #2a3e52;
  --close-btn-bg: rgba(238, 245, 252, 0.94);
  --close-btn-fg: #273548;
  --modal-scrim: rgba(28, 45, 62, 0.42);
  --site-alert-scrim: rgba(28, 45, 62, 0.38);
  --plan-modal-scrim: rgba(28, 45, 62, 0.44);
  --site-alert-card-bg: radial-gradient(circle at top, rgba(60, 155, 180, 0.12), #e8f0f7 62%);
  --site-alert-card-border: rgba(45, 130, 155, 0.32);
  --input-bg-soft: rgba(36, 62, 92, 0.045);
  --input-text-plain: #273548;
  --copy-toast-bg: rgba(236, 244, 252, 0.97);
  --copy-toast-fg: #273548;
  --copy-toast-border: rgba(45, 140, 165, 0.38);
  --favorites-block-border: rgba(52, 88, 118, 0.12);
  /* თემის ღილაკები — ნათელ რეჟიმში ღია ზედაპირი (არა მუქი slate, რომელიც apartments/ჰედერს „აურიებდა“) */
  --theme-switch-bg: #ffffff;
  --theme-switch-border: rgba(36, 62, 92, 0.2);
  --theme-switch-text: #334a5f;
  --theme-switch-active-bg: rgba(10, 124, 145, 0.12);
  --theme-switch-active-border: rgba(10, 124, 145, 0.5);
  --skyline-stroke: rgba(45, 78, 112, 0.17);
  --skyline-stroke-far: rgba(55, 88, 125, 0.09);
  --skyline-fill-far: rgba(200, 218, 236, 0.42);
  --skyline-fill-near: rgba(185, 208, 232, 0.52);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-geo);
  background-color: var(--bg);
  background-image: var(--bg-facade-stripes), var(--app-bg);
  background-attachment: fixed;
  color: var(--text);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

/* გასაყიდი ბინების გვერდები — მობილურზე (≤860px) ზოლი: უკან + ლოგო + 3D/ძიება; დესკტოპზე ღილაკი ისევ fixed (იხ. min-width: 861px). */

.headerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  gap: 20px;
}

.headerEnd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brandLogoLink {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  outline-offset: 3px;
}

.brandLogoLink:focus-visible {
  outline: 2px solid var(--accent);
}

.siteLogo {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(240px, 46vw);
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  font-family: var(--font-avant);
  font-weight: 400;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.headerSearch {
  flex: 1 1 auto;
  min-width: 140px;
  max-width: 280px;
}

.headerSearchInput {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 34px;
  border-radius: 10px;
  border: 1px solid var(--border-ui-input);
  background-color: var(--input-bg-soft);
  color: var(--input-text-plain);
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
  font-size: 13px;
  background-repeat: no-repeat;
  background-position: 10px 50%;
  background-size: 16px 16px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.headerSearchInput::placeholder {
  color: var(--text-muted);
}

.headerSearchInput:hover {
  border-color: var(--border-ui-mid);
}

.headerSearchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.nav a {
  position: relative;
  padding: 4px 0;
  color: var(--text-muted);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4dd0e1, #1a88ff);
  transition: width 0.2s ease-out;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

.hero {
  padding: 40px 0 48px;
}

.heroInner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.heroCopy h1 {
  margin: 0 0 16px;
  font-family: "Avazam", sans-serif;
  font-size: clamp(28px, 4vw, 34px);
  letter-spacing: 0.03em;
  text-transform: none;
  font-variant: normal;
}

.heroCopy p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  font-family: "Avaza", sans-serif;
}

.heroCopy .heroSublead {
  margin-top: -12px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  opacity: 0.92;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: italic;
}

.heroActions {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 28px;
}

.heroPrimaryLinks {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  width: max-content;
  margin-top: 42px;
}

.heroPrimaryLinks .btn {
  font-family: "Avaza", sans-serif;
  font-weight: 700;
}

.heroQuickLinks {
  display: flex;
  align-items: center;
  gap: 110px;
  margin-left: auto;
  justify-content: flex-end;
}

.quickTourBtn {
  width: 234px;
  min-height: 72px;
  border-radius: 16px;
  border: 1px solid #424650;
  background: linear-gradient(90deg, #232831 0%, #13151c 100%);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #dde1ea;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quickTourBtn:hover {
  transform: translateY(-2px);
  border-color: #585d68;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quickTourBtnTitle {
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-spacing: 0.06em;
  font-family: var(--font-display-sp);
  text-align: center;
}

.quickTourBtnTitle--avazam {
  font-family: "Avazam", var(--font-display-sp);
}

.quickTourBtnTitle--avazam .quickTourBtnTitleMain {
  font-size: 30px;
}

.quickTourBtnTitle--avazam .quickTourBtnTitleMinor {
  font-size: 24px;
  margin-left: 4px;
}

.quickTourBtnSub {
  margin-top: 4px;
  font-size: 16px;
  color: #9a9eaa;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
}

.quickTourBtnSub--avazam {
  font-family: "Avazam", var(--font-display-sp);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-spacing: 0.08em;
  text-align: center;
}

html[data-theme="light"] .quickTourBtn {
  border-color: rgba(74, 108, 142, 0.46);
  background: linear-gradient(90deg, #d8e6f2 0%, #c2d4e4 58%, #a9bfd2 100%);
  box-shadow: 0 10px 22px rgba(37, 62, 92, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: #24384f;
}

html[data-theme="light"] .quickTourBtn:hover {
  border-color: rgba(58, 95, 133, 0.58);
  box-shadow: 0 12px 24px rgba(34, 60, 92, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .quickTourBtnSub {
  color: #4a6078;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-avant-alt);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s ease-out, transform 0.12s ease-out,
    box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.btnPrimary {
  background: linear-gradient(135deg, #245766, #1b355d);
  color: #ffffff;
  box-shadow: var(--btn-primary-shadow);
}

.btnPrimary:hover {
  transform: translateY(-1px);
  box-shadow: var(--btn-primary-shadow-hover);
}

.btnGhost {
  color: var(--text-muted);
  border-color: var(--border-ui-soft);
  background: var(--btn-ghost-bg);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.btnGhost:hover {
  border-color: var(--border-ui-mid);
  color: var(--text);
}

.section {
  padding: 6px 0 40px;
}

.sectionAlt {
  background: var(--section-alt-bg);
}

/* ორ ტურის სექციას შორის: .section-ის ზედა/ქვედა padding-ის სამმაგი (6→18, 40→120) */
#threeD.section {
  padding: 12px 0 120px;
}

#tour.section.sectionAlt {
  position: relative;
  padding: 18px 0 min(36vh, 360px);
}

/* sectionAlt ფონზე ზემოთ — იგივე ფასადის ხაზები, რაც body-ზე */
#tour.section.sectionAlt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--bg-facade-stripes);
}

#tour.section.sectionAlt > .container {
  position: relative;
  z-index: 2;
}

/* ქვედა ცარიელი სივრცე: სრული სიგანის ჰორიზონტი (კონტური), ზემოთ vertical stripe ::before */
.siteSkyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: min(26vh, 220px);
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.siteSkyline svg {
  display: block;
  width: 100%;
  height: 100%;
}

.siteSkyline__far {
  fill: var(--skyline-fill-far);
  stroke: var(--skyline-stroke-far);
}

.siteSkyline__near {
  fill: var(--skyline-fill-near);
  stroke: var(--skyline-stroke);
}

/* 3D და 360 სექციებს შორის — იგივე ჰორიზონტი, ჰორიზონტალურად დამირორებული */
.siteSkylineBetween {
  width: 100%;
  height: min(26vh, 220px);
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.siteSkyline.siteSkyline--mirror {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  z-index: auto;
  transform: scaleX(-1);
  transform-origin: center center;
}

.sectionHead {
  margin-bottom: 18px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: normal;
}

.sectionHead h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: normal;
}

.sectionSub {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 640px;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
}

#threeD .sectionHead--threeD {
  margin-bottom: 22px;
}

#tour .sectionHead--tour {
  margin-bottom: 22px;
}

#threeD .sectionHead--threeD h2 {
  margin-top: 8px;
  margin-bottom: 0;
  letter-spacing: 0.04em;
  word-spacing: 0.08em;
}

#tour .sectionHead--tour h2 {
  margin-top: 4px;
  margin-bottom: 0;
  letter-spacing: 0.04em;
  word-spacing: 0.08em;
  white-space: nowrap;
  width: max-content;
  max-width: none;
}

/* ჩატვირთვისას სათაურების ინტროთი გამოჩენა: JS 0.5წმ-ზე რთავს .titles-intro-run */
html.titles-intro-pending #threeD .sectionHead--threeD h2,
html.titles-intro-pending #tour .sectionHead--tour h2 {
  opacity: 0;
  filter: blur(8px);
}

html.titles-intro-run #threeD .sectionHead--threeD h2,
html.titles-intro-run #tour .sectionHead--tour h2 {
  will-change: transform, opacity, filter;
}

html.titles-intro-run #threeD .sectionHead--threeD h2 {
  animation: sectionTitleEnterFromRight 0.9s cubic-bezier(0.22, 0.84, 0.22, 1.02) both;
}

html.titles-intro-run #tour .sectionHead--tour h2 {
  animation: sectionTitleEnterFromLeft 0.9s cubic-bezier(0.22, 0.84, 0.22, 1.02) both;
}

@keyframes sectionTitleEnterFromRight {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateX(140px) scale(0.97);
  }
  68% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(-10px) scale(1.01);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
}

@keyframes sectionTitleEnterFromLeft {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateX(-140px) scale(0.97);
  }
  68% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(10px) scale(1.01);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
  }
}

#threeD .sectionHeadReserve,
#tour .sectionHeadReserve--tour {
  display: none;
}

/* Pano ბლოკის სათაურისთვის — იგივე ცვლადები, რაც #tourLayout-ში (სათაური ↔ მთავარი ფანჯრის მარცხენა კიდე) */
#tour {
  --pano-side-panel-width: 340px;
  --pano-available-panel-width: 300px;
  --pano-layout-gap: var(--viewer-stack-gap);
  --flat-project-panel-width: min(420px, 34vw);
}

/* დესკტოპი: ფავორიტების გვერდითი პანელი ×0.83×0.85; გასაყიდის სია ბაზის 300px-ის −10% (×0.9). */
@media (min-width: 861px) {
  #tour {
    --pano-side-panel-width: calc(340px * 0.83 * 0.85);
    --pano-available-panel-width: calc(300px * 0.9);
    --tour-viewer-nudge-x: clamp(10px, 1.6vw, 22px);
  }
}

#tour .sectionHead--tour {
  /* viewerCard padding + #tourLayout margin-left + მთავარი სვეტის სიგანე + gap → გასაყიდის პანელის ზემოთ */
  margin-left: calc(
    12px +
      (
        (
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 2)
          ) /
          -2
      ) +
      (100% - 24px + var(--pano-layout-gap)) +
      var(--tour-viewer-nudge-x, 0px)
  );
  text-align: left;
}

#tour:has(#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open) .sectionHead--tour {
  margin-left: calc(
    12px +
      (
        (
            var(--flat-project-panel-width) +
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 3)
          ) /
          -2
      ) +
      (100% - 24px + var(--pano-layout-gap)) +
      var(--tour-viewer-nudge-x, 0px)
  );
}

/* is-detail-open-ზე flat სვეტი 1-შია — grid სიგანე ისევე რაც flat-ის გარეშე unit-side */
#tour:has(#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open) .sectionHead--tour {
  margin-left: calc(
    12px +
      (
        (
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 2)
          ) /
          -2
      ) +
      (100% - 24px + var(--pano-layout-gap)) +
      var(--tour-viewer-nudge-x, 0px)
  );
}

.viewerCard {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, rgba(120, 190, 235, 0.16), transparent 58%), var(--bg-alt);
  padding: 12px;
  border: 1px solid var(--border-ui-soft);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .viewerCard {
  background: radial-gradient(circle at 50% 0%, rgba(110, 175, 205, 0.14), transparent 56%),
    var(--bg-alt);
}

#tour .viewerCard {
  overflow-x: visible;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Object2VR: ბადის გაფართოება მარჯვნივ (მესამე სვეტი) — overflow არ მოაჭრას */
#threeD .viewerCard {
  overflow-x: visible;
}

/* Pano2VR: Object2VR-ის მსგავსად viewerCard აღარ იწევა — მთავარი ფანჯარა grid + margin-left-ით „გადაცდება“ ქარდის ფონს */
#tour .viewerCard.is-shifted,
#tour .viewerCard.is-shifted-flat {
  transform: none;
}

.viewerFrame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--viewer-frame-bg);
  min-height: 340px;
  transition:
    box-shadow 0.4s var(--motion-panel-ease),
    filter 0.35s ease;
}

.viewerCloseBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-ui-mid);
  background: var(--close-btn-bg);
  color: var(--close-btn-fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.86);
  pointer-events: none;
  transition:
    opacity 0.28s var(--motion-panel-ease),
    transform 0.34s var(--motion-panel-ease);
}

.viewerCloseBtn.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.viewerFrame iframe {
  width: 100%;
  height: var(--viewer-iframe-height);
  border: none;
  display: block;
  background: transparent;
}

.tourLayout {
  position: relative;
  align-items: start;
  transition:
    transform 520ms var(--motion-panel-ease),
    margin-left var(--motion-panel) var(--motion-panel-ease),
    margin-right var(--motion-panel) var(--motion-panel-ease),
    width var(--motion-panel) var(--motion-panel-ease),
    grid-template-columns var(--motion-panel) var(--motion-panel-ease);
}

.tourLayout.is-panel-open {
  transform: translateX(-440px);
}

.viewerFrameMain {
  transition: transform var(--motion-panel) var(--motion-panel-ease);
}

.viewerDetailSlot {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom center;
  transition:
    max-height 0.88s var(--motion-panel-ease),
    opacity 0.68s ease,
    margin-top 0.8s var(--motion-panel-ease),
    transform 0.88s var(--motion-panel-ease);
}

.viewerDetailSlot.is-visible {
  margin-top: 12px;
  max-height: 920px;
  opacity: 1;
  pointer-events: auto;
  transform: scaleY(1);
  transform-origin: bottom center;
}

/** დეტალი: ჯერ ზევით „იკეცება“ (scaleY), შემდეგ JS ახსნის is-visible */
.viewerDetailSlot.is-visible.viewerDetailSlot--closing {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom center;
  pointer-events: none;
  transition:
    max-height 0.88s var(--motion-panel-ease),
    opacity 0.68s ease,
    margin-top 0.8s var(--motion-panel-ease),
    transform 0.88s var(--motion-panel-ease);
}

.viewerFrameDetail {
  min-height: 340px;
}

#tourLayout .viewerFrameMain,
#tourLayout .viewerFrameDetail,
#objectTourLayout .viewerFrameMain,
#objectTourLayout .viewerFrameDetail {
  box-shadow: var(--shadow-card);
}

.viewerFrameProject iframe {
  height: 100%;
}

@keyframes flatProjectReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes unitPanelReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/** display:none→flex-ზე transition არ ირბენს — შესვლა მხოლოდ animation-ით */
@keyframes unitPanelSoftEnter {
  from {
    opacity: 0;
    filter: blur(14px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.flatProjectSlot {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.tourLayout.is-flat-project-open .flatProjectSlot {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: scaleY(1);
  transform-origin: bottom center;
  animation: flatProjectReveal 0.44s var(--motion-panel-ease) both;
}

/** ფლეტი: დახურვისას display:none-მდე — ჯერ collapse + fade */
.tourLayout.is-flat-project-open .flatProjectSlot.flatProjectSlot--closing {
  display: block;
  animation: none;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom center;
  pointer-events: none;
  transition:
    opacity 0.36s ease,
    transform 0.42s var(--motion-panel-ease);
}

.viewerFrameProject {
  width: 100%;
  aspect-ratio: 1 / 0.9;
  min-height: 0;
  border: 1px solid var(--border-ui);
  box-shadow: var(--shadow-card);
  background: var(--flat-project-bg);
  padding-top: 34px;
}

.flatProjectTitle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 14px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.2px;
  color: var(--flat-title-color);
  text-shadow: 0 0 8px rgba(77, 208, 225, 0.32);
  pointer-events: none;
}

html[data-theme="light"] .flatProjectTitle {
  text-shadow: none;
}

.unitPanel {
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  width: min(360px, 38vw);
  border-radius: 12px;
  border: 1px solid var(--border-ui);
  background: var(--panel-bg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(22px);
  transition:
    transform var(--motion-panel) var(--motion-panel-ease),
    opacity 0.34s ease,
    visibility 0ms linear 0.34s,
    box-shadow 0.35s ease;
}

.tourLayout.is-panel-open .unitPanel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  filter: blur(0);
  transition:
    transform var(--motion-panel) var(--motion-panel-ease),
    opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
    filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
    visibility 0ms linear 0ms,
    box-shadow 0.35s ease;
}

#objectTourLayout.is-panel-open .unitPanel.unitPanel--enter-anim,
#tourLayout.is-panel-open.is-unit-side-open .unitPanel.unitPanel--enter-anim {
  animation: unitPanelSoftEnter 0.78s cubic-bezier(0.18, 0.82, 0.28, 1) both;
}

.tourLayout.is-panel-open .unitPanel.unitPanel--closing,
#tourLayout.is-panel-open.is-unit-side-open .unitPanel.unitPanel--closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  filter: brightness(0.94);
  transform: translateX(26px) scale(0.97);
  transition:
    transform 0.36s var(--motion-panel-ease),
    opacity 0.3s ease,
    filter 0.28s ease,
    visibility 0ms linear 0.3s;
}

#objectTourLayout.is-panel-open .unitPanel.unitPanel--closing {
  transform: translateX(-20px) scale(0.97);
}

/* Object2VR: mirrored behavior (panel left, viewer shifts right) */
#objectTourLayout .unitPanel {
  left: auto;
  right: auto;
}

#objectTourLayout {
  --flat-project-panel-width: min(420px, 34vw);
  --object-side-panel-width: 340px;
  --object-available-panel-width: 300px;
  --object-layout-gap: var(--viewer-stack-gap);
  /* პანოს #tourLayout-ის ზომების სარკე: იგივე width (+ გასაყიდი+gap), ცენტრირება margin-right-ით (პანო იყენებს margin-left) */
  display: grid;
  grid-template-columns: var(--object-available-panel-width) minmax(0, 100%);
  gap: var(--object-layout-gap);
  transform: none;
  width: calc(100% + var(--object-available-panel-width) + var(--object-layout-gap));
  margin-left: 0;
  transition:
    margin-left var(--motion-panel) var(--motion-panel-ease),
    margin-right var(--motion-panel) var(--motion-panel-ease),
    width var(--motion-panel) var(--motion-panel-ease),
    grid-template-columns var(--motion-panel) var(--motion-panel-ease);
  margin-right: calc(
    -1 *
      (
        (
            var(--object-available-panel-width) +
            var(--object-side-panel-width) +
            (var(--object-layout-gap) * 2)
          ) / 2
      )
  );
}

@media (min-width: 861px) {
  #objectTourLayout {
    --object-side-panel-width: calc(340px * 0.83 * 0.85);
    --object-available-panel-width: calc(300px * 0.9);
  }
}

/* მთავარი ფანჯარა: მეორე სვეტი = პანოს მთავარი სვეტის იგივე სიგანე (მშობლის 100% მინუს გასაყიდი+gap) */
#objectTourLayout .viewerFrameMain {
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
}

#objectTourLayout #objectUnitLinkWrap {
  grid-column: 2;
  grid-row: 2;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
}

#objectTourLayout #objectUnitLinkWrap .viewerFrameDetail {
  width: 100%;
}

#objectTourLayout .unitPanelAvailable {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: stretch;
  height: var(--viewer-iframe-height);
  max-height: var(--viewer-iframe-height);
  min-height: 0;
  overflow: hidden;
  transition:
    height var(--motion-panel) var(--motion-panel-ease),
    max-height var(--motion-panel) var(--motion-panel-ease);
}

#objectTourLayout.is-available-expanded .unitPanelAvailable {
  height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
  max-height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
}

#objectTourLayout .unitPanel {
  position: static;
  width: var(--object-side-panel-width);
  display: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#objectTourLayout .unitPanelAvailable.unitPanel {
  display: flex;
  width: var(--object-available-panel-width);
}

#objectTourLayout.is-panel-open {
  transform: none;
  grid-template-columns: var(--object-available-panel-width) var(--object-side-panel-width) minmax(0, 100%);
  width: calc(
    100% +
      var(--object-available-panel-width) +
      var(--object-side-panel-width) +
      (var(--object-layout-gap) * 2)
  );
  margin-left: calc(
    -1 *
      (
        (
            var(--object-available-panel-width) +
            var(--object-side-panel-width) +
            (var(--object-layout-gap) * 2)
          ) / 2
      )
  );
  margin-right: 0;
}

#objectTourLayout.is-panel-open.is-flat-project-open {
  grid-template-columns:
    var(--flat-project-panel-width)
    var(--object-available-panel-width)
    var(--object-side-panel-width)
    minmax(0, 100%);
  width: calc(
    100% +
      var(--flat-project-panel-width) +
      var(--object-available-panel-width) +
      var(--object-side-panel-width) +
      (var(--object-layout-gap) * 3)
  );
  /* სრული კომპოზიცია: ოვერფლოუს ნახევარი მარცხნივ — ბლოკის ცენტრი = კონტეინერის ცენტრი */
  margin-left: calc(
    (
        var(--flat-project-panel-width) +
          var(--object-available-panel-width) +
          var(--object-side-panel-width) +
          (var(--object-layout-gap) * 3)
      ) /
      -2
  );
  margin-right: 0;
}

#objectTourLayout.is-panel-open.is-flat-project-open #objectFlatProjectWrap {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}

#objectTourLayout.is-flat-project-open:not(.is-panel-open) #objectFlatProjectWrap {
  grid-column: 2;
  grid-row: 3;
  width: var(--flat-project-panel-width);
  max-width: 100%;
  justify-self: end;
  align-self: start;
}

#objectTourLayout.is-panel-open .unitPanel {
  display: block;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  height: var(--viewer-iframe-height);
  max-height: var(--viewer-iframe-height);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  filter: blur(0);
  transition:
    transform var(--motion-panel) var(--motion-panel-ease),
    opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
    filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
    box-shadow 0.35s ease;
}

#objectTourLayout.is-panel-open .unitPanelAvailable.unitPanel {
  display: flex;
  grid-column: 1;
}

#objectTourLayout.is-panel-open.is-detail-open .unitPanel,
#objectTourLayout.is-panel-open.is-available-expanded .unitPanel {
  height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
  max-height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
}

#objectTourLayout.is-panel-open .viewerFrameMain {
  grid-column: 3;
  grid-row: 1;
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

#objectTourLayout.is-panel-open #objectUnitLinkWrap {
  grid-column: 3;
  grid-row: 2;
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

#objectTourLayout.is-panel-open.is-flat-project-open .unitPanel {
  grid-column: 3;
}

#objectTourLayout.is-panel-open.is-flat-project-open .unitPanelAvailable.unitPanel {
  grid-column: 2;
}

#objectTourLayout.is-panel-open.is-flat-project-open .viewerFrameMain {
  grid-column: 4;
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

#objectTourLayout.is-panel-open.is-flat-project-open #objectUnitLinkWrap {
  grid-column: 4;
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

/*
 * გასაყიდის პანელის გადაწევა ფავორიტების სვეტზე — main.js იყენებს inline transform+transition (აქ transform არა, რომ არ ჩაფაროს).
 */
#objectTourLayout.is-panel-open.is-unit-side-open .unitPanel.unitPanelAvailable {
  transition:
    height var(--motion-panel) var(--motion-panel-ease),
    max-height var(--motion-panel) var(--motion-panel-ease),
    opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
    filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
    box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  #objectTourLayout.is-panel-open.is-unit-side-open .unitPanel.unitPanelAvailable {
    transition:
      opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
      filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
      box-shadow 0.35s ease,
      height var(--motion-panel) var(--motion-panel-ease),
      max-height var(--motion-panel) var(--motion-panel-ease);
  }
}

/*
 * Object2VR: ფავორიტები დახურული — grid სვეტი სრული სიგანისა, გასაყიდის პანელი ერთი სვეტის სიგანე, იწევს მთავარი ვიუერისკენ (სარკე Pano-ს end-თან).
 */
#objectTourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) {
  transform: none;
  grid-template-columns:
    calc(
      var(--object-available-panel-width) + var(--object-side-panel-width) + var(--object-layout-gap)
    )
    minmax(0, 100%);
  width: calc(
    100% +
      var(--object-available-panel-width) +
      var(--object-side-panel-width) +
      (var(--object-layout-gap) * 2)
  );
  margin-left: calc(
    -1 *
      (
        (
            var(--object-available-panel-width) +
            var(--object-side-panel-width) +
            (var(--object-layout-gap) * 2)
          ) / 2
      )
  );
  margin-right: 0;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) .unitPanelAvailable.unitPanel {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--object-available-panel-width);
  max-width: min(100%, var(--object-available-panel-width));
  justify-self: end;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open) .unitPanel:not(.unitPanelAvailable) {
  display: none !important;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) .viewerFrameMain {
  grid-column: 2;
  grid-row: 1;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) #objectUnitLinkWrap {
  grid-column: 2;
  grid-row: 2;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) {
  grid-template-columns:
    var(--flat-project-panel-width)
    calc(
      var(--object-available-panel-width) + var(--object-side-panel-width) + var(--object-layout-gap)
    )
    minmax(0, 100%);
  width: calc(
    100% +
      var(--flat-project-panel-width) +
      var(--object-available-panel-width) +
      var(--object-side-panel-width) +
      (var(--object-layout-gap) * 3)
  );
  margin-left: calc(
    (
        var(--flat-project-panel-width) +
          var(--object-available-panel-width) +
          var(--object-side-panel-width) +
          (var(--object-layout-gap) * 3)
      ) /
      -2
  );
  margin-right: 0;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) .unitPanelAvailable.unitPanel {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: var(--object-available-panel-width);
  max-width: min(100%, var(--object-available-panel-width));
  justify-self: end;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) .viewerFrameMain {
  grid-column: 3;
  grid-row: 1;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) #objectUnitLinkWrap {
  grid-column: 3;
  grid-row: 2;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) #objectFlatProjectWrap {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--flat-project-panel-width);
  max-width: 100%;
  justify-self: start;
  align-self: center;
  transform: none;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open.is-detail-open {
  grid-template-columns:
    calc(
      var(--object-available-panel-width) + var(--object-side-panel-width) + var(--object-layout-gap)
    )
    minmax(0, 100%);
  width: calc(
    100% +
      var(--object-available-panel-width) +
      var(--object-side-panel-width) +
      (var(--object-layout-gap) * 2)
  );
  margin-left: calc(
    -1 *
      (
        (
            var(--object-available-panel-width) +
            var(--object-side-panel-width) +
            (var(--object-layout-gap) * 2)
          ) / 2
      )
  );
  margin-right: 0;
}

#objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open.is-detail-open .unitPanelAvailable.unitPanel {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--object-available-panel-width);
  max-width: min(100%, var(--object-available-panel-width));
  justify-self: end;
}

#tourLayout {
  display: grid;
  grid-template-columns: minmax(0, 100%) var(--pano-available-panel-width);
  gap: var(--pano-layout-gap);
  transform: none;
  width: calc(100% + var(--pano-available-panel-width) + var(--pano-layout-gap));
  transition:
    margin-left var(--motion-panel) var(--motion-panel-ease),
    margin-right var(--motion-panel) var(--motion-panel-ease),
    width var(--motion-panel) var(--motion-panel-ease),
    grid-template-columns var(--motion-panel) var(--motion-panel-ease);
  margin-left: calc(
    -1 *
      (
        (
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 2)
          ) / 2
      )
  );
}

#tourLayout .viewerFrameMain {
  grid-column: 1;
  grid-row: 1;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

/* ბინის 360 — იგივე სვეტის სრული სიგანე და iframe-ის სიმაღლე, რაც მთავარ ფანჯარას */
#tourLayout #panoUnitLinkWrap {
  grid-column: 1;
  grid-row: 2;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
}

#tourLayout #panoUnitLinkWrap .viewerFrameDetail {
  width: 100%;
}

#tourLayout .unitPanelAvailable {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  height: var(--viewer-iframe-height);
  max-height: var(--viewer-iframe-height);
  min-height: 0;
  overflow: hidden;
  transition:
    height var(--motion-panel) var(--motion-panel-ease),
    max-height var(--motion-panel) var(--motion-panel-ease);
}

#tourLayout.is-available-expanded .unitPanelAvailable {
  height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
  max-height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
}

#tourLayout .unitPanel {
  position: static;
  width: var(--pano-side-panel-width);
  display: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#tourLayout .unitPanelAvailable.unitPanel {
  display: flex;
  width: var(--pano-available-panel-width);
}

/* main.js: სლაიდის დროს transform მხოლოდ inline style-ით (CSS transform არ უნდა ჩაფარავდეს) */
.unitPanelAvailable.unitPanel.is-available-slot-slide {
  will-change: transform;
}

/*
 * Pano: ფავორიტები დახურული — გასაყიდის პანელი ერთი სვეტის სიგანისა; justify-self: start = მარცხნივ, მთავარი ფანჯრის კიდესთან (გაერთიანებული სვეტის შიგნით).
 */
#tourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) {
  transform: none;
  grid-template-columns:
    minmax(0, 100%)
    calc(
      var(--pano-available-panel-width) + var(--pano-side-panel-width) + var(--pano-layout-gap)
    );
  width: calc(
    100% +
      var(--pano-available-panel-width) +
      var(--pano-side-panel-width) +
      (var(--pano-layout-gap) * 2)
  );
  margin-left: calc(
    -1 *
      (
        (
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 2)
          ) / 2
      )
  );
  margin-right: 0;
}

#tourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) .unitPanelAvailable.unitPanel {
  width: var(--pano-available-panel-width);
  max-width: min(100%, var(--pano-available-panel-width));
  justify-self: start;
}

#tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) {
  grid-template-columns:
    minmax(0, 100%)
    calc(
      var(--pano-available-panel-width) + var(--pano-side-panel-width) + var(--pano-layout-gap)
    )
    var(--flat-project-panel-width);
  width: calc(
    100% +
      var(--pano-available-panel-width) +
      var(--pano-side-panel-width) +
      var(--flat-project-panel-width) +
      (var(--pano-layout-gap) * 3)
  );
  margin-left: calc(
    (
        var(--flat-project-panel-width) +
          var(--pano-available-panel-width) +
          var(--pano-side-panel-width) +
          (var(--pano-layout-gap) * 3)
      ) /
      -2
  );
  margin-right: 0;
}

#tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) .unitPanelAvailable.unitPanel {
  width: var(--pano-available-panel-width);
  max-width: min(100%, var(--pano-available-panel-width));
  justify-self: start;
}

#tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) #panoFlatProjectWrap {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  width: var(--flat-project-panel-width);
  max-width: 100%;
  transform: none;
}

/* იგივე სიგანის grid დეტალისას; flat რჩება რიგი 3 / სვეტი 1 (იგივე რაც 1772) */
#tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open.is-detail-open {
  grid-template-columns:
    minmax(0, 100%)
    calc(
      var(--pano-available-panel-width) + var(--pano-side-panel-width) + var(--pano-layout-gap)
    );
  width: calc(
    100% +
      var(--pano-available-panel-width) +
      var(--pano-side-panel-width) +
      (var(--pano-layout-gap) * 2)
  );
  margin-left: calc(
    -1 *
      (
        (
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 2)
          ) / 2
      )
  );
  margin-right: 0;
}

#tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open.is-detail-open .unitPanelAvailable.unitPanel {
  width: var(--pano-available-panel-width);
  max-width: min(100%, var(--pano-available-panel-width));
  justify-self: start;
}

#tourLayout.is-panel-open.is-unit-side-open {
  transform: none;
  grid-template-columns: minmax(0, 100%) var(--pano-side-panel-width) var(--pano-available-panel-width);
  width: calc(
    100% +
      var(--pano-available-panel-width) +
      var(--pano-side-panel-width) +
      (var(--pano-layout-gap) * 2)
  );
  margin-left: calc(
    -1 *
      (
        (
            var(--pano-available-panel-width) +
            var(--pano-side-panel-width) +
            (var(--pano-layout-gap) * 2)
          ) / 2
      )
  );
}

#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open {
  grid-template-columns:
    minmax(0, 100%)
    var(--pano-side-panel-width)
    var(--pano-available-panel-width)
    var(--flat-project-panel-width);
  width: calc(
    100% +
      var(--pano-available-panel-width) +
      var(--pano-side-panel-width) +
      var(--flat-project-panel-width) +
      (var(--pano-layout-gap) * 3)
  );
  /* სრული კომპოზიცია: ოვერფლოუს ნახევარი მარცხნივ — ცენტრირება კონტეინერში */
  margin-left: calc(
    (
        var(--flat-project-panel-width) +
          var(--pano-available-panel-width) +
          var(--pano-side-panel-width) +
          (var(--pano-layout-gap) * 3)
      ) /
      -2
  );
  margin-right: 0;
}

#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #panoFlatProjectWrap {
  grid-column: 4;
  grid-row: 1 / span 2;
  align-self: center;
  transform: none;
}

#tourLayout.is-flat-project-open:not(.is-panel-open) #panoFlatProjectWrap {
  grid-column: 1;
  grid-row: 3;
  width: var(--flat-project-panel-width);
  max-width: 100%;
  justify-self: start;
  align-self: start;
}

#tourLayout.is-panel-open.is-unit-side-open .unitPanel {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  height: var(--viewer-iframe-height);
  max-height: var(--viewer-iframe-height);
  min-height: 0;
  overflow: hidden;
  filter: blur(0);
  transition:
    transform var(--motion-panel) var(--motion-panel-ease),
    opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
    filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
    box-shadow 0.35s ease;
}

#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open .unitPanel {
  grid-column: 2;
}

#tourLayout.is-panel-open.is-unit-side-open .unitPanelAvailable.unitPanel {
  display: flex;
  grid-column: 3;
}

#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open .unitPanelAvailable.unitPanel {
  grid-column: 3;
}

/*
 * გასაყიდის სლაიდი — main.js inline transform+transition (აქ transform არა).
 */
#tourLayout.is-panel-open.is-unit-side-open .unitPanel.unitPanelAvailable {
  transition:
    height var(--motion-panel) var(--motion-panel-ease),
    max-height var(--motion-panel) var(--motion-panel-ease),
    opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
    filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
    box-shadow 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  #tourLayout.is-panel-open.is-unit-side-open .unitPanel.unitPanelAvailable {
    transition:
      opacity 0.68s cubic-bezier(0.2, 0.88, 0.28, 1),
      filter 0.76s cubic-bezier(0.18, 0.82, 0.32, 1),
      box-shadow 0.35s ease,
      height var(--motion-panel) var(--motion-panel-ease),
      max-height var(--motion-panel) var(--motion-panel-ease);
  }
}

#tourLayout.is-panel-open.is-unit-side-open.is-detail-open .unitPanel,
#tourLayout.is-panel-open.is-unit-side-open.is-available-expanded .unitPanel {
  height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
  max-height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
}

#tourLayout.is-detail-open:not(.is-unit-side-open) .unitPanelAvailable {
  height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
  max-height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
}

#objectTourLayout.is-detail-open:not(.is-unit-side-open) .unitPanelAvailable {
  height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
  max-height: calc(var(--viewer-iframe-height) * 2 + var(--viewer-stack-gap));
}

#tourLayout.is-panel-open .viewerFrameMain {
  grid-column: 1;
  grid-row: 1;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

#tourLayout.is-panel-open #panoUnitLinkWrap {
  grid-column: 1;
  grid-row: 2;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
}

#tourLayout.is-panel-open.is-flat-project-open .viewerFrameMain {
  grid-column: 1;
}

#tourLayout.is-panel-open.is-flat-project-open #panoUnitLinkWrap {
  grid-column: 1;
}

/* დესკტოპი: მთავარი ვიუერი პროპორციულად −30% (×0.7) — Pano2VR და Object2VR */
@media (min-width: 861px) {
  /* Pano2VR: მთელი viewerCard (ქარდი, მთავარი ფანჯარა, გასაყიდი/ფავორიტები, ქვედა ჩარჩო) ცოტათი მარჯვნივ */
  #tour .viewerCard {
    margin-left: var(--tour-viewer-nudge-x);
  }

  #tourLayout .viewerFrameMain iframe,
  #objectTourLayout .viewerFrameMain iframe {
    height: calc(var(--viewer-iframe-height) * 0.7);
  }

  #tourLayout .viewerFrameMain,
  #tourLayout.is-panel-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-flat-project-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open .viewerFrameMain,
  #objectTourLayout .viewerFrameMain,
  #objectTourLayout.is-panel-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open .viewerFrameMain {
    width: 70%;
    max-width: 100%;
    justify-self: center;
  }

  /* არჩეული ბინის ფანჯარა: იგივე ×0.7, იგივე სვეტში ცენტრი = მთავრის ქვეშ */
  #tourLayout #panoUnitLinkWrap,
  #tourLayout.is-panel-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-flat-project-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #panoUnitLinkWrap,
  #objectTourLayout #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open #objectUnitLinkWrap {
    width: 70%;
    max-width: 100%;
    justify-self: center;
  }

  #tourLayout #panoUnitLinkWrap.viewerDetailSlot.is-visible,
  #objectTourLayout #objectUnitLinkWrap.viewerDetailSlot.is-visible {
    margin-top: -9cm;
  }

  #tourLayout #panoUnitLinkWrap .viewerFrameDetail iframe,
  #objectTourLayout #objectUnitLinkWrap .viewerFrameDetail iframe {
    height: calc(var(--viewer-iframe-height) * 0.7);
  }

  /* Object2VR: გასაყიდი + ფავორიტების პანელი მარჯვნივ +4 სმ */
  #objectTourLayout #objectAvailablePanel,
  #objectTourLayout #objectUnitSidePanel {
    position: relative;
    left: 4cm;
  }

  /* Object2VR: პირველ ხედზე (არა is-panel-open) გასაყიდი პანელი ცოტათი მარცხნივ */
  #objectTourLayout:not(.is-panel-open) #objectAvailablePanel {
    left: calc(4cm - 12px);
  }

  /* Pano2VR: იგივე პანელები მარცხნივ −4 სმ */
  #tourLayout #panoAvailablePanel,
  #tourLayout #unitSidePanel {
    position: relative;
    left: -4cm;
  }

  /* Object2VR: 3D გეგმა მარჯვნივ +4 სმ (წინა 3 სმ + 1 სმ) */
  #objectTourLayout #objectFlatProjectWrap {
    position: relative;
    left: 4cm;
  }

  /* Pano2VR: 3D გეგმა მარცხნივ −4 სმ (წინა −3 სმ + 1 სმ) */
  #tourLayout #panoFlatProjectWrap {
    position: relative;
    left: -4cm;
  }

  /*
   * სრული კომპოზიცია + ბინის ფანჯარა (is-detail-open):
   * მე-4 სვეტი (ცარიელი) აღარაა — იგივე 3-სვეტიანი grid, რაც flat-ის გარეშე unit-side-ზე.
   * 3D გეგმა: სვეტი 1, რიგი 3 = დეტალის ქვემოთ; მარჯვნივ დასასწორებლად 15% margin (70% ცენტრირებული ვიუერის მარჯვენა კიდე).
   */
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open {
    grid-template-columns:
      minmax(0, 100%)
      var(--pano-side-panel-width)
      var(--pano-available-panel-width);
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        var(--pano-side-panel-width) +
        (var(--pano-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--pano-available-panel-width) +
              var(--pano-side-panel-width) +
              (var(--pano-layout-gap) * 2)
            ) / 2
        )
    );
    margin-right: 0;
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open:not(.is-unit-side-open) #panoFlatProjectWrap {
    grid-column: 1;
    grid-row: 3;
    justify-self: end;
    align-self: start;
    width: var(--flat-project-panel-width);
    max-width: 100%;
    margin-right: 15%;
    margin-left: 0;
    margin-top: calc(-2 * var(--pano-layout-gap) - 8cm - 14px);
    left: 0;
    transform: none;
  }

  /*
   * Object2VR სარკე (Pano2VR-ის საპირისპირო): is-detail-open + flat — მე-1 სვეტი (flat) იშლება,
   * 3 სვეტი როგორც flat-ის გარეშე; 3D გეგმა მთავარი სვეტის (3) რიგი 3, ბინის ფანჯრის ქვეშ;
   * მარცხენა სწორება 15% = 70% ცენტრირებული ვიუერის მარცხენა კიდე (სარკე: Pano margin-right 15%).
   */
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open {
    grid-template-columns:
      var(--object-available-panel-width)
      var(--object-side-panel-width)
      minmax(0, 100%);
    width: calc(
      100% +
        var(--object-available-panel-width) +
        var(--object-side-panel-width) +
        (var(--object-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--object-available-panel-width) +
              var(--object-side-panel-width) +
              (var(--object-layout-gap) * 2)
            ) / 2
        )
    );
    margin-right: 0;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanelAvailable.unitPanel {
    grid-column: 1;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanel {
    grid-column: 2;
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #objectUnitLinkWrap {
    grid-column: 3;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open:not(.is-unit-side-open) .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open:not(.is-unit-side-open) #objectUnitLinkWrap {
    grid-column: 2;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameMain {
    grid-row: 1;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open #objectUnitLinkWrap {
    grid-row: 2;
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #objectFlatProjectWrap {
    grid-column: 3;
    grid-row: 3;
    justify-self: start;
    align-self: start;
    width: var(--flat-project-panel-width);
    max-width: 100%;
    margin-left: 15%;
    margin-right: 0;
    margin-top: calc(-2 * var(--object-layout-gap) - 8cm - 14px);
    left: 0;
    transform: none;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open:not(.is-unit-side-open) #objectFlatProjectWrap {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    align-self: start;
    width: var(--flat-project-panel-width);
    max-width: 100%;
    margin-left: 15%;
    margin-right: 0;
    margin-top: calc(-2 * var(--object-layout-gap) - 8cm - 14px);
    left: 0;
    transform: none;
  }
}

/*
 * მთავარი გვერდი — დიდი viewport (QHD/DPI-სთან თავსებადი):
 * Pano2VR: მთავარი ფანჯარა +30%; გასაყიდი (#panoAvailablePanel) სიგანე +17%, მარჯვნიც გადაწევა;
 * სრულ კომპოზიციაზე #unitSidePanel +15% სიგანე, +3cm მარჯვნივ;
 * დეტალი დახურული + flat JS-ით დახურული (არა is-flat-project-open): ფავორიტები +3cm მარჯვნივ;
 * + is-detail-open: #panoUnitLinkWrap — იგივე სიგანე/სკეილი რაც მთავარს (×1.3), ქვევით ოდნავ, კიდეების გასწორება;
 * ფავორიტები დახურული (:not(.is-unit-side-open)) + დეტალი: ბინის ფანჯარა +30% (×1.3 ბაზაზე), margin-top ცოტათი ქვემოთ;
 * #panoFlatProjectWrap: ქვემოთ top ~6.55cm (flatProjectSlot ანიმაცია transform-ს იტოვებს none-ზე).
 * ფავორიტები დახურული + flat ღია: 3D გეგმა +7cm ქვემოთ, +2cm მარჯვნივ (დეტალი ღია ან არა).
 * Object2VR: გასაყიდი (#objectAvailablePanel) იგივე +15% სიგანე და იგივე პროპორციული გადაწევა (4cm ბაზა).
 * Full HD უცვლელი. min-height:1100 — chrome/ზოლი; სიგანე ≥2000.
 * სრული Pano კომპოზიცია: #tour სექციის ქვედა ფონი +7cm; .viewerCard ნაცრისფერი ქარდი +7cm ქვემოთ.
 * Object2VR (#threeD / #objectTourLayout): იგივე QHD წესები სარკისებურად (left↔4cm−X, margin-left↔margin-right სიმეტრია).
 */
@media (min-width: 2000px) and (min-height: 1100px) {
  #tour {
    --pano-available-panel-width: calc(300px * 0.9 * 1.17);
  }

  #objectTourLayout {
    --object-available-panel-width: calc(300px * 0.9 * 1.17);
  }

  #threeD:has(#objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open).section {
    padding-bottom: calc(120px + 7cm);
  }

  #threeD:has(#objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open) .viewerCard {
    padding-bottom: calc(12px + 7cm);
  }

  #tour:has(#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open).section.sectionAlt {
    padding-bottom: calc(min(36vh, 360px) + 7cm);
  }

  #tour:has(#tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open) .viewerCard {
    padding-bottom: calc(12px + 7cm);
  }

  /* მხოლოდ გასაყიდი სია: ნაკლებად მარცხნივ ვიდრე ფავორიტების პანელი (რომელსაც ტოვებს -4cm). */
  /* დამატებით +2cm მარჯვნივ (QHD) */
  #tourLayout #panoAvailablePanel {
    left: calc(-4cm + 1.17cm + 2cm);
  }

  #objectTourLayout #objectAvailablePanel {
    left: calc(4cm - 1.17cm - 2cm);
  }

  #objectTourLayout:not(.is-panel-open) #objectAvailablePanel {
    left: calc(4cm - 12px - 1.17cm - 2cm);
  }

  /*
   * Pano: ყველა გახსნილი (is-panel-open + is-unit-side-open + is-flat-project-open) — ფავორიტების პანელი
   * (#unitSidePanel) სიგანე +15%, მარჯვნიც +3cm (ბაზა -4cm).
   */
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open:not(.is-detail-open) {
    grid-template-columns:
      minmax(0, 100%)
      calc(var(--pano-side-panel-width) * 1.15)
      var(--pano-available-panel-width)
      var(--flat-project-panel-width);
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        calc(var(--pano-side-panel-width) * 1.15) +
        var(--flat-project-panel-width) +
        (var(--pano-layout-gap) * 3)
    );
    margin-left: calc(
      (
          var(--flat-project-panel-width) +
            var(--pano-available-panel-width) +
            calc(var(--pano-side-panel-width) * 1.15) +
            (var(--pano-layout-gap) * 3)
        ) /
        -2
    );
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open {
    grid-template-columns:
      minmax(0, 100%)
      calc(var(--pano-side-panel-width) * 1.15)
      var(--pano-available-panel-width);
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        calc(var(--pano-side-panel-width) * 1.15) +
        (var(--pano-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--pano-available-panel-width) +
              calc(var(--pano-side-panel-width) * 1.15) +
              (var(--pano-layout-gap) * 2)
            ) / 2
        )
    );
  }

  /*
   * QHD: ფავორიტები დახურული — გაერთიანებული სვეტი იგივე side ×1.15 რაც სრულ კომპოზიციაზე.
   */
  #tourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) {
    grid-template-columns:
      minmax(0, 100%)
      calc(
        var(--pano-available-panel-width) + calc(var(--pano-side-panel-width) * 1.15) +
          var(--pano-layout-gap)
      );
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        calc(var(--pano-side-panel-width) * 1.15) +
        (var(--pano-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--pano-available-panel-width) +
                calc(var(--pano-side-panel-width) * 1.15) +
                (var(--pano-layout-gap) * 2)
            ) /
            2
        )
    );
  }

  #tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) {
    grid-template-columns:
      minmax(0, 100%)
      calc(
        var(--pano-available-panel-width) + calc(var(--pano-side-panel-width) * 1.15) +
          var(--pano-layout-gap)
      )
      var(--flat-project-panel-width);
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        calc(var(--pano-side-panel-width) * 1.15) +
        var(--flat-project-panel-width) +
        (var(--pano-layout-gap) * 3)
    );
    margin-left: calc(
      (
          var(--flat-project-panel-width) +
            var(--pano-available-panel-width) +
            calc(var(--pano-side-panel-width) * 1.15) +
            (var(--pano-layout-gap) * 3)
        ) /
        -2
    );
  }

  #tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open.is-detail-open {
    grid-template-columns:
      minmax(0, 100%)
      calc(
        var(--pano-available-panel-width) + calc(var(--pano-side-panel-width) * 1.15) +
          var(--pano-layout-gap)
      );
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        calc(var(--pano-side-panel-width) * 1.15) +
        (var(--pano-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--pano-available-panel-width) +
                calc(var(--pano-side-panel-width) * 1.15) +
                (var(--pano-layout-gap) * 2)
            ) /
            2
        )
    );
  }

  #objectTourLayout.is-panel-open:not(.is-unit-side-open):not(.is-flat-project-open) {
    grid-template-columns:
      calc(
        var(--object-available-panel-width) + calc(var(--object-side-panel-width) * 1.15) +
          var(--object-layout-gap)
      )
      minmax(0, 100%);
    width: calc(
      100% +
        var(--object-available-panel-width) +
        calc(var(--object-side-panel-width) * 1.15) +
        (var(--object-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--object-available-panel-width) +
                calc(var(--object-side-panel-width) * 1.15) +
                (var(--object-layout-gap) * 2)
            ) /
            2
        )
    );
  }

  #objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open:not(.is-detail-open) {
    grid-template-columns:
      var(--flat-project-panel-width)
      calc(
        var(--object-available-panel-width) + calc(var(--object-side-panel-width) * 1.15) +
          var(--object-layout-gap)
      )
      minmax(0, 100%);
    width: calc(
      100% +
        var(--flat-project-panel-width) +
        var(--object-available-panel-width) +
        calc(var(--object-side-panel-width) * 1.15) +
        (var(--object-layout-gap) * 3)
    );
    margin-left: calc(
      (
          var(--flat-project-panel-width) +
            var(--object-available-panel-width) +
            calc(var(--object-side-panel-width) * 1.15) +
            (var(--object-layout-gap) * 3)
        ) /
        -2
    );
  }

  #objectTourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open.is-detail-open {
    grid-template-columns:
      calc(
        var(--object-available-panel-width) + calc(var(--object-side-panel-width) * 1.15) +
          var(--object-layout-gap)
      )
      minmax(0, 100%);
    width: calc(
      100% +
        var(--object-available-panel-width) +
        calc(var(--object-side-panel-width) * 1.15) +
        (var(--object-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--object-available-panel-width) +
                calc(var(--object-side-panel-width) * 1.15) +
                (var(--object-layout-gap) * 2)
            ) /
            2
        )
    );
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #unitSidePanel {
    width: calc(var(--pano-side-panel-width) * 1.15);
    left: calc(-4cm + 3cm);
  }

  /*
   * დეტალი დახურვა main.js-ში აშორებს is-detail-open-ს და is-flat-project-open-ს ერთად,
   * ამიტომ :not(.is-detail-open) საკმარისი არაა — საჭიროა :not(.is-flat-project-open).
   * ფავორიტები: −3cm left (მარცხნივ), სიგანე +13%; grid მე-2 სვეტი იგივე პროპორციით.
   */
  #tourLayout.is-panel-open.is-unit-side-open:not(.is-detail-open):not(.is-flat-project-open) {
    grid-template-columns:
      minmax(0, 100%)
      calc(var(--pano-side-panel-width) * 1.13)
      var(--pano-available-panel-width);
    width: calc(
      100% +
        var(--pano-available-panel-width) +
        calc(var(--pano-side-panel-width) * 1.13) +
        (var(--pano-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--pano-available-panel-width) +
              calc(var(--pano-side-panel-width) * 1.13) +
              (var(--pano-layout-gap) * 2)
            ) / 2
        )
    );
  }

  #tourLayout.is-panel-open.is-unit-side-open:not(.is-detail-open):not(.is-flat-project-open) #unitSidePanel {
    width: calc(var(--pano-side-panel-width) * 1.13);
    max-width: 100%;
    left: calc(-4cm + 3cm + 3cm - 3cm);
  }

  /*
   * 3D გეგმა (.flatProjectSlot): top calc(4cm + 1.8cm + 0.75cm) (position:relative).
   * transform არა: .tourLayout.is-flat-project-open .flatProjectSlot-ის flatProjectReveal animation-fill
   * forwards ტოვებს keyframe „to { transform: none }“-ს, რაც ჩვენს translateY-ს ჩაფარავს/აუქმებს.
   */
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open:not(.is-detail-open) #panoFlatProjectWrap {
    top: calc(4cm + 1.8cm + 0.75cm);
    left: calc(-4cm + 2cm);
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap {
    margin-top: calc(-2 * var(--pano-layout-gap) - 8cm - 14px);
    top: calc(4cm + 1.8cm + 0.75cm);
    left: 2cm;
  }

  /* ფავორიტები დახურული, 3D გეგმა ღია: ქვემოთ +7cm, მარჯვნივ +2cm (is-detail-open ორივე ვარიანტზე) */
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open:not(.is-unit-side-open) #panoFlatProjectWrap {
    margin-top: calc(-2 * var(--pano-layout-gap) - 8cm - 14px + 7cm);
    left: 2cm;
  }

  #tourLayout.is-panel-open.is-flat-project-open:not(.is-detail-open):not(.is-unit-side-open) #panoFlatProjectWrap {
    top: calc(4cm + 1.8cm + 0.75cm + 7cm);
    left: calc(-4cm + 2cm);
  }

  /* მთავარი ქვედა ბინის ფანჯარა — ყველაფერი გახსნილი + დეტალი: იგივე სიგანე/სიმაღლის მასშტაბი რაც მთავარ ფანჯარას (70%×1.3, iframe 0.7×1.3) */
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open
    #panoUnitLinkWrap.viewerDetailSlot.is-visible {
    margin-top: calc(-9cm + 6.5cm);
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoUnitLinkWrap {
    width: calc(70% * 1.3);
    max-width: 100%;
    justify-self: center;
    box-sizing: border-box;
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open
    #panoUnitLinkWrap
    .viewerFrameDetail
    iframe {
    height: calc(var(--viewer-iframe-height) * 0.7 * 1.3);
  }

  /* ფავორიტები დახურული, დეტალი ღია: +30% ზომა (70%→×1.3, iframe 0.7→×1.3), ცოტათი დაბლა მთავარი ფანჯრის ქვეშ */
  #tourLayout.is-panel-open.is-detail-open:not(.is-unit-side-open)
    #panoUnitLinkWrap.viewerDetailSlot.is-visible {
    margin-top: calc(-9cm + 6.5cm + 0.2cm);
  }

  #tourLayout.is-panel-open.is-detail-open:not(.is-unit-side-open) #panoUnitLinkWrap {
    width: calc(70% * 1.3);
    max-width: 100%;
    justify-self: center;
    box-sizing: border-box;
  }

  #tourLayout.is-panel-open.is-detail-open:not(.is-unit-side-open)
    #panoUnitLinkWrap
    .viewerFrameDetail
    iframe {
    height: calc(var(--viewer-iframe-height) * 0.7 * 1.3);
  }

  #tourLayout .viewerFrameMain iframe {
    height: calc(var(--viewer-iframe-height) * 0.7 * 1.3);
  }

  #tourLayout .viewerFrameMain,
  #tourLayout.is-panel-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-flat-project-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open .viewerFrameMain {
    width: calc(70% * 1.3);
    max-width: 100%;
  }

  /*
   * Object2VR QHD — Pano2VR სარკე (იგივე ×1.15/×1.13/×1.3; left სარკე 4cm−X ან −2cm სადაც Pano +2cm).
   */
  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open:not(.is-detail-open) {
    grid-template-columns:
      var(--flat-project-panel-width)
      var(--object-available-panel-width)
      calc(var(--object-side-panel-width) * 1.15)
      minmax(0, 100%);
    width: calc(
      100% +
        var(--flat-project-panel-width) +
        var(--object-available-panel-width) +
        calc(var(--object-side-panel-width) * 1.15) +
        (var(--object-layout-gap) * 3)
    );
    margin-left: calc(
      (
          var(--flat-project-panel-width) +
            var(--object-available-panel-width) +
            calc(var(--object-side-panel-width) * 1.15) +
            (var(--object-layout-gap) * 3)
        ) /
        -2
    );
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open {
    grid-template-columns:
      var(--object-available-panel-width)
      calc(var(--object-side-panel-width) * 1.15)
      minmax(0, 100%);
    width: calc(
      100% +
        var(--object-available-panel-width) +
        calc(var(--object-side-panel-width) * 1.15) +
        (var(--object-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--object-available-panel-width) +
              calc(var(--object-side-panel-width) * 1.15) +
              (var(--object-layout-gap) * 2)
            ) / 2
        )
    );
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #objectUnitSidePanel {
    width: calc(var(--object-side-panel-width) * 1.15);
    left: calc(4cm - 3cm);
  }

  #objectTourLayout.is-panel-open.is-unit-side-open:not(.is-detail-open):not(.is-flat-project-open) {
    grid-template-columns:
      var(--object-available-panel-width)
      calc(var(--object-side-panel-width) * 1.13)
      minmax(0, 100%);
    width: calc(
      100% +
        var(--object-available-panel-width) +
        calc(var(--object-side-panel-width) * 1.13) +
        (var(--object-layout-gap) * 2)
    );
    margin-left: calc(
      -1 *
        (
          (
              var(--object-available-panel-width) +
              calc(var(--object-side-panel-width) * 1.13) +
              (var(--object-layout-gap) * 2)
            ) / 2
        )
    );
  }

  #objectTourLayout.is-panel-open.is-unit-side-open:not(.is-detail-open):not(.is-flat-project-open) #objectUnitSidePanel {
    width: calc(var(--object-side-panel-width) * 1.13);
    max-width: 100%;
    left: calc(4cm - 3cm);
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open:not(.is-detail-open) #objectFlatProjectWrap {
    top: calc(4cm + 1.8cm + 0.75cm);
    left: calc(4cm - 2cm);
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #objectFlatProjectWrap {
    margin-top: calc(-2 * var(--object-layout-gap) - 8cm - 14px);
    top: calc(4cm + 1.8cm + 0.75cm);
    left: -2cm;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open:not(.is-unit-side-open) #objectFlatProjectWrap {
    margin-top: calc(-2 * var(--object-layout-gap) - 8cm - 14px + 7cm);
    left: -2cm;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open:not(.is-detail-open):not(.is-unit-side-open) #objectFlatProjectWrap {
    top: calc(4cm + 1.8cm + 0.75cm + 7cm);
    left: calc(4cm - 2cm);
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open
    #objectUnitLinkWrap.viewerDetailSlot.is-visible {
    margin-top: calc(-9cm + 6.5cm);
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #objectUnitLinkWrap {
    width: calc(70% * 1.3);
    max-width: 100%;
    justify-self: center;
    box-sizing: border-box;
  }

  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open
    #objectUnitLinkWrap
    .viewerFrameDetail
    iframe {
    height: calc(var(--viewer-iframe-height) * 0.7 * 1.3);
  }

  #objectTourLayout.is-panel-open.is-detail-open:not(.is-unit-side-open)
    #objectUnitLinkWrap.viewerDetailSlot.is-visible {
    margin-top: calc(-9cm + 6.5cm + 0.2cm);
  }

  #objectTourLayout.is-panel-open.is-detail-open:not(.is-unit-side-open) #objectUnitLinkWrap {
    width: calc(70% * 1.3);
    max-width: 100%;
    justify-self: center;
    box-sizing: border-box;
  }

  #objectTourLayout.is-panel-open.is-detail-open:not(.is-unit-side-open)
    #objectUnitLinkWrap
    .viewerFrameDetail
    iframe {
    height: calc(var(--viewer-iframe-height) * 0.7 * 1.3);
  }

  #objectTourLayout .viewerFrameMain iframe {
    height: calc(var(--viewer-iframe-height) * 0.7 * 1.3);
  }

  #objectTourLayout .viewerFrameMain,
  #objectTourLayout.is-panel-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-unit-side-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-unit-side-open.is-flat-project-open .viewerFrameMain {
    width: calc(70% * 1.3);
    max-width: 100%;
  }
}

.unitPanelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.unitPanelHeadActions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.unitPanelTitle {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display-sp);
}

.unitPanelAvailable .unitPanelTitle {
  font-family: "Avazam", sans-serif;
  font-weight: 700;
}

/* gasayidi binebi / „გასაყიდი ბინები“ — უფრო ფართო ასო- და სიტყვათშორისი (მხოლოდ სიის სათაური + apartments გვერდები) */
.unitPanelAvailable .unitPanelTitle[lang="ka-Latn"],
.apartmentsHeader h1[lang="ka-Latn"] {
  letter-spacing: 0.09em;
  word-spacing: 0.38em;
}

.unitPanelAvailable .favoritesList .availableUnitsEmptyMsg {
  font-family: "Avazam", sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 6px 4px;
}

#objectUnitSidePanel .unitPanelTitle,
#unitSidePanel .unitPanelTitle {
  font-family: "Avazam", sans-serif;
  font-weight: 700;
  color: var(--unit-title-color);
  text-shadow: var(--unit-title-shadow);
  text-align: center;
  width: 100%;
}

/* arCeuli binis gegma — ოდნავ ფართო ასო- და სიტყვათშორისი */
#objectUnitSidePanel .unitPanelTitle[lang="ka-Latn"],
#unitSidePanel .unitPanelTitle[lang="ka-Latn"] {
  letter-spacing: 0.08em;
  word-spacing: 0.3em;
}

#objectUnitSidePanel .unitPanelHead,
#unitSidePanel .unitPanelHead {
  justify-content: center;
  position: relative;
}

.unitPanelToggle {
  border: 1px solid var(--border-ui-strong);
  background: var(--surface-mute-3);
  color: var(--icon-btn-fg);
  border-radius: 999px;
  width: 32px;
  height: 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transform: translateY(0);
  margin-top: auto;
  align-self: flex-end;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.unitPanelToggle:hover {
  background: var(--surface-mute-1);
  border-color: var(--border-ui-input);
  transform: translateY(1px);
}

.unitPanelToggle:active {
  transform: translateY(2px);
}

.unitPlanImage {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: var(--surface-mute-4);
  border: 1px solid var(--border-ui-soft);
  border-radius: 10px;
  margin-bottom: 10px;
}

.unitSelectedCard {
  background: var(--surface-mute-1);
  border: 1px solid var(--border-ui-mid);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
}

.unitSelectedCard .unitPlanImage {
  margin-bottom: 8px;
}

/* ფავორიტების პანელი (Object2VR): არჩეული გეგმა −15% სიმაღლე, კიდე −8% */
#objectUnitSidePanel .unitPlanImage {
  width: 85%;
  max-width: 100%;
  max-height: calc(220px * 0.85 * 0.92);
  margin-left: auto;
  margin-right: auto;
  display: block;
  box-sizing: border-box;
}

/* Pano2VR ფავორიტების პანელი — ზედა: არჩეული ბინის ბლოკი −8% სიმაღლე (გეგმა + ჩარჩო) */
#unitSidePanel .unitPlanImage {
  width: calc(85% * 0.93);
  max-width: 100%;
  max-height: calc(220px * 0.85 * 0.93 * 0.92 * 0.92);
  margin-left: auto;
  margin-right: auto;
  display: block;
  box-sizing: border-box;
}

#unitSidePanel .unitSelectedCard {
  padding: calc(8px * 0.92);
  margin-bottom: calc(10px * 0.92);
}

#unitSidePanel .unitSelectedCard .unitPlanImage {
  margin-bottom: calc(8px * 0.92);
}

.unitSelectedCard .unitInfo {
  background: var(--surface-mute-2);
  border-radius: 8px;
  padding: 8px;
}

#objectUnitSidePanel.is-unit-selected .unitSelectedCard,
#unitSidePanel.is-unit-selected .unitSelectedCard {
  background: rgba(255, 255, 0, 0.14);
  border-color: rgba(255, 255, 0, 0.55);
}

/* ყვითელი ჩარჩო (არჩეული ბინა): სიმაღლე −8% */
#objectUnitSidePanel.is-unit-selected .unitSelectedCard {
  padding: calc(8px * 0.92);
  margin-bottom: calc(10px * 0.92);
}

#unitSidePanel.is-unit-selected .unitSelectedCard {
  padding: calc(8px * 0.92 * 0.92);
  margin-bottom: calc(10px * 0.92 * 0.92);
}

#objectUnitSidePanel.is-unit-selected .unitPlanImage {
  max-height: calc(220px * 0.85 * 0.92 * 0.92);
}

#unitSidePanel.is-unit-selected .unitPlanImage {
  max-height: calc(220px * 0.85 * 0.93 * 0.92 * 0.92 * 0.92);
}

#unitSidePanel.is-unit-selected .unitSelectedCard .unitPlanImage {
  margin-bottom: calc(8px * 0.92 * 0.92);
}

#objectUnitSidePanel.is-unit-selected .unitSelectedCard .unitPlanImage {
  margin-bottom: calc(8px * 0.92);
}

#objectUnitSidePanel.is-unit-selected .unitSelectedCard .unitInfo,
#unitSidePanel.is-unit-selected .unitSelectedCard .unitInfo {
  background: rgba(255, 255, 0, 0.18);
  padding: calc(8px * 0.92);
  min-height: calc(48px * 0.92);
}

#objectUnitSidePanel:not(.is-unit-selected) .unitPanelTitle,
#unitSidePanel:not(.is-unit-selected) .unitPanelTitle,
#objectUnitSidePanel:not(.is-unit-selected) .unitSelectedCard,
#unitSidePanel:not(.is-unit-selected) .unitSelectedCard {
  display: none;
}

.unitInfo {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 48px;
  font-family: var(--font-geo);
}

.unitActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.iconBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-ui-strong);
  background: var(--surface-mute-3);
  color: var(--icon-btn-fg);
  text-decoration: none;
  cursor: pointer;
  font-size: 20px;
}

.heartBtn.is-favorite {
  color: #ff4d6a;
  border-color: rgba(255, 77, 106, 0.7);
  background: rgba(255, 77, 106, 0.12);
}

.emailTextBtn {
  border: 1px solid var(--border-ui-strong);
  background: var(--surface-mute-3);
  color: var(--favorite-btn-color);
  border-radius: 10px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  /* მხოლოდ მეილის ტექსტი: ლათინური სისტემური სტეკი, საიტის ქართული ფონტების გარეშე */
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-weight: 600;
  cursor: pointer;
  direction: ltr;
  unicode-bidi: isolate;
}

.emailTextBtn:hover {
  border-color: rgba(77, 208, 225, 0.7);
}

.favoritesBlock {
  border-top: 1px solid var(--favorites-block-border);
  margin-top: 6px;
  padding-top: 12px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.favoritesTitle {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display-sp);
  color: var(--favorites-title-color);
  margin-bottom: 10px;
  text-align: center;
}

#objectAvailablePanel .unitPanelHead,
#panoAvailablePanel .unitPanelHead {
  justify-content: center;
}

.availableFilters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.availableFilters .availableFilterSelect {
  grid-column: 1 / -1;
}

.availableFilterSelect {
  width: 100%;
  border: 1px solid var(--border-ui-input);
  background: var(--filter-control-bg);
  color: var(--filter-control-fg);
  border-radius: 8px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
}

.availableSearchInput {
  width: 100%;
  border: 1px solid var(--border-ui-input);
  background-color: var(--filter-control-bg);
  color: #fff;
  border-radius: 8px;
  height: 34px;
  padding: 0 8px 0 27px;
  font-size: 12px;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
  background-repeat: no-repeat;
  background-position: 7px center;
  background-size: 15px 15px;
}

.availableSearchInput::placeholder {
  font-size: calc(12px * 0.9);
  color: #fff;
  opacity: 0.9;
}

/* ნათელი თემა: თეთრი წარწერა — ველის ფონი მუქი, რომ იკითხებოდეს */
html[data-theme="light"] .availableSearchInput {
  background-color: rgba(39, 53, 72, 0.96);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

html[data-theme="light"] .availableSearchInput::placeholder {
  color: #fff;
  opacity: 0.88;
}

/* დესკტოპი: გასაყიდი ბინების პანელის საძიებო ველები — ტექსტი +20% */
@media (min-width: 861px) {
  .availableSearchInput {
    font-size: calc(12px * 1.2);
  }

  .availableSearchInput::placeholder {
    font-size: calc(12px * 0.9 * 1.2);
  }
}

/*
 * ~1080p კლასის დესკტოპი: საძიებო ველები −20% დანარჩენი დესკტოპის ზომის მიმართ.
 * Windows სკეილზე CSS სიგანე ხშირად ≠ 1920 — ვიჭერთ ფართო, დაბალი viewport-ს.
 */
@media (min-width: 861px) and (min-width: 1400px) and (max-width: 2200px) and (max-height: 1080px) {
  .availableSearchInput {
    font-size: calc(12px * 1.2 * 0.8);
  }

  .availableSearchInput::placeholder {
    font-size: calc(12px * 0.9 * 1.2 * 0.8);
  }
}

.availableFilterSelect option {
  background: var(--filter-option-bg);
  color: var(--filter-control-fg);
}

.availableFilterSelect:focus,
.availableSearchInput:focus {
  outline: none;
  border-color: rgba(77, 208, 225, 0.7);
  box-shadow: 0 0 0 2px rgba(77, 208, 225, 0.18);
}

.availableUnitCard.is-selected {
  background: rgba(255, 255, 0, 0.14);
  border-color: rgba(255, 255, 0, 0.55);
}

.favoritesList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(77, 208, 225, 0.35) rgba(255, 255, 255, 0.04);
}

.favoritesList::-webkit-scrollbar {
  width: 7px;
}

.favoritesList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.favoritesList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(77, 208, 225, 0.55), rgba(26, 136, 255, 0.5));
  border-radius: 999px;
}

.favoritesList::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(77, 208, 225, 0.7), rgba(26, 136, 255, 0.62));
}

.favoritesList li {
  list-style: none;
}

.favoritesList li.favoritesEmptyMsg {
  color: var(--favorites-title-color);
  font-size: 13px;
  font-family: var(--font-geo);
  line-height: 1.45;
  text-align: center;
  padding: 6px 8px 10px;
}

.favoriteCard {
  border: 1px solid var(--border-ui-mid);
  border-radius: 10px;
  background: var(--surface-mute-4);
  padding: calc(8px * 0.85);
  display: grid;
  gap: calc(8px * 0.85);
}

.favoriteCard.is-selected {
  background: rgba(255, 255, 0, 0.14);
  border-color: rgba(255, 255, 0, 0.55);
}

.favoriteCard.availableUnitCard {
  position: relative;
}

.favoriteMetaRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * 0.85);
}

.availableUnitIndex {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 2.75em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-ui-mid);
  background: rgba(16, 20, 30, 0.78);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-avant);
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  pointer-events: none;
}

/* ფავორიტის ბარათი: გეგმა −8% შემდეგ −15% (0.92×0.85); ჩარჩო padding/gap −15% */
.favoriteThumbLarge {
  width: 100%;
  max-height: calc(180px * 0.92 * 0.85);
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border-ui-mid);
  background: var(--surface-mute-4);
}

.favoriteThumbLarge--deferred {
  min-height: calc(140px * 0.92 * 0.85);
  object-fit: contain;
}

.favoriteRow a,
.favoriteRow span {
  color: var(--favorite-btn-color);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favoriteRow a:hover {
  text-decoration: underline;
}

.favoriteOpenBtn {
  border: 0;
  background: transparent;
  color: var(--favorite-btn-color);
  text-align: left;
  cursor: pointer;
  padding: 0;
  line-height: 1.3;
  flex: 1 1 auto;
  font-size: 14px;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
  white-space: pre-line;
}

.availableUnitAreaLine {
  color: var(--unit-title-color);
  font-weight: 700;
}

.availableUnitAreaPrefix {
  color: var(--favorite-btn-color);
  font-weight: 400;
}

.favoriteOpenBtn:hover {
  text-decoration: underline;
}

.favoriteOpenBtn:disabled {
  opacity: 0.55;
  cursor: default;
  text-decoration: none;
}

.favoriteRemoveBtn {
  border: 1px solid var(--border-ui-input);
  background: var(--surface-mute-2);
  color: #ff8da0;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 auto;
}

.favoriteRemoveBtn:hover {
  border-color: rgba(255, 77, 106, 0.6);
  background: rgba(255, 77, 106, 0.14);
  color: #ff4d6a;
}

.favModal {
  position: fixed;
  inset: 0;
  background: var(--modal-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--motion-modal) ease,
    visibility 0ms linear var(--motion-modal);
}

.favModal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--motion-modal) ease,
    visibility 0ms linear 0ms;
}

.favModal.is-open.is-overlay-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0ms linear 0ms;
}

.favModal.is-open.is-overlay-closing .favModalCard {
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.32s var(--motion-modal-ease),
    opacity 0.26s ease;
}

.siteAlert {
  position: fixed;
  inset: 0;
  background: var(--site-alert-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 85;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--motion-modal) ease,
    visibility 0ms linear var(--motion-modal);
}

.siteAlert.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--motion-modal) ease,
    visibility 0ms linear 0ms;
}

.siteAlert.is-open.is-overlay-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0ms linear 0ms;
}

.siteAlert.is-open.is-overlay-closing .siteAlertCard {
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.3s var(--motion-modal-ease),
    opacity 0.24s ease;
}

.siteAlertCard {
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid var(--site-alert-card-border);
  background: var(--site-alert-card-bg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.4s var(--motion-modal-ease),
    opacity 0.32s ease;
}

.siteAlert.is-open .siteAlertCard {
  transform: none;
  opacity: 1;
}

.siteAlertCard h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: normal;
}

.siteAlertText {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: italic;
}

.siteAlertActions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.planImageModal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  background: var(--plan-modal-scrim);
  backdrop-filter: blur(3px);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--motion-modal) ease,
    visibility 0ms linear var(--motion-modal),
    backdrop-filter 0.35s ease;
}

.planImageModal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--motion-modal) ease,
    visibility 0ms linear 0ms,
    backdrop-filter 0.35s ease;
}

.planImageModal.is-open.is-overlay-closing {
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0ms linear 0ms,
    backdrop-filter 0.28s ease;
}

.planImageModal.is-open.is-overlay-closing .planImageModalCard {
  transform: translateY(18px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.34s var(--motion-modal-ease),
    opacity 0.28s ease;
}

.planImageModal.is-open.is-fullscreen.is-overlay-closing .planImageModalCard {
  transform: scale(0.92);
  opacity: 0;
}

/** ხელს უშლის გვერდის სქროლს fullscreen მოდალის დროს (100vh overflow) */
html.planImageModalFs,
html.planImageModalFs body {
  overflow: hidden;
  height: 100%;
}

.planImageModal.is-fullscreen {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  overscroll-behavior: contain;
}

.planImageModalCard {
  position: relative;
  width: min(1100px, 92vw);
  max-height: 88vh;
  border-radius: 12px;
  border: 1px solid var(--border-ui);
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
  color-scheme: light;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.965);
  opacity: 0;
  transition:
    transform 0.42s var(--motion-modal-ease),
    opacity 0.34s ease;
}

.planImageModal.is-open .planImageModalCard {
  transform: none;
  opacity: 1;
}

.planImageModal.is-fullscreen .planImageModalCard {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  border-radius: 0;
  border: 0;
  transform: none;
  opacity: 1;
}

.planImageModal.is-fullscreen .planImageModalHead {
  flex: 0 0 auto;
}

.planImageModalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-ui-mid);
}

.planImageModalHead h3 {
  margin: 0;
  font-size: 16px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: normal;
  color: var(--unit-title-color);
  text-shadow: var(--unit-title-shadow);
}

/* მოდალის ღილაკები: ყოველთვის ღია ტონი (საიტის მუქი თემის --close-btn-ს არ ვიყენებთ — არ „იჩაქრება“) */
.planImageModalClose {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(26, 39, 56, 0.22);
  background: #e8eaef;
  color: #1a2738;
  cursor: pointer;
}

.planImageModalClose:hover {
  border-color: rgba(77, 208, 225, 0.55);
}

.planImageModalBody {
  position: relative;
  min-height: 320px;
  max-height: calc(88vh - 52px);
  overflow: auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planImageModal.is-fullscreen .planImageModalBody {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.planImageModalBody.can-pan {
  cursor: grab;
}

.planImageModalBody.is-panning {
  cursor: grabbing;
}

.planImageModalBody img {
  max-width: 100%;
  max-height: calc(88vh - 76px);
  transform-origin: center center;
  transform: scale(1);
  transition: transform 120ms ease-out;
  user-select: none;
  -webkit-user-drag: none;
  cursor: inherit;
}

.planImageModal.is-fullscreen .planImageModalBody img {
  max-height: 100%;
}

.planImageModalFullscreen {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(26, 39, 56, 0.22);
  background: #e8eaef;
  color: #1a2738;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.planImageModalActions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  align-items: center;
}

.planImageModalActions .planImageModalFullscreen {
  position: static;
  right: auto;
  bottom: auto;
}

.planImageModalTour360 {
  padding: 0 12px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(26, 39, 56, 0.22);
  background: #e8eaef;
  color: #1a2738;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-avant-alt);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.planImageModalTour360:hover {
  border-color: rgba(77, 208, 225, 0.65);
}

.planImageModalFullscreen:hover {
  border-color: rgba(77, 208, 225, 0.65);
}

.favModalCard {
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid var(--border-ui-mid);
  background: var(--panel-bg-alt);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.4s var(--motion-modal-ease),
    opacity 0.32s ease;
}

.favModal.is-open .favModalCard {
  transform: none;
  opacity: 1;
}

.favModalCard h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: normal;
}

.favModalText {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: italic;
}

.favEmailInput {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-ui-input);
  background: var(--input-bg-soft);
  color: var(--input-text-plain);
  padding: 0 10px;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
}

.favModalActions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.copyToast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: var(--copy-toast-bg);
  border: 1px solid var(--copy-toast-border);
  color: var(--copy-toast-fg);
  font-size: 12px;
  font-family: var(--font-avant-alt);
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 80;
}

.copyToast.is-visible {
  opacity: 1;
}

/* მობილური / ტაბლეტი / touch: სრული ეკრანის ღილაკი — ქვედა მარჯვენა, უცისფერო accent-ჩარჩო */
/* მობილურ ბრაუზერში (და ზოგადად touch ზონაში) აღარ ვაჩვენებთ — ინლაინ display:flex აღარ უნდა იყოს HTML-ში */
.mobilePageFullscreenFab {
  display: none !important;
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  left: auto;
  top: auto;
  transform: none;
  /* ქვემოთ pageLoadOverlay (99999) დარჩეს; დანარჩენ UI-ზე მაღლა */
  z-index: 99990;
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--border-ui-mid);
  background: var(--panel-bg);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  box-shadow: var(--shadow-card);
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  align-items: center;
  justify-content: center;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobilePageFullscreenFab:active {
  transform: scale(0.96);
}

.mobilePageFullscreenFab:focus-visible {
  outline: 2px solid var(--border-ui-strong);
  outline-offset: 2px;
}

@media print {
  .mobilePageFullscreenFab {
    display: none !important;
  }
}

/*
 * Fullscreen API რომ არ ირთვება (განსაკუთრებით მობილური): ფანტომი რეჟიმი + viewer-ის სიმაღლის გაზრდა.
 */
html.faux-page-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
  min-height: -webkit-fill-available !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  --viewer-iframe-height: min(82dvh, 720px) !important;
}

html.faux-page-fullscreen body {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

html.faux-page-fullscreen .siteHeader {
  display: none !important;
}

html.faux-page-fullscreen .mobilePageFullscreenFab {
  display: none !important;
}

@media (max-width: 860px) {
  html.faux-page-fullscreen {
    --tour-main-viewer-iframe-height: min(
      max(200px, calc((100vw - 20px) * 9 / 16)),
      min(82dvh, 720px)
    ) !important;
  }
}

/* tour360-patch: host-mobile-responsive — სრული ბლოკი: tools/host-mobile-responsive-patch.css (PatchExports) */
@media (max-width: 860px) {
  :root {
    --tour-main-viewer-iframe-height: min(
      max(158px, calc((100vw - var(--tour-landscape-page-gutter) - 48px) * 9 / 16)),
      min(70vh, 620px)
    );
    /* ფავორიტების პანელი: სიმაღლე გასაყიდის + ეს (მობილური) */
    --tour-mobile-favorites-extra-height: 24px;
    /* გვერდითი პანელი (ფავორიტები + არჩეული ბინა): სიმაღლის მულტიპლიკატორი */
    --tour-mobile-favorites-side-panel-height-mult: 1.2;
    /* მხოლოდ Pano2VR #tourLayout ფავორიტების პანელი +10% */
    --tour-mobile-pano-favorites-panel-height-mult: 1.1;
    /* ვერტიკალური პორტრეტი: გვერდითი პანელის max სიმაღლე (ძველი ფიქსირებული) + ფავორიტების სიისთვის „ზემოთ“ ფიქსირებული ბლოკების სიმაღლის გამოკლება */
    --tour-mobile-object-side-panel-max-h: calc(
      (var(--viewer-iframe-height) + var(--tour-mobile-favorites-extra-height)) *
        var(--tour-mobile-favorites-side-panel-height-mult)
    );
    --tour-mobile-pano-side-panel-max-h: calc(
      (var(--viewer-iframe-height) + var(--tour-mobile-favorites-extra-height)) *
        var(--tour-mobile-favorites-side-panel-height-mult) *
        var(--tour-mobile-pano-favorites-panel-height-mult)
    );
    --tour-mobile-fav-chrome-w-unit: 330px;
    --tour-mobile-fav-chrome-wo-unit: 150px;
  }

  .hero {
    padding-top: 28px;
  }

  .heroActions {
    flex-wrap: wrap;
    gap: 18px;
  }

  .heroQuickLinks {
    gap: clamp(10px, 3.2vw, 56px);
  }

  .siteHeader {
    position: static;
  }

  .siteHeader.siteHeader--apartments,
  .siteHeader.siteHeader--main {
    position: sticky;
    top: 0;
    z-index: 25;
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* მთავარი გვერდი, მობილური: ლოგო მარცხნივ, 3D/360 + ძიება მარჯვნივ (უკან ღილაკი არ არის) */
  .siteHeader--main .headerInner {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .siteHeader--main .headerEnd {
    margin-left: auto;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .siteHeader--main .brand {
    min-width: 0;
  }

  .siteHeader--main .nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(8px, 2vw, 18px);
  }

  .siteHeader--main .headerSearch {
    flex: 1 1 100px;
    min-width: 0;
    max-width: min(240px, 48vw);
  }

  .siteHeader--apartments .headerInner {
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .siteHeader--apartments .headerEnd {
    margin-left: auto;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .siteHeader--apartments .brand {
    min-width: 0;
  }

  .siteHeader--apartments .nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(8px, 2vw, 18px);
  }

  .tourLayout.is-panel-open .viewerFrameMain {
    transform: none;
  }

  .tourLayout.is-panel-open {
    transform: none;
  }

  #objectTourLayout.is-panel-open {
    transform: none;
  }

  /* მხოლოდ მთავარი 3D ფანჯარა: ~16∶9 სიგანესთან. გასაყიდი ბინების პანელი იყენებს :root-ის --viewer-iframe-height-ს (min(70vh, 620px)), როგორც დესკტოპზე. */
  #objectTourLayout .viewerFrameMain {
    min-height: 0;
  }

  #objectTourLayout .viewerFrameMain iframe,
  #objectTourLayout .viewerFrameDetail iframe {
    height: var(--tour-main-viewer-iframe-height);
  }

  /* Object2VR 3D: მობილურზე ერთ სვეტში — გასაყიდი სია ზემოთ, მთავარი ფანჯარა ქვემოთ */
  #objectTourLayout,
  #objectTourLayout.is-panel-open,
  #objectTourLayout.is-panel-open.is-flat-project-open {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }

  #objectTourLayout .unitPanelAvailable,
  #objectTourLayout.is-panel-open .unitPanelAvailable.unitPanel {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    order: 2;
  }

  #objectTourLayout .viewerFrameMain,
  #objectTourLayout.is-panel-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open .viewerFrameMain {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    order: 10;
  }

  #objectTourLayout #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open #objectUnitLinkWrap {
    grid-column: 1;
    grid-row: auto;
    order: 15;
  }

  #objectTourLayout #objectFlatProjectWrap,
  #objectTourLayout.is-flat-project-open:not(.is-panel-open) #objectFlatProjectWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open #objectFlatProjectWrap {
    grid-column: 1;
    grid-row: auto;
    order: 1;
    justify-self: center;
    width: min(calc(var(--object-available-panel-width) * 1.15), 100%);
    max-width: 100%;
    box-sizing: border-box;
  }

  /* ჩარჩო სიმაღლე: 0.739×0.9 (−10% კიდე); შიდა scale უცვლელი */
  #objectTourLayout #objectFlatProjectWrap .viewerFrame.viewerFrameProject {
    min-height: 0;
    aspect-ratio: 1 / 0.665;
  }

  /* შიგთავსი: სიგანე −10% (X×0.9), სიმაღლე +10% (Y×1.1) წინა scale(0.851, 0.97865)-ზე */
  #objectTourLayout #objectFlatProjectWrap .viewerFrame.viewerFrameProject iframe {
    position: absolute;
    top: 34px;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    transform: scale(0.7659, 1.0765);
    transform-origin: center center;
  }

  #objectTourLayout #objectUnitSidePanel,
  #objectTourLayout.is-panel-open .unitPanel:not(.unitPanelAvailable),
  #objectTourLayout.is-panel-open.is-flat-project-open .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1;
    grid-row: auto;
    order: 20;
    width: var(--object-available-panel-width);
    max-width: 100%;
    justify-self: center;
    box-sizing: border-box;
  }

  /* მობილურზე: ბინის არჩევისას is-detail-open დესკტოპზე აორმაგებს ყველა .unitPanel-ს (გასაყიდიც შედის) — გასაყიდეს ვტოვებთ საწყის სიმაღლეს */
  #objectTourLayout.is-panel-open.is-detail-open .unitPanelAvailable,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanelAvailable {
    height: var(--viewer-iframe-height);
    max-height: var(--viewer-iframe-height);
  }

  #objectTourLayout.is-panel-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanel:not(.unitPanelAvailable) {
    height: calc(
      (var(--viewer-iframe-height) + var(--tour-mobile-favorites-extra-height)) *
        var(--tour-mobile-favorites-side-panel-height-mult)
    );
    max-height: calc(
      (var(--viewer-iframe-height) + var(--tour-mobile-favorites-extra-height)) *
        var(--tour-mobile-favorites-side-panel-height-mult)
    );
  }

  /* Pano 360: მობილურზე ერთ სვეტში — გასაყიდი ბინების სია ზემოთ, მთავარი ფანჯარა ქვემოთ; iframe ~16∶9 როგორც 3D-ზე */
  #tourLayout,
  #tourLayout.is-panel-open,
  #tourLayout.is-panel-open.is-unit-side-open,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }

  #tourLayout .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open .unitPanelAvailable.unitPanel {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    order: 2;
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-detail-open:not(.is-unit-side-open) .unitPanelAvailable {
    height: var(--viewer-iframe-height);
    max-height: var(--viewer-iframe-height);
  }

  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open
    .unitPanel:not(.unitPanelAvailable) {
    height: calc(
      (var(--viewer-iframe-height) + var(--tour-mobile-favorites-extra-height)) *
        var(--tour-mobile-favorites-side-panel-height-mult) *
        var(--tour-mobile-pano-favorites-panel-height-mult)
    );
    max-height: calc(
      (var(--viewer-iframe-height) + var(--tour-mobile-favorites-extra-height)) *
        var(--tour-mobile-favorites-side-panel-height-mult) *
        var(--tour-mobile-pano-favorites-panel-height-mult)
    );
  }

  #tourLayout .viewerFrameMain,
  #tourLayout.is-panel-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-flat-project-open .viewerFrameMain {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    order: 10;
  }

  #tourLayout #panoUnitLinkWrap,
  #tourLayout.is-panel-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open #panoUnitLinkWrap {
    grid-column: 1;
    grid-row: auto;
    order: 15;
  }

  /* Pano2VR ფლეტი: იგივე ზომები/ჩარჩო/შიგთავსი რაც Object2VR #objectFlatProjectWrap */
  #tourLayout #panoFlatProjectWrap,
  #tourLayout.is-flat-project-open:not(.is-panel-open) #panoFlatProjectWrap,
  #tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #panoFlatProjectWrap {
    grid-column: 1;
    grid-row: auto;
    order: 1;
    justify-self: center;
    width: min(calc(var(--pano-available-panel-width) * 1.15), 100%);
    max-width: 100%;
    box-sizing: border-box;
  }

  #tourLayout #panoFlatProjectWrap .viewerFrame.viewerFrameProject {
    min-height: 0;
    aspect-ratio: 1 / 0.665;
  }

  #tourLayout #panoFlatProjectWrap .viewerFrame.viewerFrameProject iframe {
    position: absolute;
    top: 34px;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    transform: scale(0.7659, 1.0765);
    transform-origin: center center;
  }

  #tourLayout #unitSidePanel,
  #tourLayout.is-panel-open.is-unit-side-open .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1;
    grid-row: auto;
    order: 20;
    width: var(--pano-available-panel-width);
    max-width: 100%;
    justify-self: center;
    box-sizing: border-box;
  }

  /*
   * ფავორიტების პანელი (≤860): ზედა ბლოკი (სათაური, არჩეული ბინა, ქმედებები) არ იკუმშება;
   * დარჩენილი სიმაღლე მიდის favoritesBlock-ში — სქროლი სიაში (არა ფიქსირებული „chrome“ პიქსელით).
   */
  #objectUnitSidePanel.unitPanel .unitPanelHead,
  #objectUnitSidePanel.unitPanel .unitSelectedCard,
  #objectUnitSidePanel.unitPanel .unitActions,
  #objectUnitSidePanel.unitPanel .unitPanelToggle,
  #unitSidePanel.unitPanel .unitPanelHead,
  #unitSidePanel.unitPanel .unitSelectedCard,
  #unitSidePanel.unitPanel .unitActions,
  #unitSidePanel.unitPanel .unitPanelToggle {
    flex-shrink: 0;
  }

  #objectUnitSidePanel.unitPanel .favoritesBlock .favoritesTitle,
  #unitSidePanel.unitPanel .favoritesBlock .favoritesTitle {
    flex-shrink: 0;
  }

  #objectTourLayout.is-panel-open #objectUnitSidePanel .favoritesBlock {
    flex: 1 1 auto;
    flex-grow: 1;
    min-height: 0;
    overflow: hidden;
  }

  #objectTourLayout.is-panel-open #objectUnitSidePanel .favoritesList {
    flex: 1 1 auto;
    flex-grow: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }

  #tourLayout.is-panel-open #unitSidePanel .favoritesBlock {
    flex: 1 1 auto;
    flex-grow: 1;
    min-height: 0;
    overflow: hidden;
  }

  #tourLayout.is-panel-open #unitSidePanel .favoritesList {
    flex: 1 1 auto;
    flex-grow: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }

  /* არჩეული გეგმა: სრული სიგანე ბარათში, რომ ჩარჩოში object-fit-ით მოექცეს */
  #objectUnitSidePanel.is-unit-selected .unitSelectedCard {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #objectUnitSidePanel.is-unit-selected .unitPlanImage {
    width: 100%;
    max-width: 100%;
  }

  #unitSidePanel.is-unit-selected .unitSelectedCard {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #unitSidePanel.is-unit-selected .unitPlanImage {
    width: 100%;
    max-width: 100%;
  }

  /*
   * ფავორიტების პანელი დეტალის გარეშე (ჩატვირთვიდან): იგივე flex/max-height რაც is-detail-open + პორტრეტის ბლოკში,
   * რათა დესკტოპის .unitPanel სიმაღლე (viewer-iframe) არ გადაფაროს.
   */
  #objectTourLayout.is-panel-open:not(.is-detail-open) #objectUnitSidePanel.unitPanel,
  #objectTourLayout.is-panel-open.is-flat-project-open:not(.is-detail-open) #objectUnitSidePanel.unitPanel {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: var(--tour-mobile-object-side-panel-max-h);
    min-height: 0;
    overflow: hidden;
  }

  #tourLayout.is-panel-open:not(.is-detail-open) #unitSidePanel.unitPanel,
  #tourLayout.is-panel-open.is-unit-side-open:not(.is-detail-open) #unitSidePanel.unitPanel,
  #tourLayout.is-panel-open.is-flat-project-open:not(.is-detail-open) #unitSidePanel.unitPanel,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open:not(.is-detail-open) #unitSidePanel.unitPanel {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: var(--tour-mobile-pano-side-panel-max-h);
    min-height: 0;
    overflow: hidden;
  }

  #tourLayout .viewerFrameMain iframe,
  #tourLayout .viewerFrameDetail iframe {
    height: var(--tour-main-viewer-iframe-height);
  }

  .unitPanel {
    width: min(320px, 44vw);
  }
}

/*
 * მობილური ჰორიზონტალი: ზედა ჰედერი აღარ არის sticky — სქროლით გაყვება გვერდს.
 * max-height — დიდი სიმაღლის ლანდშაფტი (ლაპტოპი/მონიტორი) არ იჭერა.
 */
@media (orientation: landscape) and (max-width: 1200px) and (max-height: 550px) {
  .siteHeader,
  .siteHeader.siteHeader--apartments,
  .siteHeader.siteHeader--main {
    position: static !important;
    top: auto;
    padding-top: env(safe-area-inset-top, 0px);
  }
}

@media (max-width: 640px) {
  .headerInner {
    flex-direction: column;
    align-items: flex-start;
  }

  .siteHeader--apartments .headerInner,
  .siteHeader--main .headerInner {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 0 8px;
  }

  .nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .siteHeader--apartments .nav,
  .siteHeader--main .nav {
    width: auto;
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .headerSearch {
    max-width: none;
    order: 1;
  }

  .siteHeader--apartments .headerSearch,
  .siteHeader--main .headerSearch {
    order: unset;
    flex: 1 1 90px;
    min-width: 0;
    max-width: min(200px, 46vw);
  }

  .nav > a[href="#threeD"] {
    order: 0;
    align-self: flex-start;
  }

  .siteHeader--apartments .nav > a,
  .siteHeader--main .nav > a {
    order: unset;
    align-self: unset;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .viewerFrame iframe {
    min-height: 280px;
  }

  #objectTourLayout .viewerFrameMain iframe,
  #objectTourLayout .viewerFrameDetail iframe,
  #tourLayout .viewerFrameMain iframe,
  #tourLayout .viewerFrameDetail iframe {
    min-height: 0;
  }

  .viewerFrameDetail {
    min-height: 280px;
  }

  #objectTourLayout .viewerFrameDetail,
  #tourLayout .viewerFrameDetail {
    min-height: 0;
  }

  .tourLayout.is-panel-open .viewerFrameMain {
    transform: none;
  }

  .tourLayout.is-panel-open {
    transform: none;
  }

  #objectTourLayout .unitPanel {
    right: auto;
    left: auto;
  }

  #objectTourLayout.is-panel-open {
    grid-template-columns: minmax(0, 1fr);
  }

  #objectTourLayout.is-panel-open .unitPanel,
  #objectTourLayout.is-panel-open .viewerFrameMain,
  #objectTourLayout.is-panel-open #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open #objectFlatProjectWrap {
    grid-column: 1;
    grid-row: auto;
  }

  .unitPanel {
    position: static;
    width: 100%;
    margin-top: 10px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
  }

  .tourLayout.is-panel-open .unitPanel {
    display: block;
  }

  #objectTourLayout {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  #objectTourLayout .unitPanelAvailable {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }

  #objectTourLayout.is-panel-open .unitPanel:not(.unitPanelAvailable) {
    justify-self: center;
  }

  #objectTourLayout .viewerFrameMain {
    grid-column: 1;
    grid-row: auto;
  }

  #objectTourLayout #objectUnitLinkWrap {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  #objectTourLayout.is-flat-project-open:not(.is-panel-open) #objectFlatProjectWrap {
    grid-column: 1;
  }

  #tourLayout {
    margin-left: 0;
    width: 100%;
  }

  #tour .sectionHead--tour {
    margin-left: 0;
  }

  .siteSkyline {
    height: min(18vh, 150px);
  }

  .siteSkylineBetween {
    height: min(18vh, 150px);
  }

  #tourLayout.is-panel-open {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin-left: 0;
  }

  #tourLayout.is-panel-open .unitPanel,
  #tourLayout.is-panel-open .viewerFrameMain,
  #tourLayout.is-panel-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open #panoFlatProjectWrap {
    grid-column: 1;
    grid-row: auto;
  }

  #tourLayout.is-panel-open .unitPanel.unitPanelAvailable,
  #tourLayout.is-panel-open .unitPanel:not(.unitPanelAvailable) {
    justify-self: center;
  }

  .heroQuickLinks {
    margin-left: 0;
    width: 100%;
    gap: clamp(6px, 2vw, 16px);
    justify-content: flex-start;
    flex-wrap: nowrap;
    container-type: inline-size;
    container-name: hero-quick-tour;
  }

  .heroActions {
    flex-wrap: wrap;
    gap: 14px;
  }

  .heroPrimaryLinks {
    width: 100%;
    max-width: 240px;
    margin-top: 0;
  }

  /* ორი ტურის ღილაკი: სიგანესთან ერთად სიმაღლე, პადინგი და ტექსტიც პროპორციულად (არა მხოლოდ ჰორიზონტალური შეკუმშვა) */
  .quickTourBtn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
    min-height: clamp(50px, 19vw, 72px);
    padding: clamp(6px, 2.2vw, 12px) clamp(7px, 2.6vw, 16px);
    border-radius: clamp(10px, 3.4vw, 16px);
    box-shadow:
      0 clamp(4px, 1.8vw, 9px) clamp(8px, 2.8vw, 22px) rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  html[data-theme="light"] .quickTourBtn {
    box-shadow:
      0 clamp(5px, 2vw, 10px) clamp(9px, 2.8vw, 22px) rgba(37, 62, 92, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.62);
  }

  .quickTourBtnTitle {
    line-height: 1.14;
    letter-spacing: 0.02em;
  }

  .quickTourBtnTitle--avazam {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: 0.15em;
    row-gap: 0.12em;
    max-width: 100%;
  }

  .quickTourBtnTitle--avazam .quickTourBtnTitleMain {
    font-size: clamp(14px, 4.6vw, 30px);
  }

  .quickTourBtnTitle--avazam .quickTourBtnTitleMinor {
    font-size: clamp(11px, 3.6vw, 24px);
    margin-left: clamp(2px, 0.7vw, 4px);
  }

  .quickTourBtnSub {
    margin-top: clamp(2px, 0.9vw, 4px);
    line-height: 1.28;
  }

  .quickTourBtnSub--avazam {
    font-size: clamp(9px, 2.9vw, 19px);
    letter-spacing: 0.025em;
    word-spacing: 0.05em;
  }
}

/*
 * ვერტიკალური მობილური: ბინის გახსნისას (is-detail-open) — გასაყიდი → მთავარი → დეტალი → 3D გეგმა → გვერდითი (ფავორიტები ქვედა).
 * max-aspect-ratio: 1/1 = width≤height (orientation: portrait-ზე საიმედო DevTools/Android-ზეც).
 * is-detail-open + დამატებითი კლასები აჭარბებს 860px-ის is-flat-project-open grid-row:auto-ს.
 */
@media (max-width: 860px) and (max-aspect-ratio: 1/1) {
  #objectTourLayout.is-panel-open.is-detail-open .unitPanelAvailable,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanelAvailable {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  #objectTourLayout.is-panel-open.is-detail-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameMain {
    grid-column: 1;
    grid-row: 2;
  }

  #objectTourLayout.is-panel-open.is-detail-open #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open #objectUnitLinkWrap {
    grid-column: 1;
    grid-row: 3;
  }

  #objectTourLayout.is-panel-open.is-detail-open #objectFlatProjectWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open #objectFlatProjectWrap {
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
    width: min(calc(var(--object-available-panel-width) * 1.15), 100%);
    max-width: 100%;
    box-sizing: border-box;
  }

  #objectTourLayout.is-panel-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1;
    grid-row: 5;
    justify-self: center;
  }

  #tourLayout.is-panel-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .unitPanelAvailable {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  #tourLayout.is-panel-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .viewerFrameMain {
    grid-column: 1;
    grid-row: 2;
  }

  #tourLayout.is-panel-open.is-detail-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoUnitLinkWrap {
    grid-column: 1;
    grid-row: 3;
  }

  #tourLayout.is-panel-open.is-detail-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap {
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
    width: min(calc(var(--pano-available-panel-width) * 1.15), 100%);
    max-width: 100%;
    box-sizing: border-box;
  }

  #tourLayout.is-panel-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open
    .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1;
    grid-row: 5;
    justify-self: center;
  }

  /*
   * პორტრეტი + დეტალი ღია: პანელის max-სიმაღლე; favoritesBlock/სიის flex იგივეა რაც ზოგად @media (max-width: 860px)-ში.
   */
  #objectTourLayout.is-panel-open.is-detail-open #objectUnitSidePanel.unitPanel,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open #objectUnitSidePanel.unitPanel {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: var(--tour-mobile-object-side-panel-max-h);
    min-height: 0;
    overflow: hidden;
  }

  #tourLayout.is-panel-open.is-detail-open #unitSidePanel.unitPanel,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open #unitSidePanel.unitPanel,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open #unitSidePanel.unitPanel,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #unitSidePanel.unitPanel {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: var(--tour-mobile-pano-side-panel-max-h);
    min-height: 0;
    overflow: hidden;
  }
}

/* მობილური ლანდშაფტი: მარჯვნივ სქროლის ზონა (~9 სმ max, clamp; წინა 15 სმ-ის ~60%) */
@media (max-width: 860px) and (orientation: landscape) {
  :root {
    --tour-landscape-page-gutter: clamp(2.1rem, 9cm, 24vw);
    /* ლანდშაფტში vh = ვიწრო კante; გასაყიდი/გვერდითი პანელების სიმაღლე პორტრეტის min(70vh,620)-ის მსგავსად — იგივე ფიზიკური განზომილება ≈ 70vw */
    --viewer-iframe-height: min(70vw, 620px);
    /* Object2VR მთავარი ფანჯარა ლანდშაფტზე (წინა mult × 0.95 ≈ −5%) */
    --object-mobile-main-viewer-mult: 1.42025;
    /* ფავორიტების გვერდითი პანელი: ბაზაზე ×4 (+100% ორჯერ) */
    --object-landscape-favorites-panel-height-mult: 4;
    /* 3D გეგმის ფანჯარა ლანდშაფტზე: სიგანე −40% (დარჩენილი წილი 0.6) */
    --object-landscape-flat-project-width-mult: 0.6;
    /* იგივე ფანჯრის სიმაღლის ზედა ზღვარი: +15% */
    --object-landscape-flat-project-max-height-mult: 1.15;
  }

  #objectTourLayout,
  #objectTourLayout.is-panel-open,
  #objectTourLayout.is-panel-open.is-flat-project-open,
  #tourLayout.is-panel-open,
  #tourLayout.is-panel-open.is-unit-side-open,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open,
  #tourLayout.is-panel-open.is-flat-project-open {
    justify-items: center;
  }

  #objectTourLayout {
    overflow-x: visible;
    --object-available-panel-width: 600px;
  }

  #tourLayout {
    overflow-x: visible;
    --pano-available-panel-width: 600px;
  }

  #objectTourLayout .unitPanelAvailable,
  #objectTourLayout.is-panel-open .unitPanelAvailable.unitPanel {
    width: var(--object-available-panel-width);
    max-width: min(100%, var(--object-available-panel-width));
  }

  #tourLayout .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open .unitPanelAvailable.unitPanel {
    width: var(--pano-available-panel-width);
    max-width: min(100%, var(--pano-available-panel-width));
  }

  /* გასაყიდი: ცენტრი (ID + margin auto — grid-ში საიმედო) */
  #objectTourLayout #objectAvailablePanel,
  #tourLayout #panoAvailablePanel {
    justify-self: center;
    margin-inline: auto;
    min-width: 0;
    box-sizing: border-box;
  }

  #objectAvailableList.favoritesList,
  #panoAvailableList.favoritesList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #objectAvailableList li.availableUnitsEmptyMsg,
  #panoAvailableList li.availableUnitsEmptyMsg {
    grid-column: 1 / -1;
  }

  #objectFavoritesList.favoritesList,
  #favoritesList.favoritesList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #objectFavoritesList li:not(:has(.favoriteCard)),
  #favoritesList li:not(:has(.favoriteCard)) {
    grid-column: 1 / -1;
  }

  #objectTourLayout #objectFlatProjectWrap,
  #objectTourLayout.is-flat-project-open:not(.is-panel-open) #objectFlatProjectWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open #objectFlatProjectWrap {
    width: min(
      calc(
        var(--object-available-panel-width) * 1.15 *
          var(--object-landscape-flat-project-width-mult)
      ),
      100%
    );
  }

  #tourLayout #panoFlatProjectWrap,
  #tourLayout.is-flat-project-open:not(.is-panel-open) #panoFlatProjectWrap,
  #tourLayout.is-panel-open:not(.is-unit-side-open).is-flat-project-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #panoFlatProjectWrap {
    width: min(
      calc(
        var(--pano-available-panel-width) * 1.15 *
          var(--object-landscape-flat-project-width-mult)
      ),
      100%
    );
  }

  #objectTourLayout #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open #objectUnitLinkWrap,
  #tourLayout #panoUnitLinkWrap,
  #tourLayout.is-panel-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-flat-project-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open #panoUnitLinkWrap {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
  }

  #objectTourLayout .viewerFrameMain iframe,
  #tourLayout .viewerFrameMain iframe {
    height: calc(
      var(--tour-main-viewer-iframe-height) * var(--object-mobile-main-viewer-mult)
    );
  }

  #objectTourLayout .viewerFrameMain,
  #objectTourLayout.is-panel-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open .viewerFrameMain,
  #tourLayout .viewerFrameMain,
  #tourLayout.is-panel-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-flat-project-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open .viewerFrameMain {
    width: calc(
      var(--tour-main-viewer-iframe-height) * 16 / 9 *
        var(--object-mobile-main-viewer-mult)
    );
    max-width: min(
      calc(100vw - 32px),
      calc(
        var(--tour-main-viewer-iframe-height) * 16 / 9 *
          var(--object-mobile-main-viewer-mult)
      )
    );
    justify-self: center;
    margin-left: clamp(20px, 6vw, 56px);
    box-sizing: border-box;
  }

  #objectTourLayout,
  #objectTourLayout.is-panel-open,
  #objectTourLayout.is-panel-open.is-flat-project-open,
  #tourLayout,
  #tourLayout.is-panel-open,
  #tourLayout.is-panel-open.is-unit-side-open,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open,
  #tourLayout.is-panel-open.is-flat-project-open {
    width: min(100%, calc(100vw - var(--tour-landscape-page-gutter)));
    max-width: calc(100vw - var(--tour-landscape-page-gutter));
    box-sizing: border-box;
  }

  /*
   * ლანდშაფტი + არჩეული ბინა — Object2VR და Pano2VR ერთნაირი რიგი:
   * გასაყიდი → მთავარი → დეტალი → (ღია გეგმისას) 3D გეგმა → ფავორიტების პანელი ქვემოთ.
   */
  #objectTourLayout.is-panel-open.is-detail-open:not(.is-flat-project-open),
  #tourLayout.is-panel-open.is-detail-open:not(.is-flat-project-open) {
    grid-template-columns: minmax(0, 1fr);
  }

  #objectTourLayout.is-panel-open.is-detail-open.is-flat-project-open,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open,
  #tourLayout.is-panel-open.is-detail-open.is-flat-project-open,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open.is-flat-project-open,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open {
    grid-template-columns: minmax(0, 1fr);
  }

  #objectTourLayout.is-panel-open.is-detail-open .unitPanelAvailable,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanelAvailable {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: var(--object-available-panel-width);
    max-width: min(100%, var(--object-available-panel-width));
  }

  #tourLayout.is-panel-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanelAvailable,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .unitPanelAvailable {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: var(--pano-available-panel-width);
    max-width: min(100%, var(--pano-available-panel-width));
  }

  #objectTourLayout.is-panel-open.is-detail-open .viewerFrameMain,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameMain,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .viewerFrameMain {
    grid-column: 1 / -1;
    grid-row: 2;
    width: calc(
      var(--tour-main-viewer-iframe-height) * 16 / 9 *
        var(--object-mobile-main-viewer-mult)
    );
    max-width: min(
      calc(100vw - 32px),
      calc(
        var(--tour-main-viewer-iframe-height) * 16 / 9 *
          var(--object-mobile-main-viewer-mult)
      )
    );
    justify-self: center;
    margin-left: clamp(20px, 6vw, 56px);
  }

  #objectTourLayout.is-panel-open.is-detail-open.is-flat-project-open #objectFlatProjectWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open #objectFlatProjectWrap {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: center;
    align-self: start;
    width: calc(
      var(--tour-main-viewer-iframe-height) * 16 / 9 *
        var(--object-mobile-main-viewer-mult) *
        var(--object-landscape-flat-project-width-mult)
    );
    max-width: min(
      calc(100vw - 32px),
      calc(
        var(--tour-main-viewer-iframe-height) * 16 / 9 *
          var(--object-mobile-main-viewer-mult) *
          var(--object-landscape-flat-project-width-mult)
      )
    );
    margin-left: clamp(20px, 6vw, 56px);
    min-height: 0;
    box-sizing: border-box;
  }

  #tourLayout.is-panel-open.is-detail-open.is-flat-project-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open.is-flat-project-open #panoFlatProjectWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: center;
    align-self: start;
    width: calc(
      var(--tour-main-viewer-iframe-height) * 16 / 9 *
        var(--object-mobile-main-viewer-mult) *
        var(--object-landscape-flat-project-width-mult)
    );
    max-width: min(
      calc(100vw - 32px),
      calc(
        var(--tour-main-viewer-iframe-height) * 16 / 9 *
          var(--object-mobile-main-viewer-mult) *
          var(--object-landscape-flat-project-width-mult)
      )
    );
    margin-left: clamp(20px, 6vw, 56px);
    min-height: 0;
    box-sizing: border-box;
  }

  #objectTourLayout.is-panel-open.is-detail-open.is-flat-project-open #objectFlatProjectWrap .viewerFrame.viewerFrameProject,
  #tourLayout.is-panel-open.is-detail-open.is-flat-project-open #panoFlatProjectWrap .viewerFrame.viewerFrameProject,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open.is-flat-project-open #panoFlatProjectWrap .viewerFrame.viewerFrameProject,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoFlatProjectWrap .viewerFrame.viewerFrameProject {
    max-height: min(
      calc(42vh * var(--object-landscape-flat-project-max-height-mult)),
      calc(300px * var(--object-landscape-flat-project-max-height-mult))
    );
  }

  /* ფავორიტები დეტალის გარეთ: ლანდშაფტზე იგივე max-height/სვეტი რაც is-detail-open-ზე (grid-row: auto — რიგი order-ით) */
  #objectTourLayout.is-panel-open:not(.is-detail-open):not(.is-flat-project-open) .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: auto;
    width: var(--object-side-panel-width);
    max-width: min(100%, var(--object-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #tourLayout.is-panel-open:not(.is-detail-open):not(.is-flat-project-open) .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open:not(.is-detail-open):not(.is-flat-project-open)
    .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: auto;
    width: var(--pano-side-panel-width);
    max-width: min(100%, var(--pano-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open:not(.is-detail-open) .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: auto;
    width: var(--object-side-panel-width);
    max-width: min(100%, var(--object-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #tourLayout.is-panel-open.is-flat-project-open:not(.is-detail-open) .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open:not(.is-detail-open) .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: auto;
    width: var(--pano-side-panel-width);
    max-width: min(100%, var(--pano-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #objectTourLayout.is-panel-open.is-detail-open:not(.is-flat-project-open) .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: 4;
    width: var(--object-side-panel-width);
    max-width: min(100%, var(--object-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #tourLayout.is-panel-open.is-detail-open:not(.is-flat-project-open) .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open:not(.is-flat-project-open)
    .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: 4;
    width: var(--pano-side-panel-width);
    max-width: min(100%, var(--pano-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: 5;
    width: var(--object-side-panel-width);
    max-width: min(100%, var(--object-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .unitPanel:not(.unitPanelAvailable),
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .unitPanel:not(.unitPanelAvailable) {
    grid-column: 1 / -1;
    grid-row: 5;
    width: var(--pano-side-panel-width);
    max-width: min(100%, var(--pano-side-panel-width));
    justify-self: center;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-height: min(
      calc(48vh * var(--object-landscape-favorites-panel-height-mult)),
      calc(340px * var(--object-landscape-favorites-panel-height-mult))
    );
    align-self: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #objectTourLayout.is-panel-open.is-detail-open:not(.is-flat-project-open) #objectUnitLinkWrap,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open #objectUnitLinkWrap,
  #tourLayout.is-panel-open.is-detail-open:not(.is-flat-project-open) #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open:not(.is-flat-project-open) #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open #panoUnitLinkWrap,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open #panoUnitLinkWrap {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
    width: calc(
      var(--tour-main-viewer-iframe-height) * 16 / 9 *
        var(--object-mobile-main-viewer-mult)
    );
    max-width: min(
      calc(100vw - 32px),
      calc(
        var(--tour-main-viewer-iframe-height) * 16 / 9 *
          var(--object-mobile-main-viewer-mult)
      )
    );
    margin-left: clamp(20px, 6vw, 56px);
    box-sizing: border-box;
  }

  #objectTourLayout.is-panel-open.is-detail-open .viewerFrameDetail iframe,
  #objectTourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameDetail iframe,
  #tourLayout.is-panel-open.is-detail-open .viewerFrameDetail iframe,
  #tourLayout.is-panel-open.is-unit-side-open.is-detail-open .viewerFrameDetail iframe,
  #tourLayout.is-panel-open.is-flat-project-open.is-detail-open .viewerFrameDetail iframe,
  #tourLayout.is-panel-open.is-unit-side-open.is-flat-project-open.is-detail-open .viewerFrameDetail iframe {
    height: calc(
      var(--tour-main-viewer-iframe-height) * var(--object-mobile-main-viewer-mult)
    );
  }
}

@supports (container-type: inline-size) {
  @media (max-width: 640px) {
    .quickTourBtnTitle--avazam .quickTourBtnTitleMain {
      font-size: clamp(13px, 10.5cqi, 30px);
    }

    .quickTourBtnTitle--avazam .quickTourBtnTitleMinor {
      font-size: clamp(10px, 8cqi, 24px);
      margin-left: clamp(2px, 1cqi, 4px);
    }

    .quickTourBtnSub--avazam {
      font-size: clamp(9px, 6.2cqi, 19px);
    }

    .quickTourBtn {
      min-height: clamp(50px, 19cqi, 72px);
      padding: clamp(6px, 2.2cqi, 12px) clamp(7px, 2.6cqi, 16px);
      border-radius: clamp(10px, 3.4cqi, 16px);
      box-shadow:
        0 clamp(4px, 1.8cqi, 9px) clamp(8px, 2.8cqi, 22px) rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    html[data-theme="light"] .quickTourBtn {
      box-shadow:
        0 clamp(5px, 2cqi, 10px) clamp(9px, 2.8cqi, 22px) rgba(37, 62, 92, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
    }
  }
}

/* prefers-reduced-motion ბლოკი შეგნებულად ამოღებულია,
   რომ ანიმაციები ყველა ბრაუზერზე ყოველთვის ჩანდეს. */

.apartmentsPage {
  min-height: 100vh;
}

#apartmentsSection.section.sectionAlt.apartmentsSection {
  position: relative;
  padding: 56px 0 min(36vh, 360px);
}

#apartmentsSection.section.sectionAlt.apartmentsSection::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--bg-facade-stripes);
}

#apartmentsSection.section.sectionAlt.apartmentsSection > .container {
  position: relative;
  z-index: 2;
  /* უფრო ფართო სვეტები / დიდი გეგმის სურათები (ორივე გასაყიდი გვერდი) */
  max-width: min(1680px, 100%);
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.apartmentsBack {
  position: relative;
  top: auto;
  left: auto;
  z-index: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border-ui-mid);
  background: var(--btn-ghost-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, border-color 0.16s ease-out;
}

.apartmentsBack:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 860px) and (min-width: 641px) {
  .siteHeader--apartments .apartmentsBack {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
}

/* დესკტოპი: უკან ღილაკი ისევ ფიქსირებული მარცხნივ, ჰედერი როგორც მთავარ გვერდზე (ლოგო / ნავიგაცია) */
@media (min-width: 861px) {
  .siteHeader--apartments .apartmentsBack {
    position: fixed;
    top: 8px;
    left: 112px;
    z-index: 30;
    width: 52px;
    height: 52px;
    font-size: 24px;
  }

  .siteHeader--apartments .headerInner {
    justify-content: space-between;
    gap: 20px;
  }

  .siteHeader--apartments .headerEnd {
    margin-left: 0;
    flex: initial;
    min-width: 0;
  }

  .siteHeader--apartments .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
  }
}

.apartmentsHeader h1 {
  margin: 0 0 8px;
  font-family: "Avazam", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 38px);
  text-transform: none;
  font-variant: normal;
}

.apartmentsFilters {
  margin: 0 0 10px;
  width: min(560px, 100%);
}

.apartmentsFilters .availableFilterSelect {
  max-width: 100%;
}

.apartmentsSearchWrap {
  margin: 0 0 18px;
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.apartmentsSearchInput {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-ui-mid);
  background-color: var(--filter-control-bg);
  color: var(--filter-control-fg);
  padding: 0 14px 0 40px;
  font-size: 15px;
  font-family: var(--font-avant);
  font-weight: 400;
  font-style: normal;
  outline: none;
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px 18px;
}

.apartmentsSearchInput::placeholder {
  color: var(--text-muted);
}

.apartmentsSearchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* საძიებო ველებში მაგნიფიკატორი (იგივე stroke ტონი რაც placeholder-ის --text-muted) */
html:not([data-theme="light"]) :is(.availableSearchInput, .apartmentsSearchInput, .headerSearchInput) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8bcc7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

html[data-theme="light"] :is(.availableSearchInput, .apartmentsSearchInput, .headerSearchInput) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6e82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

/* გასაყიდის საძიებო: თეთრი მაგნიფიკატორი (ტექსტიც თეთრია) */
html:not([data-theme="light"]) .availableSearchInput {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

.apartmentsColumns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.apartmentsPanel {
  border: 1px solid var(--border-ui-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-bg), var(--bg-alt));
  padding: 12px;
  min-width: 0;
}

.apartmentsGrid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ცარიელი სვეტი პირველ ფეიჯზე (JS-მდე / ჩატვირთვამდე) — Pano გვერდზე ორმაგი fetch-ის გამო განსაკუთრებით საჭირო */
main.apartmentsPage .apartmentsGrid:empty::before {
  content: "";
  display: block;
  flex: 1 1 auto;
  min-height: min(260px, 38vw);
  border-radius: 12px;
  border: 1px dashed var(--border-ui-soft);
  background: rgba(32, 34, 42, 0.35);
  box-sizing: border-box;
}

html[data-theme="light"] main.apartmentsPage .apartmentsGrid:empty::before {
  background: rgba(236, 238, 245, 0.55);
}

.apartmentCard {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--border-ui-mid);
  background: rgba(32, 34, 42, 0.72);
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  align-content: start;
  justify-items: stretch;
  gap: 8px;
  min-height: 0;
}

html[data-theme="light"] .apartmentCard {
  background: var(--card);
  border-color: var(--border-ui-mid);
  box-shadow: var(--shadow-card);
}

.apartmentCard--sold {
  background: rgba(200, 48, 58, 0.42);
  border-color: rgba(255, 100, 110, 0.5);
}

html[data-theme="light"] .apartmentCard--sold {
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(252, 228, 230, 0.95));
  border-color: rgba(200, 72, 82, 0.42);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .apartmentThumb {
  background: var(--card);
  border-color: var(--border-ui-soft);
}

html[data-theme="light"] .apartmentOpen {
  background: var(--btn-ghost-bg);
  border-color: var(--border-ui-mid);
  color: var(--text);
}

.apartmentIndex {
  font-size: 13px;
  font-family: var(--font-avant);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.apartmentThumb {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--border-ui-soft);
  background: rgba(18, 20, 26, 0.92);
}

.apartmentThumb--deferred {
  object-fit: cover;
}

.apartmentTitle {
  font-size: clamp(12px, 2.1vw, 16px);
  font-weight: 700;
  font-family: var(--font-display-sp);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  min-height: 0;
  padding-bottom: 2px;
  word-break: break-word;
  white-space: pre-line;
}

.apartmentOpen {
  margin-top: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border-ui-mid);
  background: rgba(22, 24, 32, 0.75);
  font-size: 12px;
  font-family: var(--font-avant-alt);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.apartmentsEmpty {
  padding: 10px;
  color: var(--text-muted);
}

/* საშუალო სიგანე: 2×2 პანელი — ბარათი თითქმის ორჯერ უფრო ფართე, გეგმა იკითხება */
@media (min-width: 901px) and (max-width: 1249px) {
  .apartmentsColumns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1250px) {
  .apartmentsColumns {
    gap: 22px;
  }
}

@media (max-width: 900px) {
  .apartmentsColumns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .apartmentsColumns {
    grid-template-columns: 1fr;
  }
}

/* ——— გვერდის სრული ჩატვირთვის ინდიკატორი ——— */
.pageLoadOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(8, 10, 18, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
  pointer-events: auto;
}

.pageLoadOverlay--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html[data-theme="light"] .pageLoadOverlay {
  background: rgba(246, 248, 252, 0.55);
}

.pageLoadSpinner {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 15px solid rgba(255, 255, 255, 0.4);
  border-top-color: rgba(18, 24, 38, 0.92);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06) inset,
    0 8px 40px rgba(0, 0, 0, 0.2);
  animation: pageLoadSpin 0.78s linear infinite;
}

html[data-theme="light"] .pageLoadSpinner {
  border-color: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(26, 34, 52, 0.9);
  box-shadow:
    0 0 0 2px rgba(30, 40, 60, 0.08) inset,
    0 8px 32px rgba(0, 0, 0, 0.08);
}

@keyframes pageLoadSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pageLoadSpinner {
    animation-duration: 1.8s;
  }
}

@media (max-width: 520px) {
  .pageLoadSpinner {
    width: min(240px, 52vw);
    height: min(240px, 52vw);
    border-width: 10px;
  }
}
/* თემის ღილაკები — flat პროექტის თეთრ პანელთან ერთად წაკითხვადობა */
body:has(#objectTourLayout.is-flat-project-open) .themeSwitchBtn,
body:has(#tourLayout.is-flat-project-open) .themeSwitchBtn {
  border-color: rgba(0, 0, 0, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] body:has(#objectTourLayout.is-flat-project-open) .themeSwitchBtn,
html[data-theme="light"] body:has(#tourLayout.is-flat-project-open) .themeSwitchBtn {
  border-color: rgba(30, 40, 60, 0.32);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
