.te-header {
  --te-header-line: #dacbe2;
  --te-header-promo: 36px;
  --te-header-admin: 0px;
  position: relative;
  z-index: 28;
  background: var(--te-cream);
  color: var(--te-plum);
  font-family: var(--te-text);
}

.admin-bar .te-header { --te-header-admin: 32px; }

.te-header.is-enhanced {
  position: sticky;
  top: calc(var(--te-header-admin) - var(--te-header-promo));
  transform: translateY(0);
  transition: transform 180ms ease;
}

.te-header.is-receding:not(:focus-within) {
  transform: translateY(calc(-100% - var(--te-header-admin)));
}

@supports selector(:has(:focus-visible)) {
  .te-header.is-receding:not(:has(:focus-visible)) {
    transform: translateY(calc(-100% - var(--te-header-admin)));
  }
}

.te-header [hidden] { display: none !important; }
.te-header a { color: inherit; }
.te-header a:hover { color: var(--te-accent); }
.te-header ul { margin: 0; padding: 0; list-style: none; }
.te-header li { margin: 0; }
.te-header svg { display: block; flex: 0 0 auto; }

.te-header__announcement {
  display: grid;
  align-content: center;
  min-height: var(--te-header-promo);
  padding: 4px 12px;
  background: var(--te-plum);
  color: #fff;
  text-align: center;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .075em;
}

.te-header__bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, 4fr) minmax(max-content, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 84px;
  padding: 0 clamp(20px, 4.2vw, 67px);
  border-bottom: 1px solid var(--te-header-line);
}

.te-header__wordmark {
  justify-self: start;
  color: var(--te-plum);
  font: 500 clamp(1.35rem, 1.85vw, 1.85rem)/1.06 var(--te-display);
  letter-spacing: -.055em;
  white-space: nowrap;
}

.te-header__desktop {
  display: grid;
  align-self: stretch;
  justify-self: center;
  min-width: 0;
}

.te-header__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 4px clamp(8px, 1.2vw, 20px);
}

.te-header__primary-item,
.te-header__nav-row {
  display: flex;
  align-items: center;
}

.te-header__nav-row > :is(a,span) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 8px;
  font-size: .93rem;
  font-weight: 600;
}

.te-header__nav-row > a:hover,
.te-header__nav-row > a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .26em;
}

.te-header__nav-toggle,
.te-header__utility,
.te-header__back {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  color: var(--te-plum);
  background: transparent;
  text-transform: none;
}

.te-header__nav-toggle {
  min-width: 28px;
  min-height: 40px;
  border-radius: 30px;
}

.te-header__nav-toggle svg { width: 16px; height: 16px; }
.te-header__nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.te-header__nav-toggle:hover,
.te-header__utility:hover,
.te-header__back:hover {
  background: var(--te-lilac);
  color: var(--te-plum);
}

.te-header__mega {
  position: absolute;
  z-index: 1;
  inset: 100% max(24px, 4.2vw) auto;
  max-height: min(66vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 26px clamp(24px, 4vw, 56px) 32px;
  border: 1px solid var(--te-header-line);
  border-radius: 0 0 18px 18px;
  background: var(--te-cream);
  box-shadow: 0 12px 28px #25113326;
}

.te-header__mega > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: start;
  gap: 24px;
}

.te-header__mega > ul > li > :is(a,span) {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
}

.te-header__mega .te-header__sublist .te-header__sublist {
  display: grid;
  gap: 6px;
  margin: 4px 0 0 10px;
  padding-left: 10px;
  border-left: 1px solid var(--te-header-line);
}

.te-header__mega a:hover {
  text-decoration: underline;
  text-underline-offset: .22em;
}

.te-header:not(.is-enhanced) .te-header__nav-toggle { display: none; }
.te-header:not(.is-enhanced) .te-header__primary-item:is(:hover,:focus-within) > .te-header__mega[hidden] { display: block !important; }

.te-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  grid-column: 3;
}

.te-header__utility {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.te-header__utility svg { width: 23px; height: 23px; }
.te-header__menu-toggle, .te-header.is-enhanced .te-header__fallback-link { display: none; }

.te-header .htw-header-native-cart-count {
  position: absolute;
  right: 0;
  top: 1px;
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 20px;
  background: var(--te-accent);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1;
}

.te-header .htw-header-native-cart-count.is-empty { display: none; }

.te-header .te-header__drawer:not([open]) { display: none; }

.te-header__drawer[open] {
  position: fixed;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(458px, 100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  background: var(--te-cream);
  color: var(--te-plum);
  box-shadow: 0 0 34px #25113330;
}

.te-header__drawer::backdrop { background: #2311278a; }

.te-header .te-header__drawer--menu {
  inset: 0 auto 0 0;
  width: min(398px, calc(100% - 26px));
  box-shadow: 10px 0 34px #25113330;
}

.te-header__drawer-heading {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 14px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--te-header-line);
  background: var(--te-lilac);
}

.te-header__drawer-heading h2 {
  margin: 0;
  color: inherit;
  font: 500 clamp(1.45rem, 4vw, 1.95rem)/1.15 var(--te-display);
  letter-spacing: -.04em;
  text-transform: none;
}

.te-header__drawer-heading .te-header__utility:hover { background: #e4d4ed; }

.te-header__drawer-content,
.te-header__mobile-nav {
  flex: 1 0 auto;
  padding: 20px 24px 28px;
}

.te-header__mobile-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--te-header-line);
}

.te-header__mobile-item > :is(a,span) {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 5px 4px;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 600;
}

.te-header__mobile-item .te-header__utility { align-self: center; }

.te-header__back {
  display: inline-flex;
  justify-content: flex-start;
  gap: 4px;
  min-height: 44px;
  padding: 0 10px 0 2px;
  border-radius: 26px;
  font-size: .9rem;
  font-weight: 650;
}

.te-header__mobile-account {
  position: sticky;
  bottom: 0;
  padding: 4px 24px calc(4px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--te-header-line);
  background: var(--te-lilac);
}

.te-header__mobile-account > a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 600;
}

.te-header__drawer--search form .flex-row {
  flex-wrap: wrap;
  margin: 0;
  gap: 4px;
}

.te-header__drawer--search .search-field,
.te-header__drawer--search .search_categories {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--te-header-line);
  border-radius: 6px;
  background: #fff;
  color: var(--te-ink);
  font: 400 1rem/1.2 var(--te-text);
  box-shadow: none;
}

.te-header__drawer--search .ux-search-submit {
  min-height: 48px;
  min-width: 48px;
  border: 1px solid var(--te-plum);
  border-radius: 6px;
  color: white;
  background: var(--te-plum);
}

.te-header__drawer--search .autocomplete-suggestions {
  position: static !important;
  width: 100% !important;
  margin-top: 8px;
  border: 1px solid var(--te-header-line);
  background: var(--te-cream);
  box-shadow: none;
}

.te-header .te-header__drawer--cart .product_list_widget li {
  min-height: 96px;
  margin: 0;
  padding: 0 30px 18px 79px;
  border-color: var(--te-header-line);
}

.te-header .te-header__drawer--cart .product_list_widget li img {
  width: 66px;
  height: 78px;
  border-radius: 7px;
  object-fit: contain;
}

.te-header .te-header__drawer--cart .product_list_widget li a:not(.remove) { color: var(--te-ink); }
.te-header .te-header__drawer--cart .product_list_widget li a.remove { color: var(--te-plum); }
.te-header .te-header__drawer--cart .woocommerce-mini-cart__total { border-color: var(--te-header-line); }

.te-header .te-header__drawer--cart :is(.woocommerce-mini-cart__buttons,.return-to-shop) a.button {
  border-color: var(--te-plum);
  border-radius: 30px;
  background: var(--te-cream);
  color: var(--te-plum);
}

.te-header .te-header__drawer--cart :is(.woocommerce-mini-cart__buttons a.checkout,.return-to-shop a.button) {
  background: var(--te-plum) !important;
  color: #fff !important;
}

.te-header__drawer-content:has(.woocommerce-mini-cart__buttons,.return-to-shop) > .te-header__shop { display: none; }
.te-header__no-script-form { padding: 8px 14px; }

@media (max-width: 1020px) {
  .te-header__bar {
    grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
    gap: 3px;
    min-height: 68px;
    padding: 0 clamp(8px, 3.2vw, 22px);
  }

  .te-header__wordmark {
    grid-column: 2;
    justify-self: center;
    font-size: clamp(1.25rem, 5.7vw, 1.66rem);
  }

  .te-header.is-enhanced.has-menu .te-header__account { display: none; }
  .te-header__utility { width: 42px; height: 42px; flex-basis: 42px; }
  .te-header__actions { gap: 0; }
  .te-header.is-enhanced .te-header__menu-toggle { display: grid; grid-column: 1; grid-row: 1; }
  .te-header.is-enhanced .te-header__desktop { display: none; }
  .te-header:not(.is-enhanced) .te-header__desktop { grid-column: 1 / -1; grid-row: 2; }
  .te-header__drawer-content, .te-header__mobile-nav { padding-inline: 18px; }
  .te-header__drawer-heading, .te-header__mobile-account { padding-inline: 18px; }
}

@media (max-width: 782px) {
  .admin-bar .te-header { --te-header-admin: 46px; }
}

@media (max-width: 600px) {
  .admin-bar .te-header { --te-header-admin: 0px; }
}

@media (prefers-reduced-motion: reduce) {
  .te-header.is-enhanced { transition: none; }
}
