/* ==========================================================================
   Header bundle — announcement bar, sticky header, nav, mobile nav, search
   ========================================================================== */

/* ---------- Announcement bar ----------
   Desktop: three evenly spaced columns.
   Mobile:  one continuous marquee (the track is duplicated in the markup).
   ------------------------------------------------------------------------ */
.pc-bar {
  background: var(--pc-ink); color: var(--pc-yellow-soft);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; padding: 9px 24px;
  --pc-bar-speed: 18s;
}
.pc-bar-in { max-width: var(--pc-max); margin: 0 auto; }

/* Grouped in the middle rather than pushed to the edges. */
.pc-bar-track { display: flex; align-items: center; justify-content: center; gap: 22px; }
.pc-bar-item { flex: none; text-align: center; }
.pc-bar .pc-dot { opacity: .35; flex: none; }

/* The duplicate track only exists for the mobile loop. */
.pc-bar-track[aria-hidden="true"] { display: none; }

@media (max-width: 780px) {
  .pc-bar { padding: 8px 0; overflow: hidden; }
  .pc-bar-in { display: flex; width: max-content; max-width: none; margin: 0; }

  .pc-bar-track { gap: 22px; padding-right: 22px; white-space: nowrap; flex-shrink: 0; justify-content: flex-start; }
  .pc-bar-item { flex: none; text-align: left; }

  /* Static fallback when the marquee is switched off in the Customizer. */
  .pc-bar:not(.pc-bar-marquee) { overflow-x: auto; padding: 8px 16px; }
  .pc-bar:not(.pc-bar-marquee)::-webkit-scrollbar { display: none; }

  .pc-bar-marquee .pc-bar-track[aria-hidden="true"] { display: flex; }
  .pc-bar-marquee .pc-bar-in { animation: pc-marquee var(--pc-bar-speed) linear infinite; }
  .pc-bar-marquee:hover .pc-bar-in,
  .pc-bar-marquee:focus-within .pc-bar-in { animation-play-state: paused; }
}

@keyframes pc-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .pc-bar-marquee .pc-bar-in { animation: none; }
  .pc-bar-marquee .pc-bar-track[aria-hidden="true"] { display: none; }
  .pc-bar-marquee { overflow-x: auto; }
}

/* ---------- Header shell ---------- */
.pc-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 252, 245, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--pc-border);
}
.pc-header-in { max-width: var(--pc-max); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 24px; }

/* ---------- Logo ---------- */
.pc-logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--pc-ink); }
.pc-logo:hover { color: var(--pc-ink); }
.pc-logo-text { display: block; }
.pc-logo-name { display: block; font-family: var(--pc-serif); font-size: 23px; color: var(--pc-ink); line-height: 1; }
.pc-logo-sub {
  display: block; font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--pc-muted3); font-weight: 700; margin-top: 3px;
}
.pc-logo-img { max-height: 52px; width: auto; display: block; }
.pc-logo-has-img { gap: 0; min-width: 0; }

/* The Customizer height is an inline style, so the mobile cap needs to
   override it — hence !important here and nowhere else on the logo. */
@media (max-width: 900px) {
  .pc-logo-img { height: auto !important; max-height: 40px !important; width: auto !important; }
}
@media (max-width: 620px) {
  .pc-logo-img { max-height: 32px !important; }
}
@media (max-width: 380px) {
  .pc-logo-img { max-height: 28px !important; }
}

/* ---------- Menu lists ----------
   Menus render as real <ul><li>, so the markers must be reset explicitly —
   a bare <li> still draws a bullet in most browsers.
   ------------------------------------------------------------------------ */
.pc-menu { list-style: none; margin: 0; padding: 0; }
.pc-menu li { list-style: none; }
.pc-menu li::marker { content: none; }

/* ---------- Desktop nav ----------
   .pc-nav is a bare layout wrapper — no background, border or padding, so
   header-level styling never interacts with it. All the menu's own surface
   styling lives on .pc-menu-header, which nothing else targets.
   ------------------------------------------------------------------------ */
.pc-nav {
  display: flex; flex: 1; justify-content: center; min-width: 0; margin: 0;
  background: none; border: none; padding: 0; box-shadow: none;
}
.pc-menu-header {
  display: flex; align-items: center; gap: 2px;
  background: var(--pc-surface); border: 1px solid var(--pc-border);
  border-radius: 100px; padding: 10px 30px !important; box-shadow: var(--pc-shadow);
}
.pc-navlink {
  display: inline-block; font-size: 15px; font-weight: 700; color: var(--pc-ink);
  padding: 9px 15px; border-radius: 100px; white-space: nowrap; transition: background .15s;
}
.pc-navlink:hover { background: var(--pc-yellow-soft); color: var(--pc-ink); }
.pc-menu-header .current-menu-item > .pc-navlink,
.pc-menu-header .current_page_item > .pc-navlink,
.pc-menu-header .current-menu-parent > .pc-navlink { background: var(--pc-yellow); color: var(--pc-ink); }

/* ---------- Actions ---------- */
.pc-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.pc-icon-btn {
  background: none; border: none; padding: 9px; border-radius: 10px; cursor: pointer;
  color: var(--pc-ink); display: inline-flex; align-items: center;
}
.pc-icon-btn:hover { background: var(--pc-yellow-soft); color: var(--pc-ink); }
.pc-cart-btn {
  position: relative; background: var(--pc-yellow); border: none; padding: 10px 14px;
  border-radius: 11px; cursor: pointer; color: var(--pc-ink); display: flex;
  align-items: center; gap: 8px; font-weight: 800; font-size: 14px;
}
.pc-cart-btn:hover { background: var(--pc-yellow-dark); color: var(--pc-ink); }

/* ---------- Currency switcher ----------
   Wrapper for the [currency_switcher] shortcode, which replaced the account
   icon. The plugin owns the open/closed state of .cc-switcher-menu, so nothing
   here may set `display` on it — a blanket `.pc-currency ul { display: flex }`
   would override the plugin's hidden state and leave the list always open.
   Only typography and colour are adjusted; layout is left to the plugin. */
.pc-currency { display: flex; align-items: center; }
.pc-currency .cc-switcher-toggle,
.pc-currency .cc-switcher-name {
  font-family: var(--pc-sans); font-size: 14px; font-weight: 700; color: var(--pc-ink);
}

/* ---------- Burger ---------- */
.pc-burger { display: none; flex-shrink: 0; }
.pc-burger .pc-burger-close { display: none; }
.pc-burger.open .pc-burger-open { display: none; }
.pc-burger.open .pc-burger-close { display: block; }

/* ---------- Mobile nav ---------- */
.pc-mobile-nav { display: none; border-top: 1px solid var(--pc-border); background: var(--pc-surface2); }
.pc-mobile-nav.open { display: block; }
.pc-menu-mobile { display: block; }
.pc-mobile-navlink {
  display: block; padding: 14px 24px; font-size: 16px; font-weight: 700;
  color: var(--pc-ink); border-bottom: 1px solid var(--pc-border);
}
.pc-mobile-navlink:last-child { border-bottom: none; }
.pc-mobile-navlink:hover { background: var(--pc-yellow-soft); color: var(--pc-ink); }

/* ---------- Search drawer ---------- */
.pc-search { display: none; border-top: 1px solid var(--pc-border); background: var(--pc-surface2); }
.pc-search.open { display: block; }
.pc-search form { max-width: var(--pc-max); margin: 0 auto; padding: 12px 24px; display: flex; gap: 10px; }
.pc-search input[type="search"] { flex: 1; }
.pc-search button {
  border: none; background: var(--pc-ink); color: var(--pc-bg); font-weight: 800;
  padding: 12px 22px; border-radius: 11px; cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pc-header-in { gap: 10px; padding: 12px 16px; }
  .pc-nav { display: none; }
  .pc-burger { display: inline-flex; }
  .pc-logo-sub { display: none; }
  .pc-actions { gap: 2px; }
  .pc-cart-btn { padding: 9px 12px; }
  .pc-bar { font-size: 12px; }
  .pc-search form { padding: 12px 16px; }
}
@media (max-width: 620px) {
  .pc-header-in { gap: 8px; padding: 10px 12px; }
  .pc-logo { gap: 8px; }
  .pc-logo svg { width: 34px; height: 34px; }
  .pc-logo-name { font-size: 19px; }
  .pc-icon-btn { padding: 7px; }
  .pc-actions { gap: 0; }
  .pc-cart-btn { padding: 8px 11px; gap: 6px; }
  .pc-burger { padding: 7px 7px 7px 0; }
}
