/* Compact marketplace header: mark, navigation, search and language share a row. */
.d1-header{height:auto!important;min-height:78px;overflow:visible!important;background:#fff}
.d1-header .d1-shell.d1-navrow{height:auto!important;min-height:78px;display:flex;align-items:center;gap:clamp(10px,1.2vw,20px);flex-wrap:nowrap;padding:7px 18px;box-sizing:border-box;overflow:visible!important}
.d1-header .d1-brand{min-width:50px!important;width:52px;max-width:52px;flex:0 0 52px;gap:0;overflow:visible}
.d1-header .d1-brand .d1-word{display:none!important}
.d1-header .d1-brand .d1-mark{font-size:39px;letter-spacing:-8px;white-space:nowrap;width:52px}
.d1-header .d1-nav{display:flex!important;align-items:center;gap:clamp(11px,1.4vw,23px);flex:1 1 auto;min-width:0;white-space:nowrap}
.d1-header .d1-nav a{font-size:clamp(13px,1.05vw,16px);white-space:nowrap}
.d1-header .d1-search{display:flex!important;flex:0 1 260px;min-width:180px;width:260px;margin:0;height:43px;z-index:150}
.d1-header .d1-icons{display:flex!important;flex:0 0 auto;gap:12px}
.d1-header .site-locale{position:static!important;display:flex;align-items:center;flex:0 0 auto;white-space:nowrap;min-height:35px;margin:0;padding:3px 6px;font-size:12px}
.canada-flag-image{display:inline-block;vertical-align:middle;width:27px;height:17px;object-fit:cover;border:1px solid #e1e5ed;border-radius:2px}
.d1-header .canada-flag{font-size:0;display:flex;align-items:center;margin:0 3px 0 0}
.ds-language-switch .canada-flag{font-size:0;display:inline-flex;align-items:center}
.site-search-results{width:min(380px,calc(100vw - 24px))!important;max-height:350px}
@media(max-width:1190px){
 .d1-header .d1-shell.d1-navrow{flex-wrap:wrap;column-gap:14px;row-gap:4px;padding:7px 16px}
 .d1-header .d1-brand{order:0}
 .d1-header .d1-search{order:1;flex:1 1 250px;max-width:none}
 .d1-header .d1-icons{order:2}
 .d1-header .site-locale{order:3}
 .d1-header .d1-nav{order:4;flex:1 0 100%;justify-content:space-between;overflow-x:auto;padding:4px 0 6px;gap:16px}
 .d1-header .d1-nav a{font-size:14px}
}
@media(max-width:600px){
 .d1-header .d1-search{flex-basis:calc(100% - 72px);order:1}
 .d1-header .d1-icons{order:2}
 .d1-header .site-locale{order:3;margin-left:auto}
 .d1-header .d1-nav{order:4;justify-content:flex-start}
}

/* The same utility strip appears above every marketplace page. */
.d1-utility{display:block!important;min-height:32px;background:#f1f5fb;color:#42536d;border-bottom:1px solid #e2eaf6;font-size:12px}
.d1-utility .d1-shell{min-height:32px;display:flex;align-items:center;gap:18px;padding:0 18px;box-sizing:border-box}
.d1-utility .d1-utility-tag{border-left:1px solid #d5deea;padding-left:18px}
.d1-utility .d1-utility-right{margin-left:auto;display:flex;gap:16px}
.d1-utility .d1-utility-right a{color:#244b80;text-decoration:none}
@media(max-width:600px){.d1-utility .d1-utility-tag{display:none}.d1-utility .d1-utility-right{gap:10px}}

/* Keep the navigation as a deliberate group and the search as one field. */
.d1-header .d1-search{max-width:340px;padding:0 14px;border:1px solid #cbd8e9!important;border-radius:24px!important;background:#fff!important;box-shadow:none!important}
.d1-header .d1-search input{display:block!important;flex:1 1 auto;width:100%;height:100%;min-width:0;margin:0!important;padding:0 5px!important;border:0!important;border-radius:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;font:inherit;font-size:14px!important;color:#17243b}
.d1-header .d1-search input:focus{border:0!important;box-shadow:none!important}
.d1-header .d1-search:focus-within{border-color:#2174df!important;box-shadow:0 0 0 3px rgba(33,116,223,.12)!important}
.d1-header .d1-nav{justify-content:center;gap:clamp(14px,1.25vw,24px)}
@media(max-width:1190px){
 .d1-header .d1-search{flex:1 1 320px;max-width:560px}
 .d1-header .d1-nav{justify-content:center;gap:clamp(18px,2.2vw,34px);flex:1 0 100%}
}
@media(max-width:600px){.d1-header .d1-search{max-width:none}.d1-header .d1-nav{justify-content:flex-start;gap:22px}}

/* Final two-row header: search has a fixed footprint; tabs sit below it. */
.d1-header .d1-shell.d1-navrow{display:grid!important;grid-template-columns:52px minmax(230px,360px) auto auto;grid-template-areas:"brand search icons locale" "nav nav nav nav";align-items:center;justify-content:start;column-gap:22px;row-gap:3px;min-height:0!important;padding:10px 18px 8px!important}
.d1-header .d1-brand{grid-area:brand;order:unset!important}
.d1-header .d1-search{grid-area:search;order:unset!important;display:flex!important;flex:none!important;width:100%!important;min-width:0!important;max-width:360px!important;height:42px!important;box-sizing:border-box;position:relative;z-index:300}
.d1-header .d1-icons{grid-area:icons;order:unset!important;margin:0;justify-self:start}
.d1-header .site-locale{grid-area:locale;order:unset!important;margin:0;justify-self:start}
.d1-header .d1-nav{grid-area:nav;order:unset!important;display:flex!important;flex:none!important;width:max-content;max-width:100%;min-width:0;justify-content:flex-start!important;gap:clamp(20px,2.6vw,42px)!important;padding:8px 0 2px 74px!important;margin:0;overflow-x:auto;box-sizing:border-box}
.d1-header .d1-nav a{flex:0 0 auto}
.d1-header .d1-search input{width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box;border:0!important;outline:0!important;box-shadow:none!important}
.d1-header .site-search-results{position:absolute!important;top:calc(100% + 7px)!important;left:0!important;right:auto!important;width:min(380px,calc(100vw - 32px))!important;max-width:none;z-index:99999!important}
.d1-header .site-search-results[hidden]{display:none!important}
@media(max-width:700px){
 .d1-header .d1-shell.d1-navrow{grid-template-columns:52px minmax(0,1fr) auto;grid-template-areas:"brand search search" "icons locale locale" "nav nav nav";column-gap:10px;padding:9px 12px!important}
 .d1-header .d1-search{max-width:none!important}
 .d1-header .site-locale{justify-self:end}
 .d1-header .d1-nav{padding-left:0!important;gap:22px!important}
}

/* Balance both header rows around the same centre line. */
.d1-header .d1-shell.d1-navrow{justify-content:center!important}
.d1-header .d1-nav{justify-self:center!important;width:max-content!important;padding:8px 0 2px!important;margin:0 auto!important}
@media(max-width:700px){
 .d1-header .d1-shell.d1-navrow{justify-content:stretch!important}
 .d1-header .d1-nav{justify-self:stretch!important;width:100%!important;margin:0!important}
}
@media(min-width:701px){.d1-header .d1-shell.d1-navrow{grid-template-columns:52px 360px 70px 125px!important}}
