/* The catalogue leads with search and photos. Secondary sections keep their own styling. */
body{background:#fbfaf8}
.market-home{padding-top:20px}
.market-home .listings-heading{margin:0 0 12px;align-items:end}
.market-home .listings-heading h2{font-size:clamp(22px,2.5vw,32px);line-height:1.12;letter-spacing:-.04em}
.market-home .listings-heading .kicker{font-size:10px;color:#7a665b}
.market-home .sort-button{font-size:12px;min-height:38px}
.market-discovery{display:flex;align-items:center;gap:8px;margin-bottom:10px;min-width:0}
.market-categories{display:flex;align-items:center;gap:7px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;padding:3px 2px 6px}
.market-categories:empty{display:none}
.market-categories button,#marketParts{display:inline-flex;align-items:center;gap:7px;min-height:40px;border:1px solid #e8e0d7;border-radius:10px;background:#fff;padding:8px 12px;color:#34303a;font-size:12px;font-weight:700;white-space:nowrap;flex:0 0 auto;cursor:pointer}
.market-categories button[aria-pressed="true"],#marketParts{color:#9f3219;border-color:#e8c9b8;background:#fff5ed}
.market-categories .ui-icon{color:#896150;width:17px;height:17px}
#marketParts span:first-child{min-width:14px}
#marketParts[hidden],#marketPartReset[hidden],#emptyPost[hidden],#listingError[hidden]{display:none}
.market-home .filter-row{margin:0 0 4px;gap:6px}
.market-home .filter-row button{font-size:12px;min-height:40px;padding:7px 11px}
.market-home .filter-row [aria-pressed="true"]{background:#f9e9df;border-color:#e8c9b8;color:#8b2f19}
.market-toolbar{position:relative;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:7px 0 13px}
#marketViews{display:inline-flex;background:#efece8;padding:3px;border-radius:10px;flex-shrink:0}
#marketViews button{border:0;background:none;color:#60584e;padding:7px 11px;border-radius:8px;font-weight:700;cursor:pointer;font-size:12px;min-height:34px}
#marketViews [aria-pressed="true"]{background:white;color:#312720;box-shadow:0 1px 4px #2a1d1918}
.market-categories::-webkit-scrollbar{display:none}
#marketCatalogue,:is(button#marketMore,#marketMore>summary){font-size:12px;min-height:38px}
details#marketMore{position:relative}
:is(button#marketMore,#marketMore>summary){display:flex;align-items:center;gap:6px;border:1px solid #e5ddd6;border-radius:8px;background:#fff;color:#4d433b;padding:0 10px;list-style:none;font-weight:650;cursor:pointer}
:is(button#marketMore,#marketMore>summary)::after{content:'⌄';font-size:13px}
button#marketMore[aria-expanded="true"]::after,
#marketMore[open] summary::after{transform:rotate(180deg)}
#marketMore summary::-webkit-details-marker{display:none}
.market-toolbar:has(#openMatches .matches-count) :is(button#marketMore,#marketMore>summary)::before{content:'';width:6px;height:6px;border-radius:50%;background:#c74724}
.market-toolbar #ocListingTools{position:absolute;right:0;top:calc(100% + 5px);z-index:15;min-width:184px;background:white;border:1px solid #e8dfd5;border-radius:10px;box-shadow:0 5px 18px #3c21131a;padding:6px;display:grid;gap:4px;margin:0}
.market-toolbar #ocListingTools[hidden],details#marketMore:not([open]) #ocListingTools{display:none}
.market-toolbar #ocListingTools button{justify-content:flex-start;width:100%}
.market-toolbar #ocListingTools #marketMoreClose{width:auto;min-height:44px;padding:6px 12px;justify-self:end}
#ocListingTools>.outline-button{font-size:11px;min-height:38px}
.market-home .listing-grid{gap:12px}
.market-home .listing-card{border:1px solid #eee6de;border-radius:14px;background:white;box-shadow:0 2px 7px #36230e07;min-width:0}
.market-home .listing-image{aspect-ratio:4/3;height:auto;background:#f0ece6;border-radius:13px 13px 0 0}
.market-home .listing-image img{width:100%;height:100%;display:block;object-fit:cover}
.market-gallery{height:100%;width:100%;position:relative;touch-action:pan-y}
.market-photo-arrow,.market-photo-count{position:absolute;background:#221d18ba;color:white}
.market-photo-arrow{display:grid;place-items:center;top:50%;transform:translateY(-50%);width:32px;height:38px;padding:0;border:0;border-radius:9px;cursor:pointer;font-size:25px;line-height:1}
.market-photo-arrow:hover,.market-photo-arrow:focus-visible{background:#241b15}
.market-photo-prev{left:5px}
.market-photo-next{right:5px}
.market-photo-count{left:7px;bottom:7px;padding:3px 7px;border-radius:6px;font-size:11px;font-weight:700}
.market-home .listing-info{padding:11px 12px;min-width:0}
.market-home .listing-price{font-size:clamp(18px,2.1vw,24px);font-weight:760;color:#282321}
.market-home .listing-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-width:0;max-width:100%;height:auto;background:none;border:0;text-align:left;color:#322e2c;font-size:14px;font-weight:650;line-height:1.3;padding:0;cursor:pointer;overflow-wrap:anywhere}
.market-home .listing-title:hover{text-decoration:underline}
.market-home .listing-meta{margin-top:6px;color:#645d57;align-items:center}
.market-home .listing-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.market-home .listing-meta time{flex-shrink:0}
.market-facts{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.market-facts span{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:6px;background:#f5efe9;padding:3px 6px;color:#624c3e;font-size:11px}
.market-home .listing-grid.list-view .listing-image{border-radius:8px;align-self:start}
.market-home .listing-grid.list-view .listing-info{padding:3px 0}
.market-home .catalog-compare-check{color:#60584e}
.market-home .empty-state{min-height:0;background:#fff;border:1px solid #eee3d7;border-radius:14px;padding:20px 14px}
.market-home .empty-state button{min-height:40px;margin:3px;font-size:12px}
.market-home .empty-state p{max-width:48ch;margin-left:auto;margin-right:auto}
#listingError{border-radius:12px;padding:12px;background:#fff3ed}
.market-order{list-style:none;margin:.5rem 0 1rem;padding:0;display:grid;gap:5px}
.market-order li{display:flex;align-items:center;gap:6px;padding:5px 8px;border:1px solid #e7e2db;border-radius:8px}
.market-order li span{flex:1}
.market-order button{min-width:38px;min-height:34px}
@media(max-width:650px){
 .market-home{padding-top:13px}
 .market-home .listings-heading{margin-bottom:8px}
 .market-home .listings-heading .kicker{font-size:9px}
 .market-home .sort-button{font-size:11px;min-height:35px;flex:0 0 auto}
 .market-discovery{gap:5px;margin-bottom:5px}
 .market-categories{gap:5px}
 .market-categories button,#marketParts{min-height:37px;padding:6px 9px;font-size:11px}
 .market-home .filter-row{display:flex;flex-wrap:wrap}
 .market-home .filter-row button{min-height:37px;font-size:11px;padding:6px 9px}
 .market-toolbar{gap:6px;margin:5px 0 9px}
 .market-toolbar>#ocListingTools{position:static;flex:0 0 100%;min-width:0;box-shadow:none}
 #ocListingTools>.outline-button{min-height:34px;padding:6px 8px;font-size:11px}
 .market-home .listing-grid{gap:8px}
 .market-home .listing-info{padding:9px}
 .market-home .listing-title{font-size:13px}
 .market-home .listing-meta time{display:none}
 .market-home .listing-meta{font-size:11px}
 .market-photo-arrow{width:28px;height:34px}
 .market-home .listing-grid.list-view .market-photo-count{font-size:9px;left:3px;bottom:3px}
}
