/* ============================================================
   BuildX Floor Plans Page
   Sidebar filters on wide screens, horizontal bar below 1460px
   3-col → 2-col → 1-col card grid
   ============================================================ */

/* ── Page Hero ──────────────────────────────────────────────── */
.fp-hero {
    background: url('/assets/images/hero-floor-plans.avif') center/cover no-repeat;
    padding: 56px 0 48px;
    position: relative;
}

.fp-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
}

.fp-hero__inner {
    position: relative;
    z-index: 2;
}

.fp-hero__card {
    background: rgba(0, 0, 0, 0.92);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 340px;
    color: #fff;
}

.fp-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.fp-hero p {
    font-size: 1.0625rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    line-height: 1.6;
}

.fp-hero .btn {
    margin-top: 16px;
}

/* ── Main Layout: Sidebar + Grid ────────────────────────────── */
.fp-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Sidebar Filters ────────────────────────────────────────── */
.fp-sidebar {
    position: sticky;
    top: 100px;
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.fp-sidebar__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
}

.fp-search {
    margin-bottom: 20px;
}

.fp-search__input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    background: #FAFAFA;
    transition: border-color 0.2s;
}

.fp-search__input:focus {
    outline: none;
    border-color: #F5A623;
    box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

.fp-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}

.fp-fieldset__legend {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 10px;
    display: block;
}

.fp-fieldset__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fp-fieldset__list li {
    margin-bottom: 6px;
}

.fp-fieldset__list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: #555;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s;
}

.fp-fieldset__list label:hover {
    color: #000000;
}

.fp-fieldset__list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #F5A623;
    flex-shrink: 0;
}

.fp-reset {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #F5A623;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.fp-reset:hover {
    color: #E09510;
}

/* ── Horizontal Filter Bar (shown below 1460px) ─────────────── */
.fp-hbar {
    display: none;
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.fp-hbar__row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.fp-hbar__group {
    flex: 1;
    min-width: 140px;
}

.fp-hbar__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.fp-hbar__select {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    background: #FAFAFA;
    cursor: pointer;
    appearance: auto;
}

.fp-hbar__select:focus {
    outline: none;
    border-color: #F5A623;
}

.fp-hbar__search {
    flex: 1.5;
    min-width: 180px;
}

.fp-hbar__search-input {
    width: 100%;
    padding: 9px 14px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    background: #FAFAFA;
}

.fp-hbar__search-input:focus {
    outline: none;
    border-color: #F5A623;
    box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

.fp-hbar__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Card Grid ──────────────────────────────────────────────── */
.fp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fp-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #595959;
    font-size: 1rem;
}

/* ── Floor Plan Card ────────────────────────────────────────── */
.fp-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.fp-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.fp-card[data-hidden="true"] {
    display: none;
}

.fp-card__image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

/* Variant label overlay */
.fp-card__variant-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fp-card__image-link:hover .fp-card__variant-label,
.fp-card__image-link.bx-fp-cycling .fp-card__variant-label {
    opacity: 1;
}

/* Hover/Tap hint pill */
.fp-card__hint-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 2;
}
.fp-card__hint-pill .hint-mobile { display: none; }
@media (max-width: 768px) {
    .fp-card__hint-pill .hint-desktop { display: none; }
    .fp-card__hint-pill .hint-mobile { display: inline; }
}
.fp-card__image-link:hover .fp-card__hint-pill,
.fp-card__image-link.bx-fp-cycling .fp-card__hint-pill {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fp-card__image {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

a.fp-card__body {
    padding: 16px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a.fp-card__body:hover {
    background: #FAFAFA;
}

.fp-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.fp-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1.5px solid;
    line-height: 1.4;
}

.fp-badge--beds     { color: #2E7D32; border-color: #C8E6C9; background: #F1F8E9; }
.fp-badge--baths    { color: #1565C0; border-color: #BBDEFB; background: #E3F2FD; }
.fp-badge--sqft     { color: #E65100; border-color: #FFE0B2; background: #FFF3E0; }
.fp-badge--feature  { color: #6A1B9A; border-color: #E1BEE7; background: #F3E5F5; }

.fp-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.fp-card__title a {
    color: #000000;
    text-decoration: none;
}

.fp-card__title a:hover {
    color: #F5A623;
}

.fp-card__desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ── Pricing Disclaimer ─────────────────────────────────────── */
.fp-disclaimer {
    font-size: 0.75rem;
    color: #595959;
    font-style: italic;
    margin-top: 24px;
    line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Below 1800px with sidebar still showing: switch to 2-col grid */
@media (max-width: 1800px) {
    .fp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Below 1460px: switch to horizontal filter bar, hide sidebar, back to 3-col */
@media (max-width: 1460px) {
    .fp-layout {
        grid-template-columns: 1fr;
    }

    .fp-sidebar {
        display: none;
    }

    .fp-hbar {
        display: block;
    }

    .fp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Below 1220px: 2-column grid with horizontal bar */
@media (max-width: 1220px) {
    .fp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Below 846px: single column cards */
@media (max-width: 846px) {
    .fp-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Below 640px: tighter spacing, stacked filter dropdowns */
@media (max-width: 640px) {
    .fp-hero h1 {
        font-size: 1.75rem;
    }

    .fp-hbar__row {
        flex-direction: column;
        gap: 12px;
    }

    .fp-hbar__group {
        min-width: 100%;
    }
}

/* -- Pagination ------------------------------------------------ */
.fp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 32px 0 16px;
    flex-wrap: wrap;
}

.fp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.fp-page-btn:hover {
    background: #f5f5f5;
    border-color: #595959;
}

.fp-page-btn--active {
    background: #000000;
    color: #fff;
    border-color: #000000;
}

.fp-page-btn--active:hover {
    background: #333;
}

.fp-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 40px;
    color: #595959;
    font-size: 0.875rem;
}
