/* PRINTO-MNAV-V19 (2026-11-19) - mobile header bar.
   Scoped to <=991px so the desktop header is untouched. Loaded after
   layout/header.css, which floats .skip-link cells at 20% width inside a
   #00bbd3 bar; everything here is an override of that.
   Greens/greys reuse tokens already in the site: #1f9d55 (landing green). */

@media only screen and (max-width: 991px) {

  /* No cyan slab any more - the bar sits straight on the white header.
     Fills use the brand cyan at low alpha, the same tint the hero already
     uses (rgba(0,187,211,.2)), so no new colour enters the palette. */
  /* the theme sets .skip-container.mobile{background-color:#00bbd3}, which is
     more specific than .po-mnav-host on its own - match it to win. */
  .skip-container.mobile.po-mnav-host,
  .po-mnav-host { background: transparent !important; padding: 9px 0 0; }

  /* ---- logo: clear of the sticky bar, 5% smaller ----
     header.phtml sets style="margin-top:-40px" inline on the anchor, so this
     needs !important to win. The image is explicitly 280px wide; 266px is 5%
     of that. Scoped to the mobile query - the desktop header is unchanged. */
  .logo { margin-top: -24px !important; }
  .logo img { width: 266px !important; height: auto; }

  /* The menu column is label + circle (55px) while the pill is 40px. With the
     label now ABOVE the icon the column grows upward, so bottom-aligning is
     what keeps the circle level with the field - flex-start would push the
     circle 15px below it. */
  .po-mnav {
    display: flex; align-items: flex-end; gap: 8px; float: none; clear: none;
    margin: 0 calc(50% - 50vw);
    padding: 0 16px 10px;
    border-bottom: 1px solid #000;
  }
  .po-mnav:after { display: none; }

  /* undo the old floated 20%/25% cells */
  .po-mnav .skip-link {
    float: none; width: auto; height: auto; border: 0;
    line-height: 1.1; text-align: center; padding: 0;
  }
  .po-mnav .skip-link.skip-nav { border-left: 0; }
  .po-mnav .skip-link:hover, .po-mnav .skip-link.skip-active { background: none; }

  /* ---- Menu: round white button, green bars, label underneath ---- */
  /* column-reverse puts the "Menu" caption above the icon. */
  .po-mnav__menu {
    flex: 0 0 auto; display: flex; flex-direction: column-reverse;
    align-items: center; gap: 4px; text-decoration: none;
  }
  .po-mnav__burger {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0, 187, 211, .13);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; box-shadow: none;
  }
  .po-mnav__burger i { display: block; width: 18px; height: 2.5px; border-radius: 2px; background: #1f9d55; }
  .po-mnav__menu .label {
    display: block !important; font-size: 11px; line-height: 1;
    color: #15181d; font-weight: 600; letter-spacing: .01em;
  }
  .po-mnav__menu.skip-active .po-mnav__burger { background: rgba(31, 157, 85, .16); }

  /* ---- Search: fills the bar, solid white, icon inside ----
     The field is already styled by the site's own "search glass" rules, which
     set the input transparent, pin the width and lay the magnifier out as a
     static sibling. Rather than re-implement that, this only corrects what
     breaks inside a 375px bar: let it fill the row, make the pill solid so it
     reads against the cyan, and stop the placeholder clipping. The !important
     flags are scoped to .po-mnav__search, so nothing outside this bar moves. */
  /* a theme rule puts 10px of padding here, which costs the field 20px and
     clips the placeholder on a 375px screen. */
  .po-mnav__search { flex: 1 1 auto; min-width: 0; display: block; padding: 0 !important; margin: 0 !important; }
  /* the outer searchautocomplete form carries its own glass background,
     which halos the white pill on the cyan bar - flatten it here only. */
  .po-mnav__search form.searchautocomplete,
  .po-mnav__search > form {
    background: transparent !important; border: 0 !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 !important;
    border-radius: 22px;
    width: 100% !important; max-width: none !important; float: none !important;
  }
  .po-mnav__search .form-search {
    position: relative; margin: 0;
    width: 100% !important; max-width: none !important;
    background: rgba(0, 187, 211, .13) !important; border-radius: 22px;
    display: flex; align-items: center;
    height: 40px !important;   /* match .po-mnav__burger exactly */
  }
  .po-mnav__search label { display: none; }
  .po-mnav__search input#search,
  .po-mnav__search .input-text {
    flex: 1 1 auto; min-width: 0;
    width: auto !important; height: 40px !important; line-height: 40px;
    border: 0 !important; background: transparent !important;
    padding: 0 4px 0 12px !important; margin: 0;
    font-size: 14px !important; color: #333; box-sizing: border-box;
  }
  .po-mnav__search input#search::-webkit-input-placeholder { color: #7b848f; }
  .po-mnav__search input#search::placeholder { color: #7b848f; }
  /* the theme zeroes this, which leaves the magnifier flush against the
     pill edge - it reads as merged with the field. */
  .po-mnav__search .search-button { flex: 0 0 auto; margin-right: 4px !important; }
  /* the autocomplete panel must hang off the field */
  .po-mnav__search .search-autocomplete { top: 46px !important; left: 0; right: 0; width: auto; }

  /* ---- cart only; the account icon moved into the drawer footer ---- */
  .po-mnav .po-mnav__cart { flex: 0 0 auto; }


  /* ---- Quick menu: its own full-bleed section, dismissable ---- */
  .po-qm {
    background: #fff;
    border-bottom: 1px solid #000;
    margin: 0 calc(50% - 50vw);
    padding: 8px 16px 11px;
  }
  .po-qm__head {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    margin: 0 0 8px;
  }
  .po-qm__title {
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: #8c939d; font-weight: 700; line-height: 1;
  }
  .po-qm__close {
    position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; margin: 0;
    padding: 0; border: 0; background: none;
    color: #8c939d; font-size: 21px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }
  /* the one highlighted shortcut, matching the desktop strip */
  .po-mchips a.po-qm-hot { background: #fec006; color: #16181d; font-weight: 600; }

  /* ============ Menu drawer: full screen, slides in from the left ============
     The theme's skip-link handler only toggles .skip-active on #header-nav.
     .skip-content is display:none, which cannot animate, so below 991px the
     panel is laid out permanently and moved off-canvas with a transform
     instead. PRINTO-MDRAWER-V1 adds the close button and the scroll lock. */
  .main-menu #header-nav.nav-content {
    display: block !important;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 100%; max-width: 100%; height: 100%;
    margin: 0; padding: 0; border: 0;
    background: #fff;
    /* .sticky-notification-bar is fixed at z-index 99999 and was covering
       the close button, so the drawer has to clear it. */
    z-index: 100010;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform .28s ease, visibility 0s linear .28s;
    visibility: hidden;
    box-shadow: none;
  }
  .main-menu #header-nav.nav-content.skip-active {
    transform: translateX(0);
    visibility: visible;
    transition: transform .28s ease, visibility 0s linear 0s;
  }
  /* the page behind must not scroll while the drawer is open */
  body.po-drawer-open { overflow: hidden; }

  .po-drawer__head {
    position: sticky; top: 0; z-index: 2;
    display: flex; justify-content: flex-end; align-items: center;
    height: 52px; padding: 0 8px;
    background: #00bbd3;
  }
  .po-drawer__close {
    width: 38px; height: 38px; padding: 0; border: 0;
    border-radius: 50%; background: rgba(255,255,255,.18);
    color: #fff; font-size: 26px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }

  /* The department list is position:absolute, so .sf-menu-block and
     .nav-container-mobile collapse to height 0 and the footer flows up behind
     the menu. Inside the drawer it must sit in normal flow instead, so the
     footer lands under it and expanding a department pushes the rest down.
     Scoped to #header-nav inside the mobile query - the desktop bar uses #nav
     and is untouched. */
  .main-menu #header-nav .sf-menu-phone { position: static !important; }
  .main-menu #header-nav .nav-container-mobile,
  .main-menu #header-nav .sf-menu-block { height: auto !important; min-height: 0 !important; }

  /* footer of the drawer: track order, account links, currency */
  .po-drawer__foot {
    border-top: 1px solid #e6e9ed;
    margin-top: 10px; padding: 14px 16px 28px;
    background: #f6f8f9;
  }
  .po-drawer__foot .po-drawer__flink {
    display: block; padding: 12px 0;
    font-size: 14px; font-weight: 600; color: #15181d; text-decoration: none;
    border-bottom: 1px solid #e6e9ed;
  }
  .po-drawer__foot .po-drawer__flink:last-of-type { border-bottom: 0; }
  .po-drawer__foot ul { list-style: none; margin: 0; padding: 0; }
  .po-drawer__foot li { display: block; }
  /* these links are white in the theme (they normally sit on the cyan bar),
     which makes them invisible on the drawer's light footer. */
  .main-menu #header-nav .po-drawer__foot li a,
  .main-menu #header-nav .po-drawer__foot .links a {
    display: block; padding: 12px 0;
    font-size: 14px; color: #15181d !important; text-decoration: none;
    border-bottom: 1px solid #e6e9ed;
  }
  .main-menu #header-nav .po-drawer__foot .header-button-title,
  .main-menu #header-nav .po-drawer__foot .header-button-title span {
    color: #15181d !important;
  }
  .po-drawer__foot li:last-child a { border-bottom: 0; }
  .po-drawer__foot .header-button { float: none; margin: 12px 0 0; }

  /* ---- most-ordered chips, no label ---- */
  /* wraps onto rows - nothing scrolls sideways any more */
  .po-mchips {
    display: flex; flex-wrap: wrap; gap: 5px;
    align-items: center; justify-content: center;
    overflow: visible;
    background: none; border: 0; border-radius: 0;
    margin: 0; padding: 0;
  }
  .po-mchips a {
    flex: 0 0 auto; display: inline-block;
    /* 11.5px/10px keeps all ten on TWO rows (5+5). At 12px/12px the last row
       overran by 9px at 375px and "Party" dropped to a third row. Leaves ~13px
       of slack at 360px, the narrowest common Android width. */
    font-size: 11.5px; line-height: 1; font-weight: 500;
    color: #15181d; background: #def6f9;
    border-radius: 18px; padding: 8px 10px;
    text-decoration: none; white-space: nowrap;
  }
  .po-mchips a:hover, .po-mchips a:active { background: #fec006; color: #16181d; }
}

/* Very narrow phones (320px, older SE): the same ten chips need another
   ~27px to stay on two rows. Verified 3 rows at 320px before this. */
@media only screen and (max-width: 359px) {
  .po-mchips { gap: 4px; }
  .po-mchips a { font-size: 11px; padding: 7px 8px; }
  .logo img { width: 240px !important; }
}

/* the bar is mobile-only; header.css already hides .skip-container.mobile
   above 991px, this just makes sure the chip row goes with it. */
@media only screen and (min-width: 992px) {
  .po-mnav-host, .po-mchips, .po-drawer__foot, .po-drawer__head { display: none !important; }
}
