/* ==========================================================
   EATWELL101 HEADER V2
   Clean-slate component. Namespaced under #ew-header-v2.
   ========================================================== */

#ew-header-v2 {
  --ewh-height: 62px;
  --ewh-nav-height: 44px;
  position: sticky;
  top: 0;
  z-index: 10000;
  color: var(--ew-ink);
  font-family: var(--ew-font-sans);
  background: var(--ew-white);
}


#ew-header-v2 .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#ew-header-v2 *,
#ew-header-v2 *::before,
#ew-header-v2 *::after {
  box-sizing: border-box;
}

#ew-header-v2 a {
  text-decoration: none;
}

.ewh-main {
  position: relative;
  z-index: 10003;
  height: var(--ewh-height);
  background: var(--ew-white);
  border-bottom: 1px solid var(--ew-border-soft);
}

.ewh-main__inner {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
}

.ewh-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ew-ink);
  cursor: pointer;
}

.ewh-icon-btn:hover {
  background: var(--ew-warm-white);
  color: var(--ew-green);
}

.ewh-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.ewh-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

#ew-header-v2.is-drawer-open .ewh-menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#ew-header-v2.is-drawer-open .ewh-menu-toggle span:nth-child(2) {
  opacity: 0;
}

#ew-header-v2.is-drawer-open .ewh-menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.ewh-logo {
  display: flex;
  align-items: center;
}

.ewh-logo img {
  display: block;
  width: auto;
  height: 34px;
}

.ewh-search {
  display: flex;
  width: 100%;
}

.ewh-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ew-border);
  border-right: 0;
  border-radius: 20px 0 0 20px;
  background: #fbfbfa;
  color: var(--ew-ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.ewh-search input:focus {
  border-color: #c9c7c0;
  background: var(--ew-white);
}

.ewh-search button {
  width: 48px;
  height: 38px;
  border: 1px solid var(--ew-green);
  border-radius: 0 20px 20px 0;
  background: var(--ew-green);
  color: #fff;
  cursor: pointer;
}

.ewh-search button:hover {
  background: var(--ew-green-hover);
  border-color: var(--ew-green-hover);
}

.ewh-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ewh-actions svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
}

.ewh-newsletter {
  margin-right: 8px;
  color: var(--ew-green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ewh-newsletter:hover {
  color: var(--ew-green-hover);
}

/* Primary nav */
.ewh-nav {
  position: relative;
  z-index: 10002;
  height: var(--ewh-nav-height);
  overflow: visible;
  background: var(--ew-white);
  border-bottom: 1px solid var(--ew-border-soft);
  transition: transform .22s ease, opacity .22s ease;
}

.ewh-nav__inner {
  display: flex;
  align-items: center;
  gap: 5px;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
}

.ewh-nav__inner > a,
.ewh-nav-dropdown > button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--ew-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .012em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.ewh-nav__inner > a:hover,
.ewh-nav-dropdown > button:hover {
  color: var(--ew-green);
}

.ewh-nav__inner > .ewh-nav__accent {
  color: var(--ew-green);
}

.ewh-nav-dropdown {
  position: relative;
  height: 100%;
}

.ewh-nav-dropdown > button i {
  margin-left: 6px;
  font-size: 10px;
}

.ewh-nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  display: none;
  min-width: 190px;
  padding: 7px;
  border: 1px solid var(--ew-border-soft);
  border-radius: var(--ew-radius);
  background: var(--ew-white);
  box-shadow: 0 14px 34px rgba(20, 28, 24, .10);
}

.ewh-nav-dropdown.is-open .ewh-nav-dropdown__menu {
  display: block;
}

.ewh-nav-dropdown__menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 3px;
  color: var(--ew-ink);
  font-size: 12px;
  line-height: 1.25;
}

.ewh-nav-dropdown__menu a:hover {
  background: var(--ew-warm-white);
  color: var(--ew-green);
}

/* Mobile search */
.ewh-mobile-search {
  position: sticky;
  top: var(--ewh-height);
  z-index: 10002;
  padding: 8px 12px;
  background: var(--ew-white);
  border-bottom: 1px solid var(--ew-border-soft);
}

.ewh-mobile-search[hidden] {
  display: none !important;
}

.ewh-mobile-search form {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid var(--ew-border);
  border-radius: 20px;
  background: #fbfbfa;
}

.ewh-mobile-search i {
  margin: 0 10px 0 13px;
  color: var(--ew-green);
  font-size: 13px;
}

.ewh-mobile-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 13px 0 0;
  border: 0;
  background: transparent;
  color: var(--ew-ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

/* Drawer */
.ewh-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10009;
  background: rgba(20, 24, 21, .22);
  opacity: 0;
  transition: opacity .2s ease;
}

.ewh-drawer-backdrop.is-visible {
  opacity: 1;
}

.ewh-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 10010;
  width: min(360px, 88vw);
  padding: 25px 24px 36px;
  overflow-y: auto;
  background: var(--ew-white);
  box-shadow: 18px 0 42px rgba(20, 28, 24, .12);
  transform: translateX(-105%);
  transition: transform .22s ease;
}

.ewh-drawer.is-open {
  transform: translateX(0);
}

.ewh-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.ewh-drawer__eyebrow,
.ewh-drawer__label {
  color: var(--ew-green);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ewh-drawer__close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ew-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ewh-drawer__nav {
  display: grid;
  gap: 0;
}

.ewh-drawer__nav a {
  padding: 13px 0;
  border-bottom: 1px solid var(--ew-border-soft);
  color: var(--ew-ink);
  font-size: 16px;
  font-weight: 650;
}

.ewh-drawer__nav a:hover,
.ewh-drawer__section a:hover {
  color: var(--ew-green);
}

.ewh-drawer__section {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.ewh-drawer__section .ewh-drawer__label {
  margin-bottom: 4px;
}

.ewh-drawer__section a {
  color: var(--ew-muted);
  font-size: 14px;
}

/* Ads preserved */
.ewh-desk-ad {
  position: relative;
  height: 283px;
  background: #f7f6f3;
  border-bottom: 1px solid var(--ew-border-soft);
  text-align: center;
}

.ewh-desk-ad #adtop {
  display: inline-block;
  width: 100%;
  min-height: 250px;
  padding: 15px 0;
  overflow: hidden;
}

.ewh-mobile-ad {
  display: none;
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0;
  background: var(--ew-white);
  border-bottom: 1px solid var(--ew-border-soft);
  box-shadow: 0 2px 7px rgba(20,28,24,.10);
}

.ewh-mobile-ad #gpt-mobi0-sticky {
  width: 320px;
  height: 50px;
  overflow: hidden;
  margin: 0 auto;
}

/* Utility visibility */
.ewh-mobile-only {
  display: none !important;
}

/* ----------------------------------------------------------
   MOBILE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  #ew-header-v2 {
    --ewh-height: 58px;
    --ewh-nav-height: 40px;
  }

  .ewh-main__inner {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 4px;
    width: 100%;
    padding: 0 8px;
  }

  .ewh-logo {
    justify-self: center;
  }

  .ewh-logo img {
    height: 32px;
    max-width: 188px;
  }

  .ewh-search--desktop,
  .ewh-desktop-only {
    display: none !important;
  }

  .ewh-mobile-only {
    display: inline-flex !important;
  }

  .ewh-actions {
    gap: 0;
  }

  .ewh-nav {
    overflow: hidden;
  }

  .ewh-nav__inner {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 6px;
    scrollbar-width: none;
  }

  .ewh-nav__inner::-webkit-scrollbar {
    display: none;
  }

  .ewh-nav__inner > a,
  .ewh-nav-dropdown > button {
    flex: 0 0 auto;
    padding: 0 10px;
    font-size: 11px;
  }

  /* By Diet belongs in drawer on mobile: simplify main strip. */
  .ewh-nav-dropdown {
    display: none;
  }

  .ewh-nav__newsletter {
    color: var(--ew-green) !important;
  }

  /* Scroll behavior: nav fully collapses on down-scroll, returns on up-scroll. */
  .ewh-nav {
    max-height: var(--ewh-nav-height);
    transition: max-height .22s ease, opacity .18s ease, border-color .18s ease;
  }

  #ew-header-v2.is-scrolling-down .ewh-nav {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    border-bottom-color: transparent;
  }

  #ew-header-v2.is-scrolling-down .ewh-nav__inner {
    opacity: 0;
  }

  #ew-header-v2.is-scrolling-down .ewh-mobile-search:not([hidden]) {
    display: none !important;
  }

}

  /*
   * V0.3.3: ad is structurally inside the sticky header.
   * It never collapses; only .ewh-nav does.
   */
  .ewh-mobile-ad {
    display: block;
    position: relative;
    top: auto;
    z-index: 10001;
    min-height: 50px;
    margin: 0;
    opacity: 1;
    transform: none;
  }

  .ewh-mobile-ad #gpt-mobi0-sticky {
    width: 320px;
    height: 50px;
    margin: 0 auto;
    overflow: hidden;
  }

  #ew-header-v2.is-scrolling-down .ewh-mobile-ad {
    display: block;
    opacity: 1;
    transform: none;
  }



@media (max-width: 390px) {
  .ewh-logo img {
    height: 30px;
    max-width: 170px;
  }

  .ewh-icon-btn {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================
   HEADER V2.0.3.4 — NAVIGATION ARCHITECTURE
   Recipes · What to Cook · My Kitchen · Healthy
   ========================================================== */

/* Saved recipes: simple bookmark */
#ew-header-v2 .ewh-bookmark-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keep My Kitchen as the product accent. */
#ew-header-v2 .ewh-nav__accent {
  color: var(--ew-green) !important;
  font-weight: 700;
}

/* Cleaner drawer hierarchy */
#ew-header-v2 .ewh-drawer__section {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

#ew-header-v2 .ewh-drawer__section--first {
  margin-top: 0;
}

#ew-header-v2 .ewh-drawer__label {
  margin-bottom: 4px;
}

#ew-header-v2 .ewh-drawer__section > a {
  padding: 3px 0;
  color: var(--ew-muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Main recipe destinations remain stronger. */
#ew-header-v2 .ewh-drawer__nav a {
  padding: 12px 0;
  color: var(--ew-ink);
  font-size: 15px;
  font-weight: 650;
}

/* Newsletter = relationship action, not another navigation row. */
#ew-header-v2 .ewh-drawer-newsletter {
  display: grid;
  gap: 5px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--ew-stone);
  border-radius: var(--ew-radius);
  background: var(--ew-warm-white);
  color: var(--ew-ink);
}

#ew-header-v2 .ewh-drawer-newsletter:hover {
  border-color: #d4d1c9;
}

#ew-header-v2 .ewh-drawer-newsletter__eyebrow {
  color: var(--ew-green);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

#ew-header-v2 .ewh-drawer-newsletter strong {
  font-family: var(--ew-font-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.015em;
}

#ew-header-v2 .ewh-drawer-newsletter > span:last-child {
  color: var(--ew-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Slightly more deliberate spacing with only four top-level destinations. */
@media (min-width: 769px) {
  #ew-header-v2 .ewh-nav__inner {
    gap: 9px;
  }

  #ew-header-v2 .ewh-nav__inner > a,
  #ew-header-v2 .ewh-nav-dropdown > button {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Mobile top-level strip: four clear destinations. */
@media (max-width: 768px) {
  #ew-header-v2 .ewh-nav__inner {
    gap: 0;
  }

  #ew-header-v2 .ewh-nav__inner > a,
  #ew-header-v2 .ewh-nav-dropdown > button {
    padding-left: 11px;
    padding-right: 11px;
  }

  #ew-header-v2 .ewh-drawer-newsletter {
    margin-top: 24px;
  }
}

