/* ============================================================================
   fm-shell.css — brand page shell  (v2, matches the approved mockup)
   ----------------------------------------------------------------------------
   Serves top-fm.php, left_column-fm.php, breadcrumb-fm.php and footer-fm.php,
   all of which render ONLY when `fm_shell = 1` in foremost_responsive.ini.
   With the flag off none of these classes appear in the document, so this sheet
   is inert and safe to deploy ahead of switching the flag on.

   SCOPING: everything is prefixed .fms- (foremost shell) or nested under
   .fms-body, which only top-fm.php sets on <body>. No Bootstrap or legacy class
   is redefined outside that scope.

   STRUCTURE (two rows, one rule):
     [ acting-as band — master sessions only ]
     row 1  logo · product search · delivery site · account menu
     row 2  navigation · basket                       <- the only border
   ========================================================================== */

:root,
.fms-body,
.fms-flyout,
.fms-foot{
  --fms-blue1:#0061fe; --fms-blue2:#0039c7; --fms-blue4:#87c2ff; --fms-blue5:#e8effd;
  --fms-navy:#121d3c;  --fms-neon:#ccff00;  --fms-white:#fff;
  --fms-navy60:rgba(18,29,60,.6); --fms-navy30:rgba(18,29,60,.3);
  --fms-r-btn:60px; --fms-r-box:30px; --fms-r-sm:16px;
  --fms-font:'Ambit','Open Sans','Helvetica Neue',Arial,sans-serif;

  /* ---------------------------- WIDTH MODEL ------------------------------
     One declaration point for every horizontal measurement in the shell and
     the page body. See the PAGE WIDTH MODEL section below for the rules that
     consume these. Changing a number here changes it everywhere. */
  --fms-gutter:48px;              /* content edge  ->  viewport edge */
  --fms-inset:24px;               /* content edge  ->  text edge     */
  --fms-w-shell:1600px;           /* head, nav row and footer. NEVER varies. */
  --fms-w-wide:1600px;
  --fms-w-standard:1200px;
  --fms-w-narrow:720px;
  --fms-w-page:var(--fms-w-standard);   /* overridden by the body tier class */
}

/* Tier selection. libs\Model::widthTierClass() emits one of these onto <body>
   alongside .fms-body; absent means standard. Two classes beat the one-class
   token block above, so the override lands. */
.fms-body.fms-w-narrow  { --fms-w-page:var(--fms-w-narrow) }
.fms-body.fms-w-standard{ --fms-w-page:var(--fms-w-standard) }
.fms-body.fms-w-wide    { --fms-w-page:var(--fms-w-wide) }

@media (max-width:1400px){
  :root,.fms-body,.fms-flyout,.fms-foot{ --fms-gutter:32px }
}
@media (max-width:767px){
  :root,.fms-body,.fms-flyout,.fms-foot{ --fms-gutter:16px; --fms-inset:16px }
}

.fms-body{font-family:var(--fms-font);color:var(--fms-navy)}
/* Self-sizing wrap, used both INSIDE .fms-head (row 1) and standalone for the
   inactive-site warnings further down the page. Standalone it must size itself,
   because .container.body-background is full-bleed; nested inside .fms-head it
   must NOT, or the gutter is subtracted twice — see the nested reset below. */
.fms-wrap{
  width:min(var(--fms-w-shell), 100% - var(--fms-gutter) * 2);
  margin-inline:auto;
  padding-inline:var(--fms-inset);
  box-sizing:border-box;
}
/* Already inside a width-owning box: fill it, do not re-apply the gutter. */
.fms-body .fms-head .fms-wrap{width:100%;max-width:none}

/* ===================== ACTING-AS BAND (master only) ====================== */
.fms-mst{background:none;color:#fff}
.fms-mst__in{width:calc(100% - var(--fms-inset) * 2);margin:10px auto 0;padding:9px var(--fms-inset);
  background:var(--fms-navy);border-radius:var(--fms-r-box);box-sizing:border-box;
  display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.fms-mst__dot{width:9px;height:9px;border-radius:50%;background:var(--fms-neon);flex-shrink:0}
.fms-mst__lbl{font-size:11px;letter-spacing:1.1px;text-transform:uppercase;color:var(--fms-neon);font-weight:700}
.fms-mst__who{font-size:14px;font-weight:700}
.fms-mst__meta{font-size:12px;color:rgba(255,255,255,.7)}
.fms-mst__act{margin-left:auto;display:flex;gap:8px}
.fms-mst__btn,.fms-mst__btn:visited{font-size:12px;padding:5px 15px;border-radius:var(--fms-r-btn);
  text-decoration:none;background:var(--fms-neon);color:var(--fms-navy);font-weight:700;white-space:nowrap}
.fms-mst__btn:hover{background:#fff;color:var(--fms-navy);text-decoration:none}
.fms-mst__btn--ghost,.fms-mst__btn--ghost:visited{background:transparent;color:#fff;
  border:1px solid rgba(255,255,255,.45);font-weight:400}
.fms-mst__btn--ghost:hover{background:rgba(255,255,255,.12);color:#fff}

/* =========================== BLUE UTILITY STRIP ========================== */
/* Corporate's pattern: a slim blue1 band across the very top, then a white
   header beneath it. Carries the account menu and, for master sessions, the
   acting-as context. */
/* ONE blue band carrying the utility line, the logo and both searches, with
   its BOTTOM corners rounded upward — the mirror of the footer's top corners.
   Full-bleed left and right; the white nav row sits beneath it. */
.fms-head{
  background:var(--fms-blue1);
  color:#fff;
  border-radius:0 0 var(--fms-r-box) var(--fms-r-box);
  padding-bottom:6px;
  /* The head owns its width rather than inheriting it from
     .container.body-background, which is now full-bleed. Without this the blue
     band would run edge to edge and the rounded bottom corners would not read. */
  width:min(var(--fms-w-shell), 100% - var(--fms-gutter) * 2);
  margin-inline:auto;
  box-sizing:border-box;
}
.fms-strip{background:none;color:#fff}
.fms-strip__in{
  width:100%;margin:0 auto;
  min-height:38px;padding-inline:var(--fms-inset);
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  box-sizing:border-box;
  border-bottom:1px solid rgba(255,255,255,.16);
}
.fms-strip__left{display:flex;align-items:center;gap:16px;min-width:0;font-size:12px}
.fms-strip__right{display:flex;align-items:center;gap:14px;margin-left:auto}
.fms-strip a,.fms-strip a:visited{color:rgba(255,255,255,.9);text-decoration:none;font-size:12px}
.fms-strip a:hover{color:var(--fms-neon);text-decoration:none}
.fms-strip__item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.fms-strip__icon{width:13px;height:13px;fill:currentColor;flex-shrink:0}

/* ================================ ROW 1 ================================= */
.fms-r1{
  display:flex;align-items:center;gap:18px;
  min-height:84px;
  background:none;
  padding:14px 0;
}

/* No tile. /assets/img/Foremost-logo.png is white text on transparent, so it
   sits directly on blue1. Customer logos are managed to suit — if one is
   supplied on white it will need replacing, not accommodating here. */
.fms-logo{
  flex:0 0 auto;width:180px;height:50px;
  display:flex;align-items:center;
  background:none;padding:0;
}
.fms-logo img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;
  object-position:left center;display:block}
/* fallback wordmark when the customer has no logo (anonymous visitors) */
.fms-logo__word{font-size:26px;font-weight:300;letter-spacing:-.6px;line-height:1;color:var(--fms-blue1)}
@media (max-width:767px){ .fms-logo__word{font-size:20px} }

/* field with a floating label */
.fms-fld{position:relative}
.fms-fld__lab{position:absolute;top:-17px;left:4px;background:none;padding:0;font-size:10px;
  font-weight:700;letter-spacing:.6px;color:rgba(255,255,255,.78);text-transform:uppercase;z-index:2}
.fms-fld__in{width:100%;height:46px;padding:0 44px 0 18px;border:2px solid #fff;
  border-radius:var(--fms-r-btn);font-family:var(--fms-font);font-size:14px;color:var(--fms-navy);
  background:#fff;outline:none;transition:box-shadow .15s}
.fms-fld__in::placeholder{color:var(--fms-navy30)}
/* Focus is the 2px border turning neon, and nothing else. The ring was a 45%
   alpha neon shadow sitting outside a neon border, so the field carried two rims
   of the same colour at different opacities and the outer one blended into the
   blue header. box-shadow is stated as none rather than left unset, so
   Bootstrap's own blue focus glow on .form-control cannot appear instead. */
.fms-fld__in:focus{border-color:var(--fms-neon);box-shadow:none}
/* Every one of these inputs also carries Bootstrap's .form-control, which sets
   border-radius:4px and its own focus box-shadow at EXACTLY the same specificity
   as the two rules above. Which one applies therefore depends on stylesheet load
   order rather than on intent, which is why the product search rendered square
   while the site selector — whose rules are one class deeper — kept its pill.
   Restating both a class higher settles it wherever the sheets happen to load.
   The .fms-f-prod radius rule in the mobile block below is the same collision
   patched at one breakpoint; it is now redundant but harmless. */
.fms-fld__in.form-control{border-radius:var(--fms-r-btn)}
.fms-fld__in.form-control:focus{border-color:var(--fms-neon);box-shadow:none}

.fms-fld__ic{position:absolute;right:7px;top:50%;transform:translateY(-50%);width:32px;height:32px;
  border:0;background:none;display:flex;align-items:center;justify-content:center;cursor:pointer;
  color:var(--fms-blue1);padding:0;z-index:2}
.fms-fld__ic svg{width:17px;height:17px;fill:currentColor}
.fms-fld__ic:focus-visible{outline:2px solid var(--fms-blue1);outline-offset:2px;border-radius:50%}

.fms-f-prod{flex:1 1 340px;min-width:220px}
/* A real width, not a flex leftover: selectize measures its container when it
   initialises, so "whatever is left over" produces a collapsed control. */
.fms-f-site{flex:0 0 340px;width:340px;min-width:280px}

/* the native select is the no-JS fallback — init.js selectizes .user_branch_list */
.fms-f-site .fms-fld__in{padding-right:38px;cursor:pointer;-webkit-appearance:none;appearance:none;
  text-overflow:ellipsis;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%230061fe' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 16px center}

/* ---- selectize-rendered branch picker ---- */
.fms-f-site .selectize-control{width:100%}
/* Selectize COPIES the original select's classes onto .selectize-control and
   .selectize-input — so both also carry .form-control and .input-sm, and
   Bootstrap's .input-sm sets a 3px radius that flattened the pill. Both
   elements are targeted, and the radius is forced. */
.fms-f-site .selectize-control,
.fms-f-site .selectize-control.form-control,
.fms-f-site .selectize-control.input-sm{
  width:100%;height:auto;padding:0;border:0;background:none;box-shadow:none;
  border-radius:var(--fms-r-btn) !important;
}
.fms-f-site .selectize-input,
.fms-f-site .selectize-input.form-control,
.fms-f-site .selectize-input.input-sm,
.fms-f-site .selectize-control .selectize-input{
  display:block;width:100%;
  min-height:46px;height:auto;padding:11px 40px 11px 18px;
  border:2px solid #fff;
  border-radius:var(--fms-r-btn) !important;
  background:#fff;box-shadow:none;
  font-family:var(--fms-font);font-size:14px;line-height:1.4;color:var(--fms-navy);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  box-sizing:border-box;
}
/* the original <select> must not show through alongside the widget */
.fms-f-site .selectize-control + select,
.fms-f-site select.selectized{display:none !important}
/* Same focus treatment as the product search: the border turns neon, nothing
   else. This carried the 45% alpha ring outside a neon border, which read as two
   overlapping rims. */
.fms-f-site .selectize-input.focus,
.fms-f-site .selectize-input.input-active{border-color:var(--fms-neon);box-shadow:none}
.fms-f-site .selectize-input input{font-family:var(--fms-font);font-size:14px;color:var(--fms-navy)}
.fms-f-site .selectize-input>.item{white-space:nowrap}
.fms-f-site .selectize-input:after{border-color:var(--fms-blue1) transparent transparent transparent;right:18px;margin-top:-2px}
.fms-f-site .selectize-dropdown,
.fms-f-site .selectize-dropdown.form-control,
.fms-f-site .selectize-dropdown.input-sm{
  border:1px solid var(--fms-blue5);
  border-radius:var(--fms-r-sm) !important;
  box-shadow:0 12px 32px rgba(18,29,60,.18);
  font-family:var(--fms-font);font-size:13px;margin-top:6px;
  width:100% !important;min-width:0;max-width:none;
  height:auto;padding:4px;background:#fff;
}
.fms-f-site .selectize-dropdown .option{padding:9px 15px;color:var(--fms-navy);white-space:normal;line-height:1.35}
.fms-f-site .selectize-dropdown .active{background:var(--fms-blue5);color:var(--fms-blue1)}
.fms-f-site .selectize-dropdown .highlight{background:rgba(204,255,0,.45);border-radius:2px}

/* ---- account menu ---- */
.fms-acct{position:relative;flex:0 0 auto;margin-left:auto}
.fms-acct__btn{display:flex;align-items:center;gap:8px;height:34px;padding:0 10px 0 4px;
  background:rgba(255,255,255,.14);border:0;border-radius:var(--fms-r-btn);cursor:pointer;
  font-family:var(--fms-font);font-size:12px;color:#fff}
.fms-acct__btn:hover{background:rgba(255,255,255,.26)}
.fms-acct__av{width:26px;height:26px;border-radius:50%;background:var(--fms-neon);color:var(--fms-navy);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:10px;flex-shrink:0}
.fms-acct__nm{display:flex;flex-direction:column;align-items:flex-start;line-height:1.25}
.fms-acct__nm b{font-weight:700;font-size:12px;white-space:nowrap;line-height:1.2}
.fms-acct__nm span{font-size:10px;color:rgba(255,255,255,.75);white-space:nowrap;line-height:1.2}
.fms-acct__cv{border:4px solid transparent;border-top-color:rgba(255,255,255,.8);margin-top:3px}
.fms-acct__menu{position:absolute;right:0;top:100%;z-index:600;min-width:255px;background:#fff;
  border:1px solid var(--fms-blue5);border-radius:var(--fms-r-sm);
  box-shadow:0 16px 44px rgba(18,29,60,.16);padding:8px;display:none}
.fms-acct.is-open .fms-acct__menu{display:block}
.fms-acct__hd{padding:10px 12px 12px;border-bottom:1px solid var(--fms-blue5);margin-bottom:6px}
.fms-acct__hd b{display:block;font-size:14px}
.fms-acct__hd span{display:block;font-size:12px;color:var(--fms-navy60);margin-top:2px}
.fms-acct__menu a,.fms-acct__menu a:visited{display:block;padding:9px 12px;font-size:13px;
  color:var(--fms-navy);text-decoration:none;border-radius:10px}
.fms-acct__menu a:hover,.fms-acct__menu a:focus{background:var(--fms-blue5);color:var(--fms-blue1);text-decoration:none}
.fms-acct__menu hr{border:0;border-top:1px solid var(--fms-blue5);margin:6px 0}

/* ================================ ROW 2 ================================= */
.fms-r2{
  border-bottom:2px solid var(--fms-blue5);background:#fff;margin-top:2px;
  /* Same reason as .fms-head — owns its width, so the two align by construction. */
  width:min(var(--fms-w-shell), 100% - var(--fms-gutter) * 2);
  margin-inline:auto;
  box-sizing:border-box;
}
.fms-r2__in{display:flex;align-items:center;gap:6px;width:100%;margin:0 auto;padding-inline:var(--fms-inset)}
.fms-nav{display:flex;list-style:none;gap:2px;margin:0;padding:0}
.fms-nav--r{margin-left:auto}
.fms-nav>li{position:relative;display:flex}
.fms-nav>li>a,.fms-nav>li>a:visited{display:flex;align-items:center;min-height:52px;padding:0 15px;
  font-size:12px;letter-spacing:.85px;text-transform:uppercase;font-weight:600;color:var(--fms-navy);
  text-decoration:none;border-bottom:3px solid transparent;white-space:nowrap;
  transition:color .15s,border-color .15s}
.fms-nav>li>a:hover,.fms-nav>li>a:focus{color:var(--fms-blue1);text-decoration:none}
.fms-nav>li.is-active>a{color:var(--fms-blue1);border-bottom-color:var(--fms-blue1)}
.fms-nav>li>a:focus-visible{outline:2px solid var(--fms-blue1);outline-offset:-2px}
.fms-nav__caret{margin-left:6px;border:4px solid transparent;border-top-color:currentColor;margin-top:2px}
.fms-nav__sub{list-style:none;margin:0;padding:8px 0;position:absolute;top:100%;left:0;z-index:500;
  min-width:230px;background:#fff;border:1px solid var(--fms-blue5);border-radius:var(--fms-r-sm);
  box-shadow:0 12px 32px rgba(18,29,60,.12);display:none}
.fms-nav>li:hover>.fms-nav__sub,
.fms-nav>li:focus-within>.fms-nav__sub{display:block}
.fms-nav__sub>li>a,.fms-nav__sub>li>a:visited{display:block;padding:8px 18px;font-size:13px;
  color:var(--fms-navy);text-decoration:none;text-transform:none;letter-spacing:0}
.fms-nav__sub>li>a:hover{background:var(--fms-blue5);color:var(--fms-blue1);text-decoration:none}

.fms-basket,.fms-basket:visited{display:inline-flex;align-items:center;gap:9px;height:40px;padding:0 20px;
  margin-left:14px;border-radius:var(--fms-r-btn);background:var(--fms-blue1);color:#fff;font-size:13px;
  text-decoration:none;white-space:nowrap;transition:transform .15s ease-out,background .15s}
.fms-basket:hover,.fms-basket:focus{background:var(--fms-blue2);color:#fff;text-decoration:none;transform:scale(1.03)}
.fms-basket svg{width:16px;height:16px;fill:currentColor}
.fms-basket b{font-weight:700}

/* the legacy cart dropdown markup, rendered inside the pill slot */
.fms-cartdrop{position:relative;display:inline-block;margin-left:14px}
.fms-cartdrop>a,.fms-cartdrop>a:visited{display:inline-flex;align-items:center;gap:9px;height:40px;
  padding:0 20px;border-radius:var(--fms-r-btn);background:var(--fms-blue1);color:#fff;font-size:13px;
  text-decoration:none;white-space:nowrap;transition:transform .15s ease-out,background .15s}
.fms-cartdrop>a:hover{background:var(--fms-blue2);color:#fff;text-decoration:none;transform:scale(1.03)}
.fms-cartdrop>a img{filter:brightness(0) invert(1);max-height:16px;width:auto}
.fms-cartdrop>a .caret{border-top-color:currentColor}
.fms-cartdrop .dropdown-menu{border-radius:var(--fms-r-box);border:1px solid var(--fms-blue5);
  box-shadow:0 16px 48px rgba(18,29,60,.16);padding:8px;margin-top:8px;
  /* min-width pushed the panel past the viewport on a narrow window */
  width:min(360px, calc(100vw - 32px));min-width:0;
  font-family:var(--fms-font);right:0;left:auto}
.fms-cartdrop .dropdown-menu table{width:100%;border-collapse:collapse}
.fms-cartdrop .dropdown-menu th{background:none;color:var(--fms-navy60);font-size:11px;font-weight:700;
  text-align:left;padding:8px 10px;border-bottom:1px solid var(--fms-blue5);white-space:nowrap}
.fms-cartdrop .dropdown-menu td{padding:8px 10px;font-size:13px;color:var(--fms-navy);
  border-bottom:1px solid rgba(135,194,255,.25);vertical-align:top}
.fms-cartdrop .dropdown-menu tr:last-child td{border-bottom:none}
.fms-cartdrop .dropdown-menu a,.fms-cartdrop .dropdown-menu a:visited{color:var(--fms-navy);text-decoration:none}
.fms-cartdrop .dropdown-menu a:hover{color:var(--fms-blue1);text-decoration:underline}
.fms-cartdrop .dropdown-menu .btn{border-radius:var(--fms-r-btn);min-height:38px;padding:0 18px;
  font-family:var(--fms-font);font-size:13px;font-weight:400;border:2px solid var(--fms-blue1);
  background:#fff;color:var(--fms-blue1);box-shadow:none;text-shadow:none}
.fms-cartdrop .dropdown-menu .btn:hover{background:var(--fms-blue5)}
.fms-cartdrop .dropdown-menu .btn:last-of-type{background:var(--fms-blue1);color:#fff}
.fms-cartdrop .dropdown-menu .btn:last-of-type:hover{background:var(--fms-blue2);color:#fff}

/* =========================== STICKY FOOTER =============================== */
/* On a short page the document ended just below the footer and the browser
   painted background for the rest of the viewport — measured as body 2776 /
   footer bottom 2718, i.e. the page simply did not reach the bottom of the
   screen. This is not a margin bug; it is a missing minimum height.

   The chain below makes the content stretch so the footer sits at the bottom on
   short pages and flows normally on long ones. Each level must participate or
   the flex-grow does not reach the content.

   These are column flex containers, so children still stack as blocks. Flex
   containers also establish a block formatting context, so they contain their
   floats — which is why the flow-root rules below can coexist with this.

   Scoped to .fms-body: with fm_shell off, page height is untouched. */
/* Measured: document 2740, #page-content-wrapper 2440, and body carrying
   padding-bottom:300px from a legacy rule — presumably clearing something the
   old shell had at the foot of the page. Nothing in the brand shell needs it,
   and it is what produced the white band under the footer. Reset here rather than
   hunting it down in whichever legacy sheet declares it; the mobile allowance
   for the fixed bottom bar is re-applied in the mobile block below. */
.fms-body{min-height:100vh;display:flex;flex-direction:column;padding-bottom:0}
.fms-body > #page-content-wrapper{flex:1 0 auto;display:flex;flex-direction:column;min-width:0}
.fms-body #page-content-wrapper > .body-background{flex:1 0 auto;display:flex;flex-direction:column;min-width:0}
.fms-body #page-content-wrapper > .body-background > .fms-foot{margin-top:auto}

/* the head must not stretch */
.fms-body .fms-head,
.fms-body .fms-r2,
.fms-body .fms-mst{flex:0 0 auto}

/* ========================= FLOAT CONTAINMENT ============================= */
/* Diagnosed on staging: the footer rendered 1,162px ABOVE the element before
   it, with clear:both applied and no floated sibling to clear.

   Cause: the page views wrap their columns in
       <section><div class="row-offcanvas row-offcanvas-left">
          <div class="col-md-3">…</div><div class="col-md-9">…</div>
       </div></section>
   and .row-offcanvas is NOT .row, so it never receives Bootstrap's clearfix.
   The columns float, .row-offcanvas collapses to zero height, and everything
   above the footer collapses with it — so the footer flows up into the gap and
   the content paints over it.

   display:flow-root makes each of these establish a block formatting context,
   which contains the floats. It is inert on elements that have no floats, so
   it is safe to apply broadly. Scoped under .fms-body: with fm_shell off the
   legacy shell is untouched.

   This is a pre-existing bug, not one the rebrand introduced — the old footer
   simply hid it behind a full-width band. */
.fms-body .row-offcanvas,
.fms-body .center-area-background,
.fms-body .body-background,
.fms-body .container > section,
.fms-body .product-thumbnails{display:flow-root}

/* Fallback for engines without flow-root */
@supports not (display: flow-root){
  .fms-body .row-offcanvas::after,
  .fms-body .center-area-background::after,
  .fms-body .body-background::after,
  .fms-body .container > section::after,
  .fms-body .product-thumbnails::after{content:"";display:table;clear:both}
}

/* =========================== PAGE WIDTH MODEL =========================== */
/* Measured on staging 2026-08: .container.body-background 1440,
   .container.center-area-background 1392, .fms-wrap 1392. All three carried the
   SAME rule — width:min(1440px, 100% - 48px) — but top-fm.php opens
   .container.body-background and then ~202 views open .container
   .center-area-background INSIDE it, so `100% - 48px` was evaluated against a
   parent that had already had 48px taken off. The gutter was subtracted twice
   and the blue head sat 24px outside the page content on every page.

   The fix is structural, not numeric: ONE element owns each width.
     - .fms-head / .fms-r2 / .fms-foot   own the shell width  (--fms-w-shell)
     - .center-area-background            owns the page width (--fms-w-page)
     - .container.body-background         owns NO width — full bleed
   Nothing is nested inside something that also constrains it, so the value
   cannot compound however deeply views nest.

   The shell width never varies. Page content sits inside it at one of three
   tiers, selected per page by libs\Model::$widthTier. A tier is only ever
   narrower than the shell, never wider, so the header never has to move.

   SCOPED UNDER .fms-body deliberately: with fm_shell off, page widths are
   untouched, so this cannot break a view that was designed full-bleed. Add
   .fms-full to any element that genuinely wants the full viewport. */
.fms-body .container,
.fms-body .container-fluid,
.fms-body .center-area-background{
  width:min(var(--fms-w-page), 100% - var(--fms-gutter) * 2);
  max-width:none;
  margin-left:auto;
  margin-right:auto;
  padding-left:var(--fms-inset);
  padding-right:var(--fms-inset);
  float:none;
  box-sizing:border-box;
}

/* The outermost page container is full bleed. It is the reason the gutter used
   to compound; it now constrains nothing and only exists to hold the shell and
   the page body. Higher specificity than the block above, so it wins. */
.fms-body .container.body-background{
  width:100%;
  max-width:none;
  padding-left:0;
  padding-right:0;
}

/* POST-RELEASE NOTICE — TEMPORARY. Delete with the block in top-fm.php. */
.fms-notice{display:flex;align-items:center;gap:14px;
  margin:0 0 14px;padding:12px 18px;
  background:var(--fms-neon);color:var(--fms-navy);
  border-radius:var(--fms-r-btn);
  font-family:var(--fms-font);font-size:13px;line-height:1.45}
.fms-notice[hidden]{display:none}
.fms-notice__txt{flex:1 1 auto}
.fms-notice__x{flex:0 0 auto;border:0;background:none;padding:0 4px;
  font-family:inherit;font-size:20px;line-height:1;color:var(--fms-navy);cursor:pointer}
.fms-notice__x:hover{opacity:.6}

/* .fms-full previously set max-width:none against a rule that used `width`,
   so it had no effect — width beats max-width. It needs width:100% to work. */
.fms-body .fms-full,
.fms-body .container.fms-full{
  width:100%;
  max-width:none;
  padding-left:0;
  padding-right:0;
}

/* the shell's own wrapper already carries the inset — don't double it */
.fms-body .fms-wrap .container{padding-left:0;padding-right:0}

/* ============================== BREADCRUMB ============================== */
/* STRANDED-CHILD RULE. The breadcrumb is emitted before the view opens its own
   .center-area-background, so it is a direct child of .container.body-background
   — which owns no width. It therefore has to own its own, on the same terms as
   the page content, or it renders flush to the viewport edge. Measured 2026-08:
   content at left 146, breadcrumb at left 25.

   Anything else that renders directly inside .container.body-background rather
   than inside the page container needs the same treatment. Find them with:
     [...document.querySelector('.container.body-background').children]
       .forEach(e => console.log(e.getBoundingClientRect().left, e.className)); */
.fms-crumbs,
.fms-body > #page-content-wrapper > .container.body-background > .btn-breadcrumb{
  width:min(var(--fms-w-page), 100% - var(--fms-gutter) * 2);
  margin-inline:auto;
  padding-inline:var(--fms-inset);
  box-sizing:border-box;
}
.fms-crumbs{font-family:var(--fms-font);font-size:12px;color:var(--fms-navy60);padding-block:16px 6px}
.fms-crumbs a,.fms-crumbs a:visited{color:var(--fms-blue1);text-decoration:none}
.fms-crumbs a:hover{text-decoration:underline}
.fms-crumbs__sep{margin:0 7px;color:var(--fms-blue4)}
.fms-crumbs__current{color:var(--fms-navy)}
.fms-crumbs__home svg{width:13px;height:13px;fill:currentColor;vertical-align:-1px}

/* ------------- legacy breadcrumb retrofit -------------------------------
   Only twelve views require snippet/breadcrumb.php; ~150 older ones hardcode
   <div id="bc2" class="btn-group btn-breadcrumb"> with .btn crumbs. These
   rules restyle that markup in place so those pages match without a PHP
   change. Scoped under .fms-body, so the legacy shell is untouched.
   The chevron shapes come from ::before/::after triangles in an older sheet,
   hence the resets; #bc2 variants cover ID-qualified rules — this sheet loads
   last, so it wins ties. */
.fms-body .btn-breadcrumb,
.fms-body #bc2.btn-breadcrumb{display:block;font-family:var(--fms-font);font-size:12px;line-height:1.6;
  background:none;border:none;box-shadow:none;padding:0;margin:0}
.fms-body .btn-breadcrumb>.btn,
.fms-body .btn-breadcrumb>a.btn,
.fms-body #bc2.btn-breadcrumb>.btn{display:inline;float:none;position:static;background:none;
  background-image:none;border:none;border-radius:0;box-shadow:none;text-shadow:none;padding:0;margin:0;
  height:auto;line-height:inherit;font-family:var(--fms-font);font-size:12px;font-weight:400;
  color:var(--fms-blue1);vertical-align:baseline}
.fms-body .btn-breadcrumb>.btn:before,
.fms-body .btn-breadcrumb>.btn:after,
.fms-body #bc2.btn-breadcrumb>.btn:before,
.fms-body #bc2.btn-breadcrumb>.btn:after{content:none !important;display:none !important;border:none !important}
.fms-body .btn-breadcrumb>.btn>div{display:inline;padding:0;margin:0}
.fms-body .btn-breadcrumb>.btn+.btn:before{content:"\203A" !important;display:inline !important;
  color:var(--fms-blue4);margin:0 7px;font-size:12px;border:none !important}
.fms-body .btn-breadcrumb>.btn:hover{background:none;color:var(--fms-navy);text-decoration:underline;box-shadow:none}
.fms-body .btn-breadcrumb>.btn:last-child{color:var(--fms-navy);cursor:default}
.fms-body .btn-breadcrumb>.btn:last-child:hover{text-decoration:none}
.fms-body .btn-breadcrumb>.btn:first-child{color:var(--fms-navy60)}
.fms-body .btn-breadcrumb>.btn:first-child:hover{color:var(--fms-blue1)}
.fms-body .btn-breadcrumb .fa-home{font-size:13px}
.fms-body section>.btn-breadcrumb{padding:14px 0 4px}

/* ============================== LEFT COLUMN ============================= */
.fms-sidenav{font-family:var(--fms-font);background:#fff;border:1px solid var(--fms-blue5);
  border-radius:var(--fms-r-box);overflow:hidden;margin-bottom:24px}
.fms-sidenav__list,.fms-sidenav__sub,.fms-sidenav__sub3{list-style:none;margin:0;padding:0}
.fms-sidenav__list>li+li{border-top:1px solid var(--fms-blue5)}
.fms-sidenav a,.fms-sidenav a:visited{text-decoration:none;display:block}
.fms-sidenav__l1{padding:13px 18px;font-size:14px;font-weight:700;color:var(--fms-navy);
  transition:background .15s,color .15s}
.fms-sidenav__l1:hover,.fms-sidenav__l1:focus{background:var(--fms-blue5);color:var(--fms-blue1);text-decoration:none}
.fms-sidenav__list>li.is-open>.fms-sidenav__l1{color:var(--fms-blue1)}
.fms-sidenav__sub{display:none;background:#fff;padding-bottom:6px}
.fms-sidenav__list>li.is-open>.fms-sidenav__sub{display:block}
.fms-sidenav__l2{padding:8px 18px 8px 30px;font-size:13px;color:var(--fms-navy);position:relative;
  transition:background .15s,color .15s}
.fms-sidenav__l2:hover,.fms-sidenav__l2:focus{background:var(--fms-blue5);color:var(--fms-blue1);text-decoration:none}
.fms-sidenav__sub>li.is-current>.fms-sidenav__l2{background:var(--fms-blue5);color:var(--fms-blue1);
  font-weight:700;box-shadow:inset 3px 0 0 var(--fms-blue1)}
.fms-sidenav__sub3{display:none}
.fms-sidenav__sub>li.is-current>.fms-sidenav__sub3,
.fms-sidenav__sub3.in{display:block}
.fms-sidenav__l3{padding:6px 18px 6px 42px;font-size:12px;color:var(--fms-navy60);transition:color .15s}
.fms-sidenav__l3:hover,.fms-sidenav__l3:focus{color:var(--fms-blue1);text-decoration:none}
.fms-sidenav__sub3>li.is-current>.fms-sidenav__l3{color:var(--fms-blue1);font-weight:700}
.fms-sidenav a:focus-visible{outline:2px solid var(--fms-blue1);outline-offset:-2px}

/* ================================ FOOTER ================================ */
/* clear:both is load-bearing — the page body above is Bootstrap 3 floated
   columns and nothing else clears them, so without this the footer rides up
   over the content. */
/* SELF-CENTRING — do not change this to width:100%.
   Measured on staging: viewport 2248, footer 2205 wide starting at x=383, i.e.
   765px wider than the 1440 column. A block cannot grow to fit its content, so
   the footer was simply taking a full-width PARENT: some page views close more
   </div>s than they open, which closes top-fm's .container early and leaves the
   footer sitting in #page-content-wrapper instead.

   Rather than chase div balance across ~150 legacy views, the footer sizes and
   centres itself. It is then correct whatever it ends up inside. This is also
   why min-width:0 / max-width:100vw / overflow-x had no effect — none of them
   addressed the parent. */
.fms-foot{
  clear:both;overflow:hidden;
  width:min(var(--fms-w-shell), 100% - var(--fms-gutter) * 2);
  max-width:100%;
  margin:24px auto 0;
  box-sizing:border-box;
  /* A hovered row elsewhere on the page carries transform:scale(1.03), which
     creates a stacking context and paints it ABOVE the footer regardless of
     document order. isolation + z-index puts the footer back on top. */
  position:relative;
  z-index:5;
  isolation:isolate;
  background:var(--fms-blue1);color:#fff;
  border-radius:var(--fms-r-box) var(--fms-r-box) 0 0;
  font-family:var(--fms-font);
}
.fms-foot *{min-width:0;box-sizing:border-box}
.fms-foot__in > *{min-width:0;overflow-wrap:anywhere}
.fms-foot__in,.fms-foot__bar{max-width:100%}
/* The footer renders INSIDE the page container, which is already width-limited.
   Giving it its own max-width as well pushed it past the right edge. Fill the
   parent and inset the content instead. */
.fms-foot__in{width:100%;max-width:100%;margin:0;padding:34px var(--fms-inset) 0;display:flex;gap:28px 36px;
  flex-wrap:wrap;align-items:flex-start;box-sizing:border-box}
.fms-foot__brand{flex:1 1 260px;min-width:0;max-width:340px}
.fms-foot__mark{font-size:23px;font-weight:300;letter-spacing:-.5px;margin-bottom:8px}
.fms-foot__desc{font-size:12.5px;line-height:1.6;color:rgba(255,255,255,.82);max-width:330px;margin-bottom:16px}
.fms-foot__tel,.fms-foot__tel:visited{display:inline-flex;align-items:center;height:38px;padding:0 20px;
  border-radius:var(--fms-r-btn);border:2px solid var(--fms-neon);color:var(--fms-neon);font-size:14px;
  text-decoration:none;font-weight:600}
.fms-foot__tel:hover{background:var(--fms-neon);color:var(--fms-navy);text-decoration:none}
.fms-foot__soc{display:flex;gap:9px;margin-top:14px}
.fms-foot__soc a,.fms-foot__soc a:visited{width:34px;height:34px;border-radius:50%;
  background:var(--fms-neon);color:var(--fms-navy);display:flex;align-items:center;justify-content:center;
  text-decoration:none}
.fms-foot__soc a:hover{background:#fff}
.fms-foot__soc svg{width:16px;height:16px;fill:currentColor}
.fms-foot__col{flex:1 1 140px;min-width:0;max-width:200px}
.fms-foot__col h4,.fms-foot__cert h4{font-size:13px;font-weight:800;margin-bottom:11px;color:#fff}
.fms-foot__col ul{list-style:none;margin:0;padding:0}
.fms-foot__col li{margin-bottom:7px}
.fms-foot__col a,.fms-foot__col a:visited{color:rgba(255,255,255,.85);font-size:12.5px;text-decoration:none}
.fms-foot__col a:hover{color:var(--fms-neon);text-decoration:none}
.fms-foot__cert{flex:1 1 190px;min-width:0;max-width:230px}
.fms-foot__badges{display:flex;gap:10px;flex-wrap:wrap}
.fms-foot__badge{background:#fff;border-radius:10px;padding:8px 10px;text-align:center;font-size:9px;
  color:var(--fms-navy);line-height:1.35;flex:1 1 84px;min-width:0}
.fms-foot__badge b{display:block;font-size:12px;font-weight:800}
.fms-foot__badge em{font-style:normal;color:var(--fms-navy60)}
.fms-foot__bar{width:100%;max-width:100%;margin:26px 0 0;padding:16px 32px 22px;box-sizing:border-box;
  border-top:1px solid rgba(255,255,255,.2);display:flex;gap:8px 24px;
  flex-wrap:wrap;font-size:12px;color:rgba(255,255,255,.72)}
.fms-foot__bar a,.fms-foot__bar a:visited{color:rgba(255,255,255,.72);text-decoration:underline}

/* ============================== MOBILE ================================== */
.fms-hamburger{display:none}
.fms-mobilebar{display:none}

@media (max-width:767px){
  /* the gutter token already narrows on mobile — no per-element override needed */
  .fms-r1{flex-wrap:wrap;min-height:0;padding:12px 0 14px;gap:14px}
  .fms-logo{width:140px;height:38px}

  /* Floating labels sit above the field. On desktop there is room; stacked on
     mobile they collided with the control above, which is what made the header
     look messy. Inline them instead. */
  .fms-fld{padding-top:15px}
  .fms-fld__lab{position:static;display:block;margin:0 0 5px 4px;
    color:rgba(255,255,255,.8);font-size:10px}
  .fms-fld{margin:0}
  .fms-f-prod,.fms-f-site{flex:1 0 100%;width:100%;min-width:0}
  .fms-f-prod{order:3}
  .fms-f-site{order:4}
  .fms-f-site .selectize-dropdown{min-width:0;max-width:none;width:100% !important}
  /* the radius was being lost at this breakpoint on both renderings */
  .fms-f-site .fms-fld__in,
  .fms-f-site .selectize-input,
  .fms-f-prod .fms-fld__in{border-radius:var(--fms-r-btn)}
  .fms-f-site select.fms-fld__in{-webkit-appearance:none;appearance:none}
  /* .fms-fld__ic is absolute against .fms-fld and centres on it with top:50%.
     That works on desktop, where the label is absolutely positioned and takes no
     space. Here the label is static and the block gains padding-top, so the
     container is taller than the input and the icon floated up out of the field.
     Anchor it to the bottom instead: the input is 46px and the icon 32px, so 7px
     clears it centrally however tall the label above happens to be. */
  .fms-fld__ic{top:auto;bottom:7px;transform:none}
  .fms-acct{display:none}          /* account lives in the flyout on mobile */
  /* The strip carried contact details (hidden) and the account menu (moved to
     the flyout), leaving an empty blue sliver. Hide it outright. */
  .fms-strip{display:none}
  .fms-head{border-radius:0 0 var(--fms-r-sm) var(--fms-r-sm);padding-bottom:4px}
  .fms-hamburger span{background:#fff}
  .fms-r2{display:none}            /* nav lives in the flyout on mobile */

  .fms-hamburger{display:inline-flex;flex-direction:column;justify-content:center;gap:5px;
    width:44px;height:44px;background:none;border:0;cursor:pointer;padding:0;margin-left:auto}
  .fms-hamburger span{display:block;width:22px;height:2px;background:var(--fms-navy);
    border-radius:2px;margin:0 auto}

  .fms-mst__in{padding:8px 16px;gap:8px}
  .fms-mst__meta{display:none}
  .fms-mst__act{margin-left:0;width:100%}

  /* Compact. On a phone the footer is a reference strip, not a landing page.
     Two columns rather than a stack, wordmark and phone on one line, socials
     and marketing copy gone (the number is in the flyout and the bottom bar). */
  .fms-foot{border-radius:var(--fms-r-sm) var(--fms-r-sm) 0 0;margin:12px auto 0}
  .fms-foot__in{
    padding:16px 16px 0;gap:12px 16px;
    flex-direction:row;flex-wrap:wrap;align-items:flex-start;
  }
  .fms-foot__brand{
    flex:1 1 100%;width:100%;max-width:none;
    display:flex;align-items:center;justify-content:space-between;gap:12px;
  }
  .fms-foot__mark{font-size:18px;margin:0}
  .fms-foot__desc{display:none}
  .fms-foot__soc{display:none}
  .fms-foot__tel{height:30px;padding:0 14px;font-size:12px;margin:0}

  .fms-foot__col{flex:1 1 calc(50% - 8px);width:auto;max-width:none;min-width:0}
  .fms-foot__col h4{margin-bottom:5px;font-size:11px}
  .fms-foot__col ul{display:block}
  .fms-foot__col li{margin-bottom:3px}
  .fms-foot__col a{font-size:12px}

  .fms-foot__cert{flex:1 1 100%;width:100%;max-width:none}
  .fms-foot__cert h4{margin-bottom:5px;font-size:11px}
  .fms-foot__badges{gap:6px}
  .fms-foot__badge{flex:1 1 0;min-width:0;font-size:8px;padding:5px 6px;line-height:1.25}
  .fms-foot__badge b{font-size:10px}
  .fms-foot__badge em{display:none}

  .fms-foot__bar{padding:10px 16px 14px;margin-top:10px;flex-direction:column;gap:2px;font-size:10px}

  /* fixed bottom action bar */
  .fms-mobilebar{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:900;background:#fff;
    border-top:1px solid var(--fms-blue5);box-shadow:0 -4px 16px rgba(18,29,60,.07)}
  .fms-mobilebar a,.fms-mobilebar a:visited{flex:1;min-height:58px;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:3px;font-family:var(--fms-font);font-size:11px;
    color:var(--fms-navy);text-decoration:none}
  .fms-mobilebar a svg{width:20px;height:20px;fill:currentColor}
  .fms-mobilebar a.is-active{color:var(--fms-blue1)}
  .fms-body{padding-bottom:58px}
}

/* ============================== FLYOUT ================================== */
.fms-flyout{position:fixed;inset:0;z-index:1000;display:none}
.fms-flyout.is-open{display:block}
.fms-flyout__scrim{position:absolute;inset:0;background:rgba(18,29,60,.5)}
.fms-flyout__panel{position:absolute;top:0;right:0;bottom:0;width:84%;max-width:330px;
  background:var(--fms-navy);overflow-y:auto;box-shadow:-8px 0 32px rgba(18,29,60,.3);
  animation:fmsSlide .22s ease-out}
@keyframes fmsSlide{from{transform:translateX(100%)}to{transform:translateX(0)}}
.fms-flyout__hd{display:flex;align-items:center;gap:10px;padding:16px 18px;
  border-bottom:1px solid rgba(255,255,255,.12)}
.fms-flyout__av{width:36px;height:36px;border-radius:50%;background:var(--fms-neon);color:var(--fms-navy);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;flex-shrink:0}
.fms-flyout__who{line-height:1.3;min-width:0}
.fms-flyout__who b{display:block;color:#fff;font-size:14px}
.fms-flyout__who span{display:block;color:rgba(255,255,255,.65);font-size:11px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.fms-flyout__x{margin-left:auto;background:none;border:0;color:rgba(255,255,255,.7);font-size:26px;
  line-height:1;cursor:pointer;padding:0 4px}
.fms-flyout__list{list-style:none;margin:0;padding:6px 0}
.fms-flyout__list a,.fms-flyout__list a:visited{display:flex;align-items:center;min-height:50px;
  padding:0 18px;color:#fff;font-size:15px;text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.07)}
.fms-flyout__list a:active,.fms-flyout__list a:focus{background:rgba(255,255,255,.09);color:#fff}
.fms-flyout__sub a,.fms-flyout__sub a:visited{padding-left:34px;font-size:14px;color:rgba(255,255,255,.78)}
.fms-flyout__sep{padding:16px 18px 6px;font-size:10px;letter-spacing:1.1px;text-transform:uppercase;
  color:var(--fms-neon);font-weight:700}
.fms-flyout__list a.fms-flyout__out{color:var(--fms-neon)}

/* ========================== MOTION / PRINT ============================== */
@media (prefers-reduced-motion:reduce){
  .fms-basket,.fms-basket:hover,.fms-cartdrop>a{transition:none;transform:none}
  .fms-nav>li>a,.fms-sidenav a{transition:none}
  .fms-flyout__panel{animation:none}
}
@media print{
  .fms-mst,.fms-r2,.fms-mobilebar,.fms-flyout,.fms-f-prod,.fms-f-site,.fms-hamburger,
  .fms-acct,.fms-foot{display:none !important}
  .fms-r1{min-height:0}
}