/* ==========================================================================
   HAUS LANG BAAN - Main CSS Tokens & Visual Source of Truth
   Reference: Stitch Screen 10 (Home), Screen 2 (Mobile), Screen 3 (Catalog), Screen 4 (Detail)
   ========================================================================== */

:root {
  /* Stitch Source of Truth Color Palette */
  --bg-surface: #fcf9f4;
  --bg-surface-low: #f6f3ee;
  --bg-surface-container: #f0ede9;
  --bg-surface-high: #ebe8e3;
  --bg-surface-highest: #e5e2dd;
  --bg-surface-lowest: #ffffff;
  
  --primary: #6e5c40;
  --primary-dark: #46371e;
  --primary-container: #b6a080;
  --primary-fixed: #f8dfbc;
  
  --on-surface: #1c1c19;
  --on-surface-variant: #4d463c;
  --secondary: #605e5b;
  --secondary-container: #e6e2de;
  
  --outline: #7e766b;
  --outline-variant: #d0c5b9;

  /* Status Colors */
  --status-available: #059669;
  --status-available-bg: #d1fae5;
  --status-reserved: #d97706;
  --status-reserved-bg: #fef3c7;
  --status-sold: #dc2626;
  --status-sold-bg: #fee2e2;
  --status-rented: #4f46e5;
  --status-rented-bg: #e0e7ff;
  --status-draft: #4b5563;
  --status-draft-bg: #f3f4f6;

  /* Typography Fonts */
  --font-serif: 'Marcellus', 'Anuphan', serif;
  --font-sans: 'Manrope', 'Anuphan', sans-serif;

  /* Spacing Scale matching Stitch */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --section-gap: 100px;
  --container-max: 1280px;

  /* Border Radii */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Rules */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-surface);
  color: var(--on-surface);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#app-view {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--on-surface);
  font-weight: 400;
  line-height: 1.2;
}

.font-display-lg {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.font-headline-md {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.3;
  font-weight: 400;
}

.font-headline-sm {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.4;
  font-weight: 500;
}

.font-label-caps {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-dark {
  background-color: var(--on-surface);
  color: var(--bg-surface);
}

.btn-dark:hover {
  background-color: rgba(28, 28, 25, 0.9);
}

.btn-secondary {
  background-color: transparent;
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
}

.btn-secondary:hover {
  border-color: var(--on-surface);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-exclusive {
  background-color: var(--on-surface);
  color: var(--bg-surface);
}

.badge-luxury {
  background-color: var(--primary-container);
  color: var(--primary-dark);
}

.badge-ultra {
  background-color: var(--primary);
  color: #ffffff;
}

.badge-reserved {
  background-color: var(--status-reserved-bg);
  color: var(--status-reserved);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-available {
  background-color: var(--status-available-bg);
  color: var(--status-available);
}

.badge-sold {
  background-color: var(--status-sold-bg);
  color: var(--status-sold);
}

.badge-rented {
  background-color: var(--status-rented-bg);
  color: var(--status-rented);
}

.badge-draft {
  background-color: var(--status-draft-bg);
  color: var(--status-draft);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(252, 249, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(208, 197, 185, 0.4);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo-stitch {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-logo-stitch .title {
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--on-surface);
  line-height: 1;
}

.brand-logo-stitch .subtitle {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-top: 2px;
}

.nav-links-stitch {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links-stitch a {
  color: var(--secondary);
}

.nav-links-stitch a:hover, .nav-links-stitch a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--on-surface);
  cursor: pointer;
}

/* Footer (Screen 10 & Screen 3) */
.footer-stitch {
  background-color: var(--bg-surface-highest);
  border-top: 1px solid var(--outline-variant);
  padding: 80px 0 40px;
  margin-top: var(--section-gap);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 32px;
  letter-spacing: -0.03em;
  color: var(--on-surface);
}

.footer-brand-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 16px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--secondary);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(208, 197, 185, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--secondary);
}

/* Floating LINE Chat Button */
.floating-line-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #00B900;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  transition: var(--transition-fast);
}

.floating-line-btn:hover {
  background-color: #009900;
  transform: translateY(-2px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(28, 28, 25, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 1;
  transition: var(--transition-fast);
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  padding: 32px;
  background: var(--bg-surface-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-sm);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--secondary);
  cursor: pointer;
}

/* Lightbox Modal */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.75rem;
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

.toast-success { background-color: var(--status-available); }
.toast-error { background-color: var(--status-sold); }
.toast-info { background-color: var(--primary); }

/* Responsive Rules */
@media (max-width: 992px) {
  .nav-links-stitch { display: none; }
  .nav-links-stitch.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--outline-variant);
    box-shadow: var(--shadow-md);
  }
  .mobile-nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
  .font-display-lg { font-size: 32px; }
  .font-headline-md { font-size: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}


/* ==========================================================
   HAUS TYPOGRAPHY MINI REFRESH
   ========================================================== */

body {
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Form / Filters */
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

/* Price / important numbers */
.property-price,
.price-display {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

/* Luxury English headings */
.font-serif,
.hero-title,
.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Thai body text gets a softer rhythm */
html[lang="th"] body {
  line-height: 1.65;
}

/* English uppercase labels */
.badge,
.eyebrow,
.section-label {
  letter-spacing: 0.08em;
}



/* ==========================================================
   HAUS SOFT LUXURY UI 2026
   Rounded / Glass / Smart / Minimal
   ========================================================== */

:root {
  --haus-radius-sm: 14px;
  --haus-radius-md: 20px;
  --haus-radius-lg: 26px;
  --haus-radius-pill: 999px;

  --haus-glass:
    rgba(255, 255, 255, 0.72);

  --haus-glass-strong:
    rgba(255, 255, 255, 0.88);

  --haus-outline:
    rgba(91, 74, 52, 0.10);

  --haus-shadow-sm:
    0 6px 20px rgba(38, 30, 22, 0.05);

  --haus-shadow-md:
    0 12px 34px rgba(38, 30, 22, 0.07);

  --haus-shadow-hover:
    0 16px 42px rgba(38, 30, 22, 0.10);
}


/* ==========================================================
   GLOBAL BUTTONS
   ========================================================== */

.btn,
button:not(.haus-gallery-action):not(.haus-lightbox-nav) {
  border-radius: var(--haus-radius-pill);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    border-color .18s ease;
}

.btn:hover,
button:not(.haus-gallery-action):not(.haus-lightbox-nav):hover {
  transform: translateY(-1px);
}


/* Primary */
.btn-primary {
  border: none !important;
  border-radius: var(--haus-radius-pill) !important;
  padding-left: 22px;
  padding-right: 22px;
  box-shadow: 0 8px 24px rgba(120, 93, 57, 0.16);
}


/* Secondary / Ghost */
.btn-secondary,
.btn-outline {
  border-radius: var(--haus-radius-pill) !important;
  background: var(--haus-glass) !important;
  border: 1px solid var(--haus-outline) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


/* ==========================================================
   INPUT / SELECT / TEXTAREA
   ========================================================== */

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  border-radius: var(--haus-radius-sm) !important;
  border: 1px solid var(--haus-outline) !important;
  background: rgba(255,255,255,.72) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65);

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;

  font-family: var(--font-sans);
}


input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  outline: none !important;

  border-color:
    rgba(160, 131, 88, 0.42) !important;

  background:
    rgba(255,255,255,.92) !important;

  box-shadow:
    0 0 0 4px rgba(160,131,88,.09) !important;
}


/* ==========================================================
   PUBLIC SEARCH / FILTER CONTROLS
   ========================================================== */

#catalog-listing-type,
#catalog-prop-type,
#catalog-query,
#catalog-max-price,
#home-listing-type,
#home-prop-type,
#home-query,
#home-max-price {

  min-height: 48px;

  border-radius:
    var(--haus-radius-pill) !important;

  padding-left: 18px !important;
  padding-right: 18px !important;

  background:
    rgba(255,255,255,.70) !important;

  border:
    1px solid rgba(100,82,59,.10) !important;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 7px 22px rgba(36,29,22,.045);
}


/* Search buttons */
#catalog-search-btn,
#home-search-btn {

  min-height: 48px;

  border-radius:
    var(--haus-radius-pill) !important;

  padding-left: 28px !important;
  padding-right: 28px !important;

  border: none !important;

  box-shadow:
    0 9px 24px rgba(44,37,29,.14);

  transition:
    transform .18s ease,
    box-shadow .18s ease;
}


#catalog-search-btn:hover,
#home-search-btn:hover {
  transform: translateY(-2px);

  box-shadow:
    0 13px 30px rgba(44,37,29,.18);
}


/* ==========================================================
   SEARCH / FILTER WRAPPERS
   ========================================================== */

.filter-bar,
.search-bar,
.search-filter-bar,
.catalog-filter-bar,
.home-search-bar {

  border-radius:
    var(--haus-radius-lg) !important;

  background:
    rgba(255,255,255,.60) !important;

  border:
    1px solid rgba(255,255,255,.52) !important;

  box-shadow:
    var(--haus-shadow-md);

  backdrop-filter:
    blur(22px);

  -webkit-backdrop-filter:
    blur(22px);
}


/* ==========================================================
   PROPERTY CARDS
   ========================================================== */

.property-card,
.feature-card-stitch {

  border-radius:
    var(--haus-radius-md) !important;

  overflow: hidden;

  border:
    1px solid rgba(94,77,54,.07) !important;

  background:
    rgba(255,255,255,.92);

  box-shadow:
    var(--haus-shadow-sm);

  transition:
    transform .24s ease,
    box-shadow .24s ease;
}


.property-card:hover,
.feature-card-stitch:hover {

  transform:
    translateY(-4px);

  box-shadow:
    var(--haus-shadow-hover);
}


/* Property images */
.property-card img,
.feature-card-stitch img {

  transition:
    transform .45s ease;
}


.property-card:hover img,
.feature-card-stitch:hover img {
  transform:
    scale(1.018);
}


/* ==========================================================
   BADGES
   ========================================================== */

.badge,
.badge-tier,
.badge-available,
.badge-reserved,
.badge-sold,
.badge-rented,
.badge-draft {

  border-radius:
    var(--haus-radius-pill) !important;

  padding:
    6px 11px !important;

  letter-spacing:
    .025em;

  border:
    1px solid rgba(255,255,255,.30);
}


/* ==========================================================
   MEDIA / GALLERY / VIDEO / MAP
   ========================================================== */

.haus-property-gallery,
.media-card,
.video-card,
.map-card {

  border-radius:
    var(--haus-radius-lg) !important;

  overflow: hidden;

  border:
    1px solid rgba(94,77,54,.06);

  box-shadow:
    var(--haus-shadow-sm);
}


/* ==========================================================
   ADMIN PANELS / CARDS
   ========================================================== */

.admin-card,
.detail-sidebar-card,
.sidebar-agent-box,
.matrix-box {

  border-radius:
    var(--haus-radius-md) !important;

  border:
    1px solid rgba(94,77,54,.08) !important;

  box-shadow:
    var(--haus-shadow-sm);
}


/* ==========================================================
   SMALL ACTION / ICON BUTTONS
   ========================================================== */

.btn-action-icon {

  border-radius:
    12px !important;

  transition:
    background .18s ease,
    transform .18s ease;
}


.btn-action-icon:hover {

  transform:
    translateY(-1px);

  background:
    rgba(157,130,91,.09);
}


/* ==========================================================
   SOFT DIVIDERS
   ========================================================== */

hr {

  border: 0;

  border-top:
    1px solid rgba(94,77,54,.08);
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {

  #catalog-listing-type,
  #catalog-prop-type,
  #catalog-query,
  #catalog-max-price,
  #home-listing-type,
  #home-prop-type,
  #home-query,
  #home-max-price,
  #catalog-search-btn,
  #home-search-btn {

    min-height:
      46px;
  }

  .property-card,
  .feature-card-stitch {

    border-radius:
      18px !important;
  }

  .haus-property-gallery {

    border-radius:
      18px !important;
  }
}



/* =========================================================
   HAUS LANG BAAN — LUXURY DARK MODE V1
   ========================================================= */


/* Theme Toggle */
.haus-theme-toggle {
  width: 38px !important;
  height: 38px !important;

  padding: 0 !important;

  display: inline-grid !important;
  place-items: center !important;

  border-radius: 999px !important;

  border:
    1px solid rgba(120, 100, 75, 0.14) !important;

  background:
    rgba(255,255,255,0.28) !important;

  color:
    var(--secondary) !important;

  -webkit-backdrop-filter:
    blur(14px) saturate(140%);

  backdrop-filter:
    blur(14px) saturate(140%);

  box-shadow:
    0 6px 18px rgba(30,24,18,0.05),
    inset 0 1px 0 rgba(255,255,255,0.48);

  cursor: pointer;

  transition:
    transform .22s ease,
    background .22s ease,
    color .22s ease;
}


.haus-theme-toggle:hover {
  transform:
    translateY(-1px) scale(1.04);

  background:
    rgba(255,255,255,0.46) !important;
}


.haus-theme-toggle i {
  font-size: 13px;
}


/* =========================================================
   DARK COLOR SYSTEM
   ========================================================= */

html[data-theme="dark"] {

  color-scheme: dark;

  --background: #151412;
  --surface: #1c1a17;

  --bg-surface: #1c1a17;
  --bg-surface-lowest: #12110f;

  --on-surface: #eee9e1;

  --text-primary: #eee9e1;
  --text-secondary: #bbb2a6;
  --text-muted: #91887c;

  --secondary: #c4b49d;

  --primary: #a88c68;
  --primary-cocoa: #b89b76;
  --gold-accent: #c4a878;

  --outline-variant:
    rgba(255,255,255,0.10);

  --haus-glass:
    rgba(35,32,28,0.66);

  --haus-glass-strong:
    rgba(38,35,31,0.84);

  --haus-outline:
    rgba(255,255,255,0.09);
}


/* Base */
html[data-theme="dark"] body {
  background:
    #151412 !important;

  color:
    #eee9e1 !important;
}


/* Navigation */
html[data-theme="dark"] nav,
html[data-theme="dark"] .navbar {
  background:
    rgba(20,19,17,0.88) !important;

  border-color:
    rgba(255,255,255,0.07) !important;

  -webkit-backdrop-filter:
    blur(22px);

  backdrop-filter:
    blur(22px);
}


/* Theme Button in Dark */
html[data-theme="dark"] .haus-theme-toggle {
  background:
    rgba(255,255,255,0.08) !important;

  border-color:
    rgba(255,255,255,0.12) !important;

  color:
    #d6c3a6 !important;

  box-shadow:
    0 7px 22px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.10);
}


html[data-theme="dark"] .haus-theme-toggle:hover {
  background:
    rgba(255,255,255,0.14) !important;
}


/* =========================================================
   HERO GLASS CARDS — SMOKED GLASS
   ========================================================= */

html[data-theme="dark"] .feature-card-stitch {

  color:
    #f1ece5 !important;

  background:
    linear-gradient(
      145deg,
      rgba(31,29,26,0.72),
      rgba(24,22,20,0.54)
    ) !important;

  border:
    1px solid rgba(255,255,255,0.10) !important;

  box-shadow:
    0 18px 46px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.09);
}


html[data-theme="dark"] .feature-card-stitch h3,
html[data-theme="dark"] .feature-card-stitch p,
html[data-theme="dark"] .feature-card-stitch > i {
  color:
    #eee7dc !important;
}


html[data-theme="dark"] .feature-card-stitch .arrow-icon {

  background:
    rgba(255,255,255,0.07) !important;

  border:
    1px solid rgba(255,255,255,0.13) !important;

  color:
    #cbb99e !important;

  box-shadow:
    0 8px 22px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}


/* =========================================================
   INPUTS / SEARCH / FILTER
   ========================================================= */

html[data-theme="dark"]
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),

html[data-theme="dark"] select,

html[data-theme="dark"] textarea {

  color:
    #eee8df !important;

  background:
    rgba(32,30,27,0.82) !important;

  border-color:
    rgba(255,255,255,0.09) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04);
}


html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color:
    #8f877c !important;
}


html[data-theme="dark"]
input:not([type="checkbox"]):not([type="radio"]):focus,

html[data-theme="dark"] select:focus,

html[data-theme="dark"] textarea:focus {

  background:
    rgba(39,36,32,0.96) !important;

  border-color:
    rgba(196,168,120,0.40) !important;

  box-shadow:
    0 0 0 4px rgba(196,168,120,0.08) !important;
}


/* =========================================================
   PROPERTY CARDS
   ========================================================= */

html[data-theme="dark"] .property-card {

  background:
    #201e1b !important;

  border-color:
    rgba(255,255,255,0.07) !important;

  color:
    #eee8df !important;

  box-shadow:
    0 12px 34px rgba(0,0,0,0.20);
}


html[data-theme="dark"] .property-card h1,
html[data-theme="dark"] .property-card h2,
html[data-theme="dark"] .property-card h3,
html[data-theme="dark"] .property-card h4,
html[data-theme="dark"] .property-card h5,

html[data-theme="dark"] .property-card p {
  color:
    #eee8df;
}


/* Generic public cards */
html[data-theme="dark"] .media-card,
html[data-theme="dark"] .video-card,
html[data-theme="dark"] .map-card,
html[data-theme="dark"] .detail-sidebar-card,
html[data-theme="dark"] .sidebar-agent-box,
html[data-theme="dark"] .matrix-box {

  background:
    #201e1b !important;

  color:
    #eee8df !important;

  border-color:
    rgba(255,255,255,0.07) !important;
}


/* Footer */
html[data-theme="dark"] footer {

  background:
    #11100e !important;

  color:
    #d9d1c6 !important;

  border-color:
    rgba(255,255,255,0.06) !important;
}


/* Smooth theme switch */
body,
nav,
.navbar,
.property-card,
.feature-card-stitch,
input,
select,
textarea,
footer {

  transition:
    background-color .28s ease,
    color .28s ease,
    border-color .28s ease,
    box-shadow .28s ease;
}


/* =========================================================
   HAUS DARK MODE — FOOTER FIX V2
   ========================================================= */

html[data-theme="dark"] footer,
html[data-theme="dark"] #contact-footer,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer-container,
html[data-theme="dark"] .footer-bottom {
  background: #11100e !important;
  color: #dcd4c9 !important;
  border-color: rgba(255,255,255,0.07) !important;
}

html[data-theme="dark"] .footer-col,
html[data-theme="dark"] .footer-col h4,
html[data-theme="dark"] .footer-col p,
html[data-theme="dark"] .footer-links,
html[data-theme="dark"] .footer-links li,
html[data-theme="dark"] .footer-links a,
html[data-theme="dark"] .footer-bottom,
html[data-theme="dark"] #footer-admin-trigger {
  color: #d9d1c6 !important;
}

html[data-theme="dark"] .footer-links a:hover {
  color: #c9ad82 !important;
}

html[data-theme="dark"] .footer-links i {
  color: #b99b72 !important;
}

html[data-theme="dark"] .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07) !important;
}


/* =========================================================
   HAUS DARK MODE — MORE THAN AN AGENCY FIX
   ========================================================= */

/* พื้นหลัง Section */
html[data-theme="dark"] .services-section-stitch {
  background:
    linear-gradient(
      180deg,
      #171512 0%,
      #1b1916 100%
    ) !important;

  color: #eee8df !important;

  border-color: rgba(255,255,255,0.06) !important;
}


/* หัวข้อ More Than An Agency */
html[data-theme="dark"] .services-section-stitch .font-display-lg {
  color: #f1ece4 !important;
}


/* คำอธิบายใต้หัวข้อ */
html[data-theme="dark"] .services-section-stitch > .container > p {
  color: #aaa196 !important;
}


/* Grid บริการ */
html[data-theme="dark"] .services-grid-stitch {
  color: #eee8df !important;
}


/* แต่ละบริการ */
html[data-theme="dark"] .service-item-stitch {
  color: #ddd5c9 !important;

  background: transparent !important;

  border-color: rgba(255,255,255,0.06) !important;
}


/* Icon สี Champagne Gold */
html[data-theme="dark"] .service-item-stitch > i {
  color: #c5a879 !important;
}


/* ชื่อบริการภาษาไทย */
html[data-theme="dark"] .service-item-stitch p {
  color: #e6ded3 !important;
}


/* คำอังกฤษในวงเล็บ */
html[data-theme="dark"] .service-item-stitch span {
  color: #8f877c !important;
}


/* Hover เบา ๆ */
html[data-theme="dark"] .service-item-stitch:hover {
  background: rgba(255,255,255,0.035) !important;
  border-radius: 18px;
}


/* =========================================================
   HAUS DARK MODE — SURFACE COLOR FIX
   Fix Catalog / Buy / Rent / Luxury header sections
   ========================================================= */

html[data-theme="dark"] {
  --bg-surface-low: #191714;
  --bg-surface-high: #211f1b;
  --bg-surface-container: #1d1b18;

  --on-surface-variant: #b8afa3;
}

/* Catalog Header */
html[data-theme="dark"] #app section[style*="--bg-surface-low"] {
  background:
    linear-gradient(
      180deg,
      #191714 0%,
      #1d1a17 100%
    ) !important;

  border-color: rgba(255,255,255,0.06) !important;
}

/* Exclusive Properties heading */
html[data-theme="dark"] #app section[style*="--bg-surface-low"] h1 {
  color: #f1ece4 !important;
}

/* Subtitle */
html[data-theme="dark"] #app section[style*="--bg-surface-low"] p {
  color: #aaa196 !important;
}



/* =========================================================
   HAUS LANGUAGE SWITCHER V1
   ========================================================= */

.haus-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 5px 8px;

  border-radius: 999px;

  background: rgba(255,255,255,0.10);

  border: 1px solid rgba(130,110,85,0.10);

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.haus-language-switcher > span {
  opacity: .32;
  font-size: 10px;
}

.haus-lang-btn {
  appearance: none;
  border: 0;
  outline: 0;

  background: transparent;

  padding: 3px 4px;

  color: var(--secondary);

  font: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;

  opacity: .52;

  cursor: pointer;

  transition:
    opacity .2s ease,
    color .2s ease,
    transform .2s ease;
}

.haus-lang-btn:hover {
  opacity: .82;
}

.haus-lang-btn.active {
  opacity: 1;
  color: var(--on-surface);
  font-weight: 700;
}

.haus-lang-btn:active {
  transform: scale(.95);
}


/* DARK MODE */
html[data-theme="dark"] .haus-language-switcher {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.07);
}

html[data-theme="dark"] .haus-lang-btn {
  color: #b8afa3;
}

html[data-theme="dark"] .haus-lang-btn.active {
  color: #eee8df;
}


/* MOBILE */
@media (max-width: 768px) {
  .haus-language-switcher {
    gap: 3px;
    padding: 4px 6px;
  }

  .haus-lang-btn {
    font-size: 9px;
  }
}


/* ===== FIX PROPERTY GALLERY BUTTON SHAPE ===== */
button.gallery-trigger {
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}


/* ===== ALIGN PROPERTY DETAIL WITH GALLERY ===== */
.detail-layout-grid {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.detail-main-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


/* ===== SINGLE IMAGE GALLERY = FULL WIDTH ===== */
.haus-property-gallery:not(:has(.haus-gallery-thumb)) {
  grid-template-columns: 1fr !important;
}

.haus-property-gallery:not(:has(.haus-gallery-thumb)) .haus-gallery-main {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}


/* ===== CENTER PROPERTY DETAIL CONTENT ===== */
.detail-main-content {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 28px auto 0 !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
}

/* Mobile */
@media (max-width: 768px) {
  .detail-main-content {
    max-width: 100% !important;
    padding: 0 18px !important;
  }
}


/* ===== PROPERTY DETAIL CLEAN LUXURY FIX ===== */

/* ก้อนข้อมูลหลัก ย่นเข้าจากขอบ */
.detail-main-content {
  width: calc(100% - 80px) !important;
  max-width: 1050px !important;
  margin: 32px auto 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* สเปก: เอากรอบบาง/เงาที่ทำให้ดูแน่นออก */
.detail-specs-matrix {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px 28px !important;
  margin: 22px 0 30px !important;
}

.matrix-box {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
}

/* กล่องราคา ไม่ให้ยาวชนขอบ */
.detail-sidebar-card {
  width: calc(100% - 80px) !important;
  max-width: 1050px !important;
  margin: 34px auto !important;
  padding: 26px 30px !important;
  box-sizing: border-box !important;

  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: none !important;
  background: rgba(255,255,255,0.035) !important;
}

/* ราคา */
.sidebar-price-tag {
  margin-top: 8px !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
}

/* Agent ด้านล่างไม่ให้รูปหลุดใหญ่ */
.sidebar-agent-box {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}

.agent-avatar {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* Mobile */
@media (max-width: 768px) {
  .detail-main-content,
  .detail-sidebar-card {
    width: calc(100% - 36px) !important;
  }

  .detail-specs-matrix {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .detail-sidebar-card {
    padding: 22px 20px !important;
  }
}


/* ===== SOFT ROUNDED SPEC BOXES ONLY ===== */
.matrix-box {
  border-radius: 14px !important;
  overflow: hidden !important;
}

