/* ===== Appfolio Listings Pro - Premium Styles ===== */
.apflp-root{
  --apflp-radius: 16px;
  --apflp-radius-sm: 12px;
  --apflp-shadow: 0 10px 30px rgba(0,0,0,.07);
  --apflp-shadow-sm: 0 4px 14px rgba(0,0,0,.06);
  --apflp-border: rgba(0,0,0,.08);

  --apflp-text: #0f172a;
  --apflp-muted: #64748b;
  --apflp-bg: #ffffff;
  --apflp-soft: #f8fafc;

  /* Primary / Secondary (Admin will override via inline CSS) */
  --apflp-accent: #0ea5e9;
  --apflp-accent-rgb: 14,165,233;

  --apflp-accent-2: #22c55e;
  --apflp-accent-2-rgb: 34,197,94;

  --apflp-cols-desktop: 3;
  --apflp-cols-tablet: 2;
  --apflp-cols-mobile: 1;

  color: var(--apflp-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.35;
}

.apflp-root * { box-sizing: border-box; }

.apflp-loading{
  padding: 14px 16px;
  background: var(--apflp-soft);
  border: 1px solid var(--apflp-border);
  border-radius: var(--apflp-radius);
  margin: 10px 0;
  display:none;
}

.apflp-msg{
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: var(--apflp-radius);
  border: 1px solid var(--apflp-border);
  background: var(--apflp-soft);
}
.apflp-msg:empty{ display:none; }
.apflp-msg.is-err{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
}
.apflp-msg.is-ok{
  border-color: rgba(var(--apflp-accent-2-rgb), .35);
  background: rgba(var(--apflp-accent-2-rgb), .08);
}

/* ===== Toolbar ===== */
.apflp-toolbar{
  display:flex;
  gap:12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.apflp-filters, .apflp-sort{
  background: var(--apflp-bg);
  border: 1px solid var(--apflp-border);
  border-radius: var(--apflp-radius);
  padding: 10px;
  box-shadow: var(--apflp-shadow-sm);
}

.apflp-filters{ flex: 1 1 520px; min-width: 0; }
.apflp-sort{ flex: 0 0 auto; min-width: 220px; max-width: 100%; }

.apflp-filters-inner{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items: center;
}

.apflp-sort-inner{
  display:flex;
  gap:10px;
  align-items: center;
}

.apflp-sort-label{
  font-size: 13px;
  color: var(--apflp-muted);
  font-weight: 600;
  white-space: nowrap;
}

.apflp-input, .apflp-select{
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--apflp-border);
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  min-width: 150px;
}

.apflp-input{
  min-width: 220px;
  flex: 1 1 220px;
}

.apflp-input:focus, .apflp-select:focus{
  border-color: rgba(var(--apflp-accent-rgb), .55);
  box-shadow: 0 0 0 4px rgba(var(--apflp-accent-rgb), .12);
}

/* ===== Grid ===== */
.apflp-grid{
  display:grid;
  gap: 14px;
  margin: 10px 0 14px;
}

/* desktop columns from admin */
@media (min-width: 992px){
  .apflp-grid{ grid-template-columns: repeat(var(--apflp-cols-desktop), minmax(0,1fr)); }
}
@media (min-width: 640px) and (max-width: 991px){
  .apflp-grid{ grid-template-columns: repeat(var(--apflp-cols-tablet), minmax(0,1fr)); }
}
@media (max-width: 639px){
  .apflp-grid{ grid-template-columns: repeat(var(--apflp-cols-mobile), minmax(0,1fr)); }
}

/* ===== Common Card ===== */
.apflp-card{
  background: var(--apflp-bg);
  border: 1px solid var(--apflp-border);
  border-radius: var(--apflp-radius);
  overflow:hidden;
  box-shadow: var(--apflp-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.apflp-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--apflp-shadow);
  border-color: rgba(var(--apflp-accent-rgb), .25);
}

/* ===== Template 1 ===== */

.apflp-card-t1{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}

.apflp-card-t1:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2,6,23,.12);
}

.apflp-card-t1 .apflp-t1-link{
  display:block;
  text-decoration:none;
  color: inherit;
}

.apflp-card-t1 .apflp-t1-media{
  background: #eef2f7;
}

.apflp-card-t1 .apflp-t1-media img{
  display:block;
  width:100%;
  height: 230px;
  object-fit: cover;
}

.apflp-card-t1 .apflp-noimg{
  height: 230px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(15,23,42,.55);
  font-size: 13px;
}

.apflp-card-t1 .apflp-t1-body{
  padding: 16px 18px 14px;
}

.apflp-card-t1 .apflp-t1-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.apflp-card-t1 .apflp-price{
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.4px;
  color: #0f172a;
}

.apflp-card-t1 .apflp-type{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  color: #0f766e;
  background: #f0fdfa;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.apflp-card-t1 .apflp-t1-address{
  margin-bottom: 12px;
}

.apflp-card-t1 .apflp-t1-addr1{
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.apflp-card-t1 .apflp-t1-addr2{
  font-size: 15px;
  color: rgba(15,23,42,.65);
}

.apflp-card-t1 .apflp-t1-icons{
  display:flex;
  align-items:center;
  gap: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,.08);
  margin-bottom: 15px;
}

.apflp-card-t1 .apflp-t1-ic{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  color: rgba(15,23,42,.85);
  font-size: 14px;
  font-weight: 600;
}

.apflp-card-t1 .apflp-t1-ic svg{
  width: 18px;
  height: 18px;
  fill: rgba(15,23,42,.6);
}

.apflp-card-t1 .apflp-t1-ic-pet{
  margin-left: auto; /* pets right side */
}

.apflp-card-t1 .apflp-t1-ic-pet span{
  font-weight: 700;
}

/* ensure old template1 buttons/actions don't show if still present somewhere */
.apflp-card-t1 .apflp-actions,
.apflp-card-t1 .apflp-btn{
  display:flex !important;
  margin: 0;
}

.flickity-slider .apflp-t1-addr1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flickity-slider .apflp-card-t1 {
  margin-bottom: 15px;
}

/* ===== Template 2  ===== */

.apflp-card-alt{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 26px rgba(2,6,23,.10);
  transition: transform .18s ease, box-shadow .18s ease;
  padding: 0; /* override old padding */
}

.apflp-card-alt:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(2,6,23,.14);
}

.apflp-card-alt .apflp-alt-cardlink{
  display:block;
  text-decoration:none;
  color: inherit;
}

.apflp-card-alt .apflp-alt-media{
  position: relative;
  background: #eef2f7;
}

.apflp-card-alt .apflp-alt-media img{
  display:block;
  width:100%;
  height: 280px;  /* screenshot look */
  object-fit: cover;
}

.apflp-card-alt .apflp-noimg{
  height: 280px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(15,23,42,.55);
  font-size: 13px;
}

.apflp-card-alt .apflp-alt-watermark{
  position:absolute;
  right: 14px;
  bottom: 14px;
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: .75;
  background: rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 8px;
  backdrop-filter: blur(6px);
}

/* body */
.apflp-card-alt .apflp-alt-body{
  padding: 18px 18px 16px;
}

.apflp-card-alt .apflp-alt-h{
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
  color: #0f172a;
}

/* pill row */
.apflp-card-alt .apflp-alt-row{
  margin-bottom: 10px;
}

.apflp-card-alt .apflp-alt-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #14532d;
  background: #dcfce7;
}

/* address */
.apflp-card-alt .apflp-alt-address{
  font-size: 15px;
  color: rgba(15,23,42,.70);
  margin-bottom: 12px;
}

/* meta icons row */
.apflp-card-alt .apflp-alt-meta{
  display:flex;
  gap: 18px;
  align-items:center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.apflp-card-alt .apflp-alt-m{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-size: 14px;
  color: rgba(15,23,42,.85);
}

.apflp-card-alt .apflp-alt-m svg{
  width: 18px;
  height: 18px;
  fill: rgba(15,23,42,.55);
}

.apflp-card-alt .apflp-alt-m b{
  font-weight: 500;
}

/* price */
.apflp-card-alt .apflp-alt-price{
  display:flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 16px;
}

.apflp-card-alt .apflp-alt-price-main{
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.apflp-card-alt .apflp-alt-price-suf{
  font-size: 15px;
  font-weight: 700;
  color: rgba(15,23,42,.65);
}

/* CTA */
.apflp-card-alt .apflp-alt-ctawrap{
  margin-top: 8px;
}

.apflp-card-alt .apflp-alt-cta{
  display:flex;
  align-items:center;
  justify-content:center;
  height: 45px;
  width: 100%;
  border-radius: 12px;
  background: #c8a75a;       /* screenshot gold */
  color: #0b0f1a;
  font-weight: 500;
  font-size: 15px;
  text-decoration:none;
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 10px 18px rgba(2,6,23,.10);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.apflp-card-alt .apflp-alt-cta:hover{
  opacity: .96;
  box-shadow: 0 14px 26px rgba(2,6,23,.14);
}

.apflp-card-alt .apflp-alt-cta:active{
  transform: translateY(1px);
}

.flickity-slider .apflp-alt-h {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* make sure old template2 sections don't appear */
/* .apflp-card-alt .apflp-alt-top,
.apflp-card-alt .apflp-thumb,
.apflp-card-alt .apflp-alt-info,
.apflp-card-alt .apflp-alt-right,
.apflp-card-alt .apflp-alt-actions,
.apflp-card-alt .apflp-link-btn{
  display:none !important;
} */


/* ===== Template 3 ===== */

.apflp-card-t3{
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 12px 28px rgba(2,6,23,.10);
}

.apflp-card-t3 .apflp-t3-cardlink{
  display:block;
  text-decoration:none;
  color: inherit;
}

/* image */
.apflp-card-t3 .apflp-t3-media{
  position: relative;
  background: #eef2f7;
}

.apflp-card-t3 .apflp-t3-media img{
  width:100%;
  height: 260px;
  object-fit: cover;
  display:block;
}

/* badges bottom */
.apflp-card-t3 .apflp-t3-badge{
  position:absolute;
  bottom: 0;
  padding: 12px 16px;
  font-weight: 800;            /* less bold */
  font-size: 18px;             /* price size */
  line-height: 1;
  color: #fff;
  background: var(--apflp-accent);
}

.apflp-card-t3 .apflp-t3-badge-left{
  left: 0;
  border-top-right-radius: 10px;
}

.apflp-card-t3 .apflp-t3-badge-right{
  right: 0;
  border-top-left-radius: 10px;
  font-size: 16px;             /* date smaller */
  padding: 16px 18px;
}

/* body */
.apflp-card-t3 .apflp-t3-body{
  padding: 16px 18px 14px;
}

.apflp-card-t3 .apflp-t3-title{
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.22;
  font-weight: 600;            /* FIX: not too bold */
  color: #0b0f1a;
  text-transform: none;
}

.apflp-card-t3 .apflp-t3-address{
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;            /* lighter than before */
  color: #707070;
}

/* meta row */
.apflp-card-t3 .apflp-t3-meta{
  display:flex;
  align-items:center;
  gap: 18px;
  flex-wrap: wrap;
}

.apflp-card-t3 .apflp-t3-m{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: #0b0f1a;
}

.apflp-card-t3 .apflp-t3-m b{
  font-weight: 500;           /* FIX: not too bold */
}

.apflp-card-t3 .apflp-t3-m svg{
  width: 24px;
  height: 24px;
  fill: rgba(15,23,42,.45);   /* soft icon tone */
}

/* actions bottom */
.apflp-card-t3 .apflp-t3-actions{
  display: flex;
  width: 94%;
  margin: 11px auto;
  margin-bottom: 15px !important;
}

.apflp-card-t3 .apflp-t3-btn{
  flex: 1 1 100%;
  height: 45px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 0;
}

.apflp-card-t3 .apflp-t3-btn-details{
  background: var(--apflp-accent-2);
  color: #fff;
}


/* ===== Card Buttons (Tour / Self-show / Details) ===== */
.apflp-actions-stack{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.apflp-btn{
  height: 46px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--apflp-border);
}

.apflp-btn-outline{
  background: #fff;
  color: var(--apflp-text);
  border-color: rgba(var(--apflp-accent-rgb), .45);
}
.apflp-btn-outline:hover{
  border-color: rgba(var(--apflp-accent-rgb), .75);
  box-shadow: 0 10px 20px rgba(2,6,23,.08);
}

.apflp-btn-solid{
  background: rgba(var(--apflp-accent-rgb), 1);
  color: #fff;
  border-color: rgba(var(--apflp-accent-rgb), 1); 
  margin-left: -10px !important;

}
.apflp-btn-solid:hover{
  filter: brightness(.98);
  color: #fff;
}

/* Template 2 outline CTA */
.apflp-card-alt .apflp-alt-ctawrap{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.apflp-card-alt .apflp-alt-cta-outline{
  background:#fff;
  color: var(--apflp-text);
  border-color: rgba(var(--apflp-accent-rgb), .45);
  box-shadow: none;
}
.apflp-card-alt .apflp-alt-cta-outline:hover{
  border-color: rgba(var(--apflp-accent-rgb), .75);
}

/* Template 3 stacked buttons */
.apflp-t3-actions-stack{
  display:flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 18px;
}
.apflp-card-t3 .apflp-t3-btn-outline{
  background:#fff;
  color: var(--apflp-text);
  border: 1px solid rgba(var(--apflp-accent-rgb), .45);
  border-radius: 12px;
  height: 46px;
  text-transform:none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 600;
}
.apflp-card-t3 .apflp-t3-btn-outline:hover{
  border-color: rgba(var(--apflp-accent-rgb), .75);
}
.apflp-card-t3 .apflp-t3-btn-details{
  border-radius: 12px;
  height: 46px;
  text-transform:none;
  letter-spacing: 0;
  font-size: 15px;
  font-weight: 600;
}


/* ===== Pagination ===== */
.apflp-pagination{
  margin: 12px 0 0;
}
.apflp-pager{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: var(--apflp-radius);
  border: 1px solid var(--apflp-border);
  background: #fff;
  box-shadow: var(--apflp-shadow-sm);
}
.apflp-pagenums{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: wrap;
}
.apflp-pagenums .apflp-pagebtn.is-active {
  background-color: var(--apflp-accent);
}

.apflp-pagenums .apflp-pagebtn:hover {
  background-color: var(--apflp-accent);
}


.apflp-pagebtn{
  height: 38px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--apflp-border);
  background:#fff;
  font-weight: 500;
  cursor:pointer;
}
.apflp-pagebtn:hover{
  border-color: rgba(var(--apflp-accent-rgb), .35);
}
.apflp-pagebtn.is-active{
  background: rgba(var(--apflp-accent-rgb), .10);
  border-color: rgba(var(--apflp-accent-rgb), .35);
}
.apflp-pagebtn[disabled]{
  opacity: .55;
  cursor: not-allowed;
}
.apflp-ell{ color: var(--apflp-muted); font-weight: 500; padding: 0 2px; }

/* ===== Detail View ===== */
.apflp-detail{
  margin-top: 8px;
  background:#fff;
  border: 1px solid var(--apflp-border);
  border-radius: var(--apflp-radius);
  box-shadow: var(--apflp-shadow);
  padding: 14px;
}

.apflp-detail-head{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.apflp-back-btn{
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--apflp-border);
  background: #fff;
  cursor:pointer;
  padding: 0 12px;
  font-weight: 900;
}
.apflp-back-btn:hover{
  border-color: rgba(var(--apflp-accent-rgb), .35);
}

.apflp-detail-title h3{
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 1000;
}
.apflp-open-appfolio{
  color: var(--apflp-accent);
  text-decoration: none;
  font-weight: 500;
}
.apflp-open-appfolio:hover{ text-decoration: underline; }

.apflp-detail-body{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0,0,0,.12);
}

.apflp-detail-actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.apflp-detail-actions a{
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  color: #0f172a;
  border: 1px solid var(--apflp-border);
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--apflp-soft);
}
.apflp-detail-actions a:hover{
  border-color: rgba(var(--apflp-accent-rgb), .35);
}

.apflp-detail-note{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--apflp-border);
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

/* Small devices tweak */
@media (max-width: 560px){
  .apflp-sort{ width:100%; min-width: unset; }
  .apflp-filters{ width:100%; }
  .apflp-input{ min-width: 100%; }
  .apflp-select{ min-width: 46%; }
  .apflp-alt-top{ grid-template-columns: 86px 1fr; }
  .apflp-alt-right{ display:none; }
}

.apflp-single-wrap{max-width:1200px;margin:0 auto;padding:22px}
.apflp-layout{display:grid;grid-template-columns:1.35fr .65fr;gap:14px;align-items:start;margin-top:14px}
.apflp-single-title{margin:0;font-size:28px;line-height:1.15}
.apflp-single-address{margin-top:6px;color:#6b7280}
.apflp-h2{margin:0 0 10px;font-size:16px}
.apflp-desc{color:#111827;line-height:1.55}

.apflp-subhead{margin:18px 0 8px;font-size:15px}
.apflp-bullets{margin:0;padding-left:18px;display:grid;gap:6px}
.apflp-bullets li{line-height:1.4}

.apflp-sidebar .apflp-side-label{font-size:12px;letter-spacing:.06em;color:#6b7280}
.apflp-sidebar .apflp-side-big{font-size:22px;font-weight:500;margin-top:6px}
.apflp-sidebar .apflp-side-mid{font-size:16px;font-weight:700;margin-top:6px}
.apflp-sidebar .apflp-side-mid-bb{font-size:22px;font-weight:700;line-height:1.2}
.apflp-side-btn{display:block;text-align:center;text-decoration:none;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;margin-top:6px}
.apflp-side-link{display:inline-block;text-decoration:none;margin-top:6px}

.apflp-gallery{display:grid;grid-template-columns:1fr;gap:10px}
.apflp-gallery-main{border:1px solid #e5e7eb;border-radius:18px;overflow:hidden;background:#fff}
.apflp-gallery-main img{width:100%;height:520px;object-fit:cover;display:block}
.apflp-gallery-thumbs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.apflp-thumb{border:1px solid #e5e7eb;border-radius:14px;overflow:hidden;padding:0;background:#fff;cursor:pointer}
.apflp-thumb img{width:100%;height:80px;object-fit:cover;display:block}

.apflp-share-row{display:flex;gap:10px;margin-top:10px}
.apflp-share-ico{width:40px;height:40px;border-radius:10px;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;text-decoration:none;font-weight:500}

.apflp-sidebar-appfolio{ text-align:center; padding:18px 18px 20px; }
.apflp-side-btn-wide{ margin-top:18px; width:100%; padding:14px 14px; border-radius:14px; }
.apflp-share-icons{ display:flex; justify-content:center; gap:12px; margin-top:12px; margin-bottom:18px; }
.apflp-ico{ width:44px;height:44px; border-radius:10px; display:inline-block; background-size:24px 24px; background-repeat:no-repeat; background-position:center; }
.apflp-brand{ margin-top:18px; display:flex; justify-content:center; }
.apflp-brand-logo{ max-width:190px; height:auto; }
.apflp-brand-listing-image{width:220px;max-width:100%;height:auto;object-fit:cover;border-radius:0;display:block;margin:0 auto}
.apflp-brand-name{ margin-top:10px; font-weight:700; }
.apflp-brand-phone{ margin-top:4px; }
.apflp-brand-link{ display:inline-block; margin-top:6px; text-decoration:none; color: var(--apflp-accent); }
.apflp-brand-link:hover{ text-decoration: underline; }

/* Twitter */
.apflp-ico.tw{
  background-color:#1DA1F2;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M22 5.8c-.7.3-1.4.5-2.2.6.8-.5 1.3-1.2 1.6-2.1-.7.4-1.5.7-2.4.9a3.8 3.8 0 0 0-6.6 2.6c0 .3 0 .6.1.9A10.8 10.8 0 0 1 3.2 4.7a3.8 3.8 0 0 0 1.2 5.1c-.6 0-1.2-.2-1.7-.5v.1a3.8 3.8 0 0 0 3 3.7c-.5.1-1 .1-1.5 0a3.8 3.8 0 0 0 3.5 2.7A7.6 7.6 0 0 1 2 17.4a10.7 10.7 0 0 0 5.8 1.7c6.9 0 10.7-5.8 10.7-10.7v-.5c.7-.5 1.3-1.2 1.8-2z'/%3E%3C/svg%3E");
}

/* Facebook */
.apflp-ico.fb{
  background-color:#1877F2;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M22 12.1C22 6.5 17.5 2 11.9 2 6.5 2 2 6.5 2 12.1c0 5 3.7 9.2 8.5 9.9v-7H8.1v-2.9h2.4V10c0-2.4 1.4-3.7 3.6-3.7 1 0 2.1.2 2.1.2v2.3h-1.2c-1.2 0-1.6.8-1.6 1.5v1.8H16l-.4 2.9h-2.4v7c4.8-.7 8.4-4.9 8.4-9.9z'/%3E%3C/svg%3E");
}

/* Pinterest */
.apflp-ico.pt{
  background-color:#E60023;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-3.6 19.3c-.1-.8-.1-2 .1-2.9l2-8.4s-.5-1 0-2.3c.6-1.5 1.7-2.6 3.1-2.6 1.5 0 2.2 1.1 2.2 2.4 0 1.5-1 3.8-1.5 5.9-.4 1.8.9 3.2 2.6 3.2 3.1 0 5.2-4 5.2-8.7 0-3.6-2.4-6.3-6.8-6.3-4.9 0-7.9 3.6-7.9 7.7 0 1.4.4 2.4 1 3.1.3.4.3.5.2 1l-.3 1.2c-.1.4-.3.6-.7.4-1.9-.8-2.8-3-2.8-5.5C4.8 6.2 7.6 2 12 2z'/%3E%3C/svg%3E");
}

/* Email */
.apflp-ico.em{
  background-color:#7C3AED;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

@media (max-width: 900px){
  .apflp-layout{grid-template-columns:1fr}
  .apflp-gallery-main img{height:420px}
  .apflp-gallery-thumbs{grid-template-columns:repeat(4,minmax(0,1fr))}
  .apflp-sidebar .apflp-side-mid-bb{font-size:24px}
}

/* ===== Map Toggle + Layout ===== */
.apflp-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}

.apflp-map-toggle{
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
}

.apflp-mapbtn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  color:var(--apflp-text, #0f172a);
  padding:10px 14px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.apflp-mapbtn:hover{ transform: translateY(-1px);color: #000; }
.apflp-mapbtn:active{ transform: translateY(0); }

/* Main layout when map on */
.apflp-main{ display:block; }
.apflp-root.apflp-map-on .apflp-main{
  display:flex;
  gap:18px;
  align-items:flex-start;
}
.apflp-root .apflp-map{ width:100%; }
.apflp-root.apflp-map-on .apflp-map{
  display:block !important;
  flex:0 0 42%;
  max-width:42%;
  position:sticky;
  top: calc(var(--apflp-sticky-top, var(--apflp-auto-sticky-top, 0px)) + var(--apflp-toolbar-h, 0px));
}
.apflp-root.apflp-map-on .apflp-content{
  flex:1 1 auto;
  min-width:0;
}
/* Beats the inline height PHP prints, without !important: max-height always
   wins over height. Keeps the configured Map Height on tall screens and
   shrinks it on short ones instead of running off the bottom. */
.apflp-root.apflp-map-on .apflp-map-root{
  max-height: calc(100vh
    - var(--apflp-sticky-top, var(--apflp-auto-sticky-top, 0px))
    - var(--apflp-toolbar-h, 0px)
    - 24px);
}

/* Grid becomes 2 cols when map is visible */
@media (min-width: 960px){
  .apflp-root.apflp-map-on .apflp-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 959px){
  .apflp-root.apflp-map-on .apflp-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
/* Tablet and phone: stop trying to sit the map beside the cards. It goes on
   top, full width, and sticks there so it stays in view while the listings
   scroll underneath it.

   The desktop map height (Settings > Map Height) is deliberately ignored here.
   A 700px map on a phone fills the whole screen, so the visitor scrolls past a
   wall of map before reaching a single listing. Height is capped to a share of
   the viewport instead.

   Themes with a fixed header can set --apflp-map-sticky-top on .apflp-root to
   push the sticky map below it. */
@media (max-width: 900px){
  .apflp-root.apflp-map-on .apflp-main{
    display:block;
  }
  /* Sticks directly under the toolbar, whose height JS publishes as
     --apflp-toolbar-h, so the two never overlap. */
  .apflp-root.apflp-map-on .apflp-map{
    flex:none;
    width:100%;
    max-width:100%;
    position:sticky;
    top: calc(var(--apflp-sticky-top, var(--apflp-auto-sticky-top, 0px)) + var(--apflp-toolbar-h, 0px));
    z-index:5;
    margin-bottom:16px;
    background:#fff;
  }
  /* Beats the inline height PHP prints on .apflp-map-root. */
  .apflp-root.apflp-map-on .apflp-map-root{
    height: var(--apflp-map-height-mobile, clamp(200px, 34vh, 300px)) !important;
    min-height:0;
    /* apflp-map.css puts an 18px margin here. The detail card is anchored to
       .apflp-map, so that margin would leave it hanging below the map's edge.
       The spacing lives on .apflp-map instead. */
    margin-bottom: 0;
  }
  .apflp-root.apflp-map-on .apflp-map-canvas{
    height:100%;
    min-height:0;
  }
  .apflp-root.apflp-map-on .apflp-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Filters collapse behind the Filters button. Open, they wrap into a grid
     rather than scrolling sideways: the single-line scroller hid Beds, Baths
     and Pets off the right edge with nothing on screen to suggest they
     existed, and its nowrap row widened the whole page on tablets.
     Specificity, not source order: the base .apflp-filterbtn{display:none}
     rule lives further down this file. */
  .apflp-root .apflp-filterbtn{ display:inline-flex; }
  .apflp-root .apflp-toolbar-row1{ display:none; margin-bottom:0; }
  .apflp-root.apflp-filters-open .apflp-toolbar-row1{
    display:block;
    margin-bottom:10px;
  }
  .apflp-root .apflp-filters-inner{
    display:grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:8px;
    overflow:visible !important;
    flex-wrap:wrap;
  }
  .apflp-root .apflp-filters-inner .apflp-input,
  .apflp-root .apflp-filters-inner .apflp-select{
    max-width:none !important;
    width:100%;
    min-width:0;
  }
  .apflp-root .apflp-filters-inner .apflp-search{
    grid-column: 1 / -1;
    max-width:none !important;
  }
}

@media (max-width: 640px){
  .apflp-root.apflp-map-on .apflp-grid{
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
  /* A sticky toolbar plus a sticky map must still leave room for a listing.
     Anything taller and the phone shows only chrome. */
  .apflp-root.apflp-map-on .apflp-map-root{
    height: var(--apflp-map-height-mobile, clamp(180px, 28vh, 240px)) !important;
  }
  /* While the filter panel is open there is no room for a pinned map as well,
     so it drops back into the flow and scrolls away. */
  .apflp-root.apflp-map-on.apflp-filters-open .apflp-map{
    position: static;
  }

  .apflp-root .apflp-toolbar{ padding:8px 0 6px; }
  .apflp-root .apflp-toolbar-row2{ margin-top:2px; }
  .apflp-root .apflp-mapbtn{ height:38px; padding:0 12px; }
  .apflp-root .apflp-filters-inner{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap:8px; }

  /* Filters + Hide Map + Sort have to share ~390px. The sort card's 220px
     minimum could not shrink, so it sat on top of the map button. */
  .apflp-root .apflp-toolbar-row{ flex-wrap: wrap; gap: 8px; }
  .apflp-root .apflp-toolbar-left{ flex: 1 1 auto; gap: 8px; min-width:0; }
  .apflp-root .apflp-toolbar-right{ flex: 0 1 auto; min-width:0; }
  .apflp-root .apflp-sort{
    min-width: 0;
    padding: 4px 6px;
    flex: 0 1 auto;
  }
  .apflp-root .apflp-sort-label{ display: none; }
  .apflp-root .apflp-sort-inner .apflp-select{
    min-width: 0;
    height: 38px;
    max-width: 140px;
  }
}

/* Narrow phones: three controls on one 360px line only fit if the padding
   comes down too. */
@media (max-width: 420px){
  .apflp-root .apflp-filterbtn{ padding: 0 10px; }
  .apflp-root .apflp-mapbtn{ padding: 0 10px; font-size: 14px; }
  .apflp-root .apflp-toolbar-row{ gap: 6px; }
  .apflp-root .apflp-toolbar-left{ gap: 6px; }
  .apflp-root .apflp-sort{ padding: 4px; }
  .apflp-root .apflp-sort-inner .apflp-select{ max-width: 112px; padding: 0 8px; font-size: 13px; }
}

/* Below ~340px the three controls genuinely do not fit on one line, so sort
   takes its own row rather than sitting on top of the map button. */
@media (max-width: 340px){
  .apflp-root .apflp-toolbar-right{ flex-basis: 100%; }
  .apflp-root .apflp-sort{ width: 100%; }
  .apflp-root .apflp-sort-inner{ width: 100%; }
  .apflp-root .apflp-sort-inner .apflp-select{ max-width: none; width: 100%; }
}

@media (max-width: 640px){
  /* The info window sits inside a map that is only ~236px tall on a phone.
     At Google's default width the buttons wrapped into a stack taller than
     the map, so the whole card scrolled inside a cramped column. Span the
     full width of the map box and trim the card to fit. */
  .apflp-root .apflp-iw,
  .apflp-iw{
    min-width:0;
    max-width:none;
    width:100%;
    gap:10px;
  }
  .apflp-iw-thumb{ width:58px; height:48px; }
  .apflp-iw-price{ font-size:17px; }
  .apflp-iw-title{
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    font-size:13px;
    line-height:1.25;
  }
  .apflp-iw-addr{ font-size:12px; margin-bottom:6px; }
  .apflp-iw-meta{ font-size:12px; }
  .apflp-iw-more{ font-size:11px; }
  /* Buttons share one row instead of wrapping raggedly. */
  .apflp-map-sheet .apflp-iw-actions-main,
  .apflp-root .apflp-iw-actions-main{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:6px;
  }
  .apflp-iw-btn{
    padding:7px 6px;
    text-align:center;
    font-size:12px;
    white-space:nowrap;
  }
  .apflp-iw-btn-full{ grid-column: 1 / -1; }
  /* A phone map is ~180-236px tall, and the card has to fit inside it without
     scrolling. Directions and Street View are the first things to go: both are
     one tap away once the visitor is in Google Maps. Tablets keep them. */
  /* apflp-map.css loads after this file and sets .apflp-iw-actions{display:flex}
     at the same specificity, so this needs the extra class to win. */
  .apflp-map-sheet .apflp-iw-actions-util,
  .apflp-root .apflp-iw-actions-util{ display:none; }
  .apflp-root .apflp-map-sheet{ padding:10px 10px 10px; }
  .apflp-map-sheet .apflp-iw-thumb{ width:52px; height:44px; }
  /* On a 180px map the card has ~140px to work in. One title line, no repeated
     address (it is already on the listing card), and all three actions on a
     single row keeps it inside the map without a scrollbar. */
  .apflp-map-sheet .apflp-iw-title{ -webkit-line-clamp:1; }
  .apflp-map-sheet .apflp-iw-addr{ display:none; }
  .apflp-map-sheet .apflp-iw-actions-main{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .apflp-map-sheet .apflp-iw-btn-full{ grid-column: auto; }
  .apflp-map-sheet .apflp-iw-btn{ font-size:11px; padding:7px 4px; }
}

/* ===== Filter bar polish (light) ===== */
.apflp-filters-inner, .apflp-sort-inner{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.apflp-filters-inner .apflp-input,
.apflp-filters-inner .apflp-select,
.apflp-sort-inner .apflp-select{
  height:44px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  padding:0 12px;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}
.apflp-sort-label{
  font-weight:700;
  color:var(--apflp-muted, #64748b);
}



/* ===== UI Enhancements (Map toggle + premium toolbar + button grid + carousel) ===== */

/* Toolbar rows.
   The filter bar stays pinned at all widths: filtering is the main job of this
   page, and a bar that scrolls away means scrolling back to the top to change
   anything. Themes with a fixed header set --apflp-sticky-top on .apflp-root to
   push it clear of that header. */
.apflp-toolbar{
  display:block;
  margin: 10px 0 14px;
  position: sticky;
  top: var(--apflp-sticky-top, var(--apflp-auto-sticky-top, 0px));
  z-index: 20;
  background: var(--apflp-bg, #fff);
  padding: 10px 0 8px;
}
.apflp-toolbar-row{display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:nowrap;}
.apflp-toolbar-row1{margin-bottom:10px;}
.apflp-toolbar-row1 .apflp-filters{width:100%; min-width:0;}
.apflp-toolbar-row{min-width:0;}
.apflp-toolbar-left, .apflp-toolbar-right{min-width:0;}
.apflp-toolbar-left{display:flex; align-items:center; gap:10px;}
.apflp-toolbar-right{display:flex; align-items:center; justify-content:flex-end; gap:10px;}

/* Filters wrap onto a second line rather than scrolling sideways, so no
   control is ever hidden off the right edge. */
.apflp-filters-inner{
  flex-wrap: wrap;
  overflow: visible;
  gap:10px;
  padding-bottom:2px;
}
.apflp-filters-inner::-webkit-scrollbar{height:6px;}
.apflp-filters-inner::-webkit-scrollbar-thumb{background: rgba(0,0,0,.15); border-radius:999px;}
.apflp-filters-inner .apflp-input,
.apflp-filters-inner .apflp-select{flex: 1 1 150px; max-width: 170px; min-width:0;}
.apflp-filters-inner .apflp-search{flex: 1 1 220px; max-width: 320px;}

/* Filters toggle: phones only, styled to match the map toggle */
.apflp-filterbtn{
  display:none;
  align-items:center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--apflp-border);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: var(--apflp-text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--apflp-shadow-sm);
}
.apflp-filterbtn::after{
  content:"";
  margin-left:8px;
  border:4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.apflp-root.apflp-filters-open .apflp-filterbtn{
  background: var(--apflp-accent);
  border-color: var(--apflp-accent);
  color:#fff;
}
.apflp-root.apflp-filters-open .apflp-filterbtn::after{ transform: translateY(-2px) rotate(180deg); }

/* Map toggle button */
.apflp-map-toggle{display:flex; gap:10px; align-items:center;}
.apflp-mapbtn{
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--apflp-border);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: var(--apflp-text);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--apflp-shadow-sm);
}
.apflp-mapbtn:hover{transform: translateY(-1px);}

/* Actions: 2-up then full-width */
.apflp-actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px;}
.apflp-btn{ text-decoration:none !important; }
.apflp-actions .apflp-act-half{flex:1 1 calc(50% - 10px); min-width: 140px;}
.apflp-actions .apflp-act-full{flex:1 1 100%;}
.apflp-actions a{display:flex; align-items:center; justify-content:center;}

/* Carousel layout */
.apflp-root{ --apflp-carousel-cols: var(--apflp-cols-desktop); }
@media (max-width: 1024px){
  .apflp-root{ --apflp-carousel-cols: var(--apflp-cols-tablet); }
}
@media (max-width: 680px){
  .apflp-root{ --apflp-carousel-cols: var(--apflp-cols-mobile); }
}

/* Map-on carousel: 2 on desktop, 1 on tablet/mobile */
.apflp-root.apflp-map-on{ --apflp-carousel-cols: 2; }
@media (max-width: 1024px){
  .apflp-root.apflp-map-on{ --apflp-carousel-cols: 1; }
}

/* ===== Map view + card equal button alignment (override) ===== */
.apflp-card-t1 .apflp-t1-body,
.apflp-card-alt .apflp-alt-body,
.apflp-card-t3 .apflp-t3-body{
  display:flex;
  flex-direction:column;
  height:100%;
}

.apflp-actions,
.apflp-alt-actions,
.apflp-t3-actions{
  margin-top:auto;
  padding-bottom:0 !important;
  margin-bottom:0 !important;
}

.apflp-actions .apflp-btn,
.apflp-alt-actions .apflp-btn,
.apflp-t3-actions .apflp-btn{
  text-decoration:none !important;
}

.apflp-t3-actions .apflp-btn {
  margin: 0 !important;
}

.apflp-t3-actions .apflp-btn {
  background: rgba(var(--apflp-accent-2-rgb), 1) !important;
}

.apflp-t3-actions .apflp-btn-solid {
  background: rgba(var(--apflp-accent-rgb), 1) !important;
}

.flickity-slider .apflp-t3-title, .flickity-slider .apflp-t3-address {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apflp-actions{ gap:10px; }
.apflp-alt-actions{ gap:10px; }
.apflp-t3-actions{ gap:10px; }

/* ===== Flickity carousel stability + smoothness ===== */
.apflp-card a{ text-decoration:none; }
.apflp-t1-address.apflp-js-eq,
.apflp-alt-head.apflp-js-eq,
.apflp-t3-head.apflp-js-eq{ display:block; }

.apflp-grid.apflp-carousel{
  display:block !important;
  overflow:hidden !important;
  grid-template-columns:none !important;
  touch-action: pan-y;
}
.apflp-grid.apflp-carousel .apflp-card{
  width:calc((100% - (var(--apflp-carousel-cols) - 1) * 16px) / var(--apflp-carousel-cols));
  margin-right:16px;
  min-height:1px;
  display:block;
  backface-visibility:hidden;
  transform:translateZ(0);
}
.apflp-grid.apflp-carousel.flickity-enabled .apflp-card{ display:block; }
.apflp-grid.apflp-carousel .flickity-viewport{
  width:100%;
  overflow:hidden;
  transition:height .22s ease;
}
.apflp-grid.apflp-carousel .flickity-slider{
  position:absolute;
  width:100%;
  height:100%;
  will-change:transform;
}
.apflp-grid.apflp-carousel.is-draggable .flickity-viewport{ cursor:grab; }
.apflp-grid.apflp-carousel.is-draggable .flickity-viewport.is-pointer-down{ cursor:grabbing; }
.apflp-grid.apflp-carousel .flickity-button{
  width:44px;
  height:44px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--apflp-border);
  box-shadow: var(--apflp-shadow-sm);
}
.apflp-grid.apflp-carousel .flickity-button:hover{ background:#fff;color: #0b0f1a; }
.apflp-grid.apflp-carousel .flickity-button:disabled{ opacity:.45; }
.apflp-grid.apflp-carousel .flickity-prev-next-button.previous{ left:-8px; }
.apflp-grid.apflp-carousel .flickity-prev-next-button.next{ right:-8px; }
.apflp-grid.apflp-carousel .flickity-page-dots{ bottom:-28px; }
.apflp-grid.apflp-carousel + .apflp-pagination{ display:none !important; }
@media (max-width:1024px){
  .apflp-grid.apflp-carousel .apflp-card{
    width:calc((100% - (var(--apflp-carousel-cols) - 1) * 16px) / var(--apflp-carousel-cols));
  }
}
@media (max-width:767px){
  .apflp-grid.apflp-carousel .apflp-card{
    width:100%;
    margin-right:12px;
  }
}

.apflp-side-actions{display:flex;flex-direction:column;gap:10px;margin-top:18px;}
.apflp-side-actions .apflp-side-btn-wide{margin-top:0;}
.apflp-side-btn-alt{background:#fff;}

a.apflp-side-btn.apflp-side-btn-wide {
  background-color: var(--apflp-accent);
  color: inherit;
}

.apflp-single-wrap .apflp-right {
  box-shadow: 0px 0px 1px 1px #ededed;
}


/* ===== Card image gallery ===== */
.apflp-card-gallery{position:relative;height:100%;min-height:230px;background:#eef2f7;overflow:hidden;width:100%;display:block}
.apflp-card-slides{position:relative;height:100%;min-height:230px;width:100%}
.apflp-card-slide{position:absolute;inset:0;opacity:0;transition:opacity .25s ease;width:100%;height:100%;pointer-events:none}
.apflp-card-slide.is-active{opacity:1;z-index:1;pointer-events:auto}
.apflp-card-slide img,.apflp-card-gallery > img{display:block;width:100%;height:230px;object-fit:cover}
.apflp-card-gallery-btn{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border:none;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:0 6px 14px rgba(0,0,0,.14);cursor:pointer;z-index:3}
.apflp-card-gallery-prev{left:12px}
.apflp-card-gallery-next{right:12px}
.apflp-card-dots{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);display:flex;gap:6px;z-index:2}
.apflp-card-dot{width:8px;height:8px;border:none;border-radius:999px;background:rgba(255,255,255,.6);padding:0;cursor:pointer}
.apflp-card-dot.is-active{background:#fff;transform:scale(1.15)}
.apflp-t1-primary-link,.apflp-alt-cardlink,.apflp-t3-link{color:inherit;text-decoration:none}
.apflp-t1-primary-link{display:inline-block;margin-bottom:14px;font-size:0}
.apflp-t1-link-text{font-size:0}

/* ===== Single gallery modernized ===== */
.apflp-gallery.apflp-wc-gallery{display:block;margin:0 0 28px}
.apflp-gallery-main-wrap{min-width:0}
.apflp-gallery-main{position:relative;border:1px solid #e9edf3;border-radius:28px;overflow:hidden;background:#fff;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.apflp-gallery-carousel .apflp-gallery-cell{width:100%}
.apflp-gallery-main img,.apflp-gallery-carousel .apflp-gallery-cell img{width:100%;height:700px;object-fit:cover;display:block}
.apflp-gallery-carousel.flickity-enabled{position:relative}
.apflp-gallery-carousel .flickity-viewport{border-radius:28px}
.apflp-gallery-carousel .flickity-button{width:48px;height:48px;border:1px solid rgba(var(--apflp-accent-rgb),.35);border-radius:10px;background:rgba(255,255,255,.95);box-shadow:0 10px 18px rgba(15,23,42,.12);color:var(--apflp-accent)}
.apflp-gallery-carousel .flickity-button:hover{background:#fff}
.apflp-gallery-carousel .flickity-prev-next-button.previous{left:18px}
.apflp-gallery-carousel .flickity-prev-next-button.next{right:18px}
.apflp-gallery-thumbs-wrap{margin-top:18px;overflow:auto hidden;padding-bottom:6px;cursor:grab;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.apflp-gallery-thumbs-wrap.is-dragging{cursor:grabbing}
.apflp-gallery-thumbs{display:flex;gap:14px;flex-wrap:nowrap;min-width:max-content}
.apflp-thumb{display:block;flex:0 0 116px;width:116px;line-height:0;border:none !important;border-radius:8px;overflow:hidden;padding:0 !important;background:#fff;cursor:pointer;opacity:.9;transition:.2s ease;appearance:none;-webkit-appearance:none}
.apflp-thumb:hover{opacity:1;transform:translateY(-1px)}
.apflp-thumb.is-active{opacity:1;border-color:rgba(var(--apflp-accent-rgb),.65);box-shadow:0 0 0 2px rgba(var(--apflp-accent-rgb),.12)}
.apflp-thumb img{width:100%;height:88px;object-fit:cover;display:block}
@media (max-width: 900px){
  .apflp-gallery-main img,.apflp-gallery-carousel .apflp-gallery-cell img{height:420px}
  .apflp-thumb{flex-basis:92px;width:92px}
  .apflp-thumb img{height:76px}
}

/* Card <-> map hover sync
   .is-map-hover is applied to every card sharing the hovered marker's address,
   so a building with several available units lights up as a set. */
.apflp-root .apflp-card.is-map-hover,
.apflp-root .apflp-card-t1.is-map-hover,
.apflp-root .apflp-card-alt.is-map-hover,
.apflp-root .apflp-card-t3.is-map-hover{
  border-color: rgba(var(--apflp-accent-rgb), .65);
  box-shadow: 0 0 0 3px rgba(var(--apflp-accent-rgb), .18), var(--apflp-shadow);
  transform: translateY(-2px);
}
.apflp-iw-more{
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--apflp-accent);
}


/* ===== In-map detail card (compact widths) =====
   Google's InfoWindow sizes itself and clips its contents inside a short map,
   so below 900px the detail card is drawn here instead: pinned across the
   bottom of the map box, left aligned, full width. */
.apflp-map-root{ position: relative; }
.apflp-root .apflp-map{ position: relative; }
.apflp-map-sheet{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: #fff;
  border-top: 1px solid var(--apflp-border, rgba(0,0,0,.08));
  box-shadow: 0 -8px 24px rgba(0,0,0,.14);
  padding: 12px 12px 12px;
  max-height: calc(100% - 10px);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  animation: apflp-sheet-in .16s ease-out;
}
.apflp-map-sheet[hidden]{ display: none; }
@keyframes apflp-sheet-in{
  from{ transform: translateY(8px); opacity: 0; }
  to{ transform: none; opacity: 1; }
}
.apflp-map-sheet .apflp-iw{
  width: 100%;
  max-width: none;
  min-width: 0;
}
.apflp-sheet-close{
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  line-height: 1;
  font-size: 20px;
  border-radius: 50%;
  border: 1px solid var(--apflp-border, rgba(0,0,0,.08));
  background: #fff;
  color: var(--apflp-text, #0f172a);
  cursor: pointer;
  z-index: 2;
}
