/* ============================================================
   SHARED SITE HEADER (sticky three-zone top bar)
   Used by index.html, products.html and product.html.
   Markup lives in each page; toggle behaviour in js/header.js.
   Zones: order-now pill · centered logo · hamburger menu.
   ============================================================ */
.hdr {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  min-height: 42px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
@media (min-width: 720px) {
  .hdr-inner {
    padding: 10px 22px;
  }
}
/* CENTER zone: logo pinned to the true center regardless of side widths */
.hdr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
}
.hdr-logo img {
  height: 34px;
  width: auto;
  display: block;
}
/* LEFT zone: solid-black "order now" button — sharp premium rectangle */
.hdr-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--sage-deep);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 20px;
  border: 1px solid var(--sage-deep);
  border-radius: 0;
  transition:
    background 0.18s var(--ease),
    color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
/* Tasteful hover: invert to white ground with a crisp black hairline. */
.hdr-order:hover,
.hdr-order:focus-visible {
  background: #fff;
  color: var(--sage-deep);
  border-color: var(--sage-deep);
}
.hdr-order:active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
@media (min-width: 720px) {
  .hdr-order {
    font-size: 14px;
    padding: 11px 24px;
  }
}
/* RIGHT zone: hamburger button */
.hdr-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  flex: 0 0 auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.hdr-toggle:hover {
  background: var(--section);
  border-color: var(--sage);
}
.hdr-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}
/* slide-down menu panel, dropped under the bar */
.hdr-menu {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 8px 16px 14px;
  display: none;
}
.hdr-menu.open {
  display: block;
}
.hdr-menu a {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  padding: 13px 8px;
  border-radius: var(--radius);
  transition:
    background 0.16s var(--ease),
    color 0.16s var(--ease);
}
.hdr-menu a + a {
  border-top: 1px solid var(--line);
}
.hdr-menu a:hover,
.hdr-menu a:focus-visible {
  background: var(--section);
  color: var(--sage-deeper);
}
@media (min-width: 720px) {
  /* Small dropdown panel that drops straight UNDER the hamburger. The toggle is
     the first item in the centered (max-width 1080) inner row, so in this RTL
     layout it sits at the row's inline-start (right) edge, 22px inside it. We
     pin the panel's inline-start (right) edge to that same x so it hangs right
     below the button — for a viewport wider than the row we add the outer
     gutter (50% - 540px), and never less than the 22px inner padding. */
  .hdr-menu {
    inset-inline: auto;
    inset-inline-start: max(22px, calc(50% - 540px + 22px));
    width: max-content;
    min-width: 220px;
    max-width: 320px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    margin-top: 8px;
    overflow: hidden;
  }
}
