/* Header, main nav, phone menu. From the Phase 2 prototype (shared/site.css, "Header"). */

/* Important notice (site option important_notices), above everything */
.notice { background: var(--sunset); color: var(--navy); font-size: var(--t-s); }
.notice .wrap { padding-block: 10px; text-align: center; }
.notice a { color: var(--navy); font-weight: var(--fw-m); }
.notice p + p { margin-top: 4px; }

/* The whole header stays stuck, the navy contact bar included. When that bar runs to two lines or more
   (tablets, phones), it scrolls away and the rest stays: header.js adds .hd--bar-away and sets
   --hd-top-h. The phone menu has Email, Chat and Call too. */
.hd { position: sticky; top: var(--admin-bar); z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }

.hd__top { background: var(--navy); color: #fff; font-size: var(--t-s); --focus: var(--peach); }
.hd__top .wrap { display: flex; justify-content: space-between; gap: 0 24px; align-items: center; min-height: 48px; flex-wrap: wrap; }
.hd__top a { color: #fff; }
.hd__ask { display: flex; align-items: center; gap: 0 4px; flex-wrap: wrap; }
.hd__ask-l { margin-right: 4px; }
.hd__ask a { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 10px; font-weight: var(--fw-m); text-underline-offset: 4px; border-radius: 0; }
.hd__ask a:hover { background: rgba(255, 255, 255, .1); }
.hd__ask .ic { width: 20px; height: 20px; color: var(--green); }
.hd__ask strong { font-size: var(--t-b); }
.hd__status { color: #e6e6ff; margin-left: 4px; }
.hd__open::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: #9a9ac4; vertical-align: 1px; }
.hd__open.is-open::before { background: var(--green); box-shadow: 0 0 0 3px rgba(49, 203, 149, .3); }
.hd__open:not([hidden]) + .hd__hours::before { content: " · "; }
.hd__open:not([hidden]) ~ .hd__soon::before { content: " · "; }
.hd__soon { font-weight: var(--fw-m); color: #fff; }
/* Closed: point to email and chat first (change 24) */
.hd__ask.is-closed :is(.hd__call, .hd__chat) { display: none; } /* open: Email, Chat and the phone number; closed: Email only */
.hd__facts { display: flex; gap: 8px 24px; align-items: center; flex-wrap: wrap; margin-left: auto; } /* stays on the right when it wraps to its own row */
.hd__facts .ic { width: 18px; height: 18px; color: var(--green); }
.hd__rating, .hd__extra { display: inline-flex; gap: 8px; align-items: center; min-height: 48px; }
.hd__tagline p, .hd__extra p { display: inline; }

.hd__main .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding-block: 16px; }
.logo { display: block; border-radius: 0; }
.logo img { display: block; width: 190px; height: auto; }

/* :not(body): WordPress gives <body> the class "search" on search results pages.
   The search box is a rounded pill with a round-ended button, like the menu's Product Finder button. */
.search:not(body) { display: flex; align-items: center; background: var(--mist); border: 2px solid var(--line-strong); border-radius: 999px; padding-left: 22px; max-width: 640px; width: 100%; justify-self: center; }
.search:not(body):focus-within { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px var(--navy); }
.search:not(body) > .ic { width: 22px; height: 22px; }
.search:not(body) input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; height: 52px; padding: 0 12px; font: var(--t-b) var(--font); color: var(--navy); }
.search:not(body) input::placeholder { color: var(--muted); opacity: 1; }
.search:not(body) input:focus-visible { outline: 0; }
.search:not(body) button { margin: 4px; min-height: 48px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: var(--fw-m) var(--t-b) var(--font); padding: 0 22px; cursor: pointer; }
.search:not(body) button:hover { background: var(--navy-2); }
.hd__search { display: flex; justify-content: center; min-width: 0; }
/* Advanced Woo Search draws its own form: give it the same size and type */
/* Advanced Woo Search: its own CSS draws a grey box with a square grey button. Its form becomes the
   same pill as above, with the navy button inside, and one focus ring on the form. */
/* .search.search--aws:not(body): as specific as the .search:not(body) rules above, or their pill, padding and flex
   stayed on and the form shrank inside it: two outlines, a dead right half, and results under the wrong spot */
.search.search--aws:not(body), .search.search--aws:not(body):focus-within { display: block; padding: 0; border: 0; background: none; box-shadow: none; }
.search--aws .aws-container .aws-search-form { height: auto; align-items: stretch; border: 2px solid var(--line-strong); border-radius: 999px; background: var(--mist); overflow: hidden; }
.search--aws .aws-container .aws-search-form:focus-within { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px var(--navy); }
.search--aws .aws-container .aws-search-form .aws-wrapper { display: flex; align-items: center; }
.search--aws .aws-container .aws-search-field { height: 52px; padding: 0 24px; border: 0; background: transparent; font: var(--t-b) var(--font); line-height: normal; color: var(--navy); }
.search--aws .aws-container .aws-search-field:focus { outline: 0; background: transparent; }
.search--aws .aws-container .aws-search-field::placeholder { color: var(--muted); opacity: 1; }
.search--aws .aws-container .aws-search-form .aws-search-clear { display: flex; align-items: center; color: var(--muted); font-size: var(--t-xl); }
.search--aws .aws-container .aws-search-form .aws-form-btn { width: 64px; min-height: 48px; margin: 4px; border: 0; border-radius: 999px !important; /* AWS sets every radius in its form to 0 !important */ background: var(--navy); }
.search--aws .aws-container .aws-search-form .aws-form-btn:hover { background: var(--navy-2); }
.search--aws .aws-container .aws-search-form .aws-search-btn_icon { width: 24px; margin: 0 auto; color: #fff; }

.hd__acts { display: flex; gap: 6px; }
.act { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 72px; min-height: 60px; padding: 4px 10px; border: 0; background: none; border-radius: 0; color: var(--navy); font: var(--fw-m) var(--t-xs)/1.2 var(--font); text-decoration: none; cursor: pointer; }
.act:hover { background: var(--mist); }
.act .ic { width: 28px; height: 28px; }
.cart-count { position: absolute; top: 2px; right: 6px; display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--green); color: var(--navy); font-weight: var(--fw-m); font-size: var(--t-xs); }

/* Main nav: click to open, never hover */
.hd__nav { position: relative; border-top: 1px solid var(--line); }
.nav { list-style: none; display: flex; flex-wrap: wrap; gap: 0 4px; align-items: stretch; }
.nav > li { display: flex; }
.nav-d { display: flex; } /* not positioned, so the panel lines up with the whole nav bar */
.nav-i { display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 16px; border: 0; border-bottom: 4px solid transparent; background: none; color: var(--navy); font: var(--fw-m) var(--t-b) var(--font); text-decoration: none; cursor: pointer; list-style: none; }
.nav-i::-webkit-details-marker { display: none; }
.nav-i:hover, .nav-i[aria-current] { background: var(--mist); }
.nav-i[aria-current] { border-bottom-color: var(--navy); }
.nav-d[open] > .nav-i { border-bottom-color: var(--green); background: var(--mist); }
.nav-i .ic { width: 20px; height: 20px; transition: transform .2s; }
.nav-d[open] > .nav-i .ic { transform: rotate(180deg); }
.nav-cta { margin-left: auto; }
/* The menu's button (class nav-cta, "Product Finder Tool"): a rounded yellow pill inside the 56px row.
   Hover outlines the pill in navy instead of greying the whole row. */
a.nav-i--cta { position: relative; isolation: isolate; }
a.nav-i--cta, a.nav-i--cta:hover, a.nav-i--cta[aria-current] { background: none; border-bottom-color: transparent; }
a.nav-i--cta::before { content: ""; position: absolute; inset: 8px 0; z-index: -1; background: var(--yellow); border: 2px solid var(--yellow); border-radius: 999px; transition: border-color .15s; }
a.nav-i--cta:hover::before { border-color: var(--navy); }

.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 2px solid var(--green); box-shadow: 0 24px 50px rgba(0, 0, 92, .16); max-height: calc(100vh - 200px); overflow-y: auto; }
.mega__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 32px; padding-block: 28px 24px; }
.mega__grid--list { display: block; }
.mega__grid--list ul { columns: 4 200px; column-gap: 32px; }
.mega__grid--list li { break-inside: avoid; }
.mega h3 { font-size: var(--t-s); color: var(--muted); margin-bottom: 8px; }
.mega h3 a { color: var(--muted); }
.mega ul { list-style: none; display: grid; }
.mega__grid--list ul { display: block; }
.mega li a, .mega li > span { display: flex; align-items: center; min-height: 48px; font-size: var(--t-b); text-decoration: none; border-radius: 0; padding: 0 8px; margin-inline: -8px; }
.mega li a:hover { background: var(--mist); text-decoration: underline; }
.mega li a[aria-current] { font-weight: var(--fw-m); }
.mega__foot { border-top: 1px solid var(--line); padding-block: 16px; }
.mega__foot p { color: var(--muted); }

.hd__main .hd__mob { display: none; }
.act--menu { display: none; }

@media (max-width: 1023px) {
  .hd__tagline { display: none; }
  .nav-i { padding: 0 10px; }
}
.hd.hd--bar-away { top: calc(var(--admin-bar) - var(--hd-top-h, 0px)); }
@media (max-width: 759px) {
  .hd { top: calc(var(--admin-bar) - var(--hd-top-h, 0px)); } /* without JavaScript too */
  .hd__top .wrap { justify-content: center; padding-block: 4px; }
  .hd__facts, .hd__ask-l { display: none; }
  .hd__ask { justify-content: center; gap: 0; }
  .hd__ask a { padding: 0 8px; }
  .hd__status { flex-basis: 100%; text-align: center; font-size: var(--t-xs); margin: 0 0 4px; }
  .hd__main .wrap { grid-template-columns: auto 1fr auto; gap: 8px; padding-block: 8px; }
  .hd__main .logo { justify-self: center; }
  .logo img { width: 150px; }
  .hd__search, .hd__nav, .act--acct, .act--help { display: none; }
  .hd__main .hd__mob { display: block; padding-bottom: 12px; }
  .hd__mob .search { max-width: none; }
  .act { min-width: 60px; }
  .act--menu { display: inline-flex; }
}

/* Phone menu: a modal dialog (focus stays inside, Esc closes) */
.mm { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #fff; color: var(--navy); }
.mm[open] { display: flex; flex-direction: column; }
.mm::backdrop { background: rgba(0, 0, 40, .45); }
.mm__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); border-bottom: 2px solid var(--line); }
.mm__head h2 { font-size: var(--t-xl); }
.mm__body { flex: 1; overflow-y: auto; padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.mm__d { border-bottom: 1px solid var(--line); }
.mm__d > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 60px; font-weight: var(--fw-m); font-size: var(--t-l); cursor: pointer; }
.mm__d > summary::-webkit-details-marker { display: none; }
.mm__d > summary .ic { transition: transform .2s; }
.mm__d[open] > summary .ic { transform: rotate(180deg); }
.mm h3 { font-size: var(--t-s); color: var(--muted); margin: 12px 0 4px; }
.mm h3 a { color: var(--muted); }
.mm ul { list-style: none; padding-bottom: 12px; }
.mm li a, .mm li > span { display: flex; align-items: center; min-height: 52px; font-size: var(--t-b); text-decoration: none; }
.mm__link { display: flex; align-items: center; min-height: 60px; font-weight: var(--fw-m); font-size: var(--t-l); text-decoration: none; border-bottom: 1px solid var(--line); }
.mm .ask { margin-top: 24px; }

/* Picture tiles in the menu panels (Eemeli, 29 Oct: pictures for feel), and a picture over each
   "Shop by Product" column */
.mega__grid--tiles { display: grid; grid-template-columns: minmax(0, 3fr) minmax(200px, 1fr); gap: 24px 32px; padding-block: 28px 24px; }
.mega__grid--tiles:not(:has(.mega__col)) { grid-template-columns: minmax(0, 1fr); }
.mega .mtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mega .mtiles--types { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.mega .mtile { display: grid; gap: 8px; align-content: start; min-height: 0; margin: 0; padding: 0; color: var(--navy); text-decoration: none; }
.mega .mtile:hover { background: none; }
.mega .mtile:hover .mtile__t { text-decoration: underline; }
.mtile__img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; background: var(--mist);
  --cut: 20px; clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); }
.mtile__t { font-size: var(--t-b); line-height: 1.3; }
.mega__pic { display: block; width: 120px; margin-bottom: 10px; }
.mega__pic > img, .mega__pic .wts-cardbd { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--mist); }
