/* Optional desktop presentation. Every existing layout remains available with layout=classic. */
#dsCategoryRail,#dsSearchTools,.ds-panel-actions{display:none}
@media(min-width:1101px){
 body.ds-enabled{--ds-rail:192px;--ds-panel:356px;--ds-header:72px}
 body.ds-enabled .market-header.header{position:sticky;top:0;z-index:50;display:grid;grid-template-columns:148px minmax(220px,1fr) auto;align-items:center;gap:18px;height:var(--ds-header);min-height:var(--ds-header);max-width:none;margin:0;padding:12px 22px;border-bottom:1px solid var(--line);background:var(--theme-surface,#fff);box-shadow:none}
 body.ds-enabled .market-search-row{display:contents}
 body.ds-enabled .market-header .brand{grid-column:1;grid-row:1;margin:0}
 body.ds-enabled .market-header .brand-lockup{width:138px;height:auto}
 body.ds-enabled .market-header .search{grid-column:2;grid-row:1;display:flex;position:relative;min-width:0;width:100%;height:46px;margin:0;padding:3px 3px 3px 12px;border:1px solid var(--line);border-radius:10px;background:var(--theme-surface,#fff);box-shadow:none}
 body.ds-enabled .market-header .search input{font-size:16px;min-width:0}
 body.ds-enabled .market-header .search button{min-height:38px;margin:0;padding:8px 18px;border-radius:7px;font-size:14px}
 body.ds-enabled .market-header .topline{grid-column:3;grid-row:1;display:flex;position:static;width:auto;min-height:44px;gap:10px;margin:0;padding:0;border:0;background:transparent;color:var(--ink)}
 body.ds-enabled .topline>span,body.ds-enabled #marketCatalogue,body.ds-enabled #marketHeaderRegion,body.ds-enabled #mobileSearch{display:none!important}
 body.ds-enabled .toplinks,body.ds-enabled .market-utility-actions,body.ds-enabled .header-account-tools{display:flex;align-items:center;gap:4px;margin:0}
 body.ds-enabled .site-message-label,body.ds-enabled #siteMenuToggle>span,body.ds-enabled .favorites-link>[data-i18n]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 body.ds-enabled .market-header #languageToggle{font-size:12px;min-height:40px;padding:6px}
 body.ds-enabled .market-header .favorites-link,body.ds-enabled .market-header .profile-button,body.ds-enabled .market-header #siteMenuToggle,body.ds-enabled .market-header .toplinks a[href="#messages"],body.ds-enabled .market-header [data-theme-toggle]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;min-width:40px;padding:9px;border:0;border-radius:8px;background:none;color:var(--ink)}
 body.ds-enabled .market-header .favorites-link{position:relative}
 body.ds-enabled .market-header .favorites-link .count{position:absolute;top:0;right:0;min-width:12px;height:14px;padding:0 3px;line-height:14px;font-size:9px}
 body.ds-enabled .market-header .header-post{min-height:42px;font-size:13px;padding:9px 12px;white-space:nowrap;margin-left:4px}
 body.ds-enabled main{max-width:none;width:100%;margin:0;padding:0}
 body.ds-enabled #listings.market-home{display:block;max-width:none;width:100%;margin:0;padding:14px 20px 24px calc(var(--ds-rail) + 20px);box-sizing:border-box;min-height:calc(100dvh - var(--ds-header));transition:none}
 body.ds-enabled.ds-detail-open #listings.market-home{padding-right:calc(var(--ds-panel) + 20px)}
 body.ds-enabled .market-feed{display:block;width:100%;min-width:0;container-type:inline-size}
 body.ds-enabled #dsCategoryRail{position:fixed;left:0;top:var(--ds-header);bottom:0;width:var(--ds-rail);z-index:15;display:flex;flex-direction:column;min-width:0;padding:14px 8px 8px;border-right:1px solid var(--line);background:var(--theme-surface,#fff);color:var(--ink);box-sizing:border-box}
 #dsCategoryRail header{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:0 6px 10px}
 #dsCategoryRail h2{font-size:17px;line-height:1.4;margin:0}
 #dsCategoryRail .ds-catalog-search{display:grid;place-items:center;width:36px;height:36px;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--muted)}
 #dsCategoryRail .ds-tree{flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;min-height:0;padding-right:2px}
 #dsCategoryRail .ds-category-row{display:flex;min-width:0;align-items:stretch;border-radius:8px;margin:2px 0;padding-left:calc(var(--ds-depth)*8px);border:1px solid transparent}
 #dsCategoryRail .ds-category-row>button:first-child{display:flex;align-items:center;gap:8px;flex:1;min-width:0;min-height:40px;text-align:left;padding:7px 5px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:13px;line-height:1.35}
 #dsCategoryRail .ds-category-row>button:first-child span:last-child{min-width:0;overflow-wrap:anywhere}
 #dsCategoryRail .ds-category-row .ui-icon{width:19px;height:19px;flex-shrink:0}
 #dsCategoryRail .ds-branch-dot{width:5px;height:5px;background:var(--muted);border-radius:50%;flex-shrink:0}
 #dsCategoryRail .ds-expand{width:30px;min-height:40px;padding:4px;border:0;border-radius:8px;background:none;color:var(--muted);font-size:18px;flex-shrink:0}
 #dsCategoryRail .ds-category-row:hover,#dsCategoryRail .ds-all:hover{background:var(--theme-raised,#f3f6f9)}
 #dsCategoryRail .ds-onpath{background:var(--theme-raised,#f3f6f9)}
 #dsCategoryRail .ds-selected{border-color:var(--blue,#0877ac);background:var(--pale,#e7f4fc)!important}
 #dsCategoryRail .ds-selected>button:first-child{font-weight:650;color:var(--blue,#0877ac)}
 #dsCategoryRail .ds-all{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:8px 6px;margin-bottom:8px;border:1px solid transparent;border-radius:8px;background:none;text-align:left;color:var(--ink);font-size:13px;line-height:1.35}
 #dsCategoryRail .ds-all svg{width:18px;height:18px;flex-shrink:0}
 #dsCategoryRail footer{border-top:1px solid var(--line);padding-top:6px;margin-top:8px}
 #dsCategoryRail footer button{min-height:36px;padding:6px;background:none;border:0;color:var(--muted);font-size:12px;text-align:left}
 body.ds-enabled :is(.market-discovery,#popularToday,#holidayBand,#marketSide,[data-market-block="hero"],[data-market-block="club"],[data-market-block="categories"],[data-market-block="seller"],[data-market-block="trust"],#browseNavigation,#uiAppliedFilters){display:none!important}
 body.ds-enabled>.footer{margin-left:var(--ds-rail)}
 body.ds-enabled.ds-detail-open>.footer{margin-right:var(--ds-panel)}
 body.ds-enabled #dsSearchTools{display:block;margin-bottom:10px;min-width:0}
 .ds-path{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-height:28px;margin-bottom:8px;color:var(--muted);font-size:13px}
 .ds-path button{min-height:28px;max-width:100%;padding:2px 0;border:0;background:transparent;color:var(--muted);font-size:13px;overflow-wrap:anywhere}
 .ds-path button[aria-current]{color:var(--blue,#0877ac);font-weight:650}
 .ds-filters{display:flex;gap:6px;align-items:center;flex-wrap:wrap;min-width:0}
 .ds-filters button{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;min-height:36px;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--theme-surface,#fff);color:var(--ink);font:inherit;font-size:13px;line-height:1.4;text-align:left;overflow-wrap:anywhere}
 .ds-filters button svg{width:16px;height:16px;flex-shrink:0}
 .ds-filters .ds-filter-applied{background:var(--pale,#e7f4fc);border-color:var(--blue,#0877ac)}
 .ds-filters .ds-filter-applied span{color:var(--muted);margin-left:2px}
 body.ds-enabled #inlineFilters{display:none!important}
 body.ds-enabled.ds-filters-open #inlineFilters{display:block!important;margin:12px 0;padding:16px;border-radius:12px;scroll-margin-top:86px}
 body.ds-enabled #inlineFilters .sf-steps button{min-height:58px;padding:10px;font-size:13px}
 body.ds-enabled #filterResultsBar{gap:8px;margin:0 0 10px;min-height:40px}
 body.ds-enabled #filterResultsBar #browseStatus{font-size:14px;font-weight:600}
 body.ds-enabled #filterResultsBar :is(#sortButton,#marketMore){min-height:36px;height:auto;padding:6px 9px;border-radius:8px;font-size:12px}
 body.ds-enabled #filterResultsBar #marketViews button{width:36px;height:36px;padding:9px}
 body.ds-enabled #filterResultsBar .ul-view-label{display:none}
 body.ds-enabled .market-controls{display:block;margin:0;padding:0;min-height:0}
 body.ds-enabled #nearbyTools{margin:0 0 8px;min-height:28px;font-size:12px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog{margin-top:0}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog:not(.list-view){grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;--cc-photo-height:156px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog:not(.list-view) .listing-title{font-size:14px;min-height:37px;max-height:38px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog:not(.list-view) .listing-info{padding:9px;gap:5px}
 body.ds-enabled #listingGrid .ds-card-selected{outline:2px solid var(--blue,#0877ac);outline-offset:0}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog.list-view .listing-card{grid-template-columns:88px minmax(0,1fr);min-height:86px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog.list-view .listing-image{width:88px;height:68px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog.list-view .listing-info{grid-template-columns:minmax(0,1fr) 88px 30px;gap:3px 7px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog.list-view .listing-title{font-size:14px;-webkit-line-clamp:2;max-height:38px}
 /* The existing detail surface becomes a nonmodal inspector; its routes and controls stay real. */
 body.ds-detail-open #modalBackdrop{position:fixed;inset:var(--ds-header) 0 0 auto;width:var(--ds-panel);height:calc(100dvh - var(--ds-header));z-index:40;display:block;padding:0;background:none;backdrop-filter:none;pointer-events:none}
 body.ds-detail-open #modalBackdrop>.modal{display:flex;flex-direction:column;position:static;width:100%;max-width:none;min-width:0;height:100%;max-height:none;margin:0;padding:0;border:0;border-left:1px solid var(--line);border-radius:0;transform:none;box-shadow:none;background:var(--theme-surface,#fff);pointer-events:auto;overflow:hidden}
 body.ds-detail-open .site-modal-navigation{position:static;display:flex;align-items:center;gap:5px;flex-shrink:0;min-height:48px;padding:7px 10px;margin:0;border-bottom:1px solid var(--line);background:var(--theme-surface,#fff)}
 body.ds-detail-open .site-modal-navigation .site-back-button{font-size:11px;min-height:32px;padding:4px 6px}
 body.ds-detail-open .ds-inspector-title{font-size:13px;font-weight:650;flex:1;min-width:0}
 body.ds-detail-open #closeModal{position:static!important;width:32px;height:32px;min-height:32px;padding:7px;margin:0;flex-shrink:0}
 body.ds-detail-open #modalContent{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;padding:12px;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
 body.ds-detail-open #modalContent>h2{font-size:18px;line-height:1.35;margin:10px 0;order:-3;overflow-wrap:anywhere}
 body.ds-detail-open .pg-detail{order:-4;flex-shrink:0;margin:0;border-radius:8px}
 body.ds-detail-open .pg-hero{height:220px;min-height:0;border-radius:8px}
 body.ds-detail-open .pg-main-open img{object-fit:contain}
 body.ds-detail-open .pg-photo-caption{font-size:11px;min-height:28px;padding-block:4px}
 body.ds-detail-open .pg-thumbs{display:none}
 body.ds-detail-open .pg-sections{max-height:84px;overflow:auto}
 body.ds-detail-open .pg-sections button{font-size:11px;min-height:30px}
 body.ds-detail-open .pg-expand{font-size:12px;min-height:34px}
 body.ds-detail-open .test-listing-notice{order:-5;font-size:11px;line-height:1.4;padding:8px;margin:0 0 10px}
 body.ds-detail-open .detail-price{font-size:25px;line-height:1.3;order:-2;margin:0 0 6px}
 body.ds-detail-open .detail-price small{font-size:12px}
 body.ds-detail-open #modalContent>.form-hint{font-size:12px;line-height:1.4;margin:4px 0 10px}
 body.ds-detail-open .catalog-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:10px;overflow:visible;margin:10px 0}
 body.ds-detail-open .catalog-details>div{display:block;min-width:0;max-width:100%;padding:9px;border:0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
 body.ds-detail-open .catalog-details dt{font-size:11px;line-height:1.3;color:var(--muted)}
 body.ds-detail-open .catalog-details dd{font-size:13px;line-height:1.4;margin:4px 0 0}
 body.ds-detail-open .catalog-description{font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
 body.ds-detail-open .member-seller{padding:9px 0;margin:8px 0}
 body.ds-detail-open .trade-contact-panel{padding:10px;margin:10px 0}
 body.ds-detail-open .trade-contact-panel h3{font-size:14px}
 body.ds-detail-open .trade-contact-panel p{font-size:12px}
 body.ds-detail-open .trade-channel{font-size:12px;padding:7px;min-height:36px}
 body.ds-detail-open .trade-history{padding:10px;margin:10px 0}
 body.ds-detail-open .trade-history h3{font-size:14px}
 body.ds-detail-open .trade-small{font-size:11px}
 body.ds-detail-open .detail-actions,body.ds-detail-open .catalog-options{gap:6px;flex-wrap:wrap}
 body.ds-detail-open .detail-actions button,body.ds-detail-open .catalog-options button{font-size:12px;min-height:36px;padding:7px}
 body.ds-detail-open .ds-panel-actions:not([hidden]){display:flex;gap:8px;flex-shrink:0;min-height:64px;padding:10px 12px;border-top:1px solid var(--line);background:var(--theme-surface,#fff)}
 body.ds-detail-open .ds-panel-actions>*{display:flex;justify-content:center;align-items:center;flex:1;min-height:44px;min-width:0;padding:10px;font-size:14px;text-align:center}
 body.ds-detail-open .vr-tray{display:none}
 body.ds-enabled .market-part-actions{margin:4px 0 10px}
 body.ds-enabled:not(.browse-category) .market-part-actions{display:none}
 body.ds-enabled .ss-panel{z-index:90}
}
@media(min-width:1101px) and (max-width:1240px){body.ds-enabled{--ds-rail:192px;--ds-panel:330px}body.ds-enabled .market-header.header{grid-template-columns:132px minmax(200px,1fr) auto;gap:10px;padding-inline:14px}body.ds-enabled .market-header .brand-lockup{width:124px}body.ds-enabled .market-header .header-post{font-size:12px;padding:8px}body.ds-enabled .market-header .topline{gap:3px}body.ds-enabled .market-header .toplinks{gap:0}body.ds-enabled #listingGrid.universal-listings.compact-catalog.list-view .listing-info{grid-template-columns:minmax(0,1fr) 66px 30px}}
@media print{#dsCategoryRail,#dsSearchTools,.ds-panel-actions{display:none!important}body.ds-enabled #listings.market-home{padding:0!important}body.ds-detail-open #modalBackdrop{position:static;width:100%;height:auto}body.ds-detail-open #modalBackdrop>.modal{height:auto;overflow:visible}body.ds-detail-open #modalContent{overflow:visible}}

@media(min-width:1101px){
 body.ds-enabled .market-header #languageToggle{color:var(--ink)}
 body.ds-detail-open #modalContent>dl.catalog-details{order:-1}
 body.ds-detail-open .ds-extra-specs{order:1;margin:8px 0;font-size:13px}
 body.ds-detail-open .ds-extra-specs summary{min-height:36px;cursor:pointer;color:var(--blue,#0877ac);padding:7px 0}
 body.ds-detail-open .catalog-description{order:0}
 body.ds-detail-open .member-seller{order:2}
 body.ds-detail-open .trade-contact-panel{order:3}
 body.ds-detail-open .nearby-detail{order:4;padding:10px;margin:10px 0}
 body.ds-detail-open .trade-history{order:5}
 body.ds-detail-open .detail-actions,body.ds-detail-open .catalog-options{order:6}
}
@media(min-width:1101px){
 body.ds-enabled #listingGrid.universal-listings.compact-catalog:not(.list-view){--cc-photo-height:140px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog:not(.list-view) .listing-info{padding:8px;gap:4px}
 body.ds-enabled #listingGrid.universal-listings.compact-catalog:not(.list-view) .ollo-fact-value{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

@media(min-width:1101px){#dsCategoryRail .ds-category-row>button:first-child span:last-child{overflow-wrap:normal;word-break:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}}
/* Footer links remain reachable at the intermediate laptop/tablet widths too. */
body>footer{flex-wrap:wrap;min-width:0}
body>footer>div:not(.storage-footer){display:flex;flex-wrap:wrap;min-width:0;max-width:100%}
body>footer>.storage-footer{flex-shrink:0}
@media(min-width:1101px){body.ds-enabled>footer{margin-left:var(--ds-rail)}body.ds-enabled.ds-detail-open>footer{margin-right:var(--ds-panel)}}

body.ds-detail-open dl.catalog-details:empty{display:none}
