/* Fiona Pattaya — shared chrome (header, footer, cards, forms, AI) */

.trust-strip {
  background: var(--navy);
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.55rem 1rem;
  letter-spacing: 0.02em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-solid {
  background: rgba(247, 244, 238, 0.98);
  box-shadow: var(--shadow-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}
.nav-desktop a {
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  white-space: nowrap;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--navy);
  background: rgba(185, 148, 90, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.lang-select,
.icon-btn {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  color: var(--text);
}
.lang-select {
  padding: 0 0.75rem;
  font-size: 0.82rem;
}
.icon-btn {
  width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.icon-btn .badge.show { display: flex; }

.menu-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  position: relative;
  border-radius: 2px;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.cta-talk { display: none; }

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.nav-drawer.open {
  pointer-events: auto;
  visibility: visible;
}
.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 27, 44, 0.45);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.nav-drawer.open .nav-drawer-backdrop { opacity: 1; }
.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 360px);
  height: 100%;
  background: var(--ivory);
  padding: 1.25rem 1.25rem 2rem;
  transform: translateX(105%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.nav-drawer.open .nav-drawer-panel { transform: translateX(0); }
.nav-drawer-panel a {
  padding: 0.85rem 0.75rem;
  border-radius: 10px;
  font-weight: 500;
}
.nav-drawer-panel a:hover { background: rgba(185, 148, 90, 0.12); }
.drawer-close {
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

body.nav-open { overflow: hidden; }

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.82);
  padding: 4rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 0.85rem;
}
.footer-brand h3 {
  color: var(--white);
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}
.footer-brand p {
  margin: 0;
  color: rgba(255,255,255,0.68);
  font-size: 0.92rem;
  max-width: 28rem;
}
.footer-col h4 {
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.footer-col a:hover { color: var(--sand); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

.prop-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.prop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.prop-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e8e2d8;
  overflow: hidden;
}
.prop-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prop-card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.prop-card-type {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.prop-card h3 {
  margin: 0;
  font-size: 1.2rem;
}
.prop-card-loc {
  color: var(--muted);
  font-size: 0.9rem;
}
.prop-card-price {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  margin-top: auto;
  padding-top: 0.35rem;
}
.prop-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.prop-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}
.prop-badge.verified { background: var(--success); }
.fav-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.fav-btn.active { color: var(--error); }

.skeleton {
  background: linear-gradient(90deg, #ebe6dc 25%, #f5f1ea 50%, #ebe6dc 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius);
  min-height: 280px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.state-box {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.state-box.error { color: var(--error); border-color: rgba(179,58,58,0.35); }
.demo-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(185,148,90,0.15);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
}

.form-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.form-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field .error-text { color: var(--error); font-size: 0.82rem; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8,27,44,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(100%, 420px);
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.modal h2 { margin: 0 0 1rem; font-size: 1.6rem; }

/* AI assistant */
.ai-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 180;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.15;
}
.wa-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 5.1rem;
  z-index: 180;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}
.ai-panel {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 190;
  width: min(100% - 2rem, 360px);
  max-height: min(70vh, 520px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.ai-panel.open { display: flex; }
.ai-panel-head {
  background: var(--navy);
  color: var(--white);
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.ai-panel-head small {
  display: block;
  opacity: 0.75;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
  background: var(--ivory);
}
.ai-msg {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 90%;
}
.ai-msg.bot { background: var(--white); border: 1px solid var(--line); }
.ai-msg.user { background: var(--navy); color: var(--white); margin-left: auto; }
.ai-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
}
.ai-form input {
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.9rem;
}
.ai-form button {
  border: none;
  background: var(--gold);
  color: var(--navy);
  border-radius: 999px;
  padding: 0 1rem;
  font-weight: 600;
  cursor: pointer;
}

@media (min-width: 980px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .cta-talk { display: inline-flex; }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

/* Mobile: keep FABs clear of hero CTAs and safe-area */
@media (max-width: 640px) {
  .header-inner {
    gap: 0.45rem;
  }
  .header-actions {
    gap: 0.2rem;
    flex-shrink: 0;
  }
  .lang-select {
    padding: 0 0.35rem;
    font-size: 0.72rem;
    min-height: 36px;
    max-width: 3.4rem;
  }
  .icon-btn, .menu-toggle {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
  .brand {
    min-width: 0;
    flex-shrink: 1;
    gap: 0.45rem;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-sub {
    display: none;
  }
  .wa-fab {
    bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
    right: 0.85rem;
    width: 48px;
    height: 48px;
  }
  .ai-fab {
    bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
    right: 0.85rem;
    width: 52px;
    height: 52px;
  }
  .ai-panel {
    right: 0.65rem;
    bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
    width: min(100% - 1.3rem, 360px);
  }
}

/* Extra-narrow phones: prevent header horizontal scroll */
@media (max-width: 360px) {
  .trust-strip {
    font-size: 0.72rem;
    padding: 0.45rem 0.65rem;
  }
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .header-actions .icon-btn#btn-account {
    display: none;
  }
  .brand-name {
    font-size: 0.98rem;
  }
}
