/* localfiles.ca — Hamilton community classifieds */
:root {
  --ink: #141B2D;
  --ink-2: #3A4254;
  --muted: #5A6476;
  --line: #E4E8F0;
  --line-2: #E1E5EE;
  --ground: #F4F6FA;
  --card: #FFFFFF;
  --indigo: #1E2A5A;
  --indigo-2: #2C3A72;
  --gold: #F5A524;
  --gold-text: #A85A00;
  --gold-mark: #D98A00;
  --gold-soft: #FFF1D6;
  --cool-soft: #E8ECF8;
  --radius: 18px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--ground); line-height: 1.45; }
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--gold-text); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.ico { flex: 0 0 auto; }
.ico.accent { color: var(--gold-mark); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-accent { background: var(--gold); color: var(--ink); }
.btn-accent:hover { background: #E8971A; color: var(--ink); }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: #16204A; color: #fff; }
.btn-outline { background: #fff; color: var(--indigo); border-color: var(--indigo); }
.btn-dark { background: var(--ink); color: #fff; min-height: 52px; padding: 0 26px; }
.btn-dark:hover { color: #fff; background: #000; }
.btn-ghost { background: rgba(255,255,255,.55); color: var(--ink); min-height: 52px; padding: 0 26px; }
.btn.block { width: 100%; }
.btn.big { min-height: 52px; padding: 0 28px; font-size: 16px; }

/* ---------- Header ---------- */
.site-header { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 100; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 10px; padding-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--indigo); color: #FFC24D; display: flex; align-items: center; justify-content: center; }
.logo-word { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.6px; }
.logo-word span { color: var(--gold-mark); }
.logo-word.light { color: #fff; font-size: 26px; margin-bottom: 10px; }
.logo-word.light span { color: #FFC24D; }

.town-picker { position: relative; }
.town-picker summary { list-style: none; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line-2); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.town-picker summary::-webkit-details-marker { display: none; }
.town-menu { position: absolute; top: 44px; left: 0; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(20,28,60,.16), 0 0 0 1px var(--line); padding: 6px; width: 220px; max-height: 360px; overflow: auto; display: flex; flex-direction: column; }
.town-menu a { padding: 10px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
.town-menu a:hover { background: var(--ground); }
.town-menu a[aria-current] { background: var(--indigo); color: #fff; font-weight: 700; }

.search { flex: 999 1 320px; display: flex; align-items: center; background: #F1F3F8; border: 1.5px solid var(--line-2); border-radius: 999px; padding: 2px 2px 2px 14px; color: var(--muted); min-width: 0; }
.search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; height: 34px; padding: 0 10px; font: inherit; font-size: 15px; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--indigo); background: #fff; }
.search button { border: 0; border-radius: 999px; background: var(--indigo); color: #fff; font: inherit; font-weight: 700; font-size: 14px; height: 34px; padding: 0 18px; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.signin { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; padding: 9px 6px; }

.tabbar { display: flex; gap: 4px; align-items: center; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tab .ico { color: #6B7487; }
.tab:hover { background: #F1F3F8; color: var(--indigo); }
.tab[aria-current] { background: var(--indigo); color: #fff; font-weight: 700; }
.tab[aria-current] .ico { color: #FFC24D; }

.flash { margin: 16px 0 0; background: #E7F6EC; color: #14532D; border-radius: 12px; padding: 12px 16px; font-weight: 500; }

/* ---------- Placeholders ---------- */
.ph { background-color: #E3E7EF; background-image: repeating-linear-gradient(135deg, rgba(30,42,90,.07) 0 10px, transparent 10px 20px); }
.phd { background-color: var(--indigo-2); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px); border-radius: 22px; display: flex; align-items: center; justify-content: center; color: #AEB7D3; font-size: 13px; }
.ph-label { color: #6B7487; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { background: var(--indigo); color: #fff; position: relative; overflow: hidden; }
.hero-rings { position: absolute; right: -120px; top: -140px; opacity: .18; fill: none; stroke: #FFC24D; stroke-width: 2; }
.hero-row { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 16px; padding-bottom: 16px; position: relative; }
.hero-copy { flex: 1 1 460px; min-width: 0; }
.eyebrow-pill { display: inline-flex; background: rgba(255,194,77,.14); color: #FFC24D; font-weight: 700; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; }
.hero h1 { margin: 20px 0 18px; font-weight: 800; font-size: clamp(38px, 5.2vw, 60px); line-height: 1.0; letter-spacing: -2px; }
.hero h1 span { color: #FFC24D; }
.hero-copy > p { margin: 0 0 28px; font-size: 19px; line-height: 1.55; color: #D2D8EA; max-width: 520px; }
.hero-copy > p.hero-sub { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: #AEB7D3; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-chips a { border: 1.5px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); color: #fff; font-weight: 500; font-size: 15px; padding: 11px 16px; border-radius: 999px; }
.hero-chips a:hover { background: rgba(255,255,255,.14); color: #fff; }
.hero-art { flex: 1 1 440px; min-width: 0; position: relative; }
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 170px 170px; gap: 14px; }
.mosaic .tall { grid-row: span 2; }
.float-card { position: absolute; left: -18px; bottom: -26px; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 18px 40px rgba(0,0,0,.25); max-width: 300px; }
.float-card .thumb { flex: 0 0 52px; height: 52px; border-radius: 12px; }
.float-card > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.float-card small { font-size: 12px; font-weight: 700; color: var(--gold-text); letter-spacing: .5px; }
.float-card strong { font-size: 15px; }
.float-card span span, .float-card > span:last-child > span { font-size: 13px; color: var(--muted); }

/* ---------- Hero: latest in each category ---------- */
.latest-panel { background: #fff; color: var(--ink); border-radius: 22px; box-shadow: 0 24px 50px rgba(0,0,0,.28); padding: 18px 18px 14px; }
.latest-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 10px; border-bottom: 1px solid var(--line); }
.latest-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #15803D; white-space: nowrap; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.town-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; background: var(--indigo); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.town-chip span { color: #FFC24D; font-size: 11px; }
.town-chip:hover { background: #16204A; color: #fff; }
.latest-list { list-style: none; margin: 0; padding: 4px 0; }
.latest-row { display: flex; align-items: center; gap: 12px; padding: 6px 4px; border-bottom: 1px solid #F0F2F6; }
.latest-row:last-child { border-bottom: 0; }
.latest-cat { flex: 0 0 132px; display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 14px; min-height: 40px; }
.latest-cat:hover { color: var(--indigo); }
.latest-ico { flex: 0 0 32px; height: 32px; border-radius: 10px; background: var(--cool-soft); color: var(--indigo); display: flex; align-items: center; justify-content: center; }
.latest-row:nth-child(3n+1) .latest-ico { background: var(--gold-soft); color: var(--gold-text); }
.latest-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-item { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; border-radius: 10px; color: var(--ink); }
.latest-item:hover { background: var(--ground); color: var(--ink); }
.latest-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-row .latest-title { color: var(--muted); font-style: italic; }
.empty-row .latest-meta { color: var(--gold-text); font-weight: 700; }
.latest-cta { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14px; }
.latest-cta:hover { background: #E8971A; color: var(--ink); }

/* ---------- Town bar & chips ---------- */
.band { background: #fff; border-bottom: 1px solid var(--line); }
.townbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 0; }
.townbar.boxed { background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px #EBEEF4; padding: 12px 16px; margin-bottom: 16px; }
.townbar-label { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.chips { flex: 1 1 480px; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 0; scrollbar-width: thin; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.chip[aria-current] { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* ---------- Sections ---------- */
.section { padding-top: 56px; }
.section.last { padding-bottom: 72px; }
.section-sm { padding-top: 4px; padding-bottom: 16px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 24px; }
.section-head.tight { align-items: baseline; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 3vw, 36px); }
.eyebrow { margin: 0 0 6px; color: var(--gold-text); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.more { font-weight: 700; padding: 10px 0; }
.section-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.h3 { margin: 0; font-weight: 800; font-size: 28px !important; letter-spacing: -0.6px; }
.h4 { font-family: var(--display); font-size: 19px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.narrow { max-width: 820px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.catcard { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; gap: 16px; align-items: flex-start; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.catcard:hover { border-color: var(--gold); box-shadow: 0 10px 26px rgba(20,28,60,.10); color: var(--ink); }
.catcard strong { display: block; font-size: 18px; margin-bottom: 4px; }
.catcard span span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.cat-ico { flex: 0 0 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.cat-ico.warm { background: var(--gold-soft); color: var(--gold-text); }
.cat-ico.cool { background: var(--cool-soft); color: var(--indigo); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
/* Just posted: 10 cards = two even rows of 5 on wide screens */
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.grid-5 .card-media { height: 150px; }
.card { position: relative; background: #fff; border-radius: var(--radius); overflow: visible; box-shadow: 0 0 0 1px #EBEEF4; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: 0 8px 24px rgba(20,28,60,.13); transform: translateY(-2px); }
.card-media { height: 150px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.card-img-main { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.card-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 18px; line-height: 1; cursor: pointer; z-index: 3; opacity: 0; transition: opacity .15s; display: flex; align-items: center; justify-content: center; }
.card-nav-l { left: 6px; }
.card-nav-r { right: 6px; }
.card-media:hover .card-nav { opacity: 1; }
.card-dots { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 3; }
.card-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.5); transition: background .15s; }
.card-dot.active { background: #fff; }
.card-tooltip { display: none; flex-direction: column; gap: 4px; background: rgba(15,22,41,.95); color: #fff; padding: 10px 12px; font-size: 13px; border-radius: 0 0 10px 10px; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.card:hover .card-tooltip { display: flex; }
.card-tooltip strong { font-size: 13.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctt-price { color: #FFC24D; font-weight: 700; }
.ctt-loc { display: flex; align-items: center; gap: 4px; color: #B0B8CC; font-size: 12px; }
.ctt-desc { color: #C8CEDC; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ctt-time { color: #8899BB; font-size: 11px; }
.card-media.short { height: 130px; }
.badge { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--indigo); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.badge.solid { position: static; background: var(--indigo); color: #fff; }
.heart { position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.heart:hover { color: #C2410C; }
.heart[aria-pressed="true"] { color: #C2410C; }
.heart[aria-pressed="true"] path { fill: currentColor; }
.save-btn[aria-pressed="true"] { background: #FFF1EC; border-color: #C2410C; color: #C2410C; }
.save-btn[aria-pressed="true"] path { fill: currentColor; }
.fav-count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--ground); color: var(--ink-2); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.card-body.pad-top { padding-top: 32px; }
.price { font-family: var(--display); font-weight: 800; font-size: 21px; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--ink); }
.card-title.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-desc { font-size: 14px; color: #4A5468; line-height: 1.45; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--muted); }
.card-meta > span:first-child { display: flex; align-items: center; gap: 5px; }
.tag { padding: 4px 10px; background: var(--gold-soft); color: #7A4100; border-radius: 999px; font-size: 12px; font-weight: 700; }
.datebox { position: absolute; left: 14px; bottom: -22px; width: 58px; height: 62px; border-radius: 14px; background: var(--indigo); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 6px 16px rgba(20,28,60,.25); }
.datebox small { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #FFC24D; }
.datebox strong { font-family: var(--display); font-size: 24px; font-weight: 800; margin-top: 4px; }

/* ---------- Panels ---------- */
.split { display: flex; flex-wrap: wrap; gap: 24px; }
.panel { background: #fff; border-radius: 22px; padding: 28px; box-shadow: 0 0 0 1px #EBEEF4; }
.panel.grow { flex: 999 1 600px; min-width: 0; }
.warm-panel { flex: 1 1 320px; min-width: 0; background: var(--gold-soft); box-shadow: none; display: flex; flex-direction: column; gap: 16px; }
.warm-panel h2 { color: #3D2300; }
.warm-panel p { margin: 0; color: #5C3A00; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row.center { justify-content: center; }
.pill-row a { background: #fff; color: #5C3A00; font-weight: 500; font-size: 14px; padding: 10px 14px; border-radius: 999px; box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.biz { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: #F6F7FB; color: var(--ink); }
.biz:hover { background: #EEF1F8; color: var(--ink); }
.biz > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; color: var(--muted); }
.biz strong { font-size: 15px; color: var(--ink); }
.biz em { font-style: normal; color: var(--gold-text); font-weight: 700; }
.logo-ph { flex: 0 0 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6B7487; }
.cta { background: var(--gold); border-radius: 26px; padding: 44px 40px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta h2 { margin: 0 0 8px; font-weight: 800; font-size: clamp(28px, 3.2vw, 38px); }
.cta p { margin: 0; font-size: 17px; color: #3D2300; }
.cta > div:first-child { flex: 1 1 420px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Category page ---------- */
.cat-head { background: #fff; border-bottom: 1px solid var(--line); padding: 6px 0 6px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 2px; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px; }
.cat-head h1, .page-title { margin: 0 0 2px; font-weight: 800; font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -1.2px; line-height: 1.05; }
.cat-head h1 span, .page-title span { color: var(--gold-mark); }
.cat-head p { margin: 0; font-size: 14px; color: #4A5468; }
.cat-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-chips { margin-top: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.result-count { margin-right: auto; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.toolbar select, .form select, .form input, .form textarea { font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 14px; height: 46px; }
.toolbar select { border-radius: 999px; height: 42px; }
.empty { background: #fff; border: 1.5px dashed #D3D9E5; border-radius: var(--radius); padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.empty strong { font-size: 18px; }
.empty span { color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Listing detail ---------- */
.detail { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.detail-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.detail-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery .big { height: clamp(240px, 40vw, 420px); border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.thumbs .ph { height: 90px; border-radius: 14px; }
.detail-tags { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.detail-title { margin: 0 0 8px; font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.detail-price { margin: 0 0 10px; font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--indigo); }
.detail-meta { margin: 0 0 24px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.detail-desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.detail-side .panel { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.reveal summary { list-style: none; }
.reveal summary::-webkit-details-marker { display: none; }
.contact { margin: 10px 0 0; text-align: center; font-weight: 700; font-size: 17px; background: var(--ground); border-radius: 12px; padding: 12px; }
.safety ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* ---------- Post form ---------- */
.lede { margin: 0 0 20px; color: var(--muted); font-size: 17px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; min-width: 0; }
.field-row .field { flex: 1 1 240px; }
.field-row { display: flex; flex-wrap: wrap; gap: 18px; }
.field label { font-weight: 700; font-size: 14px; }
.opt { font-weight: 400; color: var(--muted); }
.form textarea { height: auto; padding: 12px 14px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(245,165,36,.35); }
.err { margin: 0; color: #B42318; font-size: 13px; font-weight: 500; }
.form .btn { align-self: flex-start; }

/* ---------- Accounts ---------- */
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; }
.account summary::-webkit-details-marker { display: none; }
.account-menu { position: absolute; right: 0; top: 44px; width: 240px; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(20,28,60,.16), 0 0 0 1px var(--line); padding: 6px; display: flex; flex-direction: column; z-index: 20; }
.account-menu a, .account-menu button { text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; width: 100%; }
.account-menu a:hover, .account-menu button:hover { background: var(--ground); }
.account-email { padding: 10px 12px 8px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 4px; word-break: break-all; }
.account-email em { font-style: normal; font-weight: 700; color: #B54708; }
.auth { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 560px; }
.auth-card.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.page-title.small { font-size: clamp(28px, 3vw, 34px); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--indigo); }
.auth-switch { margin: 18px 0 0; text-align: center; font-size: 15px; color: var(--muted); }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }
.alert { background: #FEF3F2; color: #B42318; border-radius: 12px; padding: 12px 14px; font-weight: 500; margin: 0 0 12px; }
.big-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-text); display: flex; align-items: center; justify-content: center; }
.dev-note { margin-top: 12px; width: 100%; background: #F1F3F8; border-radius: 14px; padding: 16px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 12px; text-align: left; }
.posting-as { display: flex; gap: 10px; align-items: flex-start; background: #F6F7FB; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ---------- Homepage v2 ---------- */
.hero-v2 .hero-row { padding-top: 12px; padding-bottom: 12px; gap: 40px; align-items: stretch; }
.hero-v2 .hero-copy { flex: 1.4 1 520px; display: flex; flex-direction: column; justify-content: center; }
.hero-v2 h1 { margin: 0 0 12px; font-size: clamp(36px, 4.6vw, 54px); letter-spacing: -1.6px; }
.hero-v2 .hero-copy > p { margin: 0 0 24px; font-size: 18px; }
.hero-search { display: flex; flex-wrap: wrap; gap: 6px; background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.hs-field { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 52px; border-radius: 12px; background: var(--ground); color: var(--muted); flex: 1 1 150px; min-width: 0; }
.hs-field.hs-q { flex: 2 1 200px; }
.hs-field input, .hs-field select { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); height: 50px; }
.hs-field input:focus, .hs-field select:focus { outline: none; }
.hs-field:focus-within { box-shadow: 0 0 0 2px var(--indigo); background: #fff; }
.hero-search .btn { min-height: 52px; border-radius: 12px; padding: 0 26px; flex: 0 0 auto; }
.hero-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: #AEB7D3; }
.hero-popular a { color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 7px 12px; }
.hero-popular a:hover { background: rgba(255,255,255,.12); color: #fff; }

.post-card { flex: 1 1 340px; min-width: 0; background: #fff; color: var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 24px 50px rgba(0,0,0,.28); }
.post-card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.post-card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.post-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.post-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 6px; border-radius: 14px; background: var(--ground); color: var(--indigo); text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.25; border: 1.5px solid transparent; }
.post-tile:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-text); }

.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 14px; padding-bottom: 14px; font-size: 14px; color: var(--muted); }
.trust-row span { display: flex; align-items: center; gap: 8px; }
.trust-row strong { color: var(--ink); }

.town-chip.big { min-height: 38px; padding: 0 14px; font-size: 14px; }
.town-hint { margin: -14px 0 12px; font-size: 13px; color: var(--muted); }
.chip.town-toggle[aria-current]::before { content: "✓"; margin-right: 6px; color: #FFC24D; font-weight: 800; }
.town-menu a[aria-current]::before { content: "✓ "; color: #FFC24D; }
.town-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: -8px 0 20px; scrollbar-width: thin; }

.cat-live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cat-live { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px #EBEEF4; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.cat-live:hover { box-shadow: 0 0 0 1.5px var(--gold), 0 10px 24px rgba(20,28,60,.08); }
.cat-live-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px; color: var(--ink); }
.cat-live-head:hover { color: var(--ink); }
.cat-live-head .cat-ico { flex-basis: 46px; height: 46px; border-radius: 13px; }
.cat-live-name { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.cat-live-name strong { font-size: 17px; }
.cat-live-name span { font-size: 13px; color: var(--muted); }
.cat-live-arrow { color: var(--muted); font-weight: 700; }
.cat-live-new { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 16px; border-top: 1px solid #F0F2F6; background: #FAFBFD; color: var(--ink); font-size: 13.5px; min-height: 44px; }
.cat-live-new:hover { background: var(--ground); color: var(--ink); }
.new-tag { flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #15803D; background: #DCFCE7; padding: 2px 7px; border-radius: 6px; }
.cat-live-title { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-live-time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.cat-live-new.empty { color: var(--gold-text); font-weight: 700; }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 10px; }
.feed-row { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: 0 0 0 1px #EBEEF4; color: var(--ink); min-width: 0; }
.feed-row:hover { box-shadow: 0 0 0 1.5px var(--indigo), 0 8px 20px rgba(20,28,60,.08); color: var(--ink); }
.feed-ico { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--cool-soft); color: var(--indigo); display: flex; align-items: center; justify-content: center; }
.feed-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feed-main strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-main span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-price { flex: 0 0 auto; max-width: 34%; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--indigo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.panel.grow-half { flex: 1 1 420px; min-width: 0; }
.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.event-list a { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 14px; color: var(--ink); }
.event-list a:hover { background: var(--ground); color: var(--ink); }
.datebox.inline { position: static; flex: 0 0 52px; height: 56px; box-shadow: none; }
.datebox.cal { color: #FFC24D; }
.event-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.event-main strong { font-size: 15px; }
.event-main span { font-size: 13px; color: var(--muted); }
.biz-grid.two { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.muted { color: var(--muted); margin: 0; }

@media (max-width: 640px) {
  .feed { grid-template-columns: 1fr; }
  .post-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-search .btn { flex: 1 1 100%; }
  .trust-row { flex-direction: column; }
}

/* ---------- Post form: multiple towns ---------- */
.town-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.town-pick legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 8px; }
.town-pick-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; font-size: 14px; }
.link-btn { border: 0; background: none; padding: 6px 0; font: inherit; font-weight: 700; color: var(--indigo); cursor: pointer; text-decoration: underline; }
.town-count { color: var(--muted); }
.town-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.town-check { position: relative; display: flex; }
.town-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.town-check span { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 14px; cursor: pointer; }
.town-check span::before { content: ""; flex: 0 0 18px; height: 18px; border-radius: 5px; border: 1.5px solid #B8C0D0; background: #fff; }
.town-check input:checked + span { border-color: var(--indigo); background: #EEF1FA; font-weight: 700; color: var(--indigo); }
.town-check input:checked + span::before { background: var(--indigo); border-color: var(--indigo); box-shadow: inset 0 0 0 3px #fff; }
.town-check input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Multi-select dropdown (towns) ---------- */
.field-label { font-weight: 700; font-size: 14px; }
.multi-select { position: relative; }
.multi-select summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 46px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 15px; color: var(--ink); cursor: pointer; }
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select[open] summary { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(245,165,36,.35); }
.multi-select summary .ico { color: var(--muted); transition: transform .15s; }
.multi-select[open] summary .ico { transform: rotate(180deg); }
.ms-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-summary.placeholder { color: var(--muted); }
.ms-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 240px; max-height: 340px; overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(20,28,60,.18), 0 0 0 1px var(--line); padding: 6px; display: flex; flex-direction: column; }
.ms-tools { position: sticky; top: -6px; z-index: 1; background: #fff; display: flex; gap: 16px; padding: 6px 10px; border-bottom: 1px solid var(--line); margin: -6px -6px 4px; font-size: 14px; }
.field .ms-option, .ms-option { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.ms-option:hover { background: var(--ground); }
.ms-option input { width: 18px; height: 18px; accent-color: var(--indigo); flex: 0 0 auto; }
.field .ms-option:has(input:checked) { font-weight: 700; color: var(--indigo); }
.ms-foot { position: sticky; bottom: -6px; background: #fff; border-top: 1px solid var(--line); margin: 4px -6px -6px; padding: 8px 10px; display: flex; justify-content: flex-end; }
.link-btn { border: 0; background: none; padding: 6px 0; font: inherit; font-weight: 700; color: var(--indigo); cursor: pointer; text-decoration: underline; }

/* ---------- Help pages ---------- */
.help-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.help-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 0 0 1px #EBEEF4; }
.help-nav-title { margin: 4px 8px 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.help-nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; }
.help-nav a:hover { background: var(--ground); color: var(--indigo); }
.help-nav a[aria-current] { background: var(--indigo); color: #fff; }
.help-nav a[aria-current] .ico { color: #FFC24D; }
.help-main { flex: 999 1 560px; min-width: 0; }
.doc { background: #fff; border-radius: 22px; padding: 32px; box-shadow: 0 0 0 1px #EBEEF4; }
.doc h2 { font-size: 22px; margin: 28px 0 10px; }
.doc p, .doc li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.doc ul { padding-left: 20px; margin: 0; }
.doc li { margin-bottom: 6px; }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 8px; }
.tip { background: var(--ground); border-radius: 16px; padding: 18px; }
.tip h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 6px; }
.tip p { margin: 0; font-size: 14.5px; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.contact-card { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 0 0 1px #EBEEF4; display: flex; flex-direction: column; gap: 4px; }
.contact-card strong { font-size: 14px; }
.contact-card span, .contact-card a { font-size: 14px; color: var(--muted); }
.contact-card a { overflow-wrap: anywhere; }
.contact-card a { color: var(--indigo); font-weight: 700; }
.more-link { font-weight: 700; font-size: 14px; margin-top: 4px; }
.report-link { font-size: 13px; color: var(--muted); text-decoration: underline; }
@media (max-width: 640px) { .help-nav { max-width: none; flex-direction: row; overflow-x: auto; } .help-nav-title { display: none; } .help-nav a { white-space: nowrap; } .doc { padding: 22px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C3CAD9; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 24px 48px; padding-top: 24px; padding-bottom: 16px; }
.footer-cols > div { flex: 1 1 150px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-cols .footer-brand { flex: 2 1 260px; }
.footer-brand p { margin: 0; line-height: 1.55; max-width: 340px; }
.footer-cols h2 { margin: 0; font-family: var(--body); font-size: 15px; color: #fff; letter-spacing: 0; }
.footer-cols a { color: #C3CAD9; }
.footer-cols a:hover { color: #fff; }
.footer-bar { border-top: 1px solid #2A3348; }
.footer-bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 16px; padding-bottom: 18px; }
.copyright { margin: 0; font-size: 13px; color: #9AA3B5; white-space: nowrap; }
.social { display: flex; align-items: center; gap: 12px; min-width: 0; }
.social-title { color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.social-list::-webkit-scrollbar { display: none; }
.social-list a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #2E3850; color: #DDE2EC; font-size: 13px; font-weight: 500; white-space: nowrap; }
.social-list a:hover { background: #F5A524; border-color: #F5A524; color: #141B2D; }
@media (max-width: 640px) { .footer-bar-row { flex-direction: column-reverse; align-items: flex-start; } .social { width: 100%; flex-wrap: wrap; } .social-list { flex-wrap: wrap; } }
.footer-base { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid #2A3348; font-size: 13px; color: #9AA3B5; }

@media (max-width: 640px) {
  .latest-cat { flex-basis: 116px; font-size: 13px; }
  .latest-ico { flex-basis: 28px; height: 28px; }
  .latest-panel { padding: 14px 12px 12px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-actions .signin { display: none; }
  .float-card { position: static; margin-top: 14px; max-width: none; }
  .mosaic { grid-template-rows: 120px 120px; }
  .cta { padding: 32px 22px; }
  .panel { padding: 22px; }
}
/* ---- Card media: real images ---- */
/* Add these lines to the end of /srv/localfiles_ca/static/style.css */

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* Keep the badge and heart button on top of real images */
.card-media {
  position: relative;
  overflow: hidden;
}

/* Category card tooltip */
.n-cat-card { position: relative; }
.n-cc-tooltip { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(15,22,41,.93); color: #fff; padding: 10px 12px; display: none; flex-direction: column; gap: 4px; font-size: 12.5px; z-index: 10; border-radius: 0 0 12px 12px; pointer-events: none; }
.n-cat-card:hover .n-cc-tooltip { display: flex; }
.n-cc-tooltip strong { font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-cct-price { color: #FFC24D; font-weight: 700; font-size: 12px; }
.n-cct-loc { color: #9AA8C0; font-size: 11.5px; }
.n-cct-desc { color: #C5CCDA; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.n-cc-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%; width: 26px; height: 26px; font-size: 16px; cursor: pointer; z-index: 5; opacity: 0; transition: opacity .15s; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.n-cc-nav-l { left: 6px; }
.n-cc-nav-r { right: 6px; }
.n-cc-photo:hover .n-cc-nav { opacity: 1; }
