/* =============================================================
   YOUR INDUSTRIAL & LAND AGENT — Master Stylesheet
   Aesthetic: Luxury, Mysterious, Professional
   Palette: Black, Gold, Blue
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CJK fonts (Noto Serif SC, Noto Sans SC) are loaded dynamically by main.js
   only when body[data-lang="zh"] — saves ~1-2MB for English visitors. */

:root {
  /* Brand colors */
  --color-black: #0a0a0c;
  --color-deep:  #14141a;
  --color-night: #1a1d29;
  --color-blue-deep: #0d1b3d;
  --color-blue:  #1e3a8a;
  --color-blue-glow: #3b5fb8;
  --color-gold:  #c9a64c;
  --color-gold-bright: #e6c87a;
  --color-gold-deep: #8b6f2a;
  --color-cream: #f5efe0;
  --color-white: #ffffff;
  --color-grey-1: #2a2d3a;
  --color-grey-2: #4a4f5e;
  --color-grey-3: #8a8f9e;
  --color-grey-4: #d4d6dc;

  /* Fonts */
  --font-display: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-zh-display: 'Noto Serif SC', 'Cormorant Garamond', serif;
  --font-zh-body: 'Noto Sans SC', 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-xxl: 10rem;

  /* Layout */
  --max-width: 1400px;
  --content-width: 1200px;
  --narrow-width: 800px;

  /* Transitions */
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-luxury);
  --transition-base: 0.4s var(--ease-luxury);
  --transition-slow: 0.8s var(--ease-luxury);

  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-medium: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 30px rgba(201, 166, 76, 0.25);
  --shadow-blue: 0 0 40px rgba(30, 58, 138, 0.4);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--color-black);
  color: var(--color-cream);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[lang="zh"], body[data-lang="zh"] {
  font-family: var(--font-zh-body);
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-gold); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--color-gold-bright); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* === Background Atmosphere === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(30, 58, 138, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(201, 166, 76, 0.08), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(13, 27, 61, 0.4), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-cream);
}

body[lang="zh"] h1, body[lang="zh"] h2, body[lang="zh"] h3,
body[data-lang="zh"] h1, body[data-lang="zh"] h2, body[data-lang="zh"] h3 {
  font-family: var(--font-zh-display);
  font-weight: 600;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 400; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
p  { color: var(--color-grey-4); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 500;
}

.gold-text { color: var(--color-gold); }
.serif { font-family: var(--font-display); font-style: italic; }

/* === Layout containers === */
main { position: relative; z-index: 2; }
.container { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--space-md); }
.container-wide { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.container-narrow { max-width: var(--narrow-width); margin: 0 auto; padding: 0 var(--space-md); }
section { padding: var(--space-xl) 0; position: relative; }

/* === Header === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(10, 10, 12, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 166, 76, 0.1);
  transition: var(--transition-base);
}
.site-header.scrolled {
  background: rgba(10, 10, 12, 0.85);
  padding: 0.75rem 0;
  border-bottom-color: rgba(201, 166, 76, 0.25);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
}
.logo-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-cream);
  letter-spacing: 0.02em;
}
.logo-mark .accent { color: var(--color-gold); font-style: italic; }
.logo-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-grey-3);
  margin-top: 2px;
}

.main-nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.main-nav a {
  color: var(--color-cream);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  padding: 0.5rem 0;
}
.main-nav a:hover { color: var(--color-gold); }
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--color-gold);
  transition: var(--transition-base);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%; left: -1rem;
  background: rgba(10, 10, 12, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 166, 76, 0.2);
  min-width: 200px;
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: var(--transition-base);
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
.nav-dropdown-menu a::after { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.lang-switcher a { color: var(--color-grey-3); }
.lang-switcher a.active { color: var(--color-gold); }
.lang-switcher span { color: var(--color-grey-2); }

.menu-toggle {
  display: none;
  width: 32px; height: 32px;
  padding: 6px;
  position: relative;
}
.menu-toggle span {
  display: block;
  width: 100%; height: 1px;
  background: var(--color-cream);
  margin: 5px 0;
  transition: var(--transition-base);
  transform-origin: center;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xxl) var(--space-md) var(--space-xl);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(13, 27, 61, 0.4) 0%, transparent 50%, rgba(201, 166, 76, 0.05) 100%),
    radial-gradient(circle at 70% 50%, rgba(30, 58, 138, 0.3), transparent 60%);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 166, 76, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 166, 76, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.hero-content {
  max-width: var(--content-width);
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-luxury) 0.2s forwards;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 1.2s var(--ease-luxury) 0.4s forwards;
}
.hero h1 .accent {
  font-style: italic;
  color: var(--color-gold);
  font-weight: 400;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--color-grey-4);
  max-width: 700px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeInUp 1.2s var(--ease-luxury) 0.6s forwards;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1.2s var(--ease-luxury) 0.8s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--color-gold);
  color: var(--color-black);
  border-color: var(--color-gold);
}
.btn-primary:hover {
  background: transparent;
  color: var(--color-gold);
  box-shadow: var(--shadow-gold);
}
.btn-outline {
  background: transparent;
  color: var(--color-cream);
  border-color: rgba(245, 239, 224, 0.3);
}
.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}
.btn-blue {
  background: var(--color-blue);
  color: var(--color-cream);
  border-color: var(--color-blue);
}
.btn-blue:hover {
  background: var(--color-blue-glow);
  border-color: var(--color-blue-glow);
  box-shadow: var(--shadow-blue);
}

/* === Section heading === */
.section-head {
  text-align: center;
  margin-bottom: var(--space-lg);
}
.section-head .eyebrow { margin-bottom: 1rem; display: inline-block; }
.section-head h2 { margin-bottom: 1rem; }
.section-head .lead {
  max-width: 700px;
  margin: 1rem auto 0;
  color: var(--color-grey-4);
  font-size: 1.05rem;
}

.divider-gold {
  width: 60px; height: 1px;
  background: var(--color-gold);
  margin: 1.5rem auto;
  position: relative;
}
.divider-gold::before, .divider-gold::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 4px; height: 4px;
  background: var(--color-gold);
  border-radius: 50%;
  transform: translateY(-50%);
}
.divider-gold::before { left: -10px; }
.divider-gold::after { right: -10px; }

/* === Search Bar === */
.search-panel {
  max-width: 1100px;
  margin: -3rem auto 0;
  padding: 1.5rem;
  background: rgba(20, 20, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 166, 76, 0.25);
  position: relative;
  z-index: 5;
  box-shadow: var(--shadow-medium);
}
.search-panel-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  gap: 1rem;
  align-items: end;
}
.search-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201, 166, 76, 0.15);
}
.search-tab {
  padding: 0.7rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-cream);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition-fast);
}
.search-tab:hover { color: var(--color-gold); }
.search-tab.active { color: var(--color-gold); border-bottom-color: var(--color-gold); }

.search-field { display: flex; flex-direction: column; gap: 0.4rem; }
.search-field label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-grey-3);
}
.search-field select, .search-field input {
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid rgba(245, 239, 224, 0.15);
  color: var(--color-cream);
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.search-field select:focus, .search-field input:focus {
  border-color: var(--color-gold);
  outline: none;
}
.search-field select option { background: var(--color-black); }

.search-submit {
  background: var(--color-gold);
  color: var(--color-black);
  padding: 0.85rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.search-submit:hover {
  background: var(--color-gold-bright);
  box-shadow: var(--shadow-gold);
}

/* === Service Pillars (Buy/Rent/Sell) === */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: var(--space-lg);
}
.pillar {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(201, 166, 76, 0.15);
  transition: var(--transition-base);
}
.pillar:hover {
  border-color: var(--color-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}
.pillar-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease-luxury);
  filter: brightness(0.5) saturate(0.8);
}
.pillar:hover .pillar-bg { transform: scale(1.08); filter: brightness(0.6); }
.pillar-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  background: linear-gradient(to top, rgba(10,10,12,0.95) 10%, transparent 70%);
  z-index: 2;
}
.pillar-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}
.pillar h3 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.pillar p {
  font-size: 0.9rem;
  color: var(--color-grey-4);
  margin-bottom: 1rem;
}
.pillar .arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-gold);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* === Property Cards === */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.property-card {
  background: var(--color-deep);
  border: 1px solid rgba(201, 166, 76, 0.1);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}
.property-card:hover {
  border-color: rgba(201, 166, 76, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}
.property-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--color-night);
}
.property-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-luxury);
}
.property-card:hover .property-card-image img { transform: scale(1.05); }
.property-card-image .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-night), var(--color-blue-deep));
  color: var(--color-grey-2);
  font-size: 3rem;
}

.property-status {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--color-gold);
  color: var(--color-black);
}
.property-status.rent { background: var(--color-blue); color: var(--color-cream); }
.property-status.sold { background: var(--color-grey-2); color: var(--color-cream); }

.favorite-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 239, 224, 0.2);
  color: var(--color-cream);
  transition: var(--transition-fast);
}
.favorite-btn:hover, .favorite-btn.active {
  background: var(--color-gold);
  color: var(--color-black);
  border-color: var(--color-gold);
}
.favorite-btn svg { width: 16px; height: 16px; }

.property-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.property-card-area {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-grey-3);
  margin-bottom: 0.5rem;
}
.property-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: var(--color-cream);
}
.property-card-price {
  font-size: 1.1rem;
  color: var(--color-gold);
  font-weight: 500;
  margin-bottom: 1rem;
}
.property-card-specs {
  display: flex;
  gap: 1.25rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 239, 224, 0.08);
  font-size: 0.8rem;
  color: var(--color-grey-3);
}
.property-card-specs span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.property-card-zh-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-gold);
  font-family: var(--font-zh-display);
  letter-spacing: 0.1em;
}
.property-card-zh-link:hover { color: var(--color-gold-bright); }

/* === Stats Bar === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--color-blue-deep) 0%, var(--color-night) 100%);
  border-top: 1px solid rgba(201, 166, 76, 0.2);
  border-bottom: 1px solid rgba(201, 166, 76, 0.2);
  margin: var(--space-lg) 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 400;
  color: var(--color-gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-grey-3);
}

/* === Floating contact buttons === */
.float-actions {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 90;
}
.float-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold);
  color: var(--color-black);
  box-shadow: var(--shadow-medium);
  transition: var(--transition-base);
  position: relative;
}
.float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(201, 166, 76, 0.5);
}
.float-btn.whatsapp { background: #25D366; color: white; }
.float-btn.whatsapp:hover { box-shadow: 0 0 30px rgba(37, 211, 102, 0.5); }
.float-btn.call { background: var(--color-blue); color: white; }
.float-btn.call:hover { box-shadow: 0 0 30px rgba(30, 58, 138, 0.6); }
.float-btn svg { width: 24px; height: 24px; }
.float-btn .pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: pulse 2s ease-out infinite;
  opacity: 0;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* === Footer === */
.site-footer {
  background: linear-gradient(to bottom, var(--color-black), #050507);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid rgba(201, 166, 76, 0.15);
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .logo-mark { font-size: 1.6rem; margin-bottom: 0.5rem; display: block; }
.footer-brand p {
  font-size: 0.9rem;
  color: var(--color-grey-3);
  margin-top: 1rem;
  max-width: 320px;
}
.footer-col h5 {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  color: var(--color-grey-3);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--color-gold); }

.social-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.social-row a {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 239, 224, 0.05);
  border: 1px solid rgba(245, 239, 224, 0.1);
  color: var(--color-grey-3);
  transition: var(--transition-fast);
}
.social-row a:hover {
  background: var(--color-gold);
  color: var(--color-black);
  border-color: var(--color-gold);
}
.social-row svg { width: 16px; height: 16px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 239, 224, 0.08);
  font-size: 0.8rem;
  color: var(--color-grey-3);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-license {
  font-size: 0.75rem;
  color: var(--color-grey-3);
}
.footer-license strong { color: var(--color-gold); font-weight: 500; }

/* === Listing detail page === */
.listing-hero {
  padding-top: 7rem;
  padding-bottom: 2rem;
}
.listing-breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-grey-3);
  margin-bottom: 1.5rem;
}
.listing-breadcrumb a { color: var(--color-grey-3); }
.listing-breadcrumb a:hover { color: var(--color-gold); }
.listing-breadcrumb .sep { margin: 0 0.6rem; color: var(--color-grey-2); }

.listing-zh-banner {
  display: inline-block;
  background: rgba(201, 166, 76, 0.1);
  border: 1px solid rgba(201, 166, 76, 0.3);
  color: var(--color-gold);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-zh-display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  transition: var(--transition-fast);
}
.listing-zh-banner:hover {
  background: rgba(201, 166, 76, 0.2);
  color: var(--color-gold-bright);
}

.listing-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}
.listing-title-row h1 { margin-bottom: 0.5rem; }
.listing-location {
  font-size: 1rem;
  color: var(--color-grey-3);
  letter-spacing: 0.05em;
}
.listing-price-block { text-align: right; }
.listing-price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--color-gold);
  font-weight: 400;
  line-height: 1;
}
.listing-price-unit {
  font-size: 0.85rem;
  color: var(--color-grey-3);
  margin-top: 0.25rem;
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.6rem;
  height: 480px;
  margin-bottom: 3rem;
}
.gallery-main { grid-row: 1 / 3; }
.gallery-item {
  background: var(--color-night);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-luxury); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-grey-2);
  font-size: 2rem;
  background: linear-gradient(135deg, var(--color-night), var(--color-blue-deep));
}
.gallery-more, .gallery-more-desktop {
  position: absolute;
  bottom: 1rem; right: 1rem;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(10px);
  padding: 0.6rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-cream);
  border: 1px solid rgba(201,166,76,0.4);
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-fast);
  z-index: 2;
}
.gallery-more:hover, .gallery-more:focus-visible,
.gallery-more-desktop:hover, .gallery-more-desktop:focus-visible {
  background: var(--color-gold);
  color: var(--color-black);
  transform: scale(1.05);
}

/* Mobile-only "View all N photos" button — sibling of .gallery, always visible on small screens */
.gallery-more-mobile {
  display: none;
  width: 100%;
  margin-top: 0.6rem;
  margin-bottom: 2rem;
  padding: 0.9rem 1.2rem;
  background: rgba(10,10,12,0.85);
  color: var(--color-cream);
  border: 1px solid rgba(201,166,76,0.4);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}
.gallery-more-mobile:hover, .gallery-more-mobile:focus-visible {
  background: var(--color-gold);
  color: var(--color-black);
}
.gallery-item img[data-lightbox-images] { cursor: zoom-in; }

/* === Lightbox === */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.show { display: flex; }
.lightbox-image-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 5rem;
  box-sizing: border-box;
}
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(20, 20, 26, 0.7);
  border: 1px solid rgba(201,166,76,0.3);
  color: var(--color-cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 10001;
  font-family: var(--font-body);
}
.lightbox-close {
  top: 1rem; right: 1rem;
  width: 48px; height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox-prev, .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 2.5rem;
  line-height: 1;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--color-gold);
  color: var(--color-black);
  border-color: var(--color-gold);
}
.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-cream);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  background: rgba(20, 20, 26, 0.7);
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(201,166,76,0.3);
}
@media (max-width: 600px) {
  .lightbox-image-wrap { padding: 3.5rem 0.75rem; }
  .lightbox-close { top: 0.5rem; right: 0.5rem; width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 2rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

.listing-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}
.listing-content {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.spec-value {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(20, 20, 26, 0.4);
  border: 1px solid rgba(201, 166, 76, 0.1);
  overflow: hidden;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.spec-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-grey-3);
}
.spec-value {
  font-size: 1rem;
  color: var(--color-cream);
  font-weight: 500;
}

.listing-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(245, 239, 224, 0.08);
}
.listing-section:last-child { border-bottom: none; }
.listing-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.listing-section h3::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 1px;
  background: var(--color-gold);
}
.listing-description {
  line-height: 1.9;
  color: var(--color-grey-4);
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.listing-description p { margin-bottom: 1rem; }

/* Listing disclaimer box (legal + approximate-location notice) */
.listing-disclaimer-box {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: rgba(20, 20, 26, 0.4);
  border-left: 3px solid rgba(201, 166, 76, 0.4);
  border-top: 1px solid rgba(201, 166, 76, 0.08);
  border-right: 1px solid rgba(201, 166, 76, 0.08);
  border-bottom: 1px solid rgba(201, 166, 76, 0.08);
}
.listing-disclaimer-title {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 0.85rem;
  font-weight: 500;
}
.listing-disclaimer-text {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--color-grey-4);
  font-style: italic;
}
.listing-disclaimer-text p {
  margin-bottom: 0.85rem;
}
.listing-disclaimer-text p:last-child {
  margin-bottom: 0;
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  list-style: none;
}
.amenities-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-grey-4);
}
.amenities-list li::before {
  content: '◆';
  color: var(--color-gold);
  font-size: 0.7rem;
}

.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-night);
  border: 1px solid rgba(201, 166, 76, 0.15);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* === Floor Plan section (optional — only rendered if images uploaded) === */
.floor-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.floor-plan-item {
  background: var(--color-night);
  border: 1px solid rgba(201, 166, 76, 0.15);
  overflow: hidden;
}
.floor-plan-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease-luxury);
}
.floor-plan-item:hover img { transform: scale(1.03); }

/* === 360° Photos section (optional — only rendered if embeds added) === */
.panorama-item {
  margin-bottom: 1.5rem;
}
.panorama-item:last-child { margin-bottom: 0; }
.panorama-embed {
  /* taller than 16:9 — panoramas benefit from more vertical space */
  aspect-ratio: 16/10;
}

/* === Connectivity / Nearby section === */
.connectivity-section { /* inherits .listing-section spacing */ }
.connectivity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201, 166, 76, 0.2);
}
@media (max-width: 700px) {
  /* On mobile: vertical stacked tabs */
  .connectivity-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
  }
  .connectivity-tab {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(201, 166, 76, 0.1);
    border-left: 2px solid transparent;
    margin-bottom: 0;
  }
  .connectivity-tab.active {
    border-bottom-color: rgba(201, 166, 76, 0.1);
    border-left-color: var(--color-gold);
  }
}
.connectivity-tab {
  padding: 0.7rem 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-grey-3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}
.connectivity-tab:hover { color: var(--color-cream); }
.connectivity-tab.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}
.connectivity-panel { display: none; }
.connectivity-panel.active { display: block; }
.connectivity-item {
  background: rgba(20, 20, 26, 0.6);
  border: 1px solid rgba(201, 166, 76, 0.15);
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}
.connectivity-item[open] {
  border-color: rgba(201, 166, 76, 0.4);
}
.connectivity-item summary {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--color-cream);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  user-select: none;
}
.connectivity-item summary::-webkit-details-marker { display: none; }
.connectivity-item summary::after {
  content: '+';
  color: var(--color-gold);
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}
.connectivity-item[open] summary::after {
  content: '−';
}
.connectivity-item summary:hover { color: var(--color-gold); }
.connectivity-map-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-night);
  border-top: 1px solid rgba(201, 166, 76, 0.15);
}
.connectivity-map-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 600px) {
  .connectivity-map-wrap { aspect-ratio: 4/3; }
  .connectivity-tab { padding: 0.6rem 0.85rem; font-size: 0.7rem; letter-spacing: 0.1em; }
}

/* Sidebar: agent + form */
.listing-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.agent-card {
  background: linear-gradient(135deg, var(--color-deep), var(--color-night));
  border: 1px solid rgba(201, 166, 76, 0.25);
  padding: 2rem;
  text-align: center;
}
.agent-card-photo {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--color-gold-deep), var(--color-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-black);
  border: 2px solid var(--color-gold);
  overflow: hidden;
}
.agent-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agent-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}
.agent-card .agent-title {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}
.agent-card .agent-license {
  font-size: 0.75rem;
  color: var(--color-grey-3);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.15rem;
}
.agent-card .agent-company {
  font-size: 0.75rem;
  color: var(--color-grey-3);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.15rem;
}
.agent-card .agent-messaging {
  font-size: 0.75rem;
  color: var(--color-grey-3);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.15rem;
}
.agent-card .agent-messaging:last-of-type {
  margin-bottom: 1.5rem;
}
.agent-card .agent-messaging-label {
  color: var(--color-grey-4);
}
.agent-card .agent-messaging-link {
  color: var(--color-gold);
  text-decoration: none;
  border-bottom: 1px dotted rgba(201, 166, 76, 0.4);
  transition: var(--transition-fast);
}
.agent-card .agent-messaging-link:hover {
  border-bottom-color: var(--color-gold);
  color: #d4b65c;
}
.agent-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.agent-card-actions .btn { justify-content: center; padding: 0.85rem; font-size: 0.75rem; }

.inquiry-form {
  background: rgba(20, 20, 26, 0.6);
  border: 1px solid rgba(201, 166, 76, 0.15);
  padding: 1.75rem;
}
.inquiry-form h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.inquiry-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.inquiry-form label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-grey-3);
}
.inquiry-form input,
.inquiry-form textarea,
.inquiry-form select {
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid rgba(245, 239, 224, 0.1);
  color: var(--color-cream);
  padding: 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition-fast);
}
.inquiry-form input:focus,
.inquiry-form textarea:focus,
.inquiry-form select:focus {
  outline: none;
  border-color: var(--color-gold);
}
.inquiry-form textarea { resize: vertical; min-height: 90px; }
.form-success, .form-error {
  padding: 0.75rem;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.form-success { background: rgba(0, 200, 100, 0.1); border: 1px solid rgba(0, 200, 100, 0.3); color: #6eddaa; }
.form-error { background: rgba(220, 50, 50, 0.1); border: 1px solid rgba(220, 50, 50, 0.3); color: #ff8a8a; }

/* Loan Calculator */
.loan-calc {
  background: linear-gradient(135deg, var(--color-night), var(--color-blue-deep));
  border: 1px solid rgba(201, 166, 76, 0.2);
  padding: 2rem;
}
.loan-calc h3 { margin-bottom: 1.5rem; }
.loan-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.loan-calc-result {
  padding: 1.5rem;
  background: rgba(10, 10, 12, 0.5);
  border: 1px solid rgba(201, 166, 76, 0.2);
  text-align: center;
}
.loan-calc-result-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-grey-3);
  margin-bottom: 0.5rem;
}
.loan-calc-result-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-gold);
  font-weight: 400;
}
.loan-calc-disclaimer {
  font-size: 0.75rem;
  color: var(--color-grey-3);
  margin-top: 1rem;
  font-style: italic;
}

/* === Page hero (non-home) === */
.page-hero {
  padding-top: 9rem;
  padding-bottom: 4rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(201, 166, 76, 0.1);
}
.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
}
.page-hero .lead {
  max-width: 700px;
  margin: 1.5rem auto 0;
  color: var(--color-grey-4);
  font-size: 1.05rem;
}

/* === Filters bar === */
.filters-bar {
  background: rgba(20, 20, 26, 0.6);
  border: 1px solid rgba(201, 166, 76, 0.12);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) auto;
  gap: 1rem;
  align-items: end;
}
.filters-bar .search-field { gap: 0.4rem; }

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.results-count {
  font-size: 0.9rem;
  color: var(--color-grey-3);
}
.results-count strong { color: var(--color-gold); }

/* === Compare Tray === */
.compare-tray {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 10, 12, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-gold);
  padding: 1rem 2rem;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.compare-tray.show { display: flex; }
.compare-items {
  display: flex;
  gap: 1rem;
  flex: 1;
  flex-wrap: wrap;
}
.compare-item {
  font-size: 0.85rem;
  color: var(--color-cream);
  padding: 0.4rem 0.5rem 0.4rem 0.85rem;
  background: rgba(201, 166, 76, 0.1);
  border: 1px solid rgba(201, 166, 76, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.compare-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(201, 166, 76, 0.2);
  border: 1px solid rgba(201, 166, 76, 0.4);
  color: var(--color-gold);
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.compare-remove:hover, .compare-remove:focus-visible {
  background: var(--color-gold);
  color: var(--color-black);
  transform: scale(1.1);
}
.compare-clear-all {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(201, 166, 76, 0.4);
  color: var(--color-gold);
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.compare-clear-all:hover, .compare-clear-all:focus-visible {
  background: rgba(201, 166, 76, 0.15);
}

/* Hide "swipe horizontally" hint on desktop (only relevant on mobile portrait) */
@media (min-width: 769px), (orientation: landscape) {
  .compare-scroll-hint { display: none !important; }
}

/* Compare table — freeze first column ONLY in landscape orientation on phones/tablets.
   In portrait (normal phone view), don't freeze (gives full width for readability). */
.compare-table-wrap {
  overflow-x: auto;
  width: 100%;
}
.compare-table .compare-col-label {
  width: 18%;
  min-width: 140px;
}
/* On mobile portrait — minimum widths force horizontal scroll */
@media (max-width: 768px) and (orientation: portrait) {
  .compare-table {
    table-layout: auto !important;
    min-width: 700px;
  }
  .compare-table .compare-col-label {
    min-width: 140px;
  }
  .compare-table th:not(.compare-col-label),
  .compare-table td:not(.compare-col-label) {
    min-width: 200px;
  }
}
@media (orientation: landscape) and (max-width: 1024px) {
  .compare-table .compare-col-label {
    position: sticky;
    left: 0;
    background: var(--color-black);
    z-index: 2;
    box-shadow: 4px 0 8px rgba(0,0,0,0.3);
  }
}
/* On large desktop screens — also freeze first column for convenience */
@media (min-width: 1025px) {
  .compare-table .compare-col-label {
    position: sticky;
    left: 0;
    background: var(--color-black);
    z-index: 2;
  }
}

/* === About / Story === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-image {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--color-night), var(--color-blue-deep));
  border: 1px solid rgba(201, 166, 76, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-grey-2);
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-image::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid var(--color-gold);
  z-index: -1;
}
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p {
  margin-bottom: 1rem;
  color: var(--color-grey-4);
  line-height: 1.8;
}

/* === Testimonials === */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.testimonial-card {
  background: var(--color-deep);
  border: 1px solid rgba(201, 166, 76, 0.1);
  padding: 2rem;
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px; left: 1.5rem;
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--color-gold);
  line-height: 1;
  opacity: 0.4;
}
.testimonial-quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--color-cream);
}
.testimonial-author {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-gold);
}
.testimonial-role {
  font-size: 0.75rem;
  color: var(--color-grey-3);
  letter-spacing: 0.1em;
}

/* === Contact page === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-info-card {
  background: var(--color-deep);
  border: 1px solid rgba(201, 166, 76, 0.15);
  padding: 2.5rem;
}
.contact-info-card h3 { margin-bottom: 1.5rem; }
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(245, 239, 224, 0.05);
}
.contact-row:last-child { border-bottom: none; }
.contact-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 166, 76, 0.1);
  border: 1px solid rgba(201, 166, 76, 0.3);
  color: var(--color-gold);
  flex-shrink: 0;
}
.contact-row .label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-grey-3);
  margin-bottom: 0.25rem;
}
.contact-row .value {
  font-size: 1rem;
  color: var(--color-cream);
}

/* === Mobile === */
@media (max-width: 1024px) {
  .listing-layout { grid-template-columns: 1fr; }
  .listing-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    height: 600px;
  }
  .gallery-main { grid-row: 1 / 2; grid-column: 1 / -1; }
  .stats-bar { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  section { padding: var(--space-lg) 0; max-width: 100vw; overflow-x: hidden; }
  .container, .container-wide, .container-narrow { padding-left: 1rem; padding-right: 1rem; max-width: 100%; box-sizing: border-box; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    left: auto !important;
    width: 100% !important;
    height: 100vh !important;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition-base);
    z-index: 99;
    padding: 4rem 2rem;
    overflow-y: auto;
  }
  .main-nav.open { right: 0 !important; }
  .main-nav ul {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.5rem !important;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  .main-nav a { font-size: 1.1rem; }
  /* On mobile, the About dropdown is collapsed by default. Tap "About ▾" to expand.
     We use CSS-only :focus-within on the parent <li> so no extra JS is needed.
     The About anchor gets tabindex via build.py and prevents navigation on first tap. */
  .nav-dropdown { width: 100%; text-align: center; }
  .nav-dropdown > a { display: inline-block; }
  .nav-dropdown-menu {
    position: static;
    opacity: 0;
    pointer-events: none;
    transform: none;
    background: transparent;
    border: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.2s ease;
  }
  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    max-height: 300px;
    margin-top: 0.5rem;
  }
  .nav-dropdown-menu a {
    padding: 0.6rem 0.4rem;
    font-size: 0.95rem;
    opacity: 0.85;
    text-align: center;
    width: 100%;
  }

  .header-actions { gap: 0.75rem; }
  .lang-switcher { font-size: 0.7rem; }

  .search-panel {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .search-panel-inner { grid-template-columns: 1fr 1fr; }
  .search-submit { grid-column: 1 / -1; }
  .filters-bar { grid-template-columns: 1fr 1fr; max-width: 100%; box-sizing: border-box; }

  .listing-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .listing-title-row { flex-direction: column; align-items: flex-start; }
  .listing-price-block { text-align: left; }
  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    height: 500px;
  }
  .gallery-main { grid-row: 1 / 2; grid-column: 1; }
  .gallery-item:nth-child(n+5) { display: none; }
  /* On mobile the 5th item (which contained the desktop overlay) is hidden,
     so we show the sibling .gallery-more-mobile button instead. */
  .gallery-more-mobile { display: block; }
  .gallery-more-desktop { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 1rem; }

  .float-actions { right: 1rem; bottom: 1rem; }
  .float-btn { width: 50px; height: 50px; }

  .stats-bar { grid-template-columns: 1fr 1fr; padding: 2rem 1rem; }
  .stat-number { font-size: 2rem; }

  .loan-calc-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr 1fr; padding: 1.5rem; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .container, .container-wide, .container-narrow { padding: 0 1rem; }
  .hero { padding: 7rem 1rem 4rem; }
  .stats-bar { grid-template-columns: 1fr; }
  .search-panel { padding: 1rem; }
  .search-panel-inner { grid-template-columns: 1fr; }
}

/* === Print === */
@media print {
  /* Hide navigation, footer, floating buttons, interactive elements */
  .site-header, .site-footer, .float-actions, .compare-tray,
  .listing-breadcrumb, .menu-toggle, .agent-card-actions, .inquiry-form,
  .listing-zh-banner, .property-card-zh-link, .favorite-btn,
  button, [data-compare-id], .search-panel, .filters-bar, .results-info,
  .gallery-more { display: none !important; }

  /* Hide "Show Amortization Schedule" button — keep schedule open if visible */
  .loan-calc-toggle-schedule { display: none !important; }
  .loan-calc-schedule { display: block !important; max-height: none !important; overflow: visible !important; }

  /* Compare page: print full-width, no scroll, no toolbar buttons or scroll hint */
  .compare-table-wrap { overflow: visible !important; }
  .compare-table { min-width: 0 !important; width: 100% !important; }
  .compare-scroll-hint, #compare-save-pdf, #compare-clear { display: none !important; }
  .compare-table th, .compare-table td {
    border: 1px solid #ccc !important;
    padding: 0.4rem 0.5rem !important;
    color: #111 !important;
    background: white !important;
    font-size: 9pt !important;
  }
  .compare-table h3, .compare-table a { color: #111 !important; }

  /* Force schedule to print fully */
  .loan-calc-schedule, .loan-calc-table, .loan-calc-table tr,
  .listing-section, .gallery, .agent-card { page-break-inside: avoid; }

  /* Reset colors for print */
  body { background: white !important; color: #111 !important; font-size: 11pt; }
  h1, h2, h3, h4, h5, h6 { color: #111 !important; page-break-after: avoid; }
  a { color: #1a4480 !important; text-decoration: underline; }

  /* Containers */
  .container, .container-wide, .container-narrow {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  main { padding: 0 !important; }
  section { padding: 0.5rem 0 !important; }

  /* Hero / title */
  .listing-hero { padding-top: 0 !important; }
  .listing-title-row {
    display: block !important;
    border-bottom: 2px solid #111;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }
  .listing-price-block { margin-top: 0.5rem; }
  .listing-price { font-size: 18pt; color: #111 !important; }

  /* Layout: stack columns */
  .listing-layout { display: block !important; }
  .listing-content, .listing-sidebar { width: 100% !important; max-width: 100% !important; }

  /* Gallery: show only first 2 images */
  .gallery {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }
  .gallery-item:nth-child(n+3) { display: none !important; }
  .gallery-main { grid-column: span 2 !important; max-height: 4in !important; }
  .gallery img { max-height: 3in; object-fit: cover; }
  .placeholder { display: none !important; }

  /* Specs grid: 2 columns */
  .spec-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.25rem 1rem !important;
  }
  .spec-item {
    border-bottom: 1px solid #ccc;
    padding: 0.2rem 0;
    display: flex;
    justify-content: space-between;
  }
  .spec-label { color: #666 !important; font-size: 9pt !important; }
  .spec-value { color: #111 !important; font-weight: 500; }

  /* Description */
  .listing-description p { margin-bottom: 0.5rem; }

  /* Loan calc table */
  .loan-calc-table { font-size: 9pt; }
  .loan-calc-table th, .loan-calc-table td {
    border: 1px solid #ccc !important;
    padding: 0.25rem 0.4rem !important;
    color: #111 !important;
    background: white !important;
  }

  /* Hide video iframes (can't print) */
  .video-embed, iframe { display: none !important; }

  /* Agent card — keep visible but slim */
  .agent-card {
    border: 1px solid #ccc !important;
    background: white !important;
    padding: 0.75rem !important;
    margin-top: 1rem !important;
  }
  .agent-card-photo {
    background: #ccc !important;
    color: #111 !important;
    border: 1px solid #999 !important;
  }
  .agent-card h4, .agent-title, .agent-license, .agent-company { color: #111 !important; }

  /* Print URL footer */
  body::after {
    content: "industrialandland.com.my";
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ccc;
    font-size: 9pt;
    color: #666;
  }
}

/* Page setup (must be at top level, not inside @media print) */
@page { margin: 1.5cm; }

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
::selection { background: var(--color-gold); color: var(--color-black); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-black); }
::-webkit-scrollbar-thumb { background: var(--color-grey-1); }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold-deep); }

/* ============================================================
   Areas page — Buy/Rent button cards (new)
   ============================================================ */
.area-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.area-card {
  display: flex;
  flex-direction: column;
  background: rgba(201, 166, 76, 0.06);
  border: 1px solid rgba(201, 166, 76, 0.18);
  padding: 0.7rem 0.85rem;
  min-width: 180px;
  max-width: 280px;
  flex: 1 1 200px;
  transition: var(--transition-fast);
}
.area-card:hover {
  border-color: rgba(201, 166, 76, 0.5);
  background: rgba(201, 166, 76, 0.1);
}
.area-card-name {
  display: block;
  font-size: 0.9rem;
  color: var(--color-cream);
  font-weight: 500;
  margin-bottom: 0.6rem;
  text-decoration: none;
  border-bottom: 1px dotted rgba(201, 166, 76, 0.2);
  padding-bottom: 0.5rem;
}
.area-card-name:hover {
  color: var(--color-gold);
}
.area-card-type {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--color-grey-3);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}
.area-card-actions {
  display: flex;
  gap: 0.4rem;
}
.area-card-btn {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid;
  transition: var(--transition-fast);
}
.area-card-btn-buy {
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.4);
  background: rgba(76, 175, 80, 0.06);
}
.area-card-btn-buy:hover {
  background: rgba(76, 175, 80, 0.18);
  border-color: #4caf50;
  color: #6fcf73;
}
.area-card-btn-rent {
  color: #f4a836;
  border-color: rgba(244, 168, 54, 0.4);
  background: rgba(244, 168, 54, 0.06);
}
.area-card-btn-rent:hover {
  background: rgba(244, 168, 54, 0.18);
  border-color: #f4a836;
  color: #f7be5e;
}

@media (max-width: 480px) {
  .area-card {
    min-width: 100%;
    max-width: 100%;
  }
}

/* ============================================================
   SITE-WIDE POPUP (admin-configurable via /admin/popup)
   Triggers at scroll % set by admin. Shown max N times per visitor.
   ============================================================ */
.site-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: sitePopupFadeIn 0.25s ease;
}
.site-popup-backdrop[hidden] { display: none; }

@keyframes sitePopupFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sitePopupSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.site-popup {
  position: relative;
  background: var(--color-night, #1a1d29);
  border: 1px solid rgba(201, 166, 76, 0.4);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: sitePopupSlideUp 0.35s var(--ease-luxury, ease) 0.05s both;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.site-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #f5efe0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
  border-radius: 50%;
}
.site-popup-close:hover {
  background: rgba(201, 166, 76, 0.8);
  color: #0a0a0c;
}
.site-popup-image {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  display: block;
  background: #0a0a0c;
}
.site-popup-body {
  padding: 1.5rem 1.75rem 1.75rem;
}
.site-popup-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  color: #c9a64c;
  margin: 0 0 1.25rem;
  text-align: center;
}
.site-popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.site-popup-btn {
  display: block;
  text-align: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}
.site-popup-btn-primary {
  background: #25D366;
  color: white;
}
.site-popup-btn-primary:hover {
  background: #1ebe57;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}
.site-popup-btn-outline {
  background: transparent;
  border-color: rgba(201, 166, 76, 0.5);
  color: #c9a64c;
}
.site-popup-btn-outline:hover {
  background: rgba(201, 166, 76, 0.12);
  border-color: #c9a64c;
  color: #d4b65c;
}

@media (max-width: 480px) {
  .site-popup {
    max-width: 100%;
  }
  .site-popup-image {
    max-height: 200px;
  }
  .site-popup-headline {
    font-size: 1.25rem;
  }
  .site-popup-body {
    padding: 1.25rem;
  }
  .site-popup-btn {
    font-size: 0.72rem;
    padding: 0.75rem 1rem;
  }
}

@media print {
  .site-popup-backdrop { display: none !important; }
}

/* ============================================================
   Similar Listings (horizontal scroll on listing detail page)
   ============================================================ */
.similar-listings-section {
  padding: 3rem 0 4rem;
  border-top: 1px solid rgba(201, 166, 76, 0.12);
  margin-top: 3rem;
}
.similar-listings-heading {
  font-size: 1.6rem;
  color: var(--color-cream);
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
}
.similar-listings-section .container-wide > .similar-listings-heading {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
}
.similar-listings-section .container-wide > .similar-listings-heading::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 60px; height: 3px;
  background: var(--color-gold);
}
.similar-listings-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 1.5rem 0.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) transparent;
}
.similar-listings-scroll::-webkit-scrollbar { height: 8px; }
.similar-listings-scroll::-webkit-scrollbar-track { background: transparent; }
.similar-listings-scroll::-webkit-scrollbar-thumb {
  background: var(--color-gold-deep);
  border-radius: 4px;
}
.similar-listings-scroll::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }
.similar-listings-scroll > .property-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}
@media (max-width: 640px) {
  .similar-listings-scroll > .property-card { flex: 0 0 80vw; }
  .similar-listings-heading { font-size: 1.3rem; }
}
@media print {
  .similar-listings-section { display: none !important; }
}
