/* MyHomeTX listings — uses the site's existing tokens from style.css */
#listings-app { scroll-margin-top: 80px; }
.lx-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.lx-field { display: flex; flex-direction: column; gap: 4px; min-width: 120px; max-width: 190px; flex: 1 1 120px; }
.lx-field.lx-grow { flex: 3 1 220px; max-width: none; }
.lx-field span { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.lx-field input, .lx-field select { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 42px; width: 100%; box-sizing: border-box; }
.lx-field input:focus, .lx-field select:focus { outline: 2px solid var(--pine); outline-offset: 1px; }
.lx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.lx-seg label { cursor: pointer; }
.lx-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lx-seg span { display: block; padding: 11px 16px; font-size: 14px; color: var(--muted); background: var(--bg); }
.lx-seg input:checked + span { background: var(--pine); color: var(--on-pine); }
.lx-seg input:focus-visible + span { outline: 2px solid var(--bronze); outline-offset: -2px; }

.lx-status { margin: 20px 0 12px; color: var(--muted); font-size: 14px; min-height: 1.4em; }
.lx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.lx-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--fg); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.lx-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.lx-card:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.lx-photo { position: relative; aspect-ratio: 4 / 3; background: var(--line); overflow: hidden; }
.lx-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lx-nophoto { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 13px; }
.lx-badge { position: absolute; top: 10px; left: 10px; background: var(--bronze); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; }
.lx-count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 7px; border-radius: 4px; }
.lx-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.lx-price { font-family: var(--font-display); font-size: 24px; color: var(--fg); }
.lx-price small, .lx-d-price small { font-size: .55em; color: var(--muted); margin-left: 2px; }
.lx-facts { font-weight: 600; font-size: 14px; }
.lx-addr { font-size: 14px; }
.lx-hood, .lx-office { font-size: 13px; color: var(--muted); }
.lx-office { margin-top: 6px; font-size: 12px; }
.lx-skel .lx-photo { animation: lx-pulse 1.2s ease-in-out infinite; }
.lx-skel i { display: block; height: 12px; background: var(--line); border-radius: 4px; margin: 6px 0; animation: lx-pulse 1.2s ease-in-out infinite; }
.lx-skel i:first-child { width: 50%; height: 20px; }
@keyframes lx-pulse { 50% { opacity: .5; } }
.lx-empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; }
.lx-empty h3 { font-family: var(--font-display); font-weight: 400; margin: 0 0 6px; }
.lx-empty p { color: var(--muted); margin: 0 0 16px; }

.lx-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 8px; }
.lx-pager button { font: inherit; font-size: 14px; min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 6px; cursor: pointer; }
.lx-pager button[aria-current="page"] { background: var(--pine); color: var(--on-pine); border-color: var(--pine); }
.lx-pager button:disabled { opacity: .4; cursor: default; }
.lx-pager span { align-self: center; color: var(--muted); }
.lx-attrib { font-size: 12px; color: var(--muted); margin: 20px 0 0; line-height: 1.5; }

/* Detail panel */
html.lx-lock { overflow: hidden; }
.lx-panel { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: flex-end; }
.lx-panel[hidden] { display: none; }
.lx-panel-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.lx-panel-body { position: relative; width: min(760px, 100%); height: 100%; overflow-y: auto; background: var(--bg); color: var(--fg); box-shadow: -8px 0 32px rgba(0,0,0,.25); outline: none; animation: lx-in .2s ease-out; }
@keyframes lx-in { from { transform: translateX(24px); opacity: 0; } }
.lx-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lx-gallery { position: relative; aspect-ratio: 3 / 2; background: #111; }
.lx-gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lx-gallery .lx-nophoto { color: #aaa; }
.lx-g-prev, .lx-g-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lx-g-prev { left: 12px; } .lx-g-next { right: 12px; }
.lx-g-n { position: absolute; bottom: 10px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 4px; }
.lx-d-pad { padding: 24px max(16px, 4%) 40px; }
.lx-d-price { font-family: var(--font-display); font-size: 34px; margin-top: 6px; }
.lx-d-pad h2 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 4px 0 2px; }
.lx-d-sub { color: var(--muted); margin: 0 0 8px; }
.lx-d-facts { font-weight: 600; margin: 0 0 16px; }
.lx-d-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 20px; }
.lx-link { color: var(--pine); font-weight: 600; text-decoration: none; }
.lx-oh { background: var(--surface); border-left: 3px solid var(--bronze); padding: 10px 14px; margin-bottom: 20px; font-size: 14px; }
.lx-d-pad h3 { font-family: var(--font-display); font-weight: 400; font-size: 19px; margin: 24px 0 8px; }
.lx-d-desc { line-height: 1.65; white-space: pre-line; }
.lx-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; margin: 0; }
.lx-dl div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.lx-dl dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lx-dl dd { margin: 2px 0 0; }
.lx-loading { padding: 40px 24px; color: var(--muted); }

@media (max-width: 640px) {
  .lx-filters { padding: 12px; gap: 10px; }
  .lx-seg { flex: 1 1 100%; }
  .lx-seg label { flex: 1; text-align: center; }
  .lx-field { flex: 1 1 calc(50% - 5px); min-width: 0; max-width: none; }
  .lx-field.lx-grow { flex-basis: 100%; }
  .lx-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .lx-card, .lx-panel-body, .lx-skel * { transition: none; animation: none; } }
