/* Four public shells own their geometry before deferred scripts execute.
   Legacy pages retain theme-chrome's compatibility path. */
html:has(body[data-static-layout]) { scrollbar-gutter: stable; }
body[data-static-layout] {
  --static-header-bottom: calc(176px + var(--admin-toolbar-offset, 0px));
  --search-drawer-shell-left: 50%;
  --search-drawer-shell-top: var(--static-header-bottom);
  --search-drawer-shell-width: min(calc(100% - var(--gutter) * 2), var(--container));
  --search-drawer-shell-transform: translateX(-50%);
}
body[data-static-layout] .static-page-intro {
  display: flex;
  flex-direction: column;
  min-width: 0;
  order: 0;
  position: sticky;
  top: var(--static-header-bottom);
  z-index: 20;
  margin: 0 0 16px;
}
body[data-static-layout] .static-page-intro > :is(.group-hero, .product-hero-title) {
  position: relative !important;
  top: auto !important;
  order: 0;
  margin: 0;
  width: 100%;
}
body[data-static-layout] .static-page-intro > :is(.group-breadcrumbs, .product-breadcrumbs) {
  position: relative !important;
  top: auto !important;
  order: 1;
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 30px;
}
body[data-static-layout] .static-page-intro > .group-hero { min-height: 68px; }
body[data-static-layout] .group-hero h1 { min-block-size: 1lh; }
body[data-static-layout] main,
body[data-static-layout] main.group-main,
body[data-static-layout] main.product-main { min-height: 100svh !important; }
body[data-static-layout] .category-nav .header-blog-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  margin-left: 10px;
  border: 1px solid rgba(214,228,237,.7);
  border-radius: 13px;
  background: #fff;
  color: var(--blue,#007fbd);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15,23,42,.035);
}
body[data-static-layout] .header-blog-link svg { flex: none; }
body[data-static-layout] .header-blog-link:hover { background: #f0f9ff; }
body[data-static-layout] .header-blog-link:focus-visible { outline: 2px solid #007fbd; outline-offset: 3px; }
body[data-static-layout] .site-footer__contacts { min-height: 72px; }
body[data-static-layout] .site-footer__social { min-height: 24px; }
body[data-static-layout] .static-presence-toggle { display: none; }
body[data-static-layout] #product-main-image:not([data-viewer360="true"]) {
  width: 94%;
  height: 94%;
  object-fit: contain;
}

@media (min-width: 1101px) {
  body[data-static-layout] .topline__contact-module {
    --utility-rail-hero-top: calc(var(--static-header-bottom) + 16px);
    top: var(--utility-rail-hero-top) !important;
  }
  body[data-static-layout] .topline__contacts { min-height: 126px; }
  body[data-static-layout] .product-variant-nav {
    --utility-rail-side-nav-top: calc(var(--static-header-bottom) + 340px);
  }
}
@media (min-width: 821px) {
  body[data-static-layout] .control-panel a[href$="/technological/"],
  body[data-static-layout] .catalog-popover__utility a[href$="/technological/"] { display: none; }
  body[data-static-layout] .static-page-intro > .product-breadcrumbs { min-height: 42px; }
}
@media (min-width: 961px) {
  body[data-static-layout] .presence-panel__scale {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    transform: none;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 2px;
    padding: 14px 14px 10px;
  }
}
@media (max-width: 820px) {
  body[data-static-layout] .category-nav .header-blog-link { display: none; }
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 560px) and (orientation: landscape) {
  body[data-static-layout] .hero-grid {
    display: flex;
    flex-direction: column;
  }
  body[data-static-layout] .hero-grid > .hero-card { order: 0; }
  body[data-static-layout] .hero-grid > .control-panel { order: 1; }
  body[data-static-layout] .static-presence-toggle {
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    border: 1px solid rgba(153, 196, 221, .58);
  }
  body[data-static-layout] .static-presence-toggle small { margin-left: auto; font-size: 10px; }
  body[data-static-layout] .static-presence-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
  body[data-static-layout] .static-presence-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  body[data-static-layout] .hero-grid > .presence-panel { order: 3; }
  body[data-static-layout] .hero-grid > .presence-panel:not(.is-mobile-open) { display: none; }
  body[data-static-layout] .hero-grid > .presence-panel.is-mobile-open { display: block !important; width: 100%; height: auto; }
}
@media (max-width: 760px) {
  body[data-static-layout] .static-page-intro { position: static; }
  body[data-static-layout] .static-page-intro > :is(.group-breadcrumbs, .product-breadcrumbs) { order: -1; min-height: 48px; }
  body[data-static-layout].is-category-page .static-page-intro > .group-hero { min-height: 76px; }
  body[data-static-layout].is-category-page .category-view-switch[hidden] { display: flex; visibility: hidden; pointer-events: none; }
}

/* Mobile navigation geometry: no DOM relocation or loading-time JavaScript. */
@media (max-width: 760px) {
  body[data-static-layout]:is(.product-page, .group-page, .is-category-page) {
    padding-top: calc(72px + var(--admin-toolbar-offset, 0px));
  }
  body[data-static-layout] :is(main.product-main, main.group-main) {
    padding-top: 4px;
  }
  /* Layout/paint containment would anchor fixed sibling arrows to the main. */
  body[data-static-layout] main.product-main {
    contain: none;
  }
  body[data-static-layout] .static-page-intro > :is(.product-breadcrumbs, .group-breadcrumbs) {
    position: relative !important;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 40px;
    grid-template-rows: 40px;
    align-items: center;
    gap: 0 4px;
    min-height: 40px;
    height: 40px;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    font-size: 12px;
  }
  body[data-static-layout] :is(.product-back-link, .group-back-link) {
    grid-column: 1;
    grid-row: 1;
    width: 32px;
    min-width: 32px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 8px;
  }
  body[data-static-layout] :is(.product-breadcrumbs__compact, .group-breadcrumbs__compact) {
    display: contents !important;
  }
  body[data-static-layout] :is(.product-breadcrumbs__compact, .group-breadcrumbs__compact) > :not(button) {
    display: none;
  }
  body[data-static-layout] :is(.product-breadcrumbs__toggle, .group-breadcrumbs__toggle) {
    grid-column: 3;
    grid-row: 1;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(0, 127, 189, .05);
    box-shadow: none;
    color: var(--blue, #007fbd);
    font-size: 20px;
    line-height: 1;
    display: grid !important;
    place-items: center;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs):not(.is-expanded) > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) {
    display: contents;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs):not(.is-expanded) > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) > * {
    display: none;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs):not(.is-expanded) > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) > a:last-of-type {
    display: block;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 40px;
    font-weight: 400;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs).is-expanded > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) {
    position: absolute;
    top: 44px;
    inset-inline: 0;
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid #dce9f1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(22, 56, 77, .12);
    max-height: min(55svh, 360px);
    overflow-y: auto;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs).is-expanded > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) > :is(a, strong) {
    display: block;
    padding: 10px 8px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs).is-expanded :is(.product-breadcrumbs__separator, .group-breadcrumbs__separator) {
    display: none;
  }
  /* Short paths have no existing toggle: keep every ancestor accessible. */
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs):not(.is-expanded):not(:has(button)) > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) {
    display: flex;
    grid-column: 2 / -1;
    grid-row: 1;
    min-width: 0;
    overflow-x: auto;
    align-items: center;
    gap: 8px;
  }
  body[data-static-layout] :is(.product-breadcrumbs, .group-breadcrumbs):not(.is-expanded):not(:has(button)) > :is(.product-breadcrumbs__full, .group-breadcrumbs__full) > a {
    display: block;
    flex: 0 0 auto;
    white-space: nowrap;
    line-height: 40px;
  }
  body[data-static-layout] #product-variant-nav:not([hidden]) {
    position: fixed !important;
    top: auto !important;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    height: 44px !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    z-index: 30;
    pointer-events: none;
  }
  body[data-static-layout] #product-variant-nav .product-variant-nav__arrow {
    position: static !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    transform: none !important;
    border-radius: 14px;
    pointer-events: auto;
  }
  body[data-static-layout] #product-variant-nav :is(.product-variant-nav__message, .product-variant-nav__preview, .product-variant-nav__card-content) {
    display: none !important;
  }
  .catalog-popover__utility-toggle {
    border: 0;
    outline: none;
    box-shadow: none;
  }
  .catalog-popover__utility-toggle:focus-visible {
    outline: 2px solid var(--blue, #007fbd);
    outline-offset: 2px;
  }
  body[data-static-layout].is-catalog-open .category-nav::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(12, 31, 44, .32);
    z-index: 131;
    pointer-events: none;
  }
  body[data-static-layout] .catalog-popover {
    background: #fbfdff;
  }
}

/* TASK-FRONTEND-302HEADER: desktop search follows the actual header edge. */
@media (min-width: 961px), (min-width: 821px) and (min-height: 561px), (min-width: 821px) and (orientation: portrait) {
  body[data-static-layout] {
    --search-drawer-shell-top: calc(165px + var(--admin-toolbar-offset, 0px));
  }
  @supports (top: anchor(--pneumat-search-header bottom)) {
    body[data-static-layout] .site-header { anchor-name: --pneumat-search-header; }
    body[data-static-layout] .search-drawer {
      top: anchor(--pneumat-search-header bottom, var(--search-drawer-shell-top));
    }
  }
}

/* TASK-FRONTEND-303PRESENCE: home geometry belongs to CSS, not the artboard. */
@media (min-width: 1101px) {
  body[data-static-layout].home-page .topline__contact-module {
    top: calc(181px + var(--admin-toolbar-offset, 0px)) !important;
  }
  @supports (top: anchor(--pneumat-search-header bottom)) {
    body[data-static-layout].home-page .topline__contact-module {
      top: calc(anchor(--pneumat-search-header bottom, calc(165px + var(--admin-toolbar-offset, 0px))) + 16px) !important;
    }
  }
}
@media (min-width: 961px) {
  body[data-static-layout].home-page .presence-panel__body {
    grid-template-rows: minmax(0, 1fr) 12px 56px 54px;
  }
  body[data-static-layout].home-page .presence-panel__map-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }
  body[data-static-layout].home-page .presence-panel__map {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 4px;
  }
  body[data-static-layout].home-page .presence-panel__map > svg {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: auto;
  }
  body[data-static-layout].home-page :is(.presence-map__sessions, .presence-map__monthly) {
    position: absolute;
    inset: auto;
    left: 12px;
    right: auto;
    z-index: 4;
    grid-area: auto;
    justify-self: start;
    align-self: start;
    margin: 0;
  }
  body[data-static-layout].home-page .presence-map__sessions {
    bottom: 50px;
  }
  body[data-static-layout].home-page .presence-map__monthly {
    bottom: 12px;
  }
}
