.tb-pm-ztd {
    --tb-primary: #0f172a;
    --tb-primary-light: #1e293b;
    --tb-accent: #f59e0b;
    --tb-accent-hover: #d97706;
    --tb-sold: #ef4444;
    --tb-bg-body: #f8fafc;
    --tb-bg-card: #ffffff;
    --tb-text-dark: #0f172a;
    --tb-text-light: #64748b;
    --tb-border: #e2e8f0;
    --tb-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--tb-bg-body);
    color: var(--tb-text-dark);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    height: 90vh;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    border: 1px solid var(--tb-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.tb-pm-ztd * { box-sizing: border-box; }
.tb-pm-ztd button { cursor: pointer; font-family: inherit; }
.tb-pm-ztd a { text-decoration: none; color: inherit; }

.tb-pm-ztd .tb-pm-control-panel {
    background: var(--tb-primary);
    color: #fff;
    border-bottom: 4px solid var(--tb-accent);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 40;
}
.tb-pm-ztd .tb-pm-top-brand-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 16px;
    flex-wrap: wrap;
}
.tb-pm-ztd .tb-pm-kpi-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.tb-pm-ztd .tb-pm-kpi {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    text-align: center;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.tb-pm-ztd .tb-pm-kpi-value {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
}
.tb-pm-ztd .tb-pm-kpi-accent { color: var(--tb-accent); }
.tb-pm-ztd .tb-pm-kpi-sold { color: var(--tb-sold); text-shadow: 0 0 15px rgba(239,68,68,0.4); }
.tb-pm-ztd .tb-pm-kpi-label {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}
.tb-pm-ztd .tb-pm-brand-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.tb-pm-ztd .tb-pm-brand-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}
.tb-pm-ztd .tb-pm-brand-subtitle {
    color: var(--tb-accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tb-pm-ztd .tb-pm-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tb-pm-ztd .tb-pm-search-wrapper { position: relative; width: 220px; }
.tb-pm-ztd .tb-pm-search-input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--tb-primary-light);
    background: var(--tb-primary-light);
    color: #fff;
    border-radius: var(--tb-radius);
    font-size: 0.85rem;
    transition: all 0.2s;
}
.tb-pm-ztd .tb-pm-search-input:focus { outline: none; border-color: var(--tb-accent); background: #2f3e53; }
.tb-pm-ztd .tb-pm-search-input::placeholder { color: #94a3b8; }
.tb-pm-ztd .tb-pm-search-icon {
    position: absolute; right: 12px; top: 12px;
    color: var(--tb-accent); font-size: 0.8rem; pointer-events: none;
}
.tb-pm-ztd .tb-pm-dropdown-wrap { position: relative; }
.tb-pm-ztd .tb-pm-filter-btn {
    background: var(--tb-primary-light);
    color: #fff;
    border: 1px solid transparent;
    padding: 10px 16px;
    border-radius: var(--tb-radius);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
}
.tb-pm-ztd .tb-pm-filter-btn:hover,
.tb-pm-ztd .tb-pm-filter-btn.tb-pm-active { border-color: var(--tb-accent); background: #2f3e53; }
.tb-pm-ztd .tb-pm-filter-btn i { color: var(--tb-accent); }
.tb-pm-ztd .tb-pm-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    width: 300px;
    padding: 20px;
    z-index: 100;
    color: var(--tb-primary);
}
.tb-pm-ztd .tb-pm-dropdown-menu.tb-pm-show { display: block; }
.tb-pm-ztd .tb-pm-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tb-pm-ztd .tb-pm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.tb-pm-ztd .tb-pm-checkbox-item input[type="checkbox"] { accent-color: var(--tb-accent); width: 16px; height: 16px; }
.tb-pm-ztd .tb-pm-action-link {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tb-pm-ztd .tb-pm-action-link:hover { color: #fff; }
.tb-pm-ztd [data-tb-reset] { margin-left: auto; }

.tb-pm-ztd .tb-pm-slider-container { margin-top: 30px; margin-bottom: 10px; }
.tb-pm-ztd .noUi-connect { background: var(--tb-accent); }
.tb-pm-ztd .noUi-handle {
    border: 2px solid var(--tb-accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
}
.tb-pm-ztd .tb-pm-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--tb-primary);
    margin-bottom: -15px;
}

.tb-pm-ztd .tb-pm-main-content {
    display: flex;
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.tb-pm-ztd .tb-pm-listings-panel {
    width: 45%;
    padding: 24px;
    overflow-y: auto;
    background: var(--tb-bg-body);
    position: relative;
}
.tb-pm-ztd .tb-pm-map-panel {
    width: 55%;
    height: 100%;
    background: #e2e8f0;
    position: relative;
}
.tb-pm-ztd .tb-pm-map { width: 100%; height: 100%; z-index: 1; }
.tb-pm-ztd .tb-pm-listings-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}
.tb-pm-ztd .tb-pm-listings-grid { display: flex; flex-direction: column; gap: 16px; }
.tb-pm-ztd .tb-pm-property-card {
    background: #fff;
    border-radius: var(--tb-radius);
    border: 1px solid var(--tb-border);
    display: flex;
    flex-direction: row;
    height: 200px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    overflow: hidden;
}
.tb-pm-ztd .tb-pm-property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(0,0,0,0.1);
    border-color: var(--tb-accent);
}
.tb-pm-ztd .tb-pm-card-img-container {
    width: 240px;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    background: var(--tb-primary);
}
.tb-pm-ztd .tb-pm-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.9;
    transition: opacity 0.3s;
}
.tb-pm-ztd .tb-pm-property-card:hover .tb-pm-card-img { opacity: 1; }
.tb-pm-ztd .tb-pm-card-body {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}
.tb-pm-ztd .tb-pm-brand-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #fff;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    z-index: 5;
    letter-spacing: 0.5px;
}
.tb-pm-ztd .tb-pm-card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 8px;
}
.tb-pm-ztd .tb-pm-prop-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--tb-accent);
    line-height: 1;
}
.tb-pm-ztd .tb-pm-header-map-btn {
    color: var(--tb-text-light);
    font-weight: 800;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    transition: color 0.2s;
    padding: 0;
    text-transform: uppercase;
}
.tb-pm-ztd .tb-pm-header-map-btn:hover { color: var(--tb-accent); }
.tb-pm-ztd .tb-pm-prop-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tb-primary);
    margin-bottom: 4px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tb-pm-ztd .tb-pm-prop-address {
    font-size: 0.85rem;
    color: var(--tb-text-light);
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tb-pm-ztd .tb-pm-prop-address i { color: var(--tb-accent); margin-top: 2px; }
.tb-pm-ztd .tb-pm-prop-specs {
    font-size: 0.8rem;
    color: var(--tb-primary);
    display: flex;
    gap: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.tb-pm-ztd .tb-pm-prop-specs span { display: inline-flex; align-items: center; }
.tb-pm-ztd .tb-pm-prop-specs i { margin-right: 6px; color: var(--tb-accent); font-size: 0.9rem; }
.tb-pm-ztd .tb-pm-prop-footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: auto;
    gap: 8px;
}
.tb-pm-ztd .tb-pm-ownership-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: var(--tb-primary);
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}
.tb-pm-ztd .tb-pm-ownership-badge i { color: var(--tb-accent); flex-shrink: 0;}
.tb-pm-ztd .tb-pm-role-badge {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    flex: 1;
    max-width: 120px;
}
.tb-pm-ztd .tb-pm-role-badge i { color: #94a3b8; }
.tb-pm-ztd .tb-pm-role-text { line-height: 1.1; font-size: 0.7rem; }

.tb-pm-ztd .tb-pm-view-btn {
    background: transparent;
    color: var(--tb-accent);
    border: 2px solid var(--tb-accent);
    padding: 4px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
    min-width: 80px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tb-pm-ztd .tb-pm-property-card:hover .tb-pm-view-btn { background: var(--tb-accent); color: #fff; }

.tb-pm-ztd.tb-pm-grid-view .tb-pm-map-panel { display: none; }
.tb-pm-ztd.tb-pm-grid-view .tb-pm-listings-panel { width: 100%; }
.tb-pm-ztd.tb-pm-grid-view .tb-pm-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.tb-pm-ztd.tb-pm-grid-view .tb-pm-property-card { flex-direction: column; height: auto; min-height: 0; }
.tb-pm-ztd.tb-pm-grid-view .tb-pm-card-img-container { width: 100%; height: 200px; }
.tb-pm-ztd.tb-pm-grid-view .tb-pm-prop-title { white-space: normal; }

.tb-pm-marker-featured {
    background-color: #2563eb;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(37,99,235,0.9), 0 0 4px rgba(37,99,235,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
    animation: tb-pm-glow-ztd 2s ease-in-out infinite alternate;
}
.tb-pm-marker-featured i { color: #fff; font-size: 14px; }
.tb-pm-marker-featured:hover { transform: scale(1.2); z-index: 1000 !important; }
@keyframes tb-pm-glow-ztd {
    from { box-shadow: 0 0 10px rgba(37,99,235,0.7), 0 0 4px rgba(37,99,235,0.4); }
    to   { box-shadow: 0 0 20px rgba(37,99,235,1), 0 0 10px rgba(59,130,246,0.8); }
}
.tb-pm-marker-sold {
    background-color: var(--tb-sold);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(239,68,68,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}
.tb-pm-marker-sold i { color: #fff; font-size: 14px; }
.tb-pm-marker-sold:hover { transform: scale(1.2); z-index: 1000 !important; }

.tb-pm-ztd .leaflet-popup-content-wrapper {
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border: 1px solid var(--tb-accent);
}
.tb-pm-ztd .leaflet-popup-content { margin: 0; width: 260px !important; }

.tb-pm-ztd .tb-pm-reset-map-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: #fff;
    border: 2px solid var(--tb-border);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 800;
    color: var(--tb-primary);
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.tb-pm-ztd .tb-pm-reset-map-btn:hover { background: var(--tb-bg-body); color: var(--tb-accent); border-color: var(--tb-accent); }

.tb-pm-ztd .tb-pm-scrollbar::-webkit-scrollbar { width: 8px; }
.tb-pm-ztd .tb-pm-scrollbar::-webkit-scrollbar-track { background: var(--tb-bg-body); border-radius: 4px; }
.tb-pm-ztd .tb-pm-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.tb-pm-ztd .tb-pm-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--tb-accent); }

.tb-pm-ztd .tb-pm-empty-state {
    text-align: center;
    padding: 40px;
    color: var(--tb-text-light);
    font-weight: 600;
}

.tb-pm-ztd .tb-pm-modal-inner { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.tb-pm-ztd .tb-pm-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tb-pm-ztd .tb-pm-gallery-item { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; cursor: pointer; position: relative; background: var(--tb-primary-light); }
.tb-pm-ztd .tb-pm-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tb-pm-ztd .tb-pm-gallery-item:hover img { transform: scale(1.05); }

/* Load More Button Styles */
.tb-pm-ztd .tb-pm-load-more-btn {
    background: var(--tb-primary-light);
    color: #fff;
    border: 1px solid var(--tb-border);
    padding: 12px 24px;
    border-radius: var(--tb-radius);
    font-size: 0.85rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.tb-pm-ztd .tb-pm-load-more-btn:hover {
    background: var(--tb-accent);
    border-color: var(--tb-accent);
}

@media (max-width: 1100px) {
    .tb-pm-ztd .tb-pm-card-img-container { width: 180px; }
    .tb-pm-ztd .tb-pm-prop-title { font-size: 1rem; white-space: normal; }
    .tb-pm-ztd .tb-pm-prop-price { font-size: 1.15rem; }
    .tb-pm-ztd .tb-pm-role-badge { max-width: 100px; }
    .tb-pm-ztd .tb-pm-view-btn { min-width: 70px; padding: 4px 10px; }
}
@media (max-width: 900px) {
    .tb-pm-ztd { height: auto; border: none; box-shadow: none; border-radius: 0; }
    .tb-pm-ztd .tb-pm-main-content { flex-direction: column; height: auto; }
    .tb-pm-ztd .tb-pm-listings-panel { width: 100%; height: auto; overflow: visible; padding: 16px; }
    .tb-pm-ztd .tb-pm-map-panel { width: 100%; height: 400px; order: -1; }
    .tb-pm-ztd .tb-pm-property-card { flex-direction: column; height: auto; min-height: 0; }
    .tb-pm-ztd .tb-pm-card-img-container { width: 100%; height: 200px; }
    .tb-pm-ztd .tb-pm-role-badge { max-width: 140px; }
    .tb-pm-ztd .tb-pm-filter-row { display: none; }
    .tb-pm-ztd .tb-pm-top-brand-bar { justify-content: center; flex-direction: column-reverse; gap: 20px; }
    .tb-pm-ztd .tb-pm-kpi-row { justify-content: center; width: 100%; }
    .tb-pm-ztd .tb-pm-kpi { flex: 1 1 calc(50% - 12px); min-width: 130px; }
}
