.page-header,
body #header {
  background: transparent;
  box-shadow: none;
}

body #header {
  position: sticky;
  z-index: 500;
  top: 0;
}

.tk-site-header {
  --tk-header-offset: 118px;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0;
  background: rgba(248, 247, 242, .96);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(16px);
  transition: box-shadow .2s ease;
}

.tk-site-header.is-compact {
  box-shadow: 0 12px 34px rgba(17, 19, 17, .08);
  border-bottom: none;
}

.tk-header-shell {
  display: grid;
  grid-template-areas: "logo nav search utility";
  grid-template-columns: auto minmax(250px, 1fr) minmax(210px, 290px) auto;
  box-sizing: border-box;
  width: min(1800px, calc(100% - clamp(32px, 4vw, 80px)));
  min-height: 78px;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  margin-inline: auto;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--tk-line);
  transition: min-height .2s ease;
}

.tk-site-header.is-compact .tk-header-shell {
  min-height: 60px;
}

.tk-logo {
  grid-area: logo;
  display: block;
  width: clamp(126px, 10vw, 151px);
  line-height: 0;
  transition: width .2s ease;
}

.tk-site-header.is-compact .tk-logo {
  width: 122px;
}

.tk-logo img {
  display: block;
  width: 100%;
  height: auto;
}

body #header .tk-site-header a,
body #header .tk-site-header a:visited {
  color: inherit;
}

body #header .tk-site-header a:hover,
body #header .tk-site-header a:focus-visible {
  color: var(--tk-mint-text, #1f6f60);
  text-decoration: none;
}

.tk-header-nav {
  grid-area: nav;
  min-width: 0;
}

.tk-header-search {
  grid-area: search;
  min-width: 0;
}

.tk-header-search .td-widget {
  display: flex;
  width: 100%;
}

.tk-header-search .td-trigger {
  width: 100%;
  min-height: 46px;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: var(--tk-muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--tk-line);
  border-radius: 0;
  font-weight: 500;
  text-align: left;
}

.tk-header-search .td-trigger .td-trigger-label {
  order: -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tk-header-search .td-trigger svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  order: 2;
  color: var(--tk-ink);
}

.tk-header-utility {
  grid-area: utility;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.tk-header-utility #_desktop_cart {
  display: block;
}

.tk-header-utility #_desktop_cart .blockcart {
  height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

.tk-header-utility #_desktop_cart .blockcart .header {
  position: relative;
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--tk-ink);
  background: transparent;
  border: 1px solid var(--tk-line);
  border-radius: var(--radius-pill, 999px);
  font: 700 11px 'Space Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-btn {
  line-height: 0;
}

.tk-header-utility #_desktop_cart .shopping-cart {
  display: none;
}

.tk-header-utility #_desktop_cart .cart-products-count {
  position: absolute;
  top: -5px;
  right: -3px;
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  margin: 0;
  padding: 0 5px;
  color: var(--tk-ink);
  background: var(--tk-mint);
  border: 2px solid var(--tk-paper);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.tk-header-utility #_desktop_cart .blockcart.inactive .cart-products-count {
  display: none;
}

@media (max-width: 1180px) and (min-width: 901px) {
  .tk-header-shell {
    grid-template-columns: auto minmax(120px, 1fr) minmax(190px, 230px) auto;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .tk-site-header {
    --tk-header-offset: 68px;
    width: 100%;
    border-radius: 0 0 22px 22px;
  }

  .tk-header-shell,
  .tk-site-header.is-compact .tk-header-shell {
    grid-template-areas: "nav logo search utility";
    grid-template-columns: 46px minmax(82px, 1fr) 46px auto;
    width: 100%;
    min-height: 68px;
    gap: 6px;
    margin-inline: 0;
    padding: 8px 12px;
    width:100% !important;
  }

  .tk-logo,
  .tk-site-header.is-compact .tk-logo {
    width: clamp(92px, 28vw, 118px);
  }

  .tk-header-nav,
  .tk-header-search {
    display: flex;
    align-items: center;
  }

  .tk-header-search .td-trigger {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 9px;
    border: 0;
  }

  .tk-header-search .td-trigger::before {
    content: none;
  }

  .tk-header-search .td-trigger .td-trigger-label {
    display: none;
  }

  .tk-header-utility {
    gap: 12px;
  }

  .tk-header-utility #_desktop_cart .blockcart .header {
    min-width: 44px;
    min-height: 44px;
    padding: 9px;
  }
}

@media (max-width: 410px) {
  .tk-header-shell,
  .tk-site-header.is-compact .tk-header-shell {
    grid-template-columns: 44px minmax(76px, 1fr) 44px auto;
    gap: 3px;
    padding-inline: 8px;
  }

  .tk-header-utility #_desktop_cart .blockcart .header {
    min-width: 42px;
    min-height: 42px;
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tk-site-header,
  .tk-header-shell,
  .tk-logo {
    transition: none;
  }
}

/* The discovery module turns its trigger into a dark pill on hover; in the
   header it reads as a search field, so only the underline reacts. */
.tk-site-header .tk-header-search .td-trigger:hover,
.tk-site-header .tk-header-search .td-trigger:focus-visible {
  background: transparent;
  color: var(--tk-ink);
  border-bottom-color: var(--tk-ink);
}
