/* ═══════════════════════════════════════════════════
   HBM Community Finder — Frontend Styles
   ═══════════════════════════════════════════════════ */

:root {
    --hbm-primary: #8B7D3C;
    --hbm-accent: #333333;
    --hbm-text: #333333;
    --hbm-text-light: #666666;
    --hbm-border: #e0e0e0;
    --hbm-bg: #ffffff;
    --hbm-bg-light: #f8f8f8;
    --hbm-red: #c0392b;
    --hbm-green: #27ae60;
    --hbm-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --hbm-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --hbm-radius: 4px;
    --hbm-transition: 0.25s ease;
}

/* ─── Wrapper ─── */
.hbm-cf-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--hbm-text);
    line-height: 1.5;
    max-width: 100%;
    margin: 0 auto;
    background: var(--hbm-bg);
}
.hbm-cf-wrapper *, .hbm-cf-wrapper *::before, .hbm-cf-wrapper *::after {
    box-sizing: border-box;
}

/* ─── Tabs ─── */
.hbm-cf-tabs {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--hbm-border);
    padding: 0;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.hbm-cf-tabs::-webkit-scrollbar {
    display: none;
}
.hbm-cf-tabs-scroll {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 8px;
    gap: 20px;
}
.hbm-cf-tab {
    padding: 14px 22px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: var(--hbm-text-light);
    cursor: pointer;
    transition: var(--hbm-transition);
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    flex-shrink: 0;
}
.hbm-cf-tab:hover {
    color: var(--hbm-text);
}
.hbm-cf-tab.active {
    color: var(--hbm-text);
    border-bottom-color: var(--hbm-accent);
    font-weight: 600;
}
.hbm-cf-tab-count {
    font-weight: 400;
    opacity: 0.7;
}
.hbm-cf-tab-cta {
    background: var(--hbm-primary);
    color: #fff !important;
    border-radius: var(--hbm-radius);
    border-bottom: none !important;
    margin-left: 4px;
    font-weight: 600;
    padding: 10px 20px;
    flex-shrink: 0;
}
.hbm-cf-tab-cta:hover {
    opacity: 0.9;
    color: #fff !important;
}
.hbm-cf-tab-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    padding: 0 16px 0 20px;
    margin-left: auto;
}
/* Spacer to push controls right on wide screens */
@media (min-width: 901px) {
    .hbm-cf-tabs-scroll {
        flex: 1;
    }
}

/* View Toggle */
.hbm-cf-view-toggle {
    display: flex;
    border: 1px solid var(--hbm-border);
    border-radius: var(--hbm-radius);
    overflow: hidden;
}
.hbm-cf-view-btn {
    padding: 8px 16px;
    background: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--hbm-text-light);
    transition: var(--hbm-transition);
    font-family: inherit;
}
.hbm-cf-view-btn.active {
    background: var(--hbm-accent);
    color: #fff;
}
.hbm-cf-view-btn + .hbm-cf-view-btn {
    border-left: 1px solid var(--hbm-border);
}

/* Filter Button */
.hbm-cf-filter-btn {
    padding: 8px 20px;
    background: #fff;
    border: 2px solid var(--hbm-primary);
    color: var(--hbm-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--hbm-radius);
    cursor: pointer;
    transition: var(--hbm-transition);
    font-family: inherit;
}
.hbm-cf-filter-btn:hover,
.hbm-cf-filter-btn.active {
    background: var(--hbm-primary);
    color: #fff;
}

/* ─── Tab Scroll Progress Bar ─── */
.hbm-cf-tabs-progress {
    height: 3px;
    background: var(--hbm-border);
    position: relative;
    overflow: hidden;
}
.hbm-cf-tabs-progress-bar {
    height: 100%;
    background: var(--hbm-primary);
    width: 0%;
    transition: width 0.15s ease;
    border-radius: 0 2px 2px 0;
}

/* ─── Cards Carousel Navigation Arrows ─── */
.hbm-cf-cards-panel {
    position: relative;
}
.hbm-cf-cards-nav {
    display: none; /* shown via JS / media query */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--hbm-border);
    color: var(--hbm-text);
    font-size: 14px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: var(--hbm-transition);
}
.hbm-cf-cards-nav:hover {
    background: var(--hbm-primary);
    color: #fff;
    border-color: var(--hbm-primary);
}
.hbm-cf-cards-nav-prev {
    left: 4px;
}
.hbm-cf-cards-nav-next {
    right: 4px;
}
/* Show arrows on mobile when carousel is active */
@media (max-width: 768px) {
    .hbm-cf-cards-nav {
        display: flex;
        width: 36px;
        height: 36px;
    }
}
/* Hidden on desktop/tablet landscape */
@media (min-width: 769px) {
    .hbm-cf-cards-nav {
        display: none !important;
    }
}

/* ─── Toolbar ─── */
.hbm-cf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--hbm-border);
}
.hbm-cf-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.hbm-cf-result-count {
    font-size: 16px;
    color: var(--hbm-text);
}
.hbm-cf-share-btn {
    background: none;
    border: none;
    color: var(--hbm-text-light);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.hbm-cf-share-btn:hover {
    color: var(--hbm-primary);
}
.hbm-cf-sort {
    padding: 8px 14px;
    border: 1px solid var(--hbm-border);
    border-radius: var(--hbm-radius);
    font-size: 14px;
    background: #fff;
    color: var(--hbm-text);
    cursor: pointer;
    font-family: inherit;
}

/* ─── Filter Panel ─── */
.hbm-cf-filter-panel {
    background: var(--hbm-bg-light);
    border-bottom: 1px solid var(--hbm-border);
    padding: 20px;
    animation: hbmSlideDown 0.3s ease;
}
@keyframes hbmSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hbm-cf-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.hbm-cf-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hbm-text-light);
    margin-bottom: 6px;
}
.hbm-cf-filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--hbm-border);
    border-radius: var(--hbm-radius);
    font-size: 14px;
    font-family: inherit;
}
.hbm-cf-filter-actions {
    display: flex;
    gap: 12px;
}
.hbm-cf-filter-apply {
    padding: 10px 24px;
    background: var(--hbm-primary);
    color: #fff;
    border: none;
    border-radius: var(--hbm-radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.hbm-cf-filter-clear {
    padding: 10px 24px;
    background: #fff;
    color: var(--hbm-text-light);
    border: 1px solid var(--hbm-border);
    border-radius: var(--hbm-radius);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

/* ─── Main Layout ─── */
.hbm-cf-main {
    display: flex;
    min-height: 600px;
    position: relative;
}

/* Map */
.hbm-cf-map-panel {
    flex: 0 0 55%;
    max-width: 55%;
    position: relative;
}
.hbm-cf-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    position: sticky;
    top: 0;
}

/* Cards */
.hbm-cf-cards-panel {
    flex: 1;
    overflow-y: auto;
    max-height: 800px;
    padding: 16px;
    background: var(--hbm-bg);
}
.hbm-cf-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* List-only mode */
.hbm-cf-wrapper.view-list .hbm-cf-map-panel {
    display: none;
}
.hbm-cf-wrapper.view-list .hbm-cf-cards-panel {
    flex: 1;
    max-height: none;
}
.hbm-cf-wrapper.view-list .hbm-cf-cards-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Floor Plans tab — full width grid, no map */
.hbm-cf-wrapper.tab-floor_plans .hbm-cf-map-panel {
    display: none;
}
.hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-panel {
    flex: 1;
    max-height: none;
}
.hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* ─── Card Styles ─── */
.hbm-cf-card {
    background: #fff;
    border-radius: var(--hbm-radius);
    overflow: hidden;
    box-shadow: var(--hbm-shadow);
    transition: var(--hbm-transition);
    position: relative;
}
.hbm-cf-card:hover {
    box-shadow: var(--hbm-shadow-hover);
    transform: translateY(-2px);
}

/* Card Image Carousel */
.hbm-cf-card-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eee;
}
.hbm-cf-card-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.hbm-cf-card-carousel img.active {
    display: block;
}
.hbm-cf-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--hbm-text);
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}
.hbm-cf-card:hover .hbm-cf-carousel-nav {
    opacity: 1;
}
.hbm-cf-carousel-prev { left: 8px; }
.hbm-cf-carousel-next { right: 8px; }

/* Promo Banner Overlay */
.hbm-cf-promo-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    z-index: 1;
}

/* Favorite Heart */
.hbm-cf-favorite {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    z-index: 3;
    padding: 12px;
    transition: color 0.2s;
}
.hbm-cf-favorite:hover,
.hbm-cf-favorite.liked {
    color: var(--hbm-red);
}

/* Card Body */
.hbm-cf-card-body {
    padding: 14px 16px;
}
.hbm-cf-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--hbm-primary);
    margin: 0 0 4px;
    line-height: 1.3;
}
.hbm-cf-card-title a {
    color: inherit;
    text-decoration: none;
}
.hbm-cf-card-title a:hover {
    text-decoration: underline;
}
.hbm-cf-card-subtitle {
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 0 0 4px;
}
.hbm-cf-card-plan-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--hbm-text);
    margin: 4px 0;
}
.hbm-cf-card-detail {
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 2px 0;
}

/* Price */
.hbm-cf-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--hbm-text);
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hbm-cf-card-price .price-original {
    text-decoration: line-through;
    color: var(--hbm-text-light);
    font-weight: 400;
    font-size: 15px;
}
.hbm-cf-card-price .price-calc {
    font-size: 14px;
    color: var(--hbm-text-light);
    cursor: pointer;
}

/* Specs Grid */
.hbm-cf-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 8px 0;
}
.hbm-cf-card-specs span {
    white-space: nowrap;
}

/* Counts (Communities) */
.hbm-cf-card-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 8px 0;
}

/* Tours */
.hbm-cf-card-tours {
    display: flex;
    gap: 16px;
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--hbm-border);
}
.hbm-cf-tour-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--hbm-text-light);
    text-decoration: none;
}
.hbm-cf-tour-link:hover {
    color: var(--hbm-primary);
}
.hbm-cf-tour-icon {
    font-size: 20px;
}

/* Directions */
.hbm-cf-card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--hbm-border);
}
.hbm-cf-directions-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hbm-text-light);
    text-decoration: none;
}
.hbm-cf-directions-link:hover {
    color: var(--hbm-primary);
}

/* Compare Checkbox (Floor Plans) */
.hbm-cf-card-compare {
    padding: 10px 16px;
    border-top: 1px solid var(--hbm-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hbm-text-light);
}
.hbm-cf-card-compare input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--hbm-primary);
}

/* Interactive Plan Icon */
.hbm-cf-interactive-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--hbm-border);
    font-size: 12px;
    color: var(--hbm-text-light);
}
.hbm-cf-interactive-plan i {
    font-size: 28px;
    color: var(--hbm-text-light);
}

/* ─── Map Info Window ─── */
.hbm-cf-map-popup {
    max-width: 320px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.hbm-cf-map-popup-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--hbm-radius) var(--hbm-radius) 0 0;
}
.hbm-cf-map-popup-body {
    padding: 12px;
}
.hbm-cf-map-popup-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hbm-primary);
    margin: 0 0 4px;
}
.hbm-cf-map-popup-detail {
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 2px 0;
}
.hbm-cf-map-popup-price {
    font-size: 16px;
    font-weight: 700;
    margin: 6px 0;
}

/* ─── Promo Card (mixed in grid) ─── */
.hbm-cf-card.promo-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
}
.hbm-cf-card.promo-card .promo-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--hbm-primary);
    margin: 0 0 12px;
    line-height: 1.3;
}
.hbm-cf-card.promo-card .promo-text {
    font-size: 14px;
    color: var(--hbm-text-light);
    margin: 0 0 16px;
}
.hbm-cf-card.promo-card .promo-cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--hbm-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--hbm-radius);
    font-weight: 600;
    font-size: 14px;
}

/* ─── Loading Spinner ─── */
.hbm-cf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--hbm-text-light);
}
.hbm-cf-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--hbm-border);
    border-top-color: var(--hbm-primary);
    border-radius: 50%;
    animation: hbmSpin 0.7s linear infinite;
}
@keyframes hbmSpin {
    to { transform: rotate(360deg); }
}

/* ─── Responsive ─── */
/* ═══════════════════════════════════════════
   RESPONSIVE — Desktop Large (>1200px)
   ═══════════════════════════════════════════ */
@media (min-width: 1201px) {
    .hbm-cf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hbm-cf-wrapper.view-list .hbm-cf-cards-grid,
    .hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet Landscape / Small Desktop (769–1200px)
   ═══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .hbm-cf-main {
        flex-direction: column;
    }
    .hbm-cf-map-panel {
        flex: none;
        max-width: 100%;
        height: 350px;
    }
    .hbm-cf-map {
        min-height: 350px;
    }
    .hbm-cf-cards-panel {
        max-height: none;
    }
    .hbm-cf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hbm-cf-wrapper.view-list .hbm-cf-cards-grid,
    .hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .hbm-cf-wrapper.view-list .hbm-cf-cards-grid,
    .hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hbm-cf-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    .hbm-cf-tab-cta {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet Portrait (601–768px)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Tabs become horizontally scrollable */
    .hbm-cf-tabs {
        flex-wrap: nowrap;
    }
    .hbm-cf-tabs-scroll {
        padding: 0 10px;
    }
    .hbm-cf-tab {
        padding: 10px 14px;
        font-size: 13px;
    }
    .hbm-cf-tab-cta {
        padding: 8px 14px;
        font-size: 13px;
    }
    .hbm-cf-tab-controls {
        gap: 6px;
        padding: 0 10px 0 6px;
    }
    .hbm-cf-view-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    .hbm-cf-view-btn span,
    .hbm-cf-view-btn .view-label {
        display: none;
    }
    .hbm-cf-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Toolbar stacks */
    .hbm-cf-toolbar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        padding: 10px 14px;
    }
    .hbm-cf-toolbar-left {
        justify-content: space-between;
    }
    .hbm-cf-toolbar-right {
        display: flex;
        justify-content: flex-end;
    }

    /* Cards 2-col on tablet */
    .hbm-cf-cards-grid,
    .hbm-cf-wrapper.view-list .hbm-cf-cards-grid,
    .hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Filter grid */
    .hbm-cf-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Map smaller */
    .hbm-cf-map-panel {
        height: 280px;
    }
    .hbm-cf-map {
        min-height: 280px;
    }

    /* Compare modal */
    .hbm-cf-compare-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 30px 12px 50px;
    }
    .hbm-cf-compare-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Mobile (≤600px) — CAROUSEL CARDS
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
    /* Tabs: smaller, tighter */
    .hbm-cf-tabs-scroll {
        padding: 0 8px;
    }
    .hbm-cf-tab {
        padding: 10px 10px;
        font-size: 12px;
    }
    .hbm-cf-tab-count {
        font-size: 11px;
    }
    .hbm-cf-tab-cta {
        padding: 7px 12px;
        font-size: 12px;
        margin-left: 2px;
    }
    .hbm-cf-tab-controls {
        padding: 0 8px 0 4px;
        gap: 4px;
    }
    .hbm-cf-filter-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    .hbm-cf-view-btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    /* ─── Cards become horizontal carousel ─── */
    .hbm-cf-cards-panel {
        padding: 12px 0 12px 12px;
        overflow: visible;
    }
    .hbm-cf-cards-grid,
    .hbm-cf-wrapper.view-list .hbm-cf-cards-grid,
    .hbm-cf-wrapper.tab-floor_plans .hbm-cf-cards-grid {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 12px;
        padding-right: 12px;
        padding-bottom: 8px;
    }
    .hbm-cf-cards-grid::-webkit-scrollbar {
        display: none;
    }
    .hbm-cf-cards-grid .hbm-cf-card {
        flex: 0 0 82%;
        max-width: 82%;
        scroll-snap-align: start;
    }

    /* Filter single column */
    .hbm-cf-filter-grid {
        grid-template-columns: 1fr;
    }

    /* Map even smaller */
    .hbm-cf-map-panel {
        height: 220px;
    }
    .hbm-cf-map {
        min-height: 220px;
    }

    /* Card body tighter */
    .hbm-cf-card-body {
        padding: 10px 12px;
    }
    .hbm-cf-card-title {
        font-size: 15px;
    }
    .hbm-cf-card-price {
        font-size: 16px;
    }

    /* Compare modal full single column */
    .hbm-cf-compare-grid {
        grid-template-columns: 1fr;
        padding: 20px 10px 40px;
        gap: 0;
    }
    .hbm-cf-compare-col {
        border-right: none;
        border-bottom: 2px solid var(--hbm-border);
        padding: 16px 4px;
    }
    .hbm-cf-compare-col:last-child {
        border-bottom: none;
    }
    .hbm-cf-compare-col.empty {
        display: none;
    }

    /* Toolbar tighter */
    .hbm-cf-toolbar {
        padding: 8px 12px;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Very Small Mobile (≤400px)
   ═══════════════════════════════════════════ */
@media (max-width: 400px) {
    .hbm-cf-tab {
        padding: 8px 8px;
        font-size: 11px;
    }
    .hbm-cf-tab-cta {
        padding: 6px 10px;
        font-size: 11px;
    }
    .hbm-cf-view-btn {
        padding: 5px 6px;
        font-size: 11px;
    }
    .hbm-cf-toolbar {
        padding: 8px 10px;
    }
    .hbm-cf-result-count {
        font-size: 14px;
    }
    .hbm-cf-sort {
        font-size: 12px;
        padding: 6px 8px;
    }
    .hbm-cf-compare-toolbar-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    /* Wider cards on very small screens */
    .hbm-cf-cards-grid .hbm-cf-card {
        flex: 0 0 88% !important;
        max-width: 88% !important;
    }
}

/* ═══════════════════════════════════════════
   LEAFLET OVERRIDES
   ═══════════════════════════════════════════ */

/* Remove default Leaflet marker icon artifacts */
.hbm-cf-marker-icon {
    background: none !important;
    border: none !important;
}

/* Cluster icon container */
.hbm-cf-cluster-icon {
    background: none !important;
    border: none !important;
}

/* Leaflet popup styling to match Drees design */
.hbm-cf-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hbm-cf-leaflet-popup .leaflet-popup-content {
    margin: 0;
    min-width: 260px;
}
.hbm-cf-leaflet-popup .leaflet-popup-tip {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Map popup image */
.hbm-cf-map-popup-img-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}
.hbm-cf-map-popup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hbm-cf-map-popup-promo {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* Map popup body */
.hbm-cf-map-popup-body {
    padding: 12px 14px;
}
.hbm-cf-map-popup-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hbm-primary);
    margin: 0 0 4px;
    line-height: 1.3;
}
.hbm-cf-map-popup-detail {
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 2px 0;
    line-height: 1.4;
}
.hbm-cf-map-popup-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--hbm-text);
    margin: 8px 0 6px;
}
.hbm-cf-map-popup-directions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--hbm-text-light);
    text-decoration: none;
    padding: 4px 0;
}
.hbm-cf-map-popup-directions:hover {
    color: var(--hbm-primary);
}

/* Leaflet zoom control positioning */
.hbm-cf-map .leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.hbm-cf-map .leaflet-control-zoom a {
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 16px;
    color: var(--hbm-text);
    border: none;
}

/* Ctrl+scroll hint overlay */
.leaflet-container::after {
    content: 'Use ctrl + scroll to zoom the map';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

/* ═══════════════════════════════════════════
   COMPARE FEATURE
   ═══════════════════════════════════════════ */

/* Compare toolbar button (appears when 1+ plans checked) */
.hbm-cf-compare-toolbar-btn {
    padding: 8px 24px;
    background: var(--hbm-primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--hbm-transition);
    font-family: inherit;
    white-space: nowrap;
}
.hbm-cf-compare-toolbar-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Compare checkbox styling on cards */
.hbm-cf-card-compare {
    padding: 10px 16px;
    border-top: 1px solid var(--hbm-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hbm-text-light);
    cursor: pointer;
}
.hbm-cf-card-compare input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--hbm-primary);
    cursor: pointer;
}
.hbm-cf-card-compare:hover {
    color: var(--hbm-text);
}

/* ─── Compare Modal (fullscreen overlay) ─── */
.hbm-cf-compare-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 999999;
    overflow-y: auto;
    animation: hbmCompareIn 0.3s ease;
}
@keyframes hbmCompareIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Close button */
.hbm-cf-compare-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: var(--hbm-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 22px;
    cursor: pointer;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hbm-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hbm-cf-compare-close:hover {
    opacity: 0.85;
}

/* 4-column grid */
.hbm-cf-compare-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Single compare column */
.hbm-cf-compare-col {
    border-right: 1px solid var(--hbm-border);
    padding: 0 16px;
}
.hbm-cf-compare-col:last-child {
    border-right: none;
}

/* Empty column */
.hbm-cf-compare-col.empty {
    opacity: 0.5;
}

/* Column image */
.hbm-cf-compare-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    border-radius: var(--hbm-radius);
    overflow: hidden;
    margin-bottom: 8px;
}
.hbm-cf-compare-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hbm-cf-compare-img-wrap .hbm-cf-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px;
    font-size: 16px;
}

/* Plan name under image */
.hbm-cf-compare-plan-label {
    text-align: center;
    font-size: 13px;
    color: var(--hbm-text-light);
    margin: 0 0 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--hbm-border);
}

/* Dropdown selector */
.hbm-cf-compare-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--hbm-border);
    border-radius: var(--hbm-radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--hbm-text);
    background: #fff;
    cursor: pointer;
    margin-bottom: 16px;
    font-family: inherit;
    appearance: auto;
}

/* Spec rows */
.hbm-cf-compare-specs {
    padding: 0;
}
.hbm-cf-compare-spec-row {
    padding: 12px 4px;
    border-bottom: 1px solid var(--hbm-border);
    font-size: 14px;
    color: var(--hbm-text);
    min-height: 44px;
    display: flex;
    align-items: center;
}
.hbm-cf-compare-spec-row strong {
    font-size: 18px;
}
.hbm-cf-compare-spec-row:last-child {
    border-bottom: none;
}

/* Section headers in compare (Features, Neighborhoods) */
.hbm-cf-compare-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hbm-text);
    padding: 14px 4px 8px;
    margin: 0;
}

/* Features scrollable area */
.hbm-cf-compare-features {
    max-height: 140px;
    overflow-y: auto;
    padding: 0 4px 12px;
    font-size: 13px;
    color: var(--hbm-text-light);
    line-height: 1.6;
    border-bottom: 1px solid var(--hbm-border);
}
.hbm-cf-compare-features ul {
    margin: 0;
    padding: 0 0 0 18px;
}
.hbm-cf-compare-features li {
    margin-bottom: 4px;
}

/* Neighborhoods list */
.hbm-cf-compare-neighborhoods {
    padding: 0 4px 16px;
    font-size: 13px;
    color: var(--hbm-text-light);
}
.hbm-cf-compare-neighborhoods ul {
    margin: 0;
    padding: 0 0 0 18px;
}
.hbm-cf-compare-neighborhoods li {
    margin-bottom: 4px;
}

/* View This Plan CTA */
.hbm-cf-compare-cta {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--hbm-primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--hbm-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--hbm-transition);
    margin-top: 16px;
    font-family: inherit;
}
.hbm-cf-compare-cta:hover {
    opacity: 0.9;
}
.hbm-cf-compare-col.empty .hbm-cf-compare-cta {
    background: #ddd;
    color: #999;
    pointer-events: none;
}

/* Compare responsive handled in main responsive block above */
