.th-header {
  --th-bg: #6b4626;
  --th-bg-solid: #6b4626;
  --th-bg-soft: rgba(169, 127, 88, 0.22);
  --th-surface: rgba(255, 255, 255, 0.06);
  --th-border: rgba(255, 255, 255, 0.08);
  --th-text: #eeddcc;
  --th-text-muted: #c5c5c5;
  --th-accent: #b9895d;
  --th-accent-strong: #c89a6d;
  --th-shell-width: 1440px;

  position: absolute;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: 0 20px;
  color: var(--th-text);
}

.th-header a,
.th-header button {
  color: inherit;
}

.th-header__shell {
  max-width: var(--th-shell-width);
  margin: 0 auto;
  background: var(--th-bg);
  border-radius: 0 0 32px 32px;
  backdrop-filter: blur(4px);
  opacity: 0.8;
}

.th-header__bar {
  padding: 0;
}

.th-header__pay-later {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  line-height: normal;
  color: var(--th-text-muted);
}

.th-header__pay-later-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #efadc4;
  color: #1d1020;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.th-header__pay-later-link {
  text-decoration: underline;
}

.th-header__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 16px 32px 36px;
}

.th-header__column {
  min-width: 0;
}

.th-header__column--left,
.th-header__column--right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
}

.th-header__column--center {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
}

.th-header__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.th-header__icon-svg {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.th-header__icon-svg svg {
  width: 100%;
  height: 100%;
}

.th-header__nav {
  min-width: 0;
}

.th-header__column--center .custom-logo-link,
.th-mobile-panel__brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.th-header__column--center .custom-logo,
.th-mobile-panel__brand .custom-logo {
  width: auto;
  max-width: 100%;
}

.th-header__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.th-header__utility-icons,
.th-header__contact-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

.th-header__utility-icons--mobile {
  display: none;
}

.th-header__utility-button,
.th-header__contact-button,
.th-mobile-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--th-text);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.th-header__contact-button {
  background: var(--th-bg-soft);
}

.th-header__utility-button:hover,
.th-header__contact-button:hover,
.th-header__cta:hover,
.th-header__secondary-cta:hover,
.th-mobile-panel__close:hover {
  transform: translateY(-1px);
}

.th-header__cta,
.th-header__secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.th-header__cta {
  background: var(--th-accent);
  color: #fff6ef;
}

.th-header__secondary-cta {
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: var(--th-text);
  background: transparent;
}

.th-nav-desktop__list,
.th-nav-mobile__list,
.th-nav-mobile__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.th-nav-desktop__list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.th-nav-desktop__item {
  position: relative;
}

.th-nav-desktop__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  color: var(--th-text-muted);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.th-nav-desktop__link:hover,
.th-nav-desktop__item:hover > .th-nav-desktop__link {
  color: var(--th-text);
}

.th-nav-desktop__chevron {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.th-nav-desktop__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 240px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(106, 71, 40, 0.98);
  border: 1px solid var(--th-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.th-nav-desktop__item:hover .th-nav-desktop__dropdown,
.th-nav-desktop__item:focus-within .th-nav-desktop__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.th-nav-desktop__submenu {
  display: grid;
  gap: 12px;
}

.th-nav-desktop__submenu-link {
  display: block;
  color: var(--th-text-muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
}

.th-nav-desktop__submenu-link:hover {
  color: var(--th-text);
}

.th-mobile-panel {
  display: none;
}

.admin-bar .th-header {
  top: 32px;
}

body.th-menu-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .th-header {
    padding: 0;
  }

  .th-header__shell {
    border-radius: 0 0 24px 24px;
  }

  .th-header__bar {
    padding: 0;
  }

  .th-header__pay-later {
    font-size: 13px;
    gap: 8px;
  }

  .th-header__main {
    grid-template-columns: auto 1fr auto;
    min-height: 0;
    padding: 0 16px 18px;
    gap: 12px;
  }

  .th-header__column--left,
  .th-header__column--right,
  .th-header__column--center {
    display: contents;
  }

  .th-header__burger {
    display: inline-flex;
  }

  .th-header__nav--desktop,
  .th-header__contact-list--desktop,
  .th-header__cta--desktop,
  .th-header__utility-icons--desktop {
    display: none;
  }

  .th-header__utility-icons--mobile {
    display: flex;
  }

  .th-header__brand {
    justify-content: center;
  }

  .th-mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: var(--th-bg-solid);
    padding: 16px 18px 32px;
    overflow-y: auto;
  }

  .th-mobile-panel.is-open {
    display: block;
  }

  .th-mobile-panel__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }

  .th-mobile-panel__brand {
    display: flex;
    justify-content: center;
  }

  .th-mobile-panel__utility {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }

  .th-mobile-panel__body {
    display: grid;
    gap: 28px;
  }

  .th-nav-mobile__list {
    display: grid;
    gap: 12px;
  }

  .th-nav-mobile__item {
    border-radius: 20px;
  }

  .th-nav-mobile__item.has-children {
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 0;
  }

  .th-nav-mobile__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 6px 0 18px;
  }

  .th-nav-mobile__link,
  .th-nav-mobile__submenu-link {
    color: var(--th-text);
    text-decoration: none;
  }

  .th-nav-mobile__link {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    flex: 1;
  }

  .th-nav-mobile__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .th-nav-mobile__toggle-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
  }

  .th-nav-mobile__toggle-icon--minus {
    display: none;
  }

  .th-nav-mobile__item.is-open .th-nav-mobile__toggle-icon--plus {
    display: none;
  }

  .th-nav-mobile__item.is-open .th-nav-mobile__toggle-icon--minus {
    display: inline-flex;
  }

  .th-nav-mobile__submenu-wrap {
    padding: 0 18px 12px;
  }

  .th-nav-mobile__submenu {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
  }

  .th-nav-mobile__submenu-link {
    display: block;
    font-size: 20px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.78);
  }

  .th-mobile-panel__cta-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .th-header__cta--mobile,
  .th-header__secondary-cta {
    min-width: 228px;
  }

  .th-header__contact-list--mobile {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .th-header__bar {
    padding: 10px 16px 8px;
  }

  .th-header__pay-later {
    font-size: 12px;
  }

  .th-header__pay-later-badge {
    min-height: 18px;
    padding: 3px 7px;
    font-size: 9px;
  }

  .th-header__main {
    padding: 0 14px 16px;
  }

  .th-header__column--center .custom-logo-link,
  .th-mobile-panel__brand .custom-logo-link {
    max-width: 112px;
  }

  .th-header__column--center .custom-logo,
  .th-mobile-panel__brand .custom-logo {
    max-height: 52px;
  }

  .th-header__actions {
    gap: 8px;
  }

  .th-header__utility-icons--mobile {
    gap: 2px;
  }

  .th-header__utility-button,
  .th-mobile-panel__close,
  .th-header__contact-button {
    width: 36px;
    height: 36px;
  }

  .th-nav-mobile__link {
    font-size: 16px;
  }

  .th-nav-mobile__submenu-link {
    font-size: 15px;
  }

  .th-header__cta--mobile,
  .th-header__secondary-cta {
    min-width: 0;
    width: 100%;
    max-width: 220px;
  }
}
