/* Mobile header — one thin bar on every page that has the menu (home views,
   About/Sizing/Shipping/FAQ, product pages, bag, legal, contact, account).
   It mirrors the bar the home story docks into (story.css): 40px of white,
   the logo on the left, the menu on the right with the bottoms of its
   letters on the same line as the bottom of the logo. Desktop is untouched.

   Its own file, linked last in <head> with a ?v= token, so it beats the
   inline header styles legal/contact carry and isn't held back by
   style.css's 24h cache. Everything is scoped to `header` — legal.html has
   a second <nav> (.legal-nav) that must not pick this up. Checkout has its
   own header (logo, language, Secure) and doesn't load this. */
@media (max-width: 768px) {
  header {
    height: 40px; padding: 0 14px; flex-wrap: nowrap; gap: 0;
    justify-content: space-between; align-items: stretch; align-content: normal;
    background: var(--white);
  }
  /* Logo 18px tall, centred in the bar → its bottom sits at 29px. */
  header .header-logo { width: auto; height: auto; margin: 0; display: flex; align-items: center; }
  header .header-logo img { height: 18px; width: auto; }
  /* Each item fills the bar's height (an easy tap) with its text on the
     bottom; 9.5px of padding puts the baseline at 29px — measured. */
  header nav {
    width: auto; height: 100%; display: flex; justify-content: flex-end; align-items: stretch;
    gap: min(18px, 2.8vw); padding: 0; margin-left: auto; min-width: 0;
  }
  header nav a,
  header nav .nav-lang-btn {
    display: flex !important; align-items: flex-end !important; padding: 0 0 9.5px !important; line-height: 1 !important;
    font-size: min(10.5px, 2.55vw) !important; letter-spacing: 0.1em !important; white-space: nowrap;
  }
  header nav .nav-lang-btn { gap: 5px !important; }
  header nav .nav-lang-btn span { font-size: inherit !important; letter-spacing: inherit !important; padding: 0 !important; line-height: 1 !important; }
  /* 320px phones: a 16px logo (bottom at 28) so the menu fits beside it. */
  @media (max-width: 359px) {
    header .header-logo img { height: 16px; }
    header nav a,
    header nav .nav-lang-btn { padding-bottom: 10.5px !important; }
  }

  /* Footer (2026-11-02): the same four links on every page — Legal dropped —
     on one line, spread across the width, no item wrapping onto two lines. */
  footer .footer-right { justify-content: space-between; gap: 8px; }
  footer .footer-right a { white-space: nowrap; }
  /* The line must fit in every language (2026-11-03). FR/PL run ~25% longer
     than EN ("Livraison & Retours", "Tabela rozmiarów") and pushed the page
     10–70px wider than the phone, so it slid left/right — and the fixed
     header stretched with it. Type scales with the screen instead; letter-
     spacing is in em (style.css) so it shrinks too. EN keeps 10px on
     ordinary phones. Measured text width per px of type: EN 27.7, PL 33.7,
     FR 34.9 — FR at 2.3vw leaves ~20px spare on a 390 and a 320 phone. */
  footer .footer-right a { font-size: min(10px, 2.9vw); }
  html:lang(fr) footer .footer-right a,
  html:lang(pl) footer .footer-right a { font-size: min(10px, 2.3vw); }

  /* And lock the page to the phone's width whatever else ever overruns:
     nothing can make it pan sideways. `clip`, not `hidden`, so it doesn't
     turn html/body into scroll containers (that would break sticky). */
  html, body { overflow-x: clip; }
}
