/**
 * TruOath Nutrition Header CSS — Aesop 1:1 Replica
 * Notification bar + two-tier transparent header + mobile overlay
 */

/* ==========================================================================
   A. Top Notification Bar
   ========================================================================== */
.truoath-topbar {
  background-color: #252525;
  color: #fff;
  text-align: center;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.4;
  position: relative;
  z-index: 1002;
}

.truoath-topbar__inner {
  max-width: 1400px;
  margin: 0 auto;
}

.truoath-topbar__text {
  color: rgba(255,255,255,0.9);
}

.truoath-topbar__text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.truoath-topbar__text a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ==========================================================================
   B. Main Header
   ========================================================================== */
.truoath-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  padding: 0 48px;
  background: transparent;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

/* Push header down by notification bar height */
.truoath-topbar + .truoath-header {
  top: 38px;
}

/* Sticky state: solid background when scrolled */
.truoath-header.is-scrolled {
  position: fixed;
  top: 0;
  background-color: #252525;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ==========================================================================
   B2. Inner Page Header (NOT homepage) — dark background, readable text
   ========================================================================== */
.not-home .truoath-header {
  position: fixed;
  background-color: #252525;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.not-home .truoath-topbar {
  position: relative;
  z-index: 1002;
}

/* Body padding for inner pages so content doesn't hide behind fixed header */
.not-home #page > .site-main,
.not-home #page > main,
.not-home .truoath-journal-page,
.not-home .truoath-single-post,
.not-home .truoath-standard-page,
.not-home .truoath-about-story,
.not-home article.truoath-standard-page,
.not-home article.truoath-single-post {
  padding-top: 120px !important;
}

.not-home .truoath-shop-page,
.not-home .truoath-cart-page {
  padding-top: 120px !important;
}

.not-home .truoath-single-product {
  padding-top: 120px !important;
}

/* Hide notification bar when header is scrolled/fixed */
.truoath-topbar.is-hidden {
  transform: translateY(-100%);
  position: absolute;
}

/* ==========================================================================
   C. Header Rows (shared)
   ========================================================================== */
.truoath-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Top Row: Utility | Logo | Actions --- */
.truoath-header__row--top {
  padding: 22px 0 10px;
}

.truoath-header__left,
.truoath-header__right {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.truoath-header__right {
  justify-content: flex-end;
}

.truoath-header__left a,
.truoath-header__right a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: opacity 0.25s ease;
}

.truoath-header__left a:hover,
.truoath-header__right a:hover {
  opacity: 0.65;
  text-decoration: none;
}

/* --- Center: Logo --- */
.truoath-header__center {
  text-align: center;
  flex: 0 0 auto;
  padding: 0 40px;
}

/* ✅ Image logo — replaces the old text logo */
.truoath-header__logo {
  display: block;
  line-height: 0;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
}

.truoath-header__logo:hover {
  opacity: 0.85;
}

.truoath-header__logo-img {
  height: 36px;   /* adjust height to taste — width scales automatically */
  width: auto;
  display: block;
  /*
   * Your uploaded logo has a black background.
   * filter: brightness(0) invert(1) converts any dark/black logo
   * to pure white so it shows correctly on the dark header.
   * If you upload a version with a transparent background and white text,
   * you can remove this filter entirely.
   */
  filter: brightness(0) invert(1);
  transition: opacity 0.25s ease;
}

/* --- Bottom Row: Nav links | Search --- */
.truoath-header__row--bottom {
  padding: 12px 0 16px;
}

.truoath-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.truoath-header__nav a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.truoath-header__nav a:hover {
  opacity: 0.65;
  text-decoration: none;
}

/* Search button — outlined, right side */
.truoath-header__search {
  flex: 0 0 auto;
  margin-left: 32px;
}

.truoath-header__search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 8px 20px 8px 14px;
  cursor: pointer;
  transition: border-color 0.25s ease;
  letter-spacing: 0.01em;
  border-radius: 0;
  min-width: 140px;
}

.truoath-header__search-btn:hover {
  border-color: rgba(255,255,255,0.7);
  background: transparent;
  color: #fff;
}

.truoath-header__search-btn svg {
  flex-shrink: 0;
}

/* ==========================================================================
   D. Mobile Toggle
   ========================================================================== */
.truoath-header__mobile-toggle {
  display: none;
  position: absolute;
  top: 24px;
  right: 20px;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
}

.truoath-header__mobile-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* ==========================================================================
   E. Mobile Navigation Overlay
   ========================================================================== */
.truoath-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #252525;
  z-index: 2000;
  flex-direction: column;
  padding: 30px 28px 40px;
  overflow-y: auto;
}

.truoath-mobile-overlay.is-active {
  display: flex;
}

.truoath-mobile-overlay__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

/* ✅ Image logo in mobile overlay */
.truoath-mobile-overlay__logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1); /* same invert trick as desktop */
}

.truoath-mobile-overlay__close {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}

.truoath-mobile-overlay__close:hover {
  background: transparent;
  border: none;
}

.truoath-mobile-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.truoath-mobile-overlay__nav a {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.truoath-mobile-overlay__nav a:hover {
  text-decoration: none;
}

.truoath-mobile-overlay__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.truoath-mobile-overlay__actions a {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

/* ==========================================================================
   F. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .truoath-header {
    padding: 0 20px;
  }

  .truoath-header__row--top {
    padding: 16px 0 10px;
  }

  .truoath-header__left,
  .truoath-header__row--bottom {
    display: none;
  }

  .truoath-header__right .truoath-header__action-link {
    display: none;
  }

  .truoath-header__row--top {
    justify-content: center;
  }

  .truoath-header__center {
    flex: 1;
    text-align: center;
    padding: 0;
  }

  /* Scale logo down slightly on mobile */
  .truoath-header__logo-img {
    height: 28px;
  }

  .truoath-header__right {
    flex: 0;
  }

  .truoath-header__mobile-toggle {
    display: flex;
  }
}