/* AtHomeGrower single top menu fix
   Keeps the white pill buttons with black oval borders and removes the lower legacy menu bar. */

.ahg-global-menu-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
  background: rgba(250, 248, 241, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ahg-global-menu-shell {
  width: min(1320px, calc(100% - 1rem));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.45rem 0;
}

.ahg-global-menu-header ~ .ahg-global-menu-header,
.ahg-global-menu-header ~ header:not(.ahg-global-menu-header),
.ahg-global-menu-header ~ .site-header,
.ahg-global-menu-header ~ .main-header,
.ahg-global-menu-header ~ .page-header,
.ahg-global-menu-header ~ .header,
.ahg-global-menu-header ~ .topbar,
.ahg-global-menu-header ~ .navbar,
.ahg-global-menu-header ~ .nav-wrap,
.ahg-global-menu-header ~ .navigation,
.ahg-global-menu-header ~ .site-nav,
.ahg-global-menu-header ~ .main-nav,
.ahg-global-menu-header ~ .primary-nav,
[data-ahg-legacy-menu-hidden="true"] {
  display: none !important;
}

body > header:not(.ahg-global-menu-header):has(nav),
body > div:has(> nav.site-nav),
body > div:has(> nav.main-nav),
body > div:has(> nav.primary-nav),
body > nav:not(.ahg-condensed-nav) {
  display: none !important;
}

.ahg-condensed-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
  width: 100%;
}

.ahg-condensed-nav a,
.ahg-condensed-nav summary {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}

.ahg-condensed-nav__link,
.ahg-condensed-nav__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.65rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 91, 49, 0.18);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
  cursor: pointer;
  white-space: nowrap;
}

.ahg-condensed-nav__link:hover,
.ahg-condensed-nav__summary:hover,
.ahg-condensed-nav__item[open] > .ahg-condensed-nav__summary {
  background: rgba(236, 246, 230, 0.95);
  border-color: rgba(46, 91, 49, 0.34);
  text-decoration: none;
}

.ahg-condensed-nav__item {
  position: relative;
}

.ahg-condensed-nav__summary {
  list-style: none;
}

.ahg-condensed-nav__summary::-webkit-details-marker {
  display: none;
}

.ahg-condensed-nav__summary::after {
  content: "";
  font-size: 0.72rem;
  opacity: 0.72;
  transform: translateY(-1px);
}

.ahg-condensed-nav__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 9999;
  width: min(320px, calc(100vw - 2rem));
  padding: 0.55rem;
  border: 1px solid rgba(46, 91, 49, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(31, 48, 33, 0.16);
}

.ahg-condensed-nav__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.78rem;
  border-radius: 12px;
  color: #1f3522;
  font-weight: 650;
  text-decoration: none;
}

.ahg-condensed-nav__menu a:hover {
  background: #eef7e9;
  text-decoration: none;
}

.ahg-condensed-nav__menu a[aria-current="page"],
.ahg-condensed-nav__link[aria-current="page"] {
  background: #dff0d8;
  border-color: rgba(46, 91, 49, 0.35);
}

.ahg-condensed-nav__label {
  display: block;
  padding: 0.55rem 0.78rem 0.35rem;
  color: #607061;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ahg-condensed-nav__divider {
  height: 1px;
  margin: 0.35rem 0.4rem;
  background: rgba(46, 91, 49, 0.14);
}

.ahg-condensed-nav__mobile-toggle {
  display: none;
}

@media (max-width: 980px) {
  .ahg-condensed-nav {
    justify-content: flex-start;
    gap: 0.55rem;
  }

  .ahg-condensed-nav__desktop {
    display: none !important;
  }

  .ahg-condensed-nav__mobile-toggle {
    display: block;
    width: 100%;
  }

  .ahg-condensed-nav__mobile-toggle > summary {
    width: fit-content;
  }

  .ahg-condensed-nav__mobile-panel {
    margin-top: 0.55rem;
    width: min(100%, 420px);
    padding: 0.55rem;
    border: 1px solid rgba(46, 91, 49, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 50px rgba(31, 48, 33, 0.14);
  }

  .ahg-condensed-nav__mobile-panel a {
    display: block;
    padding: 0.72rem 0.78rem;
    border-radius: 12px;
  }

  .ahg-condensed-nav__mobile-panel a:hover {
    background: #eef7e9;
  }
}


/* Plant Care content update responsive tightening */
.ahg-condensed-nav__link,
.ahg-condensed-nav__summary {
  padding-left: 0.74rem;
  padding-right: 0.74rem;
}

@media (max-width: 1120px) {
  .ahg-global-menu-shell {
    width: min(1240px, calc(100% - 0.8rem));
  }

  .ahg-condensed-nav {
    gap: 0.32rem;
  }

  .ahg-condensed-nav__link,
  .ahg-condensed-nav__summary {
    padding-left: 0.62rem;
    padding-right: 0.62rem;
    font-size: 0.95rem;
  }
}


/* AtHomeGrower banner logo + Search Any Plant */

.ahg-home-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(180px, 20vw, 255px);
  min-width: 180px;
  text-decoration: none !important;
  border-radius: 999px;
  line-height: 0;
  filter: drop-shadow(0 10px 20px rgba(23, 53, 31, 0.16));
}

.ahg-home-logo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 999px;
}

.ahg-home-button {
  display: none !important;
}

.ahg-global-menu-shell {
  width: min(1320px, calc(100% - 1rem));
  gap: 0.7rem;
}

.ahg-global-search {
  position: relative;
  flex: 0 1 295px;
  min-width: 220px;
  order: 2;
}

.ahg-global-search__form {
  display: flex;
  align-items: center;
  width: 100%;
}

.ahg-global-search__input {
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(47, 111, 78, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #17351f;
  padding: 0.65rem 2.85rem 0.65rem 0.95rem;
  font-weight: 750;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.ahg-global-search__input:focus {
  border-color: rgba(47, 111, 78, 0.58);
  box-shadow: 0 0 0 4px rgba(47, 111, 78, 0.12);
}

.ahg-global-search__button {
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #2f6f4e;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.ahg-global-search__suggestions {
  display: none;
  position: absolute;
  z-index: 100000;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  background: #ffffff;
  border: 1px solid rgba(47, 111, 78, 0.18);
  border-radius: 1rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.ahg-global-search__suggestions[data-open="true"] {
  display: block;
}

.ahg-global-search__suggestion {
  display: grid;
  gap: 0.12rem;
  padding: 0.75rem 0.9rem;
  text-decoration: none !important;
  color: #17351f;
  border-bottom: 1px solid rgba(47, 111, 78, 0.08);
}

.ahg-global-search__suggestion:hover,
.ahg-global-search__suggestion[aria-selected="true"] {
  background: #f0fdf4;
}

.ahg-global-search__suggestion strong {
  font-size: 0.96rem;
}

.ahg-global-search__suggestion span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.ahg-condensed-nav {
  order: 3;
  flex: 1 1 auto;
}

.ahg-search-page {
  background: #faf8f1;
  min-height: 100vh;
  color: #1f2937;
}

.ahg-search-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.ahg-search-hero h1 {
  margin: 0;
  color: #17351f;
  font-size: clamp(2.2rem, 6vw, 4.65rem);
  line-height: 0.96;
}

.ahg-search-hero p {
  color: #64748b;
  line-height: 1.65;
  font-size: 1.05rem;
}

.ahg-search-large {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-top: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(47, 111, 78, 0.18);
  border-radius: 1.35rem;
  padding: 0.75rem;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.ahg-search-large input {
  border: 0;
  outline: 0;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 750;
  color: #17351f;
  padding: 0 0.85rem;
}

.ahg-search-large button {
  border: 0;
  border-radius: 999px;
  padding: 0 1.2rem;
  background: #2f6f4e;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.ahg-search-status {
  color: #52675a;
  font-weight: 850;
  margin: 1.25rem 0 0.75rem;
}

.ahg-search-result {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid rgba(47, 111, 78, 0.16);
  border-radius: 1.15rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ahg-search-result img {
  width: 94px;
  height: 94px;
  object-fit: cover;
  border-radius: 1rem;
  background: #f8fafc;
}

.ahg-search-result h2 {
  margin: 0;
  color: #17351f;
  font-size: 1.28rem;
}

.ahg-search-meta {
  color: #64748b;
  font-weight: 750;
  margin: 0.2rem 0 0.5rem;
}

.ahg-search-pages {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.ahg-search-page-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.62rem 0.75rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  text-decoration: none !important;
  color: #17351f;
  border: 1px solid rgba(47, 111, 78, 0.10);
}

.ahg-search-page-link:hover {
  background: #f0fdf4;
}

.ahg-search-page-link strong {
  font-weight: 900;
}

.ahg-search-page-link span {
  color: #64748b;
  font-size: 0.88rem;
}

.ahg-search-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
  font-size: 0.74rem;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .ahg-global-menu-shell {
    align-items: stretch;
  }

  .ahg-global-search {
    order: 2;
    width: 100%;
    flex-basis: auto;
  }

  .ahg-condensed-nav {
    order: 3;
  }
}

@media (max-width: 760px) {
  .ahg-home-logo {
    width: 220px;
  }

  .ahg-search-large {
    grid-template-columns: 1fr;
  }

  .ahg-search-large button {
    min-height: 48px;
  }

  .ahg-search-result {
    grid-template-columns: 1fr;
  }

  .ahg-search-result img {
    width: 100%;
    height: 180px;
  }
}


/* Final menu-button and caret overrides. */
.ahg-condensed-nav__link,
.ahg-condensed-nav__summary,
.ahg-global-search__input {
  background: #ffffff;
  color: #111827;
  border: 1.5px solid rgba(17, 24, 39, 0.82);
  border-radius: 999px;
}

.ahg-condensed-nav__link:hover,
.ahg-condensed-nav__summary:hover,
.ahg-condensed-nav__item[open] > .ahg-condensed-nav__summary {
  background: #f7faf4;
  border-color: #111827;
}

.ahg-condensed-nav__summary::after {
  content: "" !important;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.8;
  transform: translateY(1px);
}

.ahg-global-search__button {
  background: #111827;
  color: #ffffff;
}
