/* TPS: sticky Header Top (logo/search/account/cart) — home + shop only */

/* Belt-and-suspenders: if .stuck appears on disallowed pages, undo fixed sticky */
body:not(.home):not(.woocommerce-shop):not(.post-type-archive-product) .header-wrapper.stuck,
html.tps-no-header-sticky .header-wrapper.stuck {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 !important;
  animation: none !important;
  -webkit-animation: none !important;
  box-shadow: none !important;
  z-index: auto !important;
}

/* Restore category bar / hide-for-sticky rows when stuck is neutralized */
body:not(.home):not(.woocommerce-shop):not(.post-type-archive-product) .stuck .header-bottom.hide-for-sticky,
html.tps-no-header-sticky .stuck .header-bottom.hide-for-sticky {
  display: flex !important;
}

body:not(.home):not(.woocommerce-shop):not(.post-type-archive-product) .stuck .header-main,
html.tps-no-header-sticky .stuck .header-main {
  height: 77px !important;
}

body:not(.home):not(.woocommerce-shop):not(.post-type-archive-product) .stuck #logo img,
html.tps-no-header-sticky .stuck #logo img {
  max-height: 77px !important;
}

@media (max-width: 549px) {
  body:not(.home):not(.woocommerce-shop):not(.post-type-archive-product) .stuck .header-main,
  html.tps-no-header-sticky .stuck .header-main {
    height: 70px !important;
  }
  body:not(.home):not(.woocommerce-shop):not(.post-type-archive-product) .stuck #logo img,
  html.tps-no-header-sticky .stuck #logo img {
    max-height: 70px !important;
  }
}

/* Allowed pages: smooth sticky-jump already from Flatsome; light polish */
body.home #header.has-sticky .header-wrapper.stuck,
body.woocommerce-shop #header.has-sticky .header-wrapper.stuck,
body.post-type-archive-product #header.has-sticky .header-wrapper.stuck,
html.tps-header-sticky-allowed #header.has-sticky .header-wrapper.stuck {
  will-change: transform;
  backface-visibility: hidden;
}
