/* Header additions; loads after styles.css and blog.css. Phone menu: template-parts/sections/site-header.php + app.js (setupMenu).
   The drawer is moved to <body> while open, so the sliding header's transform never traps it.
   Breakpoint: the full nav (7 links, two with mega chevrons, CTA, search, account, cart) needs ~1090px of row,
   so the menu button takes over at <= 1199px. Keep in sync with app.js (min-width:1200px) and mega-menu.css/js. */

.pk-menu-btn{display:none}
@media (max-width:1199px){
  .nav-links,.nav .btn{display:none}
  .nav-right{margin-left:auto}
  .pk-menu-btn{display:inline-flex}
  .pk-account-btn--in-menu{display:none}
}
/* the account chip is icon-only in the bar (text stays its accessible name); text would push the links off the row */
.nav .pk-account-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:420px){
  .nav > .wrap{gap:10px}
  .nav-right{gap:6px}
  .nav .logo{font-size:clamp(.8rem, 4.1vw, 1.2rem);white-space:nowrap}
  .pk-menu-btn-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap} /* icon only; the text stays the button's name */
}
@media (max-width:360px){
  .nav .logo{font-size:3.4vw}
  .nav .cart-btn{padding:0 8px;gap:4px}
}

/* logo image (pk_home_logo_img): fixed height from the widget, width follows; shrinks rather than overflow on phones */
.nav .logo{min-width:0}
.pk-logo-img{display:block;width:auto;max-width:100%;object-fit:contain;object-position:left center}

/* below the cart drawer (70) so an All-Access tap can hand over to the cart; above sticky CTA (50) and header (40) */
.pk-menu{position:fixed;inset:0;z-index:65}
.pk-menu[hidden]{display:none}
.admin-bar .pk-menu{top:32px} /* logged in: keep the close button out from under the WP toolbar */
@media (max-width:782px){.admin-bar .pk-menu{top:46px}}
@media (min-width:1200px){.pk-menu{display:none!important}}
.pk-menu-scrim{position:absolute;inset:0;background:rgba(10,10,10,.5);opacity:0;transition:opacity 200ms ease}
.pk-menu-panel{
  position:absolute;top:0;right:0;height:100%;width:min(360px,88vw);
  display:flex;flex-direction:column;gap:20px;
  padding:14px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background:var(--paper);color:var(--ink);overflow-y:auto;overscroll-behavior:contain;
  transform:translateX(100%);transition:transform 260ms var(--ease-drawer);
}
.pk-menu.is-open .pk-menu-scrim{opacity:1}
.pk-menu.is-open .pk-menu-panel{transform:none}
.pk-menu-close{align-self:flex-end;justify-content:center;width:44px;padding:0}
.pk-menu-links{list-style:none;margin:0;padding:0;display:grid}
.pk-menu-links a{display:flex;align-items:center;min-height:52px;border-bottom:2px solid var(--tint-2);font-weight:800;font-size:1.15rem;text-decoration:none;color:var(--ink)}
@media (hover:hover) and (pointer:fine){.pk-menu-links a:hover{color:var(--accent)}}
/* Mega menu items in the drawer: link + expand button, compact sub list (mega-menu.js). */
.pk-menu-row{display:flex;align-items:center;border-bottom:2px solid var(--tint-2)}
.pk-menu-row > a{flex:1;border-bottom:0}
.pk-menu-sub-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:52px;min-height:52px;margin-right:-14px;padding:0;border:0;background:none;color:var(--ink);cursor:pointer}
.pk-menu-sub-btn svg{transition:transform 200ms var(--ease-out)}
.pk-menu-sub-btn[aria-expanded="true"] svg{transform:rotate(180deg)}
.pk-menu-sublinks{list-style:none;margin:0;padding:4px 0 10px 14px;border-bottom:2px solid var(--tint-2)}
.pk-menu-sublinks[hidden]{display:none}
.pk-menu-links .pk-menu-sublinks a{min-height:44px;border-bottom:0;font-weight:700;font-size:1rem;line-height:1.25}
.pk-menu-account{display:flex;align-items:center;gap:10px;min-height:52px;border-bottom:2px solid var(--tint-2);font-weight:800;font-size:1.15rem;text-decoration:none;color:var(--ink)}
@media (hover:hover) and (pointer:fine){.pk-menu-account:hover{color:var(--accent)}}
.pk-menu .pk-menu-cta{display:inline-flex;width:100%}
body.pk-menu-lock{overflow:hidden}
html:has(body.pk-menu-lock){scrollbar-gutter:stable} /* keep the page from shifting when the scrollbar goes */
@media (prefers-reduced-motion:reduce){
  .pk-menu-scrim,.pk-menu-panel,.pk-menu-sub-btn svg{transition:none}
}

/* account link: same icon chip as search/cart (label hidden above, kept as the link's name).
   Below 1200px it moves into the menu drawer when there is one (.pk-account-btn--in-menu). */
.pk-account-btn{justify-content:center;min-width:44px;padding:0 12px;color:var(--ink);text-decoration:none}
@media (hover:hover) and (pointer:fine){.pk-account-btn:hover{background:var(--tint)}}
