:root {
    --theme-white: #ffffff;
    --theme-ink-strong: #1a1a2e;
    --theme-text-strong: #374151;
    --theme-text-muted: #6b7280;
    --theme-text-soft: #9ca3af;
    --theme-border: #e5e7eb;
    --theme-surface-soft: #f3f4f6;
    --theme-surface-muted: #f8fafc;
    --theme-link: #0d4ea6;
    --theme-shadow-weak: rgba(0, 0, 0, 0.1);  
    --cn-bg: #f3f4f6;
    --cn-panel: #ffffff;
    --cn-text: #1f2937;
    --cn-muted: #475569;
    --cn-brand: #ef3b3a;
    --cn-brand-ink: #9f1111;
    --cn-accent: #ff0b6f;
    --cn-line: #d7dce4;
    --cn-accent-color: #ed174d;
    --cn-accent-strong-color: #ce0f3f;
    --cn-ink-color: #1d2430;
    --cn-muted-color: #667085;
    --cn-soft-color: #f9f4f5;
    --cn-line-color: #e6d9df;
    --cn-shadow-menu: rgba(26, 14, 21, 0.12);
    --cn-shadow-search: rgba(105, 40, 79, 0.12);
    --cn-shadow-mobile-menu: rgba(43, 26, 37, 0.12);
    --cn-shadow-cta: rgba(210, 23, 74, 0.25);
    --cn-shadow-cta-hover: rgba(210, 23, 74, 0.3);
    --home-hero-glow: rgba(229,57,53,.12);
    --home-search-shadow: rgba(129, 38, 95, 0.12);
    --home-focus-ring: rgba(255, 11, 111, .12);
    --home-button-shadow: rgba(255, 11, 111, .28);
}
input:focus::placeholder, textarea:focus::placeholder {color: transparent;}
input#password {margin-top: .5rem;}
.auth-brand h1 {font-size: 1.2rem;}
.unlock-alert{margin-top:15px;}
.cn-header {
    --cn-accent: var(--cn-accent-color);
    --cn-accent-strong: var(--cn-accent-strong-color);
    --cn-ink: var(--cn-ink-color);
    --cn-muted: var(--cn-muted-color);
    --cn-soft: var(--cn-soft-color);
    --cn-line: var(--cn-line-color);
    border-bottom: 1px solid var(--cn-line);
    background: var(--theme-white);
    position: sticky;
    top: 0;
    z-index: 1035;
    backdrop-filter: saturate(1.08) blur(6px);
}

.cn-header-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

.cn-topbar {
    min-height: 78px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.cn-logo {
    color: var(--cn-accent);
    text-decoration: none;
    font-weight: 900;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    letter-spacing: -0.03em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

.cn-top-actions,
.cn-mobile-actions {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.cn-top-actions {
    margin-left: auto;
    flex: 0 0 auto;
}

.cn-icon-btn,
.cn-account-toggle,
.cn-mobile-account,
.cn-mobile-icon {
    border: 1px solid color-mix(in srgb, var(--cn-accent) 45%, var(--theme-white) 55%);
    background: color-mix(in srgb, var(--cn-accent) 8%, var(--theme-white) 92%);
    color: var(--cn-accent-strong);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
}

.cn-icon-btn svg,
.cn-mobile-icon svg,
.cn-avatar svg {
    width: 22px;
    height: 22px;
}

.cn-icon-btn:hover,
.cn-account-toggle:hover,
.cn-mobile-account:hover,
.cn-mobile-icon:hover,
.cn-icon-btn:focus-visible,
.cn-account-toggle:focus-visible,
.cn-mobile-account:focus-visible,
.cn-mobile-icon:focus-visible {
    border-color: var(--cn-accent);
    background: color-mix(in srgb, var(--cn-accent) 14%, var(--theme-white) 86%);
    color: var(--cn-accent);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cn-accent) 18%, transparent 82%);
}

.cn-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cn-accent-strong);
}

.cn-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid color-mix(in srgb, var(--cn-accent-strong) 60%, var(--cn-muted) 40%);
    margin-left: 2px;
}

.cn-account-menu {
    min-width: 180px;
    border: 1px solid var(--cn-line);
    box-shadow: 0 14px 28px var(--cn-shadow-menu);
}

.cn-search-expand {
    position: absolute;
    right: 210px;
    top: 50%;
    transform: translateY(-50%) scaleX(.65);
    transform-origin: right center;
    width: min(52vw, 400px);
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    border: 1px solid var(--cn-line);
    border-radius: 999px;
    background: var(--theme-white);
    overflow: hidden;
    box-shadow: 0 12px 24px var(--cn-shadow-search);
}

.cn-search-expand.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scaleX(1);
}

.cn-search-expand input,
.cn-mobile-search input {
    border: 0;
    width: 100%;
    outline: none;
    background: transparent;
    padding: .63rem .95rem;
    color: var(--cn-ink);
}

.cn-search-expand button,
.cn-mobile-search button {
    border: 0;
    border-left: 1px solid var(--cn-line);
    background: transparent;
    color: var(--cn-muted);
    width: 46px;
    height: 42px;
}

.cn-search-expand button svg,
.cn-mobile-search button svg {
    width: 20px;
    height: 20px;
}

.cn-main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: nowrap;
    width: max-content;
}

.cn-main-nav a {
    color: var(--cn-ink);
    text-decoration: none;
    padding: .55rem .8rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}

.cn-main-nav a:hover,
.cn-main-nav a:focus-visible {
    background: var(--cn-soft);
    color: var(--cn-accent-strong);
    outline: none;
}

.cn-main-nav {
    margin-left: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--cn-accent) 45%, transparent 55%) transparent;
}

.cn-main-nav::-webkit-scrollbar {
    height: 6px;
}

.cn-main-nav::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--cn-accent) 45%, transparent 55%);
    border-radius: 999px;
}

.cn-main-nav::-webkit-scrollbar-track {
    background: transparent;
}
.market-shell nav{margin-top: 1rem !important;}
.cn-post-cta {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: .45rem 1rem;
    border-radius: 3px;
    color: var(--theme-white);
    background: linear-gradient(95deg, var(--cn-accent), color-mix(in srgb, var(--cn-accent) 72%, var(--theme-white) 28%));
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: 0 8px 20px var(--cn-shadow-cta);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cn-post-cta:hover,
.cn-post-cta:focus-visible {
    color: var(--theme-white);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px var(--cn-shadow-cta-hover);
}

.cn-mobilebar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.cn-logo-mobile {
    font-size: 1.2rem;
    max-width: calc(100% - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.cn-mobile-search {
    display: none;
    margin-bottom: .75rem;
    border: 1px solid var(--cn-line);
    border-radius: 999px;
    background: var(--theme-white);
    overflow: hidden;
}

.cn-mobile-search.is-open {
    display: flex;
}

.cn-mobile-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    z-index: 1045;
    display: none;
}

.cn-mobile-panel.show {
    display: block;
}

.cn-mobile-menu {
    background: var(--theme-white);
    border-top: 1px solid var(--cn-line);
    border-bottom: 1px solid var(--cn-line);
    padding: .85rem 1rem 1.1rem;
    display: grid;
    gap: .45rem;
    box-shadow: 0 10px 28px var(--cn-shadow-mobile-menu);
}

.cn-mobile-menu a {
    color: var(--cn-ink);
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    padding: .5rem .58rem;
}

.cn-mobile-menu a:hover,
.cn-mobile-menu a:focus-visible {
    background: var(--cn-soft);
    color: var(--cn-accent-strong);
    outline: none;
}

.cn-post-cta-mobile {
    margin-top: .35rem;
    width: fit-content;
}

/* ==============================================
   Home page
   ============================================== */
:root {
    --home-bg: #f4f7fb;
    --home-panel: var(--theme-white);
    --home-text: #1f2937;
    --home-muted: #64748b;
    --home-line: #d8deea;
    --home-brand: #e53935;
    --home-brand-dark: #b71c1c;
    --home-accent: #ff0b6f;
}
body {
    background: radial-gradient(circle at top right, var(--home-hero-glow), transparent 30%), #ffffff;
    color: var(--home-text);
    font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
min-height: 100vh;
}
.home-shell {
    margin-top: 0;
    padding-bottom: 0px;
min-height: 100vh;
}
.hero {
    margin-top: 1.2rem;
    background: linear-gradient(135deg, var(--theme-white), color-mix(in srgb, var(--theme-white) 82%, var(--home-brand) 18%) 55%, color-mix(in srgb, var(--theme-white) 70%, var(--home-accent) 30%));
    border: 1px solid var(--home-line);
    border-radius: 16px;
    padding: 1.2rem;
}
.hero h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}
.hero p {
    margin: 0.55rem 0 0;
    color: var(--home-muted);
    max-width: 900px;
}
.home-search-showcase {
    background-image: var(--home-search-showcase-bg-image, none);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    margin-top: 1.2rem;
    border-radius: 3px;
}
.home-search-box {
    padding-top: 75px !important;
    padding-bottom: 100px !important;
}
.home-search-box h1 {
    margin: 0 auto;
}
.home-search-title {
    font-size: 90px;
    color: var(--home-brand);
    text-align: center;
    font-weight: 700;
    font-family: "Fahkwang", sans-serif;
    max-width: 590px;
    margin-bottom: 11px !important;
    letter-spacing: .01em;
}
.home-search-box h1 b {
    font-weight: 300;
}
.home-search-box p{font-size: 25px;font-weight: 600;font-family: "Fahkwang", sans-serif;margin-bottom:5px;letter-spacing:2px;}
.search-box.home-search-card {
    margin-top: 0;
    background: linear-gradient(160deg, color-mix(in srgb, var(--theme-white) 97%, transparent), color-mix(in srgb, var(--theme-white) 92%, transparent));
    border: 1px solid var(--home-line);
    border-radius: 3px;
    padding: .95rem;
    box-shadow: 0 18px 40px var(--home-search-shadow);
    position: relative;
}
.search-box.home-search-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 3px;
    padding: 1px;
    background: linear-gradient(130deg, color-mix(in srgb, var(--home-accent) 35%, transparent), color-mix(in srgb, var(--home-brand) 30%, transparent));
    -webkit-mask: linear-gradient(var(--theme-white) 0 0) content-box, linear-gradient(var(--theme-white) 0 0);
    mask: linear-gradient(var(--theme-white) 0 0) content-box, linear-gradient(var(--theme-white) 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.search-box.home-search-card .form-control,
.search-box.home-search-card .form-select {
    border-radius: 3px;
    min-height: 55px;
    border: 1px solid var(--home-line);
    box-shadow: none;
}
.search-box.home-search-card .form-control:focus,
.search-box.home-search-card .form-select:focus {
    border-color: var(--home-accent);
    box-shadow: 0 0 0 .2rem var(--home-focus-ring);
}
.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 55px;
    border-radius: 3px;
    border: 0;
    background: linear-gradient(90deg, var(--home-accent), color-mix(in srgb, var(--home-accent) 78%, var(--theme-white) 22%));
    color: var(--theme-white);
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease;
}
.search-btn:hover,
.search-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px var(--home-button-shadow);
}
.cn-inline-icon {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -1em;
}
/* Keep auth social icons centered inside their button text baseline. */
.auth-card .btn.btn-outline-secondary .cn-inline-icon {
        vertical-align: middle;
}
.search-btn-icon {
    width: .95rem;
    height: .95rem;
    line-height: 1;
}
.kpi-grid {
    margin-top: 0.95rem;
}
.kpi-card {
    background: var(--home-panel);
    border: 1px solid var(--home-line);
    border-radius: 5px;
    padding: 0.85rem 0.95rem;
    height: 100%;
}
.kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
}
.kpi-label {
    color: var(--home-muted);
    font-size: 0.86rem;
}
.section-panel {
    margin-top: 0px;
    background: var(--home-panel);
    padding: 1rem 2rem;
}
.category-card {
    border: 1px solid var(--home-line);
    border-radius: 5px;
    padding: 0.85rem;
    height: 100%;
    background: var(--theme-white);
}
.category-card h2 {
    font-size: 1.05rem;
    margin: 0;
}
.category-card p {
    margin: 0.35rem 0 0.7rem;
    color: var(--home-muted);
    font-size: 0.9rem;
}
.state-links a {
    display: inline-block;
    margin: 0 0.65rem 0.55rem 0;
    text-decoration: none;
    color: var(--theme-link);
    font-weight: 500;
}
.state-links a:hover {
    text-decoration: none;
}
.autocomplete-dropdown {
    box-shadow: 0 2px 8px var(--theme-shadow-weak);
    text-align: left;
}
.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--theme-border);
    font-size: 0.95rem;
    text-align: left;
}
.autocomplete-item:hover {
    background: var(--theme-surface-soft);
}
.autocomplete-item.active {
    background: color-mix(in srgb, var(--theme-link) 10%, var(--theme-white) 90%);
}

#homeSearchInput {
    text-align: left;
}

.cn-site-footer {
display: none;
    border-top: 1px solid var(--theme-border);
    background: var(--theme-white);
}

.cn-footer-newsletter {
    border: 1px solid var(--theme-border);
    background: linear-gradient(145deg, var(--theme-white), color-mix(in srgb, var(--theme-white) 85%, var(--theme-link) 15%));
}

.cn-footer-copyright {
    border-top: 1px solid var(--theme-border);
    font-size: 0.95rem;
}

.cn-footer-copyright-links a {
    text-decoration: none;
    font-weight: 500;
}

.cn-footer-copyright-links a:hover {
    text-decoration: underline;
}

.copy-right-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.copy-right-list {
    text-align: right;
}

.copy-right-list ul li {
    display: inline-block;
    margin: 0 8px;
}

.copy-right-list ul li a {
    display: inline-block;
    transition: all 0.5s;
    text-decoration: none;
}

#toTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    display: none;
    z-index: 99;
}

.top-btn {
    background-color: var(--home-brand);
    color: var(--theme-white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--mainColor);
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    transition: 0.9s;
}

.cn-site-footer a {
    color: var(--theme-link);
    text-decoration: none;
}

.cn-site-footer a:hover {
    text-decoration: underline;
}

/* ===== Migrated from views/maintenance.php ===== */
body.maintenance-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(160deg, #f8fafc 0%, #edf2f7 100%);
    color: #1f2937;
}
.maintenance-card {
    width: min(92vw, 560px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    text-align: center;
}
.maintenance-logo-wrap {
    margin-bottom: 1rem;
}
.maintenance-logo {
    display: inline-block;
    max-width: min(100%, 320px);
    height: auto;
}
body.maintenance-page h1 {
    margin: 0 0 .75rem;
    font-size: 1.7rem;
}
body.maintenance-page p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}


/* ===== Migrated from views/posts-index.php ===== */
body.posts-index-page {
    background: linear-gradient(to bottom, #ffffff, #f7f7f7);
    color: var(--cn-text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
.bg-light {
background: radial-gradient(circle at top right, var(--home-hero-glow), transparent 30%), #ffffff;
}

/* Filters and listings section */
.market-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1rem;
min-height: 100vh;
}
.market-tools {
    margin-top: 0px;
}
.posts-filter-card {
    background: linear-gradient(160deg, #fffdfa, #f8f0f3);
    border: 1px solid #e6cfdb;
    border-radius: 3px;
    padding: 5px;
    box-shadow: 0 18px 40px rgba(129, 38, 95, 0.12);
}
.market-tools .form-select,
.market-tools .form-control {
    border-radius: 3px;
    min-height: 55px;
    border-color: #cfd6df;
}

.posts-filter-card .form-control:focus,
.posts-filter-card .form-select:focus,
#postsZip:focus,
#postsCategorySelect:focus {
    border-color: #ff0b6f;
    box-shadow: 0 0 0 .2rem rgba(255, 11, 111, .12);
}

body.posts-index-page .search-btn {
    min-height: 55px;
    border-radius: 3px;
    border: 1px solid #f03d8b;
    background: linear-gradient(90deg, var(--cn-accent), #ff3b8c);
    color: #fff;
    font-weight: 800;
}

#postsFilterForm .btn,
#postsFilterForm .form-control,
#postsFilterForm .form-select,
#postsFilterForm .input-group-text {
    border-radius: 3px;
}

#postsFilterForm .btn,
#postsFilterForm .input-group-text {
    min-height: 45px;
}

#nearMeBtn {
    min-height: 45px;
}

#postsCategorySelect {
    min-height: 45px;
}

#postsZip {
    min-height: 45px;
}

input#postsZip {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 3px !important;
    border-bottom-left-radius: 3px !important;
}

.btn-addonZip {
    border: 1px solid #cfd6df;
    background: linear-gradient(95deg, var(--cn-accent), #f74f72);
    color: #fff;
    font-weight: 600;
    border-top-right-radius: 3px !important;
    border-bottom-right-radius: 3px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn-addonZip:hover {
    color: #fff;
    background: linear-gradient(45deg, var(--cn-accent), #f74f72);
}
.market-intro {
    margin-top: 1.5rem;
    background: var(--cn-panel);
    border: 1px solid var(--cn-line);
    border-radius: 5px;
    padding: 0.95rem 1rem;
}
.market-intro h1 {
    margin: 0 0 0.4rem;
    font-size: 1.28rem;
    font-weight: 800;
}
.market-intro p {
    margin: 0;
    color: var(--cn-muted);
}
.results-meta {
    margin-top: 0.8rem;
    color: var(--cn-muted);
    font-size: 0.92rem;
}
.card-grid {
    margin-top: 0.85rem;
}
body.posts-index-page .listing-card {
    background: var(--cn-panel);
    border: 1px solid var(--cn-line);
    border-radius: 5px;
    height: 100%;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.04);
}
body.posts-index-page .listing-card-target {
    outline: 3px solid #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), 0 10px 24px rgba(31, 41, 55, 0.12);
}
body.posts-index-page .listing-card .card-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
body.posts-index-page .listing-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: start;
    margin-bottom: 0.35rem;
}
body.posts-index-page .listing-location {
    color: #7a2f2f;
    font-weight: 700;
    font-size: 0.9rem;
}
body.posts-index-page .listing-date {
    font-size: 0.82rem;
    color: var(--cn-muted);
}
body.posts-index-page .listing-state {
    color: transparent;
    font-size: 0.82rem;
    font-weight: 600;
}
body.posts-index-page .listing-title {
    color: #1d3557;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.34;
    font-size: 1rem;
}
body.posts-index-page .listing-title:hover { text-decoration: none; }
body.posts-index-page .listing-content {
    margin-top: 0.45rem;
    color: #2f3b4a;
    font-size: 18px;
    line-height: 1.5;
    max-height: 12em;
    overflow: hidden;
}
:is(body.posts-index-page, body.post-detail-page) .listing-content--with-inline-title { margin-top: 0; }
:is(body.posts-index-page, body.post-detail-page) .listing-content--with-inline-title .listing-title {
    font-weight: inherit;
    line-height: inherit;
    font-size: inherit;
}
:is(body.posts-index-page, body.post-detail-page) .listing-content .listing-title-inline-separator { white-space: pre-wrap; }
:is(body.posts-index-page, body.post-detail-page) .listing-content--with-inline-title > p,
:is(body.posts-index-page, body.post-detail-page) .listing-content--with-inline-title > div {
    display: inline;
    margin: 0;
}
:is(body.posts-index-page, body.post-detail-page) .thumb-strip {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.55rem;
    overflow-x: auto;
}
:is(body.posts-index-page, body.post-detail-page) .thumb-strip img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cdd8e5;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
:is(body.posts-index-page, body.post-detail-page) .thumb-strip img:hover {
    opacity: 0.82;
    transform: scale(1.06);
}
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.88);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox.open { display: flex; }
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox img {
    max-width: min(90vw, 900px);
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.7);
    user-select: none;
}
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
    padding: 0.25rem 0.5rem;
}
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox-close:hover { opacity: 1; }
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox-nav {
    display: flex;
    gap: 1rem;
}
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox-nav button {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.15s;
}
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox-nav button:hover { background: rgba(255,255,255,.28); }
:is(body.posts-index-page, body.post-detail-page) #cn-lightbox-counter {
    color: rgba(255,255,255,.7);
    font-size: 0.85rem;
}
:is(body.posts-index-page, body.post-detail-page) .listing-actions {
    margin-top: auto;
    padding-top: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}
:is(body.posts-index-page, body.post-detail-page) .listing-actions-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
:is(body.posts-index-page, body.post-detail-page) .listing-distance {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
}
:is(body.posts-index-page, body.post-detail-page) .quick-view-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd6df;
    border-radius: 3px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}
:is(body.posts-index-page, body.post-detail-page) .quick-view-btn:hover {
    color: #0f4e99;
    border-color: #0f4e99;
}
:is(body.posts-index-page, body.post-detail-page) .quick-view-btn .quick-view-icon {
    width: 23px;
    height: 23px;
    display: block;
}
:is(body.posts-index-page, body.post-detail-page) .quick-view-content {
    white-space: normal;
}
:is(body.posts-index-page, body.post-detail-page) .modal-center .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}
.faq-panel,
.link-hub {
    margin-top: 1rem;
    background: var(--cn-panel);
    border: 1px solid var(--cn-line);
    border-radius: 5px;
    padding: 0.95rem 1rem;
}
.link-hub a {
    color: #0f4e99;
    font-weight:600;
    text-decoration: none;
    font-size: 1rem;
    margin-right: 1rem;
    line-height: 2;
}
.link-hub a:hover { text-decoration: underline; }

/* ===== Migrated from views/account-payments.php ===== */
.pm-save-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.pm-save-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pm-save-slider {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #9ca3af;
    display: inline-block;
    position: relative;
    transition: background .2s ease;
}
.pm-save-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: left .2s ease;
}
.pm-save-switch input:checked + .pm-save-slider {
    background: #16a34a;
}
.pm-save-switch input:checked + .pm-save-slider::after {
    left: 21px;
}
.ua-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.ua-modal-backdrop.open {
    display: flex;
}
.ua-modal {
    background: #fff;
    border-radius: 5px;
    padding: 1.5rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}
.ua-modal h3 {
    margin: 0 0 .75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}
.ua-modal p {
    margin: 0 0 1.25rem;
    color: #475569;
    line-height: 1.6;
}
.ua-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

.app-subscriptions-table th {
    font-size: .78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.app-subscriptions-table td {
    font-size: .92rem;
    color: #1e293b;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.app-subscriptions-table tbody tr:last-child td {
    border-bottom: 0;
}

.app-subscriptions-table td.text-end {
    font-variant-numeric: tabular-nums;
}


/* ===== Migrated from views/post-category-selection.php ===== */
.category-option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 1rem;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
}

.category-option-btn:hover,
.category-option-btn:focus {
    background: #eff6ff;
    color: #1e40af;
    border-color: #2563eb;
    text-decoration: none;
}

/* ===== Migrated from views/post-detail.php ===== */
body.post-detail-page {
    --detail-bg: #f3f5f8;
    --detail-panel: #ffffff;
    --detail-text: #1f2937;
    --detail-muted: #6b7280;
    --detail-line: #d6deea;
    --detail-brand: #e53935;
    color: var(--detail-text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}


.detail-header-wrap {
    width: 100%;
    border-bottom: 1px solid var(--detail-line);
    background: linear-gradient(90deg, #ffffff, #f8fbff);
}
.detail-topbar {
    max-width: 1240px;
    margin: 0 auto;
}
.detail-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1rem;
}
.detail-head {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: .85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.detail-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--detail-brand);
    text-decoration: none;
}
.detail-panel {
    margin-top: .85rem;
    background: var(--detail-panel);
    border: 1px solid var(--detail-line);
    border-radius: 5px;
    padding: 1rem 1rem 1.05rem;
}
.detail-breadcrumb {
    margin-bottom: .55rem;
    font-size: .9rem;
}
.detail-breadcrumb a + a::before {
    content: "→";
    color: var(--detail-muted);
    margin: 0 .45rem 0 .15rem;
}
.detail-breadcrumb a {
    color: #0d4ea6;
    text-decoration: none;
}
.detail-breadcrumb a:hover {
    text-decoration: none;
}
.detail-meta {
    color: var(--detail-muted);
    font-size: 1.125rem;
    margin-bottom: .85rem;
}
.detail-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
    margin-bottom: .85rem;
}
.detail-meta-row .detail-meta {
    margin-bottom: 0;
}
h1#listingTitle {
    font-size: 22px;
}
.detail-title-content-inline {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #253243;
}
.detail-title-content-inline #listingTitle,
.detail-title-content-inline .listingTitle {
    display: inline;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    font-weight: 700;
    color: inherit;
}
.detail-title-content-inline .detail-content {
    display: inline;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}
.detail-title-content-inline .detail-content > p,
.detail-title-content-inline .detail-content > div {
    display: inline;
    margin: 0;
}
.detail-meta-row .detail-meta-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    color: #0f4e99;
    background: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.detail-meta-phone:hover {
    color: #0b3e7a;
    border-color: #0f4e99;
}
.detail-meta-phone-with-label {
    width: auto;
    height: auto;
    justify-content: flex-start;
    padding: .35rem .65rem;
    gap: .25rem;
    white-space: nowrap;
    align-self: flex-start;
}
.detail-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #253243;
}
.detail-gallery {
    margin-top: .95rem;
}
.js-phone-token{font-size:16px;}
.ad-contact-info {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: .75rem;
    align-items: start;
    margin-top: .75rem;
    font-size: 1rem;
}
.ad-contact-main {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    min-width: 0;
}
.ad-contact-main-empty {
    min-height: 1px;
}
.ad-contact-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #253243;
}
.ad-contact-share {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}
.ad-contact-row a {
    color: #0d4ea6;
    text-decoration: none;
    word-break: break-all;
}
.ad-contact-row a:hover {
    text-decoration: underline;
}
.ad-contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #4b5563;
}
.ad-contact-row a span{
    word-break: normal;
}
.detail-gallery .carousel {
    border: 1px solid #d0d8e6;
    border-radius: 5px;
    overflow: hidden;
    background: #eef3fa;
}
.detail-gallery .carousel-item img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    cursor: zoom-in;
}
.detail-gallery .carousel-control-prev,
.detail-gallery .carousel-control-next {
    width: 10%;
}
.detail-gallery .carousel-control-prev-icon,
.detail-gallery .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.45);
    border-radius: 999px;
    background-size: 65% 65%;
}
.detail-gallery .carousel-indicators {
    margin-bottom: .45rem;
}
.detail-gallery .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.detail-related {
    margin-top: 1rem;
}
.detail-share-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #d2d9e6;
    background: #ffffff;
    color: #1f2a44;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.detail-share-btn svg {
    width: 20px;
    height: 20px;
}
.detail-share-btn:hover {
    border-color: #aab7cf;
    background: #f7f9fc;
    transform: translateY(-1px);
}
.detail-share-btn:focus-visible {
    outline: 2px solid #94b8ff;
    outline-offset: 2px;
}
.detail-share-facebook {
    color: #1a3f8b;
}
.detail-share-messenger {
    color: #0061ff;
}
.detail-share-sms {
    color: #1f7a43;
}
.detail-related-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    margin-bottom: .85rem;
}
.detail-related-grid {
    margin-top: 0.85rem;
}
body.post-detail-page .listing-card {
    background: #ffffff;
    border: 1px solid #d6deea;
    border-radius: 5px;
    height: 100%;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.04);
}
body.post-detail-page .listing-card .card-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
body.post-detail-page .listing-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: start;
    margin-bottom: 0.35rem;
}
body.post-detail-page .listing-location {
    color: #7a2f2f;
    font-weight: 700;
    font-size: 0.9rem;
}
body.post-detail-page .listing-date {
    font-size: 0.82rem;
    color: var(--detail-muted);
}
body.post-detail-page .listing-state {
    color: transparent;
    font-size: 0.82rem;
    font-weight: 600;
}
body.post-detail-page .listing-title {
    color: #1d3557;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.34;
    font-size: 1rem;
}
body.post-detail-page .listing-title:hover {
    text-decoration: underline;
}
body.post-detail-page .listing-content {
    margin-top: 0.45rem;
    color: #2f3b4a;
    font-size: 18px;
    line-height: 1.5;
    max-height: 12em;
    overflow: hidden;
}
.detail-map-frame {
    width: 100%;
    height: 520px;
    border: 0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}
.detail-map-note {
    margin-top: .6rem;
    font-size: .88rem;
    color: var(--detail-muted);
}
.detail-map-attribution {
    margin-top: .35rem;
    font-size: .78rem;
    color: var(--detail-muted);
}
.post-detail-page #modal-echo div, .posts-index-page #modal-echo div {font-size:19px;}
a.listing-title{text-decoration: none !important;}
/* ===== Migrated from views/post-manage.php ===== */
.manage-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
.manage-form-card{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:1.75rem}
.manage-side{display:flex;flex-direction:column;gap:1rem}
.manage-map-wrap{border-radius:10px;overflow:hidden;border:1px solid #e2e8f0}
.manage-map-wrap iframe{display:block;width:100%;height:260px;border:none}
.manage-map-placeholder{width:100%;height:260px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid #e2e8f0;color:#94a3b8;flex-direction:column;gap:.5rem;font-size:.875rem}
.existing-images-grid{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:.5rem}
.exist-img-wrap{position:relative;width:100px;height:100px;border-radius:8px;overflow:hidden;border:1px solid #e2e8f0}
.exist-img-wrap.featured{width:300px;height:225px}
.exist-img-wrap img{width:100%;height:100%;object-fit:cover}
.exist-img-badge{position:absolute;left:6px;bottom:6px;background:rgba(15,23,42,.86);color:#fff;border-radius:999px;padding:2px 8px;font-size:.7rem;font-weight:600;display:none}
.exist-img-wrap.featured .exist-img-badge{display:inline-flex}
.exist-img-del{position:absolute;top:4px;right:4px;background:rgba(239,68,68,.9);color:#fff;border:none;border-radius:50%;width:22px;height:22px;font-size:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.exist-img-del.selected{background:#10b981}
.new-img-card{position:relative;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;width:100px;height:100px}
.new-img-card.featured{width:300px;height:225px}
.new-img-card img{width:100%;height:100%;object-fit:cover}
.new-img-badge{position:absolute;left:6px;bottom:6px;background:rgba(15,23,42,.86);color:#fff;border-radius:999px;padding:2px 8px;font-size:.7rem;font-weight:600}
.new-img-add{border:1px dashed #94a3b8;border-radius:8px;background:#fff;color:#334155;font-weight:600;width:100px;height:100px}
.new-img-add.featured{width:300px;height:225px}

/* Renew modal */
.ua-modal-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:2000;align-items:center;justify-content:center}
.ua-modal-backdrop.open{display:flex}
.ua-modal{background:#fff;border-radius:12px;padding:2rem;max-width:420px;width:90%;box-shadow:0 20px 60px rgba(0,0,0,.18)}
.ua-modal h3{margin:0 0 .75rem;font-size:1.15rem;font-weight:700;color:#1e293b}
.ua-modal p{margin:0 0 1.25rem;color:#475569;line-height:1.6}
.ua-modal-actions{display:flex;gap:.75rem;justify-content:flex-end}


/* ===== Migrated from views/post-checkout.php ===== */


/* ===== Responsive breakpoints (large to small) ===== */
@media (min-width: 992px) {
    .manage-grid { grid-template-columns: 7fr 3fr; }
    .manage-grid.manage-grid-single { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .cn-header {
        position: sticky;
        top: 0;
    }

    .cn-header-shell {
        padding: 0 12px;
    }
}

@media (max-width: 768px) {
    .detail-topbar {
        padding: 0 .65rem;
    }
    .detail-shell {
        padding: .7rem;
    }
    .detail-gallery .carousel-item img {
        height: 260px;
    }
    .detail-map-frame {
        height: 390px;
    }
}

@media (max-width: 767px) {
    .cn-footer-copyright p {
        text-align: center;
        margin-bottom: 15px;
    }

    .copy-right-list {
        text-align: center;
    }

    .copy-right-list ul li {
        display: inline-block;
        margin: 0 5px;
    }
}

@media (max-width: 576px) {
.market-shell section.card-grid, section.detail-related {
  overflow-x: hidden;
  /* Optional: Adds a tiny bit of side padding if cards touch screen edges on mobile */
  padding-left: 1px; 
  padding-right: 1px;
}
    .hero h1 {
        font-size: 1.3rem;
    }
    .home-search-box {
        padding-top: 60px !important;
        padding-bottom: 80px !important;
    }
    .home-search-title {
        font-size: 42px;
        max-width: 100%;
    }
    .search-btn {
        gap: 0;
    }
    .search-btn-label {
        display: none;
    }
    .market-shell {
        padding: 0.7rem;
    }
}
@media (max-width: 479px) {
    .search-box.home-search-card {padding: 5px;}
    .home-search-box {
        padding-top: 10px !important;
        padding-bottom: 15px !important;
    }
.home-search-title{font-size:31px;}
.section-panel{padding:15px;}
}
.u-style-hide { display: none; }
.u-style-hide-important { display: none !important; }
.u-style-toast-z1100 { z-index: 1100; }
.u-style-card-pad-15 { padding: 15px; }
.u-style-link-underline-offset { text-decoration: underline; text-underline-offset: 2px; }
.u-style-mt-05-hide { display: none; margin-top: .5rem; }
.u-style-status-error { font-size: .85rem; color: #ef4444; margin-bottom: .75rem; display: none; }
.u-style-note-muted { margin: .25rem 0 1rem; font-size: .85rem; color: #475569; }
.u-style-heading-inline { font-size: 1.05rem; font-weight: 700; margin: 0; color: #1e293b; }
.u-style-subtle-label { font-size: .85rem; color: #64748b; display: block; margin-bottom: .5rem; }
.u-style-content-hint { margin-top: -.25rem; }
.u-style-phone-test-content { line-height: 1.7; white-space: normal; }
.u-style-center-empty { text-align: center; padding: 3rem 1rem; color: #64748b; }
.u-style-empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.u-style-m0 { margin: 0; }
.u-style-mt-025 { margin: .25rem 0 0; }
.u-style-btn-compact { font-size: .9rem; padding: .5rem 1.25rem; }
.u-style-flex-between-start { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.u-style-mr-04 { margin-right: .4rem; }
.u-style-nowrap-noshrink { white-space: nowrap; flex-shrink: 0; }
.u-style-mt-075 { margin-top: .75rem; }
.u-style-card-max-760 { max-width: 760px; }
.u-style-card-element-pad { padding-top: .75rem; padding-bottom: .75rem; }
.u-style-font-08 { font-size: .8rem; }
.u-style-fw-normal { font-weight: normal; }
.u-style-pos-relative { position: relative; }
.u-style-autocomplete-dropdown { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #ccc; border-top: none; max-height: 300px; overflow-y: auto; z-index: 1000; }
.u-style-blocked-bg { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.u-style-radius-15-overflow { border-radius: 15px; overflow: hidden; }
.u-style-bg-white { background: white; }
.u-style-danger-hero { font-size: 4rem; color: #dc3545; margin-bottom: 1.5rem; }
.u-style-danger-hero .cn-inline-icon { width: 4rem; height: 4rem; }
.u-style-color-333 { color: #333; }
.u-style-color-666 { color: #666; }
.u-style-btn-gradient-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; border-radius: 8px; }
.u-style-font-2rem { font-size: 2rem; }
.u-style-hide-flex-between { display: none; justify-content: space-between; margin-bottom: .5rem; }
.u-style-th-w-120 { width: 120px; }
.u-style-th-w-140 { width: 140px; }
.u-style-th-w-100 { width: 100px; }
.u-style-svg-18 { width: 18px; height: 18px; }
.u-style-form-hidden { display: none; }
.u-style-topbtn-hidden { display: none !important; }
.u-style-topbtn-visible { display: inline-block !important; }
.u-style-sidebar-divider-top { margin-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 2rem; }
.u-style-chevron-90-muted { width: 0.9rem; height: 0.9rem; color: #9ca3af; transform: rotate(90deg); }
.u-style-text-danger { color: #ef4444; }
.u-style-avatar-44 { width: 44px; height: 44px; object-fit: cover; }
.u-style-svg-vmiddle { vertical-align: middle; }
.u-style-svg-vneg2-mr6 { vertical-align: -2px; margin-right: 6px; }
.u-style-progress-h6 { height: 6px; }
.u-style-progress-w0 { width: 0%; }
.u-style-preline { white-space: pre-line; }
.u-style-listing-card-dynamic-bg { transition: background-color .2s ease; }
.u-style-header-logo-img { height: 40px; width: auto; object-fit: contain; }
.u-style-footer-copyright { background-color: #000000; }
.u-style-title-counter { font-weight: 600; }
.u-style-title-counter-danger { color: #dc2626; }
.u-style-title-counter-warn { color: #d97706; }
.u-style-title-counter-ok { color: #16a34a; }
