.imp-header {
  --imp-header-red: #f00000;
  --imp-header-text: #ffffff;
  --imp-header-focus: #fff4b8;
  --imp-header-panel: #c90010;
  --imp-header-shadow: 0 8px 22px rgba(90, 0, 10, 0.14);
  --imp-header-z: 30;
  --imp-header-height: 68px;
  --imp-header-inner-width: 1180px;
  --imp-header-logo-width: 205px;
  --imp-header-logo-offset: 14px;
  position: relative;
  z-index: var(--imp-header-z);
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

.imp-header--sticky {
  position: sticky;
  top: var(--imp-header-sticky-offset, 0);
}

.admin-bar .imp-header--sticky {
  top: calc(var(--imp-header-sticky-offset, 0px) + var(--wp-admin--admin-bar--height, 32px));
}

.tax-imp_product_line,
.post-type-archive-imp_product,
.single-imp_product,
.page-template-page-sobre-nos {
  --imp-internal-header-height: 96px;
}

.tax-imp_product_line .imp-header,
.post-type-archive-imp_product .imp-header,
.single-imp_product .imp-header,
.page-template-page-sobre-nos .imp-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--imp-header-z);
  width: 100%;
}

.admin-bar.tax-imp_product_line .imp-header,
.admin-bar.post-type-archive-imp_product .imp-header,
.admin-bar.single-imp_product .imp-header,
.admin-bar.page-template-page-sobre-nos .imp-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 782px) {
  .admin-bar.tax-imp_product_line .imp-header,
  .admin-bar.post-type-archive-imp_product .imp-header,
  .admin-bar.single-imp_product .imp-header,
  .admin-bar.page-template-page-sobre-nos .imp-header {
    top: 46px;
  }
}

.imp-header__bar {
  position: relative;
  min-height: var(--imp-header-height);
  background-color: var(--imp-header-red);
  background-image: var(--imp-header-pattern);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--imp-header-shadow);
}

.imp-header--no-pattern .imp-header__bar {
  background-image: none;
}

.imp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, var(--imp-header-inner-width));
  max-width: var(--imp-header-inner-width);
  min-height: var(--imp-header-height);
  margin-inline: auto;
  gap: clamp(28px, 4vw, 64px) !important;
}

.imp-header__logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: var(--imp-header-height);
  transform: none !important;
}

.imp-header__logo-img {
  display: block;
  width: var(--imp-header-logo-width) !important;
  max-width: 32vw;
  height: auto;
  transform: translateY(var(--imp-header-logo-offset));
}

.imp-header__nav {
  min-width: 0;
  margin-left: 0;
}

.imp-header__menu,
.imp-header__mobile-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(30px, 3vw, 46px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.imp-header__menu li,
.imp-header__mobile-menu li {
  position: relative;
  margin: 0;
}

.imp-header__menu a,
.imp-header__mobile-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--imp-header-text);
  font-family: var(--imp-font-body, "Montserrat", Arial, sans-serif);
  font-size: clamp(17px, 1.2vw, 21px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  outline: none;
  transition: color 200ms ease, opacity 200ms ease;
}

.imp-header__menu a::after {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 3px;
  content: "";
  background: currentColor;
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 200ms ease;
}

.imp-header__menu a:hover,
.imp-header__menu a:focus-visible,
.imp-header__mobile-menu a:hover,
.imp-header__mobile-menu a:focus-visible,
.imp-header__menu a.is-anchor-active,
.imp-header__mobile-menu a.is-anchor-active {
  color: var(--imp-header-focus);
}

.imp-header__menu a:hover::after,
.imp-header__menu a:focus-visible::after,
.imp-header__menu a.is-anchor-active::after {
  width: 100%;
}

.imp-header__menu a:focus-visible,
.imp-header__mobile-menu a:focus-visible,
.imp-header__toggle:focus-visible {
  outline: 3px solid var(--imp-header-focus);
  outline-offset: 3px;
}

.imp-header__menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 35;
  min-width: 190px;
  margin: 0;
  padding: 8px;
  list-style: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  background: #d40000;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.imp-header__menu li:hover > .sub-menu,
.imp-header__menu li:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.imp-header__menu .sub-menu a {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
}

.imp-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  cursor: pointer;
}

.imp-header__toggle-line {
  position: absolute;
  width: 24px;
  height: 3px;
  background: #ffffff;
  border-radius: 3px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.imp-header__toggle-line:nth-child(1) {
  transform: translateY(-8px);
}

.imp-header__toggle-line:nth-child(3) {
  transform: translateY(8px);
}

.imp-header.is-open .imp-header__toggle-line:nth-child(1) {
  transform: rotate(45deg);
}

.imp-header.is-open .imp-header__toggle-line:nth-child(2) {
  opacity: 0;
}

.imp-header.is-open .imp-header__toggle-line:nth-child(3) {
  transform: rotate(-45deg);
}

.imp-header__mobile-panel {
  position: absolute;
  inset-inline: 16px;
  top: 100%;
  z-index: 36;
  padding: 20px;
  background: var(--imp-header-panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 14px 28px rgba(80, 0, 12, 0.24);
}

.imp-header__mobile-panel[hidden] {
  display: none;
}

.imp-header__mobile-menu {
  align-items: stretch;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
}

.imp-header__mobile-menu a {
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding-inline: 12px;
  border-radius: 10px;
}

.imp-header__mobile-menu a:hover,
.imp-header__mobile-menu a:focus-visible,
.imp-header__mobile-menu a.is-anchor-active {
  background: rgba(255, 255, 255, 0.1);
}

.imp-header__mobile-menu .sub-menu {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 0 0 16px;
  list-style: none;
}

body.imp-header-lock {
  overflow: hidden;
}

@media (max-width: 768px) {
  .tax-imp_product_line,
  .post-type-archive-imp_product,
  .single-imp_product,
  .page-template-page-sobre-nos {
    --imp-internal-header-height: 74px;
  }

  .imp-header__bar {
    min-height: clamp(58px, 17vw, 68px);
  }

  .imp-header__inner {
    width: min(100% - 32px, 100%);
    gap: 14px !important;
  }

  .imp-header__logo-img {
    width: clamp(96px, 29vw, 112px) !important;
    max-width: 40vw;
    transform: translateY(8px);
  }

  .imp-header__nav {
    display: none;
  }

  .imp-header__toggle {
    position: relative;
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
  }

  .imp-header__mobile-panel {
    inset-inline: clamp(14px, 4.5vw, 18px);
    padding: 16px clamp(12px, 4vw, 16px);
  }

  .imp-header__mobile-menu a {
    min-height: 50px;
    font-size: 1rem;
  }
}

.imp-header.imp-header--mobile-active .imp-header__nav {
  display: none;
}

.imp-header.imp-header--mobile-active .imp-header__toggle {
  position: relative;
  display: inline-flex;
}

.imp-header.imp-header--mobile-active .imp-header__inner {
  justify-content: space-between;
}

.imp-header.imp-header--desktop-active .imp-header__mobile-panel {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .imp-header__menu a,
  .imp-header__mobile-menu a,
  .imp-header__menu a::after {
    transition: none;
  }
}
