/* ==========================================================================
   Zimal Properties — additions for the dynamic site (new pages & components).
   site.css holds the approved design verbatim; this file only adds to it,
   using the design's own tokens. The only "overrides" restyle <a> elements that
   replaced prototype <button>s so they look identical.
   ========================================================================== */

/* Links that replaced prototype buttons keep the original look */
#zimal-home .brand-link { display: block; width: max-content; }
#zimal-home a.property-photo { display: block; }
#zimal-home .property-title-link:hover { color: var(--z-navy-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
#zimal-home a.mini-link:hover,
#zimal-home .footer-contact a:hover,
#zimal-home .footer-links a:hover { color: var(--z-white); }
#zimal-home .footer-social { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11px; }
#zimal-home .footer-social a { color: var(--z-gold); }
#zimal-home .owner-copy .owner-form-btn { margin-left: 6px; border-color: rgba(255,255,255,.28); color: var(--z-white); }
#zimal-home .owner-copy .owner-form-btn:hover { border-color: rgba(255,255,255,.6); }
#zimal-home .closing .closing-form-btn { border-color: rgba(255,255,255,.28); background: transparent; color: var(--z-white); }
#zimal-home .z-btn:focus-visible,
#zimal-home a:focus-visible,
#zimal-home button:focus-visible,
#zimal-home summary:focus-visible { outline: 2px solid var(--z-gold); outline-offset: 2px; }
#zimal-home .chat-privacy a { text-decoration: underline; }

/* The design anchored the toast to the top of the document, so it was invisible
   when triggered further down the page. Keep its look; pin it to the viewport. */
#zimal-home .toast { position: fixed; top: 24px; z-index: 95; }
@media (max-width: 760px) { #zimal-home .toast { top: 16px; } }

/* Honeypot: invisible to people, present for bots */
#zimal-home .hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Mobile bar: links styled exactly like the original buttons */
@media (max-width: 760px) {
  #zimal-home .mobile-actions a,
  #zimal-home .mobile-actions button {
    min-height: 58px; border: 0; border-right: 1px solid var(--z-line); background: var(--z-white);
    display: flex; align-items: center; justify-content: center; gap: 7px;
    color: var(--z-navy); font-size: 11px; font-weight: 500;
  }
  #zimal-home .mobile-actions > :last-child { border-right: 0; background: var(--z-whatsapp); color: var(--z-white); }
  #zimal-home .owner-copy .owner-form-btn { margin: 10px 0 0; }
}

/* Fix for the original design: on phones `.purpose-column .property-grid` (2 columns)
   out-specified the 1-column mobile rule, squeezing cards to ~160px and clipping
   their action buttons. */
@media (max-width: 600px) {
  #zimal-home .purpose-column .property-grid { grid-template-columns: 1fr; }
}

#zimal-home .empty-note { margin: 0; padding: 22px; border: 1px dashed #d8dde4; border-radius: var(--z-radius); background: var(--z-white); color: var(--z-slate); font-size: 13px; line-height: 1.6; }
#zimal-home .empty-note a { color: var(--z-navy); text-decoration: underline; }

/* ---- Inner page hero ---------------------------------------------------- */
#zimal-home .page-hero { position: relative; padding: 56px 0 104px; background: linear-gradient(135deg, var(--z-navy), var(--z-navy-2)); color: var(--z-white); overflow: hidden; }
#zimal-home .page-hero::after { content: ""; position: absolute; right: -90px; top: -120px; width: 340px; height: 340px; border: 1px solid rgba(200,164,90,.22); border-radius: 50%; pointer-events: none; }
#zimal-home .page-hero h1 { max-width: 820px; margin: 0; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.04em; font-weight: 500; }
#zimal-home .page-hero-copy { margin: 16px 0 0; color: rgba(255,255,255,.72); font-size: 14px; }
#zimal-home .page-hero .hero-buttons { margin: 28px 0 0; }
#zimal-home .page-hero.is-error { padding-bottom: 90px; }
#zimal-home .page-hero .z-btn-outline { background: transparent; color: var(--z-white); border-color: rgba(255,255,255,.3); }
#zimal-home .breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; color: rgba(255,255,255,.6); font-size: 11px; }
#zimal-home .breadcrumbs a:hover { color: var(--z-white); }
#zimal-home .breadcrumbs.is-light { color: var(--z-slate); }
#zimal-home .breadcrumbs.is-light a:hover { color: var(--z-navy); }
#zimal-home .search-panel.is-compact { margin-top: -62px; }

/* ---- Listing results -------------------------------------------------- */
#zimal-home .listing-section { padding-top: 48px; }
#zimal-home .listing-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; color: var(--z-slate); font-size: 12px; }
#zimal-home .listing-toolbar p { margin: 0; }
#zimal-home .listing-sort { display: flex; align-items: center; gap: 10px; }
#zimal-home .listing-sort label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
#zimal-home .listing-sort select { min-height: 42px; padding: 0 12px; border: 1px solid var(--z-line); border-radius: 10px; background: #fbfcfd; color: var(--z-ink); font-size: 12px; }
#zimal-home .listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
#zimal-home .listing-grid h2 { margin: 9px 0 8px; color: var(--z-navy); font-size: 17px; line-height: 1.35; font-weight: 500; }
#zimal-home .pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 0; padding: 0; list-style: none; }
#zimal-home .pagination a,
#zimal-home .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--z-line); border-radius: 12px; background: var(--z-white); color: var(--z-navy); font-size: 13px; }
#zimal-home .pagination a:hover { border-color: var(--z-gold); }
#zimal-home .pagination [aria-current] { background: var(--z-navy); border-color: var(--z-navy); color: var(--z-white); }
#zimal-home .pagination .gap { align-self: center; color: var(--z-slate); padding: 0 4px; }
#zimal-home .empty-state { max-width: 560px; margin: 10px auto; padding: 44px 32px; text-align: center; border: 1px solid var(--z-line); border-radius: calc(var(--z-radius) + 4px); background: var(--z-ivory); }
#zimal-home .empty-state .service-icon { margin: 0 auto 20px; }
#zimal-home .empty-state h2 { margin: 0 0 10px; color: var(--z-navy); font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
#zimal-home .empty-state p { margin: 0 0 24px; color: var(--z-slate); font-size: 13px; line-height: 1.7; }

/* ---- Property detail -------------------------------------------------- */
#zimal-home .preview-banner { padding: 12px 20px; background: var(--z-gold-soft); color: var(--z-navy); text-align: center; font-size: 12px; font-weight: 500; }
#zimal-home .pd-section { padding-top: 40px; }
#zimal-home .pd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
#zimal-home .pd-head h1 { max-width: 760px; margin: 10px 0 0; color: var(--z-navy); font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -.035em; font-weight: 500; }
#zimal-home .pd-price { text-align: right; flex: 0 0 auto; }
#zimal-home .pd-price .price { margin-top: 10px; font-size: 26px; }
#zimal-home .status-chip.is-inline { position: static; display: inline-block; }
#zimal-home .pd-gallery { margin-bottom: 36px; }
#zimal-home .pd-main { overflow: hidden; aspect-ratio: 16 / 8; border-radius: calc(var(--z-radius) + 4px); background: #dce3ea; }
#zimal-home .pd-main img { width: 100%; height: 100%; object-fit: cover; }
#zimal-home .pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
#zimal-home .pd-thumb { flex: 0 0 auto; width: 112px; height: 78px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: #dce3ea; cursor: pointer; }
#zimal-home .pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
#zimal-home .pd-thumb[aria-current="true"] { border-color: var(--z-gold); }
#zimal-home .pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
#zimal-home .pd-meta { margin-top: 0; padding: 18px 0; font-size: 12px; gap: 12px 22px; }
#zimal-home .pd-meta svg { width: 17px; height: 17px; }
#zimal-home .pd-h2 { margin: 34px 0 14px; color: var(--z-navy); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
#zimal-home .pd-text p { margin: 0 0 14px; color: var(--z-slate); font-size: 14px; line-height: 1.8; }
#zimal-home .pd-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; padding: 0; list-style: none; }
#zimal-home .pd-features li { display: flex; align-items: center; gap: 9px; color: var(--z-ink); font-size: 13px; }
#zimal-home .pd-features svg { width: 16px; height: 16px; color: var(--z-gold); flex: 0 0 auto; }
#zimal-home .pd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--z-line); }
#zimal-home .pd-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--z-line); font-size: 13px; }
#zimal-home .pd-facts div:nth-child(odd) { margin-right: 24px; }
#zimal-home .pd-facts dt { color: var(--z-slate); }
#zimal-home .pd-facts dd { margin: 0; color: var(--z-navy); font-weight: 500; text-align: right; }
#zimal-home .pd-aside { position: sticky; top: 24px; }
#zimal-home .pd-agent { padding: 24px; border: 1px solid var(--z-line); border-radius: calc(var(--z-radius) + 4px); background: var(--z-white); box-shadow: 0 22px 60px rgba(10,29,52,.08); }
#zimal-home .pd-agent-head { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; margin-bottom: 18px; }
#zimal-home .pd-agent-photo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; object-position: center top; }
#zimal-home .pd-agent-head .broker-role { margin: 0 0 4px; }
#zimal-home .pd-agent h2 { margin: 0; color: var(--z-navy); font-size: 19px; font-weight: 500; }
#zimal-home .pd-agent-title { margin: 0 0 16px !important; }
#zimal-home .pd-agent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#zimal-home .pd-form { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--z-line); }
#zimal-home .pd-form-title { margin: 0; color: var(--z-navy); font-size: 14px; font-weight: 500; }
#zimal-home .field textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--z-line); border-radius: 10px; background: #fbfcfd; color: var(--z-ink); font: inherit; font-size: 13px; resize: vertical; }
#zimal-home .field input:focus,
#zimal-home .field select:focus,
#zimal-home .field textarea:focus { outline: none; border-color: var(--z-gold); box-shadow: 0 0 0 3px rgba(200,164,90,.16); }

/* ---- Broker profile --------------------------------------------------- */
#zimal-home .broker-profile .broker-card.is-profile { grid-template-columns: 320px 1fr; max-width: 980px; margin: 0 auto; }
#zimal-home .broker-card.is-profile .broker-photo { min-height: 380px; }
#zimal-home .broker-card.is-profile .broker-body { padding: 40px; }
#zimal-home .broker-card.is-profile h1 { margin: 0; color: var(--z-white); font-size: clamp(30px, 4vw, 44px); font-weight: 500; letter-spacing: -.035em; }
#zimal-home .broker-bio p { margin: 0 0 12px; max-width: 520px; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.75; }
#zimal-home .broker-facts { display: grid; gap: 8px; margin: 6px 0 24px; padding: 0; list-style: none; color: rgba(255,255,255,.8); font-size: 12px; }
#zimal-home .broker-facts li { display: flex; align-items: center; gap: 8px; }
#zimal-home .broker-facts svg { width: 15px; height: 15px; color: var(--z-gold); }
#zimal-home .broker-profile .z-btn-outline { background: transparent; color: var(--z-white); border-color: rgba(255,255,255,.3); }

/* ---- CMS page ------------------------------------------------------------ */
#zimal-home .cms-content { max-width: 760px; color: var(--z-ink); font-size: 15px; line-height: 1.8; }
#zimal-home .cms-content h2 { margin: 36px 0 12px; color: var(--z-navy); font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
#zimal-home .cms-content h3 { margin: 28px 0 10px; color: var(--z-navy); font-size: 18px; font-weight: 500; }
#zimal-home .cms-content p,
#zimal-home .cms-content ul,
#zimal-home .cms-content ol { margin: 0 0 16px; color: var(--z-slate); }
#zimal-home .cms-content a { color: var(--z-navy); text-decoration: underline; }
#zimal-home .cms-content blockquote { margin: 20px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--z-gold); }
#zimal-home .cms-content table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13px; }
#zimal-home .cms-content th,
#zimal-home .cms-content td { padding: 10px; border: 1px solid var(--z-line); text-align: left; }

/* ---- Enquiry dialog (styled like the chat widget) ---------------------- */
html.enq-lock { overflow: hidden; }
#zimal-home .enq-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4,17,31,.55); backdrop-filter: blur(3px); }
#zimal-home .enq-dialog { position: fixed; z-index: 91; left: 50%; top: 50%; width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 24px); overflow: auto; transform: translate(-50%, -50%); border-radius: 24px; background: var(--z-white); box-shadow: 0 28px 80px rgba(7,24,43,.35); }
#zimal-home .enq-dialog[hidden],
#zimal-home .enq-backdrop[hidden] { display: none; }
#zimal-home .enq-form { padding: 22px 20px 18px; background: #fbfbfc; }
#zimal-home .enq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#zimal-home .enq-full { grid-column: 1 / -1; }
#zimal-home .enq-optional { text-transform: none; letter-spacing: 0; }
#zimal-home .enq-errors { min-height: 18px; margin: 12px 2px 6px; color: #b42318; font-size: 12px; }
#zimal-home .enq-submit { width: 100%; }

@media (max-width: 1120px) {
  #zimal-home .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #zimal-home .pd-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
}
@media (max-width: 760px) {
  #zimal-home .page-hero { padding: 40px 0 112px; }
  #zimal-home .search-panel.is-compact { margin-top: -84px; }
  #zimal-home .listing-grid { grid-template-columns: 1fr; }
  #zimal-home .listing-toolbar { flex-direction: column; align-items: flex-start; }
  #zimal-home .pd-head { flex-direction: column; align-items: flex-start; }
  #zimal-home .pd-price { text-align: left; }
  #zimal-home .pd-main { aspect-ratio: 4 / 3; }
  #zimal-home .pd-layout { grid-template-columns: 1fr; }
  #zimal-home .pd-aside { position: static; }
  #zimal-home .pd-features,
  #zimal-home .pd-facts { grid-template-columns: 1fr; }
  #zimal-home .pd-facts div:nth-child(odd) { margin-right: 0; }
  #zimal-home .broker-profile .broker-card.is-profile { grid-template-columns: 1fr; }
  #zimal-home .broker-card.is-profile .broker-photo { height: 360px; min-height: 0; }
  #zimal-home .broker-card.is-profile .broker-body { padding: 28px; }
  #zimal-home .enq-grid { grid-template-columns: 1fr; }
}
