/**
 * Property Listing Card — base styles
 *
 * Shared base for property listing sections built as horizontal cards
 * (image left, details right). Currently used by the Featured
 * Properties Carousel shortcode (`.fpc-*` classes), and meant to be
 * reused/extended by other property listing sections later.
 *
 * Palette: #000000 / #54595F / #7A7A7A / #ffffff / #5485D6 (accent)
 * Fonts:   Helvetica (sans), 'Azeret Mono' (uppercase labels/buttons)
 */

/* On :root, not just .fpc-wrap, so these still resolve for cards without an .fpc-wrap ancestor (item-list-v1.php/item-v1.php). */
:root {
    --fpc-black: #000000;
    --fpc-700:   #54595F;
    --fpc-500:   #7A7A7A;
    --fpc-white: #ffffff;
    --fpc-hover: #5485D6;
    --fpc-sans:  Helvetica, Arial, sans-serif;
    --fpc-mono:  'Azeret Mono', 'SFMono-Regular', Consolas, monospace;
}
.fpc-wrap {
    position: relative;
    font-family: var(--fpc-sans);
}
.fpc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.fpc-heading {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 30px;
    font-weight: 500;
    color: var(--fpc-black);
    letter-spacing: -.01em;
}
.fpc-nav-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.fpc-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--fpc-500);
    border-radius: 4px;
    font-family: var(--fpc-mono);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--fpc-500);
    text-decoration: none;
    transition: color .15s, border-color .15s;
}
.fpc-view-all-btn:hover {
    color: var(--fpc-hover);
    border-color: var(--fpc-hover);
}
.fpc-view-all-mobile {
    display: none;
}
@media (max-width: 767px) {
    .fpc-header .fpc-view-all-btn {
        display: none;
    }
    .fpc-view-all-mobile {
        display: flex;
        justify-content: center;
        margin-top: 16px;
    }
}
.fpc-paragraph {
    margin: -.75rem 0 1.5rem;
    max-width: 560px;
    font-family: var(--fpc-mono);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: .02em;
    color: var(--fpc-700);
}
.fpc-swiper {
    overflow: hidden;
    width: 100%;
}
.fpc-swiper .swiper-wrapper {
    align-items: stretch;
    box-sizing: border-box;
}
.fpc-swiper .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}
.fpc-swiper .swiper-slide > * {
    width: 100%;
}
.fpc-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fpc-500);
    color: var(--fpc-white);
    border: 1px solid rgba(122, 122, 122, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}
.fpc-nav:hover {
    background: var(--fpc-black);
    border-color: var(--fpc-black);
    color: var(--fpc-hover);
}

/* ── Card ── */
.fpc-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 400px;
    background: var(--fpc-white);
    border: 1px solid rgba(122, 122, 122, .2);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .2s ease, transform .2s ease;
}
.fpc-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.1);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none !important;
}
.fpc-card-media {
    position: relative;
    flex: 0 0 46%;
    max-width: 46%;
    overflow: hidden;
    background: rgba(122, 122, 122, .15);
}
.fpc-card-media img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}
.fpc-media-swiper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.fpc-media-swiper .swiper-slide {
    height: 100%;
}
.fpc-media-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
/* Houzez's .item-tools only gets position:absolute via version-specific selectors that don't match our markup. */
.fpc-card-media .item-tools {
    position: absolute;
    z-index: 2;
}
.fpc-card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fpc-badge {
    font-family: var(--fpc-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--fpc-white);
    line-height: 1.6;
}
.fpc-badge-featured { background: var(--fpc-hover); }

.fpc-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}
.fpc-card-upper {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    color: inherit;
    text-decoration: none !important;
}
.fpc-card-title {
    margin: 0;
    font-family: var(--fpc-sans);
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--fpc-black);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fpc-card:hover .fpc-card-title {
    color: var(--fpc-hover);
}
.fpc-card-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-family: Helvetica, sans-serif;
    font-size: .82rem;
    color: var(--fpc-700);
    line-height: 1.5;
}
.fpc-card-address svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--fpc-500);
}
.fpc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fpc-tag {
    font-family: var(--fpc-mono);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--fpc-white);
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.6;
}
.fpc-tag-type   { background: var(--fpc-500); }
.fpc-tag-status { background: var(--fpc-700); }

.fpc-card-lower {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fpc-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none !important;
    color: inherit;
}
.fpc-card-hr {
    border: none;
    border-top: 2px solid rgba(122, 122, 122, .2);
    margin: 12px 0;
}
.fpc-card-area {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--fpc-mono);
    font-size: .85rem;
    color: var(--fpc-700);
    flex-shrink: 0;
}
.fpc-card-area i {
    font-size: 13px;
}
.fpc-card-area strong {
    color: var(--fpc-700);
    font-weight: 600;
}
.fpc-card-price {
    text-align: right;
    font-family: var(--fpc-sans);
    font-size: .85rem;
    font-weight: 600;
    color: var(--fpc-700);
}
/* houzez_listing_price_v1() outputs a bare <li>, which gets a default bullet marker even without a <ul> wrapper. */
.fpc-card-price li {
    list-style: none;
}
.fpc-card-lister {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    row-gap: 4px;
}
.fpc-lister-info {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}
.fpc-lister-avatar {
    width: 22px;
    height: 22px !important;
    border-radius: 50% !important;
    object-fit: fill !important;
    flex-shrink: 0;
}
.fpc-lister-name {
    font-size: .8rem;
    color: var(--fpc-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fpc-lister-name a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.fpc-lister-name a:hover {
    color: var(--fpc-hover);
}
@media (max-width: 767px) {
    .fpc-card { flex-direction: column; height: auto; }
    .fpc-card-media { flex: none; max-width: 100%; height: 220px; }
}

/* ── Vertical card variant (image on top, info below, at every breakpoint) ── */
.fpc-card--vertical {
    flex-direction: column;
    height: auto;
}
.fpc-card--vertical .fpc-card-media {
    flex: none;
    max-width: 100%;
    height: 200px;
}

/* ── City cover card — full-bleed photo, overlaid caption ── */
.city-cover-card {
    position: relative;
    display: block;
    width: 100%;
    height: 275px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(122, 122, 122, .15);
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}
.city-cover-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    color: inherit;
    text-decoration: none !important;
}
.city-cover-bg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    display: block;
    transition: transform .4s ease;
}
.city-cover-card:hover .city-cover-bg {
    transform: scale(1.05);
}
.city-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fpc-sans);
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--fpc-500);
}
.city-cover-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,.75) 100%);
    z-index: 1;
}
.city-cover-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 16px;
}
.city-cover-name {
    margin: 0 0 2px;
    font-family: var(--fpc-sans);
    font-size: 1.02rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.2;
}
.city-cover-count {
    font-family: var(--fpc-mono);
    font-size: 12px;
    font-weight: normal;
    letter-spacing: .04em;
    color: rgba(255,255,255,.85);
}

/* ── City Properties Grid — same .fpc-card design, grid layout, bold title ── */
.cpg-wrap {
    width: 100%;
}
.cpg-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(var(--cpg-columns-mobile, 1), 1fr);
    gap: 24px;
    transition: opacity .15s ease;
}
@media (min-width: 768px) {
    .cpg-grid { grid-template-columns: repeat(var(--cpg-columns-tablet, 2), 1fr); }
}
@media (min-width: 1024px) {
    .cpg-grid { grid-template-columns: repeat(var(--cpg-columns-desktop, 2), 1fr); }
}
.cpg-grid .fpc-card-title {
    font-weight: 700;
    font-size: 1.3rem;
}
/* Bold titles on the city-page card override, same weight as the custom city landing pages above. */
.cpg-grid-item .fpc-card-title {
    font-weight: 700;
}
/* Stretch to match row height (Houzez's grid rows are flexbox and stretch by default) instead of the vertical variant's height:auto. */
.cpg-grid-item {
    display: flex;
}
.cpg-grid-item .fpc-card--vertical {
    height: 100%;
    width: 100%;
}
/* Diamond spans 2 of Houzez's row-cols-* columns instead of 1. !important wins over the equal-specificity row-cols-* width rule. */
@media (min-width: 768px) {
    .cpg-grid-item--span2 {
        flex: 0 0 auto !important;
        width: 100% !important;
    }
}
/* Not min-width scoped, so this also applies on mobile. */
.cpg-grid-item--span2 .fpc-card-media {
    height: 320px;
}
/* List view: Diamond 400px vs standard 200px on tablet/desktop; on mobile both stack, so only the image height (320px vs 220px) differs instead. */
@media (min-width: 768px) {
    .cpg-grid-item--standard .fpc-card {
        height: 200px;
    }
    .cpg-grid-item--diamond .fpc-card {
        height: 400px;
    }
}
@media (max-width: 767px) {
    .cpg-grid-item--diamond .fpc-card-media {
        height: 320px;
    }
}
/* >=768px only, so mobile keeps the stacked/auto-height mobile layout. */
@media (min-width: 768px) {
    .cpg-grid .fpc-card {
        height: 320px;
    }
}
.cpg-pagination .pagination-wrap {
    margin-top: 28px;
}
.cpg-no-results {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    font-size: 1rem;
    color: var(--fpc-700, #54595F);
    background: #ffffff;
}


@media (max-width: 767.98px) {
   .listing-tools-wrap > .d-flex {
    flex-direction: unset !important;
   }
}

/* AJAX loading overlay for city/type taxonomy pagination, sort, and view-switch (city-type-ajax-pagination.php). */
.ctp-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    align-items: center;
    justify-content: center;
}
.ctp-loading-overlay.active {
    display: flex;
}
.ctp-loading-overlay .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--fpc-hover, #5485D6);
}
