:root {
  --page-bg: #eceeef;
  --card: #f6f7f8;
  --card-strong: #ffffff;
  --line: #dbe0e4;
  --text: #0f1318;
  --muted: #6e7680;
  --muted-soft: #9ca5ae;
  --primary: #17dddd;
  --primary-deep: #101d38;
  --danger-bg: #fff1ef;
  --danger-line: #ffcfc8;
  --danger-text: #b42318;
  --shadow-soft: 0 8px 24px rgba(13, 18, 24, 0.08);
  --shadow-glass: 0 14px 34px rgba(16, 23, 32, 0.13);
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-sm: 10px;
  --bg-layer-1: radial-gradient(1100px 500px at 0% -10%, rgba(255, 255, 255, 0.82), transparent 60%);
  --bg-layer-2: radial-gradient(900px 460px at 100% -20%, rgba(23, 221, 221, 0.13), transparent 58%);
  --font-family-main: "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family-main);
  background: var(--bg-layer-1), var(--bg-layer-2), var(--page-bg);
  color: var(--text);
}

body[data-design-theme="1"] {
  --page-bg: #eaf2fb;
  --card: #eff6ff;
  --card-strong: #ffffff;
  --line: #cfe0f5;
  --text: #0e1a2d;
  --muted: #61708a;
  --muted-soft: #8d9bb0;
  --primary: #1f9bff;
  --primary-deep: #11284f;
  --shadow-soft: 0 8px 24px rgba(12, 42, 84, 0.12);
  --shadow-glass: 0 16px 36px rgba(18, 53, 97, 0.16);
  --radius-xl: 16px;
  --radius-lg: 14px;
  --radius-sm: 12px;
  --bg-layer-1: radial-gradient(1200px 520px at -8% -16%, rgba(255, 255, 255, 0.95), transparent 60%);
  --bg-layer-2: radial-gradient(840px 460px at 104% -14%, rgba(31, 155, 255, 0.2), transparent 60%);
}

body[data-design-theme="2"] {
  --page-bg: #f5efe7;
  --card: #fcf7f1;
  --card-strong: #fffdf9;
  --line: #e8dccd;
  --text: #2a1f15;
  --muted: #746252;
  --muted-soft: #9a8673;
  --primary: #c68542;
  --primary-deep: #3f2a17;
  --shadow-soft: 0 8px 24px rgba(62, 39, 18, 0.12);
  --shadow-glass: 0 15px 34px rgba(79, 50, 22, 0.14);
  --radius-xl: 18px;
  --radius-lg: 16px;
  --radius-sm: 12px;
  --bg-layer-1: radial-gradient(1120px 480px at 4% -16%, rgba(255, 255, 255, 0.9), transparent 60%);
  --bg-layer-2: radial-gradient(780px 420px at 102% -12%, rgba(198, 133, 66, 0.16), transparent 60%);
}

body[data-design-theme="3"] {
  --page-bg: #edf5f2;
  --card: #f4fbf8;
  --card-strong: #ffffff;
  --line: #d4e8df;
  --text: #10251d;
  --muted: #557266;
  --muted-soft: #7c9a8d;
  --primary: #2ecf95;
  --primary-deep: #0e2f29;
  --shadow-soft: 0 8px 24px rgba(13, 56, 44, 0.11);
  --shadow-glass: 0 16px 35px rgba(13, 62, 47, 0.14);
  --radius-xl: 15px;
  --radius-lg: 13px;
  --radius-sm: 10px;
  --bg-layer-1: radial-gradient(1040px 520px at -5% -14%, rgba(255, 255, 255, 0.9), transparent 60%);
  --bg-layer-2: radial-gradient(860px 450px at 106% -16%, rgba(46, 207, 149, 0.18), transparent 60%);
}

.page {
  width: min(1140px, calc(100% - 1rem));
  margin: 0.55rem auto 1.8rem;
  padding-bottom: 5.2rem;
}

.brand-header {
  display: flex;
  justify-content: center;
  margin: 0.15rem 0 0.65rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.page-cta {
  margin: 1.15rem 0 0.35rem;
  padding: 0.2rem 0;
  text-align: center;
  font-size: 0.87rem;
  color: #526071;
  font-weight: 500;
}

.page-cta a {
  color: #0f7878;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hidden {
  display: none !important;
}

.loading {
  display: grid;
  gap: 0.6rem;
}

.skeleton {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #e2e6e9 0%, #f1f3f5 45%, #e2e6e9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}

.skeleton.media {
  height: min(66vw, 420px);
}

.skeleton.title {
  width: 88%;
  height: 42px;
}

.skeleton.line {
  width: 100%;
  height: 16px;
}

.skeleton.line.small {
  width: 34%;
}

.skeleton.action {
  width: 100%;
  height: 44px;
}

.skeleton.card {
  width: 100%;
  height: 154px;
}

.skeleton.card.tall {
  height: 260px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger-text);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.error h1 {
  margin: 0;
  font-size: 1.2rem;
}

.error p {
  margin: 0.4rem 0 0;
}

.content {
  display: grid;
  gap: 0.72rem;
}

.hero-layout {
  display: grid;
  gap: 0.72rem;
}

.media-section,
.summary-section,
.attribute-card,
.location-section,
.inquiry-section {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.media-section {
  padding: 0.56rem;
}

.carousel-wrap {
  position: relative;
}

.main-media {
  width: 100%;
  height: min(74vw, 500px);
  object-fit: cover;
  border-radius: 10px;
  background: #dbe1e6;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #dce1e5;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #20262d;
  cursor: pointer;
  font-size: 1.18rem;
  line-height: 1;
}

.carousel-btn.prev {
  left: 0.5rem;
}

.carousel-btn.next {
  right: 0.5rem;
}

.group-card-row {
  margin-top: 0.58rem;
  display: flex;
  gap: 0.48rem;
  overflow-x: auto;
  padding-bottom: 0.14rem;
  scrollbar-width: none;
}

.group-card-row::-webkit-scrollbar {
  display: none;
}

.group-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.42rem;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  min-width: 112px;
  max-width: 112px;
  padding: 0.4rem;
  cursor: pointer;
}

.group-card.active {
  border-color: #14c8c8;
  box-shadow: inset 0 0 0 1px #14c8c8, 0 10px 24px rgba(20, 200, 200, 0.16);
}

.group-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 7px;
  overflow: hidden;
  background: #e2e8ed;
  display: grid;
  place-items: center;
  position: relative;
}

.group-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-preview-play {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.78);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.group-preview-play svg {
  width: 14px;
  height: 14px;
  display: block;
}

.group-preview-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 15, 0.28);
  display: grid;
  place-items: center;
}

.group-preview-video-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #dfe7ef;
  background: linear-gradient(150deg, #4e5966 0%, #2e3947 55%, #1f2833 100%);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-preview-badge {
  font-size: 0.61rem;
  font-weight: 700;
  color: #4f5964;
  border: 1px solid #cfd7de;
  border-radius: 999px;
  background: #f8fafb;
  padding: 0.12rem 0.4rem;
}

.group-content {
  min-width: 0;
}

.group-name {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a2129;
  line-height: 1.2;
  text-align: center;
}

.summary-section,
.inquiry-section,
.attribute-card,
.location-section {
  padding: 0.82rem;
}

.category-pill {
  display: inline-block;
  background: #ddfcfb;
  color: #0f4e53;
  border: 1px solid #baf3f3;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.48rem;
}

.property-title {
  margin: 0.48rem 0 0;
  font-size: clamp(1.24rem, 6vw, 2.05rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.property-description {
  margin: 0.44rem 0 0;
  color: #5f6873;
  font-size: 0.92rem;
  font-weight: 500;
}

.address {
  margin: 0.58rem 0 0;
  color: #55606b;
  font-weight: 500;
  font-size: 0.95rem;
}

.listed-by {
  margin: 0.42rem 0 0;
  color: #27313a;
  font-size: 0.95rem;
}

.listed-by span {
  font-weight: 700;
}

.action-row {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.55);
  min-height: 42px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: #11161c;
}

.action-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.action-btn.map {
  background: linear-gradient(180deg, #192747 0%, #111a32 100%);
  color: #ecf3ff;
  border-color: #0b1328;
}

.detail-layout {
  display: grid;
  gap: 0.72rem;
}

.left-stack {
  display: grid;
  gap: 0.72rem;
}

.attributes-section {
  display: grid;
  gap: 0.72rem;
}

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.54rem;
  font-size: 1.22rem;
  font-weight: 800;
}

.section-title .dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #0dbdbd;
  display: inline-block;
  position: relative;
}

.section-title .dot::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #0dbdbd;
  position: absolute;
  top: 3px;
  left: 3px;
}

.attribute-header {
  margin: 0;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  font-size: 1.16rem;
  font-weight: 800;
}

.attribute-header .bar {
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
  display: inline-block;
}

.attribute-grid {
  margin-top: 0.76rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.82rem;
}

.attribute-row {
  display: grid;
  gap: 0.3rem;
}

.attr-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.attr-value {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: #121821;
}

.attr-value a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  background: #ecf0f3;
  border: 1px solid #e0e6ea;
  color: #4a5661;
  padding: 0.17rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.option-chip img {
  width: 14px;
  height: 14px;
  object-fit: cover;
  border-radius: 4px;
}

.location-section {
  display: grid;
  gap: 0.65rem;
}

.map-preview {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #d7dde2;
}

.map-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.inquiry-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.inquiry-subtitle {
  margin: 0.35rem 0 0.82rem;
  color: #69747f;
  font-size: 0.9rem;
}

.inquiry-form {
  display: grid;
  gap: 0.64rem;
}

.inquiry-form label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #596572;
  text-transform: uppercase;
}

.inquiry-form input,
.inquiry-form textarea {
  margin-top: 0.3rem;
  width: 100%;
  border: 1px solid #dce2e7;
  background: #edf0f3;
  border-radius: 8px;
  padding: 0.64rem 0.68rem;
  font: inherit;
  font-size: 0.95rem;
  color: #10161d;
}

.inquiry-form textarea {
  min-height: 80px;
  resize: vertical;
}

.inquiry-btn {
  margin-top: 0.15rem;
  border: 0;
  border-radius: 10px;
  min-height: 45px;
  background: linear-gradient(90deg, #11d8d8 0%, #1deeee 100%);
  color: #002020;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(17, 216, 216, 0.25);
}

.inquiry-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.inquiry-form.success {
  outline: 2px solid #5be9cb;
  border-radius: 10px;
  padding: 0.3rem;
}

.inquiry-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #dce7eb;
  overflow: hidden;
}

.inquiry-progress-bar {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10d6d6 0%, #1af0f0 100%);
  animation: inquiry-progress-move 1s linear infinite;
}

@keyframes inquiry-progress-move {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(240%);
  }
}

.empty-media {
  background: #e5eaee;
  border-radius: 10px;
  height: min(56vw, 320px);
  display: grid;
  place-items: center;
  color: #617180;
  font-weight: 600;
}

.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.84);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 200;
}

.floating-share {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 220;
  border: 0;
  border-radius: 999px;
  height: 48px;
  padding: 0 1rem;
  background: linear-gradient(135deg, #12d6d6 0%, #16e8e8 100%);
  color: #002223;
  box-shadow: 0 14px 30px rgba(18, 214, 214, 0.36);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.floating-share:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(18, 214, 214, 0.42);
}

.floating-share:active {
  transform: translateY(0);
}

.floating-share svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 24, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: grid;
  place-items: end center;
  padding: 1rem;
}

.share-sheet {
  width: min(420px, 100%);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 20px 40px rgba(9, 15, 22, 0.22);
  padding: 1rem;
}

.share-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.share-subtitle {
  margin: 0.2rem 0 0;
  color: #647181;
  font-size: 0.83rem;
  font-weight: 500;
}

.share-url {
  margin: 0.55rem 0 0;
  padding: 0.42rem 0.55rem;
  border: 1px dashed #d2dae2;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #435264;
  background: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-actions {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.share-option {
  text-decoration: none;
  border: 1px solid #d8dee3;
  border-radius: 10px;
  min-height: 46px;
  background: #ffffff;
  color: #121821;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.share-option:hover {
  transform: translateY(-1px);
  border-color: #bfcad6;
  box-shadow: 0 8px 18px rgba(20, 30, 42, 0.08);
}

.share-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
}

.share-icon svg {
  width: 16px;
  height: 16px;
}

.share-icon img {
  width: 16px;
  height: 16px;
  display: block;
}

.share-icon.whatsapp {
  background: #25d366;
}

.share-icon.facebook {
  background: #1877f2;
}

.share-icon.twitterx {
  background: #0f1419;
}

.share-icon.copy {
  background: #1f2937;
}

.share-cancel {
  margin-top: 0.75rem;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  width: 100%;
  background: #e9edf0;
  color: #27313a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 640px) {
  .floating-share {
    right: 0.8rem;
    bottom: calc(0.8rem + env(safe-area-inset-bottom));
    height: 46px;
    padding: 0 0.95rem;
  }

  .action-row .action-btn:only-child {
    grid-column: 1 / -1;
  }

  .share-overlay {
    padding: 0;
    place-items: end stretch;
  }

  .share-sheet {
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 0.9rem 0.85rem calc(0.95rem + env(safe-area-inset-bottom));
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    max-height: 88vh;
    overflow: auto;
  }

  .share-title {
    font-size: 1.02rem;
  }

  .share-subtitle {
    font-size: 0.8rem;
  }

  .share-url {
    white-space: normal;
    word-break: break-all;
    line-height: 1.35;
    max-height: 3.2rem;
    overflow: auto;
  }

  .share-option {
    min-height: 48px;
    font-size: 0.92rem;
    border-radius: 11px;
  }

  .share-cancel {
    min-height: 46px;
  }
}

@media (min-width: 760px) {
  .page {
    width: min(1180px, calc(100% - 2.1rem));
    margin-top: 1rem;
    padding-bottom: 5.6rem;
  }

  .brand-header {
    margin-bottom: 0.75rem;
  }

  .brand-logo {
    height: 38px;
  }

  .summary-section,
  .inquiry-section,
  .attribute-card,
  .location-section {
    padding: 1rem;
  }

  .attribute-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.6rem;
  }
}

@media (min-width: 1024px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.85fr);
    align-items: start;
    gap: 0.8rem;
  }

  .inquiry-section {
    position: sticky;
    top: 0.7rem;
    box-shadow: var(--shadow-soft);
    background: #f7f8f9;
  }
}

/* Theme 1: Editorial Clean */
body[data-design-theme="1"] .page {
  width: min(1220px, calc(100% - 2rem));
}

body[data-design-theme="1"] .content {
  gap: 1rem;
}

body[data-design-theme="1"] .media-section,
body[data-design-theme="1"] .summary-section,
body[data-design-theme="1"] .attribute-card,
body[data-design-theme="1"] .location-section,
body[data-design-theme="1"] .inquiry-section {
  border-radius: 20px;
}

body[data-design-theme="1"] .main-media {
  height: min(64vw, 580px);
  border-radius: 14px;
}

body[data-design-theme="1"] .group-card-row {
  gap: 0.62rem;
}

body[data-design-theme="1"] .group-card {
  min-width: 132px;
  max-width: 132px;
  padding: 0.5rem;
  border-radius: 13px;
}

body[data-design-theme="1"] .group-name {
  font-size: 0.86rem;
}

body[data-design-theme="1"] .summary-section {
  padding: 1rem 1.05rem;
}

body[data-design-theme="1"] .property-title {
  font-size: clamp(1.42rem, 3.2vw, 2.45rem);
  line-height: 1.14;
}

body[data-design-theme="1"] .property-description {
  font-size: 1rem;
  max-width: 76ch;
}

body[data-design-theme="1"] .action-row {
  grid-template-columns: repeat(2, minmax(0, 220px));
  justify-content: start;
}

body[data-design-theme="1"] .attribute-card {
  padding: 1.02rem 1.08rem;
}

body[data-design-theme="1"] .attribute-grid {
  gap: 1rem 2rem;
}

body[data-design-theme="1"] .attr-name {
  font-size: 0.72rem;
}

body[data-design-theme="1"] .attr-value {
  font-size: 1.12rem;
}

body[data-design-theme="1"] .pill {
  font-size: 0.86rem;
  padding: 0.2rem 0.58rem;
}

body[data-design-theme="1"] .inquiry-section {
  background: rgba(255, 255, 255, 0.82);
}

/* Theme 2: Warm Luxury */
body[data-design-theme="2"] {
  --font-family-main: "Georgia", "Times New Roman", serif;
}

body[data-design-theme="2"] .page {
  width: min(1060px, calc(100% - 1.5rem));
}

body[data-design-theme="2"] .brand-logo {
  height: 36px;
  filter: saturate(0.75) contrast(1.05);
}

body[data-design-theme="2"] .media-section,
body[data-design-theme="2"] .summary-section,
body[data-design-theme="2"] .attribute-card,
body[data-design-theme="2"] .location-section,
body[data-design-theme="2"] .inquiry-section {
  background: #fffaf3;
  border: 1px solid #ebdfcf;
  box-shadow: 0 8px 22px rgba(79, 49, 23, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-design-theme="2"] .media-section,
body[data-design-theme="2"] .summary-section {
  border-radius: 6px;
}

body[data-design-theme="2"] .attribute-card,
body[data-design-theme="2"] .location-section,
body[data-design-theme="2"] .inquiry-section {
  border-radius: 6px;
}

body[data-design-theme="2"] .main-media {
  height: min(58vw, 480px);
  border-radius: 4px;
}

body[data-design-theme="2"] .group-card {
  min-width: 126px;
  max-width: 126px;
  border-radius: 4px;
  background: #fffcf8;
  border-color: #e5d8c7;
}

body[data-design-theme="2"] .group-card.active {
  border-color: #b67838;
  box-shadow: inset 0 0 0 1px #b67838;
}

body[data-design-theme="2"] .category-pill {
  background: #f7ede0;
  border-color: #ead6bc;
  color: #5f4325;
  letter-spacing: 0.16em;
}

body[data-design-theme="2"] .property-title {
  font-size: clamp(1.5rem, 4vw, 2.7rem);
  letter-spacing: 0;
}

body[data-design-theme="2"] .property-description,
body[data-design-theme="2"] .address {
  font-size: 1rem;
  color: #5d4c3e;
}

body[data-design-theme="2"] .action-btn {
  border-radius: 3px;
  min-height: 44px;
  border-color: #dbc8b2;
  background: #fff9f2;
}

body[data-design-theme="2"] .action-btn.map {
  background: #3f2a17;
  border-color: #3f2a17;
}

body[data-design-theme="2"] .attribute-header,
body[data-design-theme="2"] .section-title,
body[data-design-theme="2"] .inquiry-title {
  font-weight: 700;
}

body[data-design-theme="2"] .attribute-header .bar {
  width: 30px;
  height: 2px;
  border-radius: 0;
  background: #b67838;
}

body[data-design-theme="2"] .attr-name {
  letter-spacing: 0.08em;
}

body[data-design-theme="2"] .pill {
  background: #f7ede2;
  border-color: #ead9c6;
  color: #5d4a39;
  border-radius: 3px;
}

body[data-design-theme="2"] .inquiry-form input,
body[data-design-theme="2"] .inquiry-form textarea {
  background: #fffdf9;
  border-color: #e6d9ca;
  border-radius: 4px;
}

body[data-design-theme="2"] .inquiry-btn {
  border-radius: 4px;
  background: linear-gradient(90deg, #b67838 0%, #cf9150 100%);
  color: #fff9ef;
  box-shadow: 0 10px 20px rgba(145, 91, 40, 0.2);
}

/* Theme 3: Dark Cinematic */
body[data-design-theme="3"] {
  --font-family-main: "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #e5f1ea;
}

body[data-design-theme="3"] .brand-logo {
  filter: brightness(0) invert(1) opacity(0.88);
}

body[data-design-theme="3"] .page-cta {
  color: #8fb8aa;
}

body[data-design-theme="3"] .page-cta a {
  color: #6fe2b8;
}

body[data-design-theme="3"] .media-section,
body[data-design-theme="3"] .summary-section,
body[data-design-theme="3"] .attribute-card,
body[data-design-theme="3"] .location-section,
body[data-design-theme="3"] .inquiry-section {
  background: linear-gradient(165deg, rgba(11, 25, 21, 0.9) 0%, rgba(9, 19, 16, 0.95) 100%);
  border: 1px solid rgba(97, 140, 123, 0.24);
  box-shadow: 0 18px 34px rgba(2, 10, 7, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body[data-design-theme="3"] .media-section {
  padding: 0.72rem;
}

body[data-design-theme="3"] .main-media {
  height: min(70vw, 560px);
  border-radius: 12px;
  border: 1px solid rgba(104, 151, 133, 0.32);
}

body[data-design-theme="3"] .group-card {
  min-width: 136px;
  max-width: 136px;
  background: rgba(20, 38, 33, 0.9);
  border-color: rgba(99, 149, 129, 0.35);
}

body[data-design-theme="3"] .group-card.active {
  border-color: #57d8a5;
  box-shadow: inset 0 0 0 1px #57d8a5, 0 10px 20px rgba(47, 170, 127, 0.2);
}

body[data-design-theme="3"] .group-name {
  color: #d5ece2;
}

body[data-design-theme="3"] .category-pill {
  background: rgba(19, 58, 46, 0.9);
  border-color: rgba(101, 173, 141, 0.5);
  color: #9df1cb;
}

body[data-design-theme="3"] .property-title {
  color: #f2fff8;
  font-size: clamp(1.42rem, 3.6vw, 2.3rem);
}

body[data-design-theme="3"] .property-description,
body[data-design-theme="3"] .address {
  color: #a7c5b8;
}

body[data-design-theme="3"] .action-btn {
  background: rgba(20, 38, 33, 0.82);
  border-color: rgba(102, 148, 130, 0.32);
  color: #def9ec;
}

body[data-design-theme="3"] .action-btn.map {
  background: linear-gradient(180deg, #1f5849 0%, #163f34 100%);
  border-color: #205846;
}

body[data-design-theme="3"] .attribute-header,
body[data-design-theme="3"] .section-title,
body[data-design-theme="3"] .inquiry-title {
  color: #f0fff7;
}

body[data-design-theme="3"] .attr-name {
  color: #7ea695;
}

body[data-design-theme="3"] .attr-value {
  color: #d8f7e9;
}

body[data-design-theme="3"] .pill {
  background: rgba(27, 54, 45, 0.92);
  border-color: rgba(91, 145, 121, 0.36);
  color: #bdeed6;
}

body[data-design-theme="3"] .map-preview {
  border-color: rgba(94, 140, 122, 0.34);
}

body[data-design-theme="3"] .inquiry-subtitle,
body[data-design-theme="3"] .inquiry-form label {
  color: #8ab09f;
}

body[data-design-theme="3"] .inquiry-form input,
body[data-design-theme="3"] .inquiry-form textarea {
  background: rgba(16, 34, 29, 0.9);
  border-color: rgba(89, 133, 116, 0.35);
  color: #e6fff4;
}

body[data-design-theme="3"] .inquiry-btn {
  background: linear-gradient(90deg, #2ecf95 0%, #48e1ab 100%);
  color: #05261c;
}

body[data-design-theme="3"] .floating-share {
  background: linear-gradient(135deg, #1b6e50 0%, #2ecf95 100%);
  color: #ecfff7;
  box-shadow: 0 14px 30px rgba(8, 37, 27, 0.56);
}

body[data-design-theme="3"] .share-sheet {
  background: rgba(13, 27, 23, 0.98);
  border-color: rgba(89, 137, 119, 0.3);
}

body[data-design-theme="3"] .share-title {
  color: #f1fff8;
}

body[data-design-theme="3"] .share-subtitle,
body[data-design-theme="3"] .share-url {
  color: #9cc3b3;
}

body[data-design-theme="3"] .share-url {
  border-color: rgba(94, 142, 124, 0.38);
  background: rgba(19, 41, 34, 0.9);
}

body[data-design-theme="3"] .share-option {
  background: rgba(21, 44, 36, 0.9);
  border-color: rgba(98, 144, 126, 0.36);
  color: #e7fff4;
}

body[data-design-theme="3"] .share-cancel {
  background: rgba(28, 54, 45, 0.92);
  color: #daf5e8;
}

/* Theme 4: Metro Cards */
body[data-design-theme="4"] {
  --page-bg: #f2f4f8;
  --card: #ffffff;
  --card-strong: #ffffff;
  --line: #d6dbe5;
  --text: #111625;
  --muted: #5f6b84;
  --muted-soft: #8892a6;
  --primary: #6a52ff;
  --primary-deep: #1c1f34;
  --shadow-soft: 0 10px 24px rgba(25, 33, 56, 0.09);
  --shadow-glass: 0 14px 32px rgba(26, 34, 55, 0.1);
  --bg-layer-1: linear-gradient(180deg, #fafbff 0%, #f2f4f8 100%);
  --bg-layer-2: radial-gradient(820px 420px at 100% -10%, rgba(106, 82, 255, 0.12), transparent 60%);
}

body[data-design-theme="4"] .page {
  width: min(1240px, calc(100% - 2.4rem));
}

body[data-design-theme="4"] .media-section,
body[data-design-theme="4"] .summary-section,
body[data-design-theme="4"] .attribute-card,
body[data-design-theme="4"] .location-section,
body[data-design-theme="4"] .inquiry-section {
  background: #ffffff;
  border: 1px solid #d9deea;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(22, 33, 61, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-design-theme="4"] .main-media {
  height: min(52vw, 420px);
}

body[data-design-theme="4"] .property-title {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
}

body[data-design-theme="4"] .action-btn.map {
  background: linear-gradient(180deg, #3b2ca6 0%, #2b2077 100%);
  border-color: #251d64;
}

body[data-design-theme="4"] .pill {
  background: #f0efff;
  border-color: #dcd9ff;
  color: #4338a4;
}

/* Theme 5: Soft Editorial Minimal */
body[data-design-theme="5"] {
  --page-bg: #f7f7f4;
  --card: #fffefb;
  --card-strong: #ffffff;
  --line: #e8e7de;
  --text: #1f2228;
  --muted: #666d78;
  --muted-soft: #9097a4;
  --primary: #ef6f5e;
  --primary-deep: #2d2523;
  --shadow-soft: 0 8px 18px rgba(40, 35, 31, 0.07);
  --shadow-glass: 0 10px 22px rgba(40, 34, 30, 0.08);
  --bg-layer-1: radial-gradient(980px 420px at -8% -10%, rgba(255, 255, 255, 0.95), transparent 62%);
  --bg-layer-2: radial-gradient(840px 430px at 108% -10%, rgba(239, 111, 94, 0.12), transparent 60%);
}

body[data-design-theme="5"] .page {
  width: min(980px, calc(100% - 1.2rem));
}

body[data-design-theme="5"] .media-section,
body[data-design-theme="5"] .summary-section,
body[data-design-theme="5"] .attribute-card,
body[data-design-theme="5"] .location-section,
body[data-design-theme="5"] .inquiry-section {
  border-radius: 22px;
}

body[data-design-theme="5"] .main-media {
  height: min(78vw, 620px);
  border-radius: 16px;
}

body[data-design-theme="5"] .group-card {
  min-width: 144px;
  max-width: 144px;
}

body[data-design-theme="5"] .property-title {
  font-size: clamp(1.55rem, 4.6vw, 2.7rem);
}

body[data-design-theme="5"] .attribute-header .bar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef6f5e 0%, #ff917f 100%);
}

body[data-design-theme="5"] .action-btn.map {
  background: linear-gradient(180deg, #332a27 0%, #231c1a 100%);
  border-color: #201917;
}

body[data-design-theme="5"] .pill {
  background: #fff1ef;
  border-color: #ffd5cf;
  color: #9b4338;
}

/* Layout-specific arrangement rules */
body[data-design-theme="3"] .hero-layout {
  grid-template-columns: 1fr;
}

body[data-design-theme="3"] .hero-layout .summary-section {
  margin-top: -0.06rem;
}

body[data-design-theme="4"] .content.layout-theme-4 {
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.28fr);
  grid-template-areas:
    "summary media"
    "inquiry details";
  gap: 0.85rem;
}

body[data-design-theme="4"] .content.layout-theme-4 .summary-section {
  grid-area: summary;
  align-self: start;
  position: sticky;
  top: 0.8rem;
}

body[data-design-theme="4"] .content.layout-theme-4 .media-section {
  grid-area: media;
}

body[data-design-theme="4"] .content.layout-theme-4 .detail-layout {
  grid-area: details;
}

body[data-design-theme="4"] .content.layout-theme-4 .inquiry-section {
  grid-area: inquiry;
  align-self: start;
}

body[data-design-theme="4"] .content.layout-theme-4 .detail-layout {
  display: block;
}

body[data-design-theme="5"] .content.layout-theme-5 .summary-section {
  text-align: center;
}

body[data-design-theme="5"] .content.layout-theme-5 .action-row {
  justify-content: center;
}

body[data-design-theme="5"] .content.layout-theme-5 .detail-layout {
  grid-template-columns: 1fr;
}

body[data-design-theme="5"] .content.layout-theme-5 .left-stack {
  gap: 0.95rem;
}

@media (min-width: 1024px) {
  body[data-design-theme="1"] .detail-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
    gap: 1rem;
  }

  body[data-design-theme="2"] .detail-layout {
    grid-template-columns: 1fr;
  }

  body[data-design-theme="2"] .inquiry-section {
    position: static;
  }

  body[data-design-theme="3"] .detail-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
    gap: 0.95rem;
  }

  body[data-design-theme="3"] .hero-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0.8rem;
  }

  body[data-design-theme="4"] .content.layout-theme-4 {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.3fr);
    grid-template-areas:
      "summary media"
      "inquiry details";
  }

  body[data-design-theme="5"] .content.layout-theme-5 .detail-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
    gap: 0.9rem;
  }

  body[data-design-theme="5"] .content.layout-theme-5 .summary-section {
    max-width: 900px;
    justify-self: center;
    width: 100%;
  }
}

@media (max-width: 1023px) {
  body[data-design-theme="4"] .content.layout-theme-4 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "media"
      "inquiry"
      "details";
  }
}
