.market-hero{background:var(--lt-navy);color:white;padding:44px 0}.market-hero h1{font-size:clamp(30px,5vw,48px);margin:10px 0}.market-hero p{margin:0 0 22px;color:#dbe7ef}.market-hero .kicker{color:var(--lt-green-mint)}.market-shell{padding-top:24px;padding-bottom:64px;min-height:50vh}.market-nav{display:flex;gap:24px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--lt-line);padding-bottom:18px;margin-bottom:24px}.market-nav a{font-weight:700}.market-nav form{margin-left:auto}.market-nav button{border:0;background:none;cursor:pointer}.market-panel,.market-card{background:var(--lt-surface);border:1px solid var(--lt-line);border-radius:12px}.market-panel{padding:24px}.market-narrow{max-width:650px;margin:auto}.market-form{display:grid;gap:18px}.market-form label,.market-filters label{display:grid;gap:7px;font-size:14px;font-weight:600}.market-form input:not([type=checkbox]),.market-form select,.market-form textarea,.market-filters input,.market-filters select{width:100%;border:1px solid var(--lt-line-3);border-radius:6px;padding:10px;background:white;font:inherit;color:var(--lt-ink)}.market-form textarea{min-height:140px}.market-form .market-check{display:flex;align-items:start;gap:10px}.market-check input{margin-top:4px}.market-columns{display:grid;grid-template-columns:245px minmax(0,1fr);gap:24px}.market-filters{display:grid;gap:16px;align-content:start}.market-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.market-card{overflow:hidden}.market-card>a{display:block;color:inherit;text-decoration:none}.market-card img,.market-placeholder{width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--lt-surface-2)}.market-placeholder{display:grid;place-items:center;color:var(--lt-ink-3);font-size:36px}.market-card-body{padding:16px}.market-card h3{font-size:16px;margin:6px 0;overflow-wrap:anywhere}.market-card p{font-size:13px;color:var(--lt-ink-3);margin:6px 0}.market-price{font-size:20px;font-weight:800}.market-badge{display:inline-block;border-radius:20px;background:var(--tint-green-bg);padding:4px 9px;font-size:12px}.market-actions{display:flex;gap:10px;flex-wrap:wrap;padding:0 16px 16px}.market-actions button,.market-paging button{border:1px solid var(--lt-line);border-radius:6px;padding:8px 12px;background:white;cursor:pointer}.market-empty{padding:50px 20px;text-align:center;background:var(--lt-surface-2);border-radius:12px;grid-column:1/-1}.market-paging{display:flex;justify-content:space-between;align-items:center;margin-top:24px}.market-detail{display:grid;grid-template-columns:1.25fr 1fr;gap:28px}.market-gallery>img{width:100%;max-height:550px;object-fit:contain;border-radius:12px;background:var(--lt-surface-2)}.market-thumbs{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.market-thumbs img{width:70px;height:70px;object-fit:cover}.market-thumbs button{padding:0;border:1px solid var(--lt-line);background:white;cursor:pointer}.market-description{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}.market-chat{display:grid;grid-template-columns:280px minmax(0,1fr);gap:20px;min-height:500px}.market-chat .e-listview{border-radius:10px}.market-chat .e-chat-ui{min-height:500px}.market-previews{display:flex;flex-wrap:wrap;gap:10px}.market-previews img{width:90px;height:90px;object-fit:cover;border-radius:8px}#market-status:not(:empty){padding:14px;margin-bottom:18px;border-radius:8px;background:var(--tint-amber-bg);color:var(--lt-ink)}.market-form .e-upload-actions{display:none}.market-form button:disabled{opacity:.6;cursor:wait}.market-help{color:var(--lt-ink-3);font-size:13px;line-height:1.6}.market-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:1050px){.market-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.market-columns,.market-detail,.market-chat{grid-template-columns:1fr}.market-filters{grid-template-columns:1fr 1fr}.market-filters h2,.market-filters button{grid-column:1/-1}.market-panel{padding:18px}.market-nav{gap:15px}.market-nav form{margin-left:0}.market-chat{min-height:0}.market-hero{padding:30px 0}}@media(max-width:400px){.market-grid,.market-row{grid-template-columns:1fr}}
.market-filter-details>summary{display:none;cursor:pointer;font-weight:700;padding:14px;border:1px solid var(--lt-line);border-radius:8px;background:white;margin-bottom:12px}@media(max-width:700px){.market-filter-details>summary{display:list-item;list-style-position:inside}}
#market-otp{display:flex;gap:clamp(4px,1.5vw,10px);width:100%}.market-form #market-otp input.e-otp-input-field{flex:1 1 0;min-width:0;max-width:48px;width:0;padding:10px 0;text-align:center;font-size:20px}.market-form .e-dropdownlist input.e-input{border:0;background:transparent}
.market-new-listing{max-width:1120px;margin:0 auto}.market-listing-form{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:24px}.market-listing-form>section{min-width:0;align-content:start}.market-listing-form h3{margin:0;font-size:18px}.market-listing-images .e-upload{width:100%;box-sizing:border-box}.market-listing-images .market-previews{margin-top:18px}.market-listing-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:24px}.market-listing-footer .market-help{margin:0}.market-listing-footer button{flex-shrink:0}@media(max-width:760px){.market-listing-form{grid-template-columns:minmax(0,1fr);gap:18px}.market-listing-footer{align-items:stretch;flex-direction:column;gap:16px}}

/* The tree popup has room for nested labels without widening the filter column. */
.market-category-tree.e-popup { max-width: calc(100vw - 32px); }
.market-category-tree.e-popup .e-treeview .e-text-content { display: flex; align-items: center; }
.market-category-tree.e-popup .e-treeview .e-list-text { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; min-width: 0; }
.market-category-tree.e-popup .e-treeview .e-icons,
.market-category-tree.e-popup .e-treeview .e-list-icon { flex-shrink: 0; }

.market-applied-filters { margin-bottom: 16px; min-width: 0; }
.market-applied-filters .e-breadcrumb { background: transparent; padding: 0; }
.market-applied-filters .e-breadcrumb ol { display: flex; flex-wrap: wrap; row-gap: 6px; }
.market-applied-filters .e-breadcrumb .e-breadcrumb-text { white-space: normal; overflow-wrap: anywhere; }
.market-applied-filters p { margin: 8px 0 0; overflow-wrap: anywhere; }

.market-existing-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; margin-bottom: 16px; }
.market-existing-photos img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }
.market-existing-photos button { width: 100%; padding: 6px; margin-top: 4px; }
/* Keep controls below the complete public header, including its secondary navigation. */
.market-shell { --market-header-offset: var(--lt-header-h, 97px); --market-nav-height: 60px; }
.market-nav { position: sticky; top: var(--market-header-offset); z-index: 30; background: var(--lt-surface); padding-top: 12px; }
.market-filter-slot { min-width: 0; }
.market-filter-details { position: relative; z-index: 20; max-height: calc(100dvh - var(--market-header-offset) - var(--market-nav-height) - var(--market-summary-height, 0px) - 36px); overflow-y: auto; overscroll-behavior: contain; background: var(--lt-surface); border-radius: 12px; }
/* Syncfusion's virtualizer requires every row to have the same measured height. */
#results.market-results-list { border: 0; background: transparent; overflow: visible; }
#results.market-results-list .e-list-parent { margin: 0; padding: 0; }
#results.market-results-list .e-list-item { height: 380px; padding: 0 0 18px; border: 0; box-sizing: border-box; background: transparent; }
#results.market-results-list .market-result-row { height: 100%; }
#results.market-results-list .market-card { height: 100%; white-space: normal; }
#results.market-results-list .market-card img,
#results.market-results-list .market-placeholder { display: grid; height: 170px; aspect-ratio: auto; }
#results.market-results-list .market-card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 22px; height: 44px; }
#results.market-results-list .market-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 18px; }
#results.market-results-list a:focus-visible { outline: 3px solid var(--lt-green); outline-offset: -3px; }
@media(max-width:700px) {
    .market-filter-details { border: 1px solid var(--lt-line); }
    .market-filter-details>summary { margin-bottom: 0; border: 0; }
    .market-filter-details[open] { max-height: min(55dvh, calc(100dvh - var(--market-header-offset) - var(--market-nav-height) - var(--market-summary-height, 0px) - 36px)); }
}
.market-skeleton-grid { margin-bottom: 18px; }
.market-skeleton-card { height: 362px; }
.market-skeleton-card .market-card-body { display: grid; gap: 10px; }
.market-skeleton-card .e-skeleton { border-radius: 4px; }
.market-paging { gap: 16px; flex-wrap: wrap; }
.market-paging [role=status] { flex: 1; }
@media(max-width:700px) {
    /* Block flow lets the mobile filter stick throughout the results below it. */
    .market-columns { display: block; }
    .market-filter-details { margin-bottom: 24px; }
}

.market-filter-details.market-filter-pinned { position: fixed; margin: 0; }

/* One full-width summary keeps the cards and filters on the same starting row. */
.market-browse .market-nav { margin-bottom: 0; }
.market-results-summary { position: sticky; top: calc(var(--market-header-offset) + var(--market-nav-height)); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 12px 10px; margin-bottom: 24px; background: var(--lt-surface); border-bottom: 1px solid var(--lt-line); }
.market-results-summary .market-applied-filters { flex: 1; min-width: 0; margin: 0; }
.market-results-summary #result-count { flex-shrink: 0; margin: 0 0 0 auto; text-align: right; }
.market-results-summary .market-applied-filters p { margin: 4px 0 0; }
.market-results-summary .market-applied-filters nav[hidden] + p { margin-top: 0; }
