/* ════════════════════════════════════════════════════════════════
   Penworthy — components layer
   Header, nav, mobile menu, cart controls, wishlist, modal, footer,
   stickers, plus new components designed in the prototype's visual
   language: toast, skeleton loaders, search type-ahead, a11y helpers.
   Ported from design-reference/styles.css + component JSX inline styles.
   ════════════════════════════════════════════════════════════════ */

/* ── A11y: visually hidden text (WordPress convention) ── */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--pw-blue);
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 5px;
  top: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  width: auto;
  z-index: 100000;
  border-radius: var(--pw-r-sm);
  box-shadow: var(--pw-shadow-lg);
}

/* ── A11y: keyboard focus rings ── */
:focus-visible {
  outline: 2px solid var(--pw-blue);
  outline-offset: 2px;
}
/* Inputs carry their own focus treatment (border + soft ring) */
.input:focus-visible { outline: none; }
/* On deep-blue surfaces a blue ring would vanish — switch to yellow */
.pw-header :focus-visible,
.pw-footer :focus-visible,
.pw-mmenu :focus-visible,
.pw-lightbox :focus-visible {
  outline-color: var(--pw-yellow);
}

/* ── Announcement strip ── */
.pw-announce {
  display: block;
  background: var(--pw-yellow);
  color: var(--pw-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
}
a.pw-announce { color: var(--pw-ink); text-decoration: underline; }

/* ── Header ── */
.pw-header {
  background: var(--pw-blue-deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
/* Logged-in preview: keep the sticky header below the WP admin bar */
body.admin-bar .pw-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .pw-header { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .pw-header { top: 0; } } /* bar scrolls away */
.pw-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 82px;
  padding: 0 50px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.pw-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pw-script);
  font-size: 38px;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.pw-logo .stars {
  position: absolute;
  bottom: -6px;
  left: 16px;
  font-size: 12px;
  letter-spacing: 4px;
  color: #fff;
  font-family: var(--pw-body);
  opacity: .9;
}

/* Penworthy wordmark (inline SVG span rendered by pw_logo) */
.pw-logo-mark {
  display: inline-flex;
  align-items: center;
  height: 34px;
}
.pw-logo-mark svg { height: 100%; width: auto; display: block; }
a .pw-logo-mark,
button .pw-logo-mark { cursor: pointer; }

.pw-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 24px;
  flex: 1;
}
.pw-nav-item {
  padding: 10px 18px;
  font-size: 16px;
  color: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--pw-r);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: background .15s;
}
.pw-nav-item .caret { font-size: 10px; opacity: .8; }

/* Active item: Sofia's Figma treatment — star in top-right corner + underline */
.pw-nav-label {
  position: relative;
  display: inline-block;
}
.pw-nav-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--pw-yellow);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.pw-nav-star {
  position: absolute;
  top: -6px;
  right: -9px;
  width: 9px;
  height: 9px;
  fill: var(--pw-yellow);
  opacity: 0;
  transform: scale(.4) rotate(-20deg);
  transform-origin: center;
  transition: opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.pw-nav-item.is-active { color: #fff; }
.pw-nav-item.is-active .pw-nav-label::after { transform: scaleX(1); }
.pw-nav-item.is-active .pw-nav-star {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.pw-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pw-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.pw-cart-btn:hover { background: rgba(255,255,255,.18); }
.pw-cart-pill {
  width: auto;
  border-radius: var(--pw-pill);
  padding: 0 16px 0 14px;
  gap: 7px;
}
.pw-cart-pill .pw-cart-num {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1;
}
.pw-cart-pill .pw-cart-dot {
  font-size: 16px;
  line-height: 1;
  opacity: .55;
}
.pw-cart-pill .pw-cart-total {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .3px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pw-cart-btn .cart-count {
  position: absolute;
  top: -2px; right: -4px;
  background: var(--pw-orange);
  color: var(--pw-orange-btn-ink); /* 6.78:1 on the brand orange */
  min-width: 20px; height: 20px;
  border-radius: 10px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--pw-blue-deep);
}

.pw-btn-outline {
  padding: 10px 22px;
  border-radius: var(--pw-pill);
  border: 1.5px solid var(--pw-yellow);
  color: #fff;
  font-size: 15px;
  background: transparent;
  cursor: pointer;
  transition: background .15s;
}
.pw-btn-outline:hover { background: rgba(248,228,154,.12); }
.pw-btn-yellow {
  padding: 10px 22px;
  border-radius: var(--pw-pill);
  background: var(--pw-yellow);
  color: var(--pw-blue);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s;
}
.pw-btn-yellow:hover { filter: brightness(.96); }

.pw-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

/* Header compression — keep everything on one line down to laptop widths */
@media (max-width: 1360px) {
  .pw-header-inner { padding: 0 28px; gap: 16px; }
  .pw-nav { margin-left: 8px; gap: 2px; }
  .pw-nav-item { padding: 10px 13px; font-size: 15px; }
}
@media (max-width: 1120px) {
  .pw-header-inner { padding: 0 20px; gap: 10px; }
  .pw-nav-item { padding: 9px 10px; font-size: 14px; }
  .pw-logo { font-size: 30px; }
  /* Cart pill collapses to icon + count so the cluster stays compact */
  .pw-cart-pill .pw-cart-dot, .pw-cart-pill .pw-cart-total { display: none; }
  .pw-cart-pill { padding: 0 14px; }
}

/* ── Header: phone treatment — hamburger + full-screen menu ── */
.pw-burger {
  display: none;
  position: relative;
  z-index: 96;
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  cursor: pointer;
  transition: background .15s;
}
.pw-burger:hover { background: rgba(255,255,255,.18); }
.pw-burger span {
  position: absolute;
  left: 11px;
  width: 16px; height: 2px;
  border-radius: 1px;
  background: #fff;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .18s, top .25s cubic-bezier(.4,0,.2,1);
}
.pw-burger span:nth-child(1) { top: 13px; }
.pw-burger span:nth-child(2) { top: 18px; }
.pw-burger span:nth-child(3) { top: 23px; }
.pw-burger.is-x span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.pw-burger.is-x span:nth-child(2) { opacity: 0; }
.pw-burger.is-x span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

.pw-mmenu {
  display: none;
  position: fixed;
  inset: 62px 0 0 0;
  z-index: 94;
  flex-direction: column;
  justify-content: space-between;
  background: var(--pw-blue-deep);
  padding: 20px 26px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(103%);
  visibility: hidden;
  transition: transform .34s cubic-bezier(.32,.72,.24,1), visibility 0s linear .34s;
  overflow-y: auto;
}
.pw-mmenu.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .34s cubic-bezier(.32,.72,.24,1);
}
.pw-mmenu { scrollbar-width: none; }
.pw-mmenu::-webkit-scrollbar { display: none; }
.pw-mmenu-list { display: flex; flex-direction: column; }
.pw-mmenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 2px;
  font-family: var(--pw-display, inherit);
  font-size: 27px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.10);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s cubic-bezier(.4,0,.2,1);
}
.pw-mmenu.is-open .pw-mmenu-item { opacity: 1; transform: translateY(0); }
.pw-mmenu-item.is-active { color: var(--pw-yellow); }
.pw-mmenu-star { width: 15px; height: 16px; fill: var(--pw-yellow); flex: none; }
.pw-mmenu-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s cubic-bezier(.4,0,.2,1);
}
.pw-mmenu.is-open .pw-mmenu-foot { opacity: 1; transform: translateY(0); }
.pw-mmenu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  font-size: 16.5px;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  cursor: pointer;
}
.pw-mmenu-link:hover { color: #fff; }

/* Mobile floating cart pill — always visible, bottom-right */
.pw-cart-fab {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  align-items: center;
  gap: 7px;
  height: 52px;
  padding: 0 19px;
  border-radius: var(--pw-pill);
  background: var(--pw-yellow);
  color: var(--pw-blue);
  box-shadow: 0 10px 28px rgba(4,48,76,.38), 0 2px 6px rgba(4,48,76,.22);
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.pw-cart-fab:active { transform: scale(.96); }
.pw-cart-fab:hover { filter: brightness(.97); }
.pw-cart-fab .pw-cart-fab-num { font-size: 15.5px; font-weight: 700; line-height: 1; }
.pw-cart-fab .pw-cart-fab-dot { font-size: 15px; line-height: 1; opacity: .5; }
.pw-cart-fab .pw-cart-fab-total { font-size: 15.5px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .2px; }

@media (max-width: 860px) {
  .pw-header-inner { height: 62px; padding: 0 14px; gap: 10px; position: relative; }
  /* Centered, slightly larger logo — burger left, icons right.
     Scoped to the header: the footer logo is also a .pw-logo-mark. */
  .pw-header-inner .pw-logo-mark {
    height: 31px !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  /* Touch-friendly add / quantity controls */
  .pw-addctl { height: 38px !important; }
  .pw-addctl-btn { width: 36px !important; }
  .pw-addctl-add { height: 38px !important; font-size: 14px !important; }
  .pw-burger { display: block; }
  .pw-nav { display: none; }
  .pw-mmenu { display: flex; }
  .pw-cart-fab { display: inline-flex; }
  .pw-header-right { gap: 8px; margin-left: auto; }
  .pw-header-right .pw-cart-btn { display: none; }
  .pw-wish-btn { width: 38px; height: 38px; }
  .pw-avatar { width: 34px; height: 34px; font-size: 16px; }
}

/* ── Add / quantity control (ported from components.jsx AddControl) ── */
.pw-addctl {
  display: inline-flex;
  align-items: center;
  height: 32px;
  background: #fff;
  border: 1.5px solid var(--pw-blue);
  border-radius: var(--pw-pill);
  overflow: hidden;
}
.pw-addctl-btn {
  width: 28px;
  align-self: stretch;
  color: var(--pw-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.pw-addctl-btn:hover { background: var(--pw-blue-tint); }
.pw-addctl-qty {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--pw-blue);
  font-variant-numeric: tabular-nums;
}
.pw-addctl-add {
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--pw-pill);
  background: var(--pw-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: filter .15s;
}
.pw-addctl-add:hover { filter: brightness(1.08); }
.pw-addctl-add.is-added { background: var(--pw-green); }
.pw-addctl-out {
  height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--pw-pill);
  background: var(--pw-line-2);
  color: var(--pw-ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

/* ── Save / wishlist heart ── */
.pw-save {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: transparent;
  border: none;
  padding: 2px;
  color: #fff;
  cursor: pointer;
  z-index: 3;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
  transition: transform .18s cubic-bezier(.22,.61,.36,1), color .18s;
}
.pw-save:hover { color: var(--pw-coral); transform: scale(1.12); }
.pw-save.is-saved { color: var(--pw-coral); }
@keyframes pw-heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }
.pw-save.is-saved svg { animation: pw-heart-pop .3s ease; }
@keyframes pw-qty-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.pw-qty-bump { display: inline-block; animation: pw-qty-bump .28s ease; }
.is-saved-btn { border-color: var(--pw-coral) !important; color: var(--pw-coral) !important; }

/* ── Header saved-kits button ── */
.pw-wish-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  border: none;
  cursor: pointer;
  color: #fff;
  transition: background .15s;
}
.pw-wish-btn:hover { background: rgba(255,255,255,.18); }
.pw-wish-count {
  position: absolute;
  top: -2px; right: -4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--pw-yellow);
  color: var(--pw-blue);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  animation: pw-heart-pop .3s ease;
}

/* ── Modal (write a review) ── */
@keyframes pw-lb-in { from { opacity: 0; } to { opacity: 1; } }
.pw-modal {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(15,21,29,.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: pw-lb-in .18s ease;
}
.pw-modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--pw-r-lg);
  padding: 30px 32px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--pw-shadow-lg);
}
.pw-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--pw-ink-3); background: var(--pw-bg-2);
  cursor: pointer; transition: background .15s, color .15s;
}
.pw-modal-close:hover { background: var(--pw-line); color: var(--pw-ink); }
.pw-modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.pw-modal-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── Dropdown menu card (ported from products.jsx SortDropdown; pair with
      .card for surface + border, motion.css animates the pop) ── */
.pw-menu-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 180px;
  padding: 8px;
  box-shadow: var(--pw-shadow-lg);
  z-index: 30;
}
.pw-menu-pop-item {
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border-radius: var(--pw-r);
  font-size: 14px;
  font-weight: 500;
  color: var(--pw-ink-2);
  background: transparent;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.pw-menu-pop-item:hover { background: var(--pw-bg-2); color: var(--pw-ink); }
.pw-menu-pop-item.is-active {
  background: var(--pw-blue-tint);
  color: var(--pw-blue);
  font-weight: 600;
}

/* ── Brand stickers ── */
.pw-sticker {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  max-width: none;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.16));
}
@keyframes pw-sticker-bob { 0%,100% { transform: translateY(0) var(--pw-rot, rotate(0deg)); } 50% { transform: translateY(-8px) var(--pw-rot, rotate(0deg)); } }
.pw-sticker-float { animation: pw-sticker-bob 5.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pw-sticker-float { animation: none !important; } }

/* ── Footer ── */
.pw-footer {
  background: var(--pw-blue-deep);
  color: rgba(255,255,255,.85);
  padding: 56px 50px 24px;
  margin-top: 80px;
}
.pw-footer-inner { max-width: 1440px; margin: 0 auto; }
.pw-footer h4, .pw-footer .pw-footer-heading {
  color: #fff;
  font-family: var(--pw-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pw-footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr;
  gap: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.pw-footer-cols a { display: block; padding: 6px 0; color: rgba(255,255,255,.9); font-size: 14px; } /* 5.31:1 on --pw-blue-deep (was .75 = 4.19:1) */
.pw-footer-cols a:hover { color: #fff; }
.pw-footer-bottom {
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,.8); /* copyright text — 4.55:1 on --pw-blue-deep (was .5 = 2.71:1) */
  display: flex;
  justify-content: space-between;
}

/* ── Footer collapse ── */
@media (max-width: 1080px) {
  .pw-footer { padding: 48px 32px 24px; }
  .pw-footer-cols { grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
  .pw-footer-cols > div:first-child { grid-column: 1 / -1; max-width: 460px; }
  .pw-footer-cols > div:last-child { grid-column: 1 / -1; max-width: 460px; }
}
@media (max-width: 640px) {
  .pw-footer { padding: 40px 20px 20px; margin-top: 56px; }
  .pw-footer-cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .pw-footer-bottom { flex-direction: column; gap: 10px; }
}

/* ════════════════════════════════════════════════════════════════
   New components (flow-gap additions) — designed in the prototype's
   visual language; see BUILD-NOTES.md "Flow gaps being ADDED".
   ════════════════════════════════════════════════════════════════ */

/* ── Toast — dark ink pill, bottom-center, icon + message + action link
      (visual source: the account-section toasts in pages/account.jsx) ── */
.pw-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4500;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(92vw, 560px);
  padding: 14px 22px;
  border-radius: var(--pw-r);
  background: var(--pw-ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--pw-shadow-lg);
  animation: pw-toast-in .32s var(--pw-ease-out, cubic-bezier(.22,.61,.36,1)) both;
}
@keyframes pw-toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.pw-toast.is-hiding {
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .25s ease, transform .25s var(--pw-ease-out, ease);
}
.pw-toast-ic {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--pw-green);
}
.pw-toast.is-error .pw-toast-ic { color: var(--pw-coral); }
.pw-toast-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--pw-yellow);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.pw-toast-action:hover { text-decoration: underline; }
@media (max-width: 860px) {
  /* Clear the floating cart pill */
  .pw-toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .pw-toast { animation: none; }
}

/* ── Skeleton loaders — shimmering placeholder blocks for PLP updates ── */
.pw-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--pw-line-2);
  border-radius: var(--pw-r);
  color: transparent;
  pointer-events: none;
  user-select: none;
}
.pw-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: pw-skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes pw-skeleton-shimmer { 100% { transform: translateX(100%); } }
/* Card-shaped scaffold that mirrors .pw-prod while results load */
.pw-skeleton-card {
  background: #fff;
  border: 1px solid var(--pw-line);
  border-radius: var(--pw-r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pw-skeleton-card .pw-skeleton-body {
  padding: 14px 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pw-skeleton-cover { aspect-ratio: 4 / 3; border-radius: 0; width: 100%; }
.pw-skeleton-line { height: 13px; width: 100%; }
.pw-skeleton-line.is-short { width: 55%; }
.pw-skeleton-line.is-half { width: 70%; }
.pw-skeleton-pill { height: 26px; width: 90px; border-radius: var(--pw-pill); }
@media (prefers-reduced-motion: reduce) {
  .pw-skeleton::after { animation: none; }
}

/* ── Header search type-ahead — white card dropdown under the field ── */
.pw-suggest-wrap { position: relative; }
.pw-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  color: var(--pw-ink);
  border-radius: var(--pw-r-md);
  box-shadow: var(--pw-shadow-lg);
  padding: 8px;
  z-index: 60;
  max-height: min(420px, 62vh);
  overflow-y: auto;
  text-align: left;
  animation: pw-suggest-in .2s var(--pw-ease-out, cubic-bezier(.22,.61,.36,1)) both;
  transform-origin: top center;
}
@keyframes pw-suggest-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.pw-suggest-label {
  padding: 10px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pw-ink-3);
}
/* Product row: 44px thumb + title/kit + price */
.pw-suggest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--pw-r);
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.pw-suggest-row:hover,
.pw-suggest-row.is-active { background: var(--pw-blue-tint); }
.pw-suggest-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: var(--pw-r-sm);
  overflow: hidden;
  background: var(--pw-blue-tint);
}
.pw-suggest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-suggest-meta { flex: 1; min-width: 0; }
.pw-suggest-title {
  font-family: var(--pw-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--pw-ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pw-suggest-kit {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--pw-blue);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pw-suggest-price {
  flex-shrink: 0;
  font-family: var(--pw-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--pw-ink);
  font-variant-numeric: tabular-nums;
}
/* Term chips row (subjects, kit lines, popular searches) */
.pw-suggest-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 10px 10px;
}
.pw-suggest-term {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--pw-pill);
  background: var(--pw-blue-tint);
  color: var(--pw-blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pw-suggest-term:hover { background: var(--pw-blue); color: #fff; }
/* No-results row */
.pw-suggest-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  font-size: 14.5px;
  color: var(--pw-ink-2);
  line-height: 1.5;
}
.pw-suggest-empty .pw-suggest-empty-ic {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--pw-blue);
}
.pw-suggest-sep { height: 1px; background: var(--pw-line-2); margin: 6px 4px; }
/* "See all results" footer row */
.pw-suggest-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px;
  border-radius: var(--pw-r);
  font-size: 14px;
  font-weight: 700;
  color: var(--pw-blue);
  cursor: pointer;
  transition: background .12s;
}
.pw-suggest-all:hover { background: var(--pw-blue-tint); }
@media (prefers-reduced-motion: reduce) {
  .pw-suggest { animation: none; }
}

/* ── Footer newsletter + socials (inline styles in components.jsx Footer) ── */
.pw-newsletter { margin-top: 12px; display: flex; gap: 6px; }
.pw-newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--pw-r);
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}
.pw-newsletter-input::placeholder { color: rgba(255,255,255,0.95); } /* 4.55:1 over --pw-blue-deep (was .55 = 2.97:1) */
.pw-newsletter-input:focus { outline: 2px solid var(--pw-yellow); outline-offset: 1px; }
.pw-newsletter-btn {
  padding: 10px 16px;
  border-radius: var(--pw-r);
  background: var(--pw-yellow);
  color: var(--pw-blue);
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.pw-social { display: flex; gap: 10px; margin-top: 14px; }
.pw-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
a.pw-social-btn:hover { background: rgba(255,255,255,.22); }

/* ── Footer ClassWallet-eligible chip (inline styles in components.jsx) ── */
.pw-footer-badges { margin-top: 16px; display: flex; gap: 8px; align-items: center; }
.pw-footer-cw {
  padding: 8px 12px;
  background: rgba(255,255,255,.12);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pw-footer-cw-name { font-size: 12.5px; font-weight: 700; color: #fff; }
.pw-footer-cw-sub { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.7); }

/* Mobile menu: log out row for signed-in shoppers (reference-site pattern) */
.pw-mmenu-logout { color: rgba(255,255,255,.55); }
.pw-mmenu-logout:hover { color: #fff; }

/* ── Mobile audit fixes (2026-07-11) ── */

/* The bottom-sheet filter drawer pins "Show N kits" to the viewport bottom;
   hide the cart FAB while it's open (mirrors the PDP buy-bar rule). */
body.pw-drawer-open .pw-cart-fab { opacity: 0; pointer-events: none; transition: opacity .2s ease; }

/* Phones: modal actions stack full-width (primary on top) instead of clipping. */
@media (max-width: 480px) {
  .pw-modal-actions { flex-direction: column-reverse; }
  .pw-modal-actions .btn { width: 100%; justify-content: center; }
}

/* Footer type scale + legal-links gap (components.jsx parity). */
.pw-footer-tagline { font-size: 14px; line-height: 1.6; }
.pw-footer-news-copy { font-size: 14px; line-height: 1.6; }
.pw-footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.pw-footer-legal a { color: rgba(255,255,255,.85); } /* legal links — 4.92:1 on --pw-blue-deep (was inherited .5 = 2.71:1) */

/* Phones: 40px minimum touch targets for the header cluster + card hearts. */
@media (max-width: 860px) {
  .pw-avatar { width: 40px; height: 40px; }
  .pw-burger, .pw-wish-btn { width: 40px; height: 40px; }
  .pw-save { min-width: 40px; min-height: 40px; }
}

/* ── Scroll-fade edges (rows marked data-pw-scrollfade; app.js toggles) ── */
[data-pw-scrollfade].pw-fade-r {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 44px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 44px), transparent 100%);
}
[data-pw-scrollfade].pw-fade-l {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 44px, #000 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 44px, #000 100%);
}
[data-pw-scrollfade].pw-fade-l.pw-fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
}
[data-pw-scrollfade].pw-fade-b {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 44px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 44px), transparent 100%);
}
[data-pw-scrollfade].pw-fade-t {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 44px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 44px, #000 100%);
}
[data-pw-scrollfade].pw-fade-t.pw-fade-b {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 44px, #000 calc(100% - 44px), transparent 100%);
}

/* ── Photo focal framing (ACF "framing" dropdown; helpers append the class).
     !important: an editor's explicit choice must beat the per-slot tuning
     in home.css. "Auto" adds no class and falls through to those defaults. ── */
.pw-photo-focal-top img { object-position: 50% 10% !important; }
.pw-photo-focal-center img { object-position: 50% 50% !important; }
.pw-photo-focal-bottom img { object-position: 50% 85% !important; }

/* ════════════════════════════════════════════════════════════════
   WooCommerce notices (global — cart, checkout AND account surfaces)
   Lives here (always loaded) so notices are styled everywhere, not just
   on the cart/checkout-only checkout.css.
   ════════════════════════════════════════════════════════════════ */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: var(--pw-r);
  font-size: 14px;
  line-height: 1.5;
  list-style: none;
}
.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li { list-style: none; margin: 0; }
.woocommerce-message { background: var(--pw-green-light); color: #2C7A52; }
.woocommerce-info { background: var(--pw-blue-tint); color: var(--pw-blue); }
.woocommerce-error { background: var(--pw-coral-light); color: #C4471F; }
.woocommerce-notices-wrapper:empty { display: none; }
