.pym-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(226,235,232,.82);
  backdrop-filter: blur(16px);
  transition: box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.pym-header.is-stuck { box-shadow: 0 10px 34px rgba(18,33,31,.08); background: rgba(255,255,255,.94); }
.pym-topbar { border-bottom: 1px solid var(--pym-border); background: #f9fcfb; font-size: 12px; color: var(--pym-muted); }
.pym-topbar__inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pym-topbar__message, .pym-topbar__meta, .pym-topbar__meta a { display: inline-flex; align-items: center; gap: 8px; }
.pym-topbar__dot { width: 8px; height: 8px; background: var(--pym-primary); border-radius: 999px; box-shadow: 0 0 0 4px rgba(19,184,166,.12); }
.pym-topbar__meta a { color: var(--pym-text); font-weight: 650; }
.pym-topbar__meta .pym-icon { width: 16px; height: 16px; }

.pym-header-main { background: rgba(255,255,255,.82); }
.pym-header-main__inner { min-height: 76px; display: grid; grid-template-columns: 230px minmax(260px, 1fr) auto; gap: 20px; align-items: center; }
.pym-header-main__search { min-width: 0; }
.pym-header-main__actions { display: flex; align-items: center; gap: 10px; }
.pym-header-actions { display: inline-flex; align-items: center; gap: 8px; }
.pym-header-cta { min-width: 112px; }

.pym-desktop-nav { border-top: 1px solid rgba(226,235,232,.72); background: rgba(255,255,255,.72); }
.pym-desktop-nav__inner { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pym-desktop-nav__menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.pym-desktop-nav__menu > li { position: relative; }
.pym-desktop-nav__menu > li > a {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 12px;
  border-radius: 999px; color: var(--pym-text);
  font-size: 13px; font-weight: 650;
}
.pym-desktop-nav__menu > li:hover > a,
.pym-desktop-nav__menu > li.is-open > a,
.pym-desktop-nav__menu > li.current-menu-item > a { background: var(--pym-primary-soft); color: var(--pym-primary-dark); }
.pym-desktop-nav__menu .sub-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 230px; margin: 0; padding: 10px;
  list-style: none; opacity: 0; visibility: hidden; transform: translateY(8px);
  background: #fff; border: 1px solid var(--pym-border);
  border-radius: 20px; box-shadow: var(--pym-shadow-md);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.pym-desktop-nav__menu .sub-menu::before {
  content: ""; position: absolute; right: 0; left: 0; top: -14px; height: 14px;
  pointer-events: auto;
}
.pym-desktop-nav__menu li:hover > .sub-menu,
.pym-desktop-nav__menu li.is-open > .sub-menu,
.pym-desktop-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.pym-desktop-nav__menu .sub-menu a { display: flex; padding: 10px 12px; border-radius: 13px; color: var(--pym-text); font-size: 13px; }
.pym-desktop-nav__menu .sub-menu a:hover { background: var(--pym-primary-soft); color: var(--pym-primary-dark); }
.pym-desktop-nav__guide { display: inline-flex; align-items: center; gap: 7px; color: var(--pym-primary-dark); font-weight: 650; font-size: 13px; }
.pym-desktop-nav__guide .pym-icon { width: 18px; height: 18px; }

.pym-mobile-header { display: none; }
.pym-drawer-overlay, .pym-mobile-drawer { display: none; }

/* v1.2.2 — tighter, stable desktop header layout */
@media (min-width: 1025px) {
  .pym-header { contain: layout paint; }
  .pym-topbar__inner { min-width: 0; }
  .pym-topbar__message,
  .pym-topbar__meta { min-width: 0; white-space: nowrap; }
  .pym-topbar__message span:last-child,
  .pym-topbar__meta > span { overflow: hidden; text-overflow: ellipsis; }
  .pym-header-main__inner {
    min-height: 72px;
    grid-template-columns: minmax(255px, max-content) minmax(320px, 1fr) max-content;
    gap: 14px;
  }
  .pym-header-main__logo { min-width: 0; display: flex; align-items: center; }
  .pym-logo { min-width: 0; max-width: 320px; }
  .pym-logo__text { min-width: 0; }
  .pym-logo__text strong,
  .pym-logo__text small {
    max-width: 265px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .pym-logo__text strong { font-weight: 700; font-size: 15px; }
  .pym-header-main__search { min-width: 280px; }
  .pym-header-main__actions { min-width: max-content; white-space: nowrap; }
  .pym-header-actions { flex-wrap: nowrap; }
  .pym-icon-btn { height: 46px; }
  .pym-header-cta { min-width: 118px; height: 46px; padding-inline: 18px; }
  .pym-desktop-nav__menu { min-width: 0; flex-wrap: nowrap; }
  .pym-desktop-nav__menu > li > a { white-space: nowrap; }
}

@media (min-width: 1025px) and (max-width: 1240px) {
  .pym-header-main__inner { grid-template-columns: minmax(220px, max-content) minmax(260px, 1fr) max-content; gap: 10px; }
  .pym-logo__text strong { max-width: 215px; font-size: 14px; }
  .pym-logo__text small { max-width: 215px; }
  .pym-search input[type="search"] { padding-left: 72px; }
  .pym-search__submit { padding-inline: 11px; }
  .pym-icon-btn { padding-inline: 10px; gap: 5px; }
  .pym-icon-btn span:not(.pym-cart-count) { font-size: 11px; }
  .pym-header-cta { min-width: 108px; padding-inline: 15px; }
}

/* v1.2.4 — z-index scale: drawer must always sit above product/configurator floating UI. */
.pym-header { z-index: 1200; }
.pym-drawer-overlay {
  z-index: 9000;
  background: rgba(18,33,31,.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.pym-mobile-drawer { z-index: 9010; }
body.pym-lock-scroll .pym-drawer-overlay:not([hidden]),
.pym-drawer-overlay.is-open { display: block; }
.pym-mobile-drawer[aria-hidden="false"],
.pym-mobile-drawer.is-open { display: flex; }
@media (min-width: 1025px) {
  .pym-drawer-overlay,
  .pym-mobile-drawer { display: none !important; }
}


/* v1.2.6 — consistent layer scale with configurator bottom sheets. */
@media (max-width: 1024px) {
  .pym-header { z-index: 1200; }
  .pym-drawer-overlay { z-index: 25000; }
  .pym-mobile-drawer { z-index: 25010; }
}
