/* Company wordmarks: preserve image proportions and avoid repeating the name. */
.site-header[data-site-header] .site-identity-wordmark { display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0; }
.site-header[data-site-header] .site-identity-wordmark img { display:block;width:260px;max-width:100%;height:auto;max-height:64px;object-fit:contain;object-position:left center; }
.site-header[data-site-header] .site-identity-wordmark>span { display:block;min-width:0; }
.site-header[data-site-header] .site-identity-wordmark small { display:block;line-height:1.3;overflow-wrap:anywhere; }
.brand-logo-options { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:16px; }
.brand-logo-option { min-width:0; }
.brand-logo-option input[type=file] { max-width:100%; }
.brand-logo-preview { display:flex;align-items:center;justify-content:center;min-height:90px;padding:12px;border:1px solid #b7c3ca;border-radius:6px;background:white;color:#172f3f; }
.brand-logo-preview-dark { background:#253640;color:white; }
.brand-logo-preview img { display:block;width:auto;height:auto;max-width:100%;max-height:80px;object-fit:contain; }
.brand-logo-preview img[hidden] { display:none; }
.brand-logo-preview-icon img { width:64px;height:64px;object-fit:contain; }
.prepared-logo-set { margin-block:20px; }
.prepared-logo-set summary { cursor:pointer;min-height:44px;display:flex;align-items:center; }
/* One layout for phones, Flip screens and unfolded Folds. Desktop stays in its existing grid. */
@media(max-width:1100px) {
 .site-header[data-site-header] { box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;align-items:center;gap:8px 12px;padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left)); }
 .site-header[data-site-header] :is(.site-identity,.header-search,.header-controls,.storefront-preferences-bar) { min-width:0;max-width:100%;margin:0; }
 .site-header[data-site-header] .site-identity { grid-column:1;grid-row:1;justify-self:start;align-self:center; }
 .site-header[data-site-header] .site-identity-wordmark { flex-wrap:nowrap; }
 .site-header[data-site-header] .site-identity-wordmark img { width:260px;max-height:54px; }
 .site-header[data-site-header] .site-identity small { font-size:11px;line-height:1.25; }
 .site-header[data-site-header] nav.product-menu[data-product-menu] { grid-column:2;grid-row:1;align-self:center;justify-self:end; }
 .site-header[data-site-header] .product-menu-root>summary { display:flex;align-items:center;gap:5px;box-sizing:border-box;min-height:44px;margin:0;padding:8px;white-space:nowrap; }
 .site-header[data-site-header] .header-search { grid-column:1/-1;grid-row:2;width:100%;display:flex; }
 .site-header[data-site-header] .header-search input { box-sizing:border-box;flex:1 1 0;width:0;min-width:0;min-height:44px;padding:8px 10px;font-size:16px; }
 .site-header[data-site-header] .header-search button { box-sizing:border-box;flex:0 0 auto;min-height:44px;padding:8px 12px;font-size:16px; }
 .site-header[data-site-header] .header-controls { grid-column:1/-1;grid-row:3;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:2px 24px;width:100%;padding:0; }
 .site-header[data-site-header] .header-controls #site-utility-nav { position:relative;display:flex;align-items:center;justify-content:flex-start;flex:0 1 auto;flex-wrap:wrap;gap:0 8px;width:auto;max-width:100%;min-width:0;margin:0;padding:0; }
 .site-header[data-site-header] #site-utility-nav>a,
 .site-header[data-site-header] #site-utility-nav>.customer-profile-menu>summary { box-sizing:border-box;display:flex;align-items:center;min-height:44px;margin:0;padding:8px 6px;font-size:14px;line-height:1.3;white-space:normal; }
 .site-header[data-site-header] #site-utility-nav>a:first-child { padding-left:0; }
 .site-header[data-site-header] .customer-profile-menu { position:static; }
 .site-header[data-site-header] .customer-profile-options { box-sizing:border-box;position:absolute;left:0;right:auto;top:100%;width:280px;max-width:calc(100vw - 24px);max-height:60dvh;min-width:0;overflow:auto;z-index:50; }
 .site-header[data-site-header] .customer-profile-options a { min-height:44px;box-sizing:border-box;white-space:normal; }
 .site-header[data-site-header] .header-controls .storefront-preferences-bar { flex:0 1 auto;width:auto;padding:0;border:0; }
 .site-header[data-site-header] .storefront-preferences { display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:8px;width:100%;margin:0;padding:0; }
 .site-header[data-site-header] .storefront-preferences label { display:flex;align-items:center;flex-wrap:nowrap;gap:4px;min-width:0;max-width:100%;margin:0;font-size:12px; }
 .site-header[data-site-header] .storefront-preferences :is(select,button) { box-sizing:border-box;width:auto;min-width:0;max-width:100%;min-height:44px;margin:0;padding:6px;font-size:16px;line-height:1.2; }
 .site-header[data-site-header] .storefront-preferences button { flex:none; }
 .site-header[data-site-header] .product-menu-panel { box-sizing:border-box;left:0;right:0;width:100%;max-width:100%;z-index:60; }
}
@media(max-width:699px) {
 .site-header[data-site-header] .header-controls .storefront-preferences-bar { flex-basis:100%; }
 /* Text remains the accessible name; selected language and currency stay visible. */
 .site-header[data-site-header] .storefront-preferences label>span { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
 .site-header[data-site-header] .storefront-preferences label:first-of-type { flex:0 1 130px; }
 .site-header[data-site-header] .storefront-preferences label:nth-of-type(2) { flex:0 1 90px; }
 .site-header[data-site-header] .storefront-preferences select { width:100%; }
 .site-header[data-site-header] .site-identity-wordmark img { max-height:48px; }
}

/* A shallow logo viewport removes surplus canvas space from the supplied wordmark
   without changing the original image or stretching its lettering. */
.site-header[data-site-header] .site-identity .brand-wordmark-art { display:block;position:relative;width:260px;max-width:100%;aspect-ratio:5/1;overflow:hidden;flex:none; }
.site-header[data-site-header] .site-identity .brand-wordmark-art img { position:absolute;display:block;width:100%;height:auto;max-width:none;max-height:none;left:0;top:50%;transform:translateY(-50%);object-fit:contain; }

.rail-brand .rail-mark img { display:block;width:100%;height:100%;object-fit:contain;border-radius:inherit; }
