/* header.css — split from the storefront stylesheet, same rules and order */
/* App-style sticky shop bar */
.nm-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid #ececec;
  box-shadow: 0 1px 8px rgba(17, 17, 17, 0.06);
}

.nm-bar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas:
    "brand location location location"
    "search search account cart";
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px 6px;
}

.nm-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
}

.nm-logo {
  height: 32px;
  width: auto;
  display: block;
}

.nm-location {
  grid-area: location;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  border: 0;
  background: transparent;
  color: #222;
  text-align: left;
  padding: 0;
  max-width: 190px;
}

.nm-search {
  grid-area: search;
}

.nm-account {
  grid-area: account;
}

.nm-cart {
  grid-area: cart;
}

.nm-location svg {
  flex: 0 0 auto;
  color: #6BB252;
}

.nm-location-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 100px;
  text-wrap: balance;
}

.nm-location small {
  color: #777;
  font-size: 11px;
}

.nm-location strong {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #9a9a9a;
  font-size: 14px;
  text-decoration: none;
}

.nm-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nm-search:focus-within {
  border-color: #6BB252;
}

.nm-search svg {
  color: #777;
  flex: 0 0 auto;
}

.nm-search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  font-size: 14px;
  color: #222;
}

.nm-search input::placeholder {
  color: #9a9a9a;
}

.nm-search {
  position: relative;
}

.nm-suggest {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  overflow: hidden;
}

.nm-suggest a {
  display: block;
  padding: 8px 12px;
  color: #6BB252;
  font-size: 14px;
}

.nm-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 36px;
  color: #222;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
}

.nm-tool span {
  display: none;
}

.nm-tool:hover {
  color: #6BB252;
}

.nm-cats {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 8px;
  border-top: 1px solid #e4e4e4;
  scrollbar-width: none;
}

.nm-cats::-webkit-scrollbar {
  display: none;
}

.nm-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 4px;
  min-width: 68px;
  padding: 8px 10px 7px;
  color: #555;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  background: transparent;
  white-space: nowrap;
  transition: padding 0.25s ease, gap 0.25s ease, color 0.2s ease;
}

.nm-cat-icon {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  color: #444;
  opacity: 1;
  overflow: hidden;
  flex: 0 0 auto;
  transition: height 0.28s ease, opacity 0.2s ease, margin 0.28s ease, color 0.2s ease;
}

.nm-cat.is-active {
  color: #111;
  font-weight: 800;
  background: transparent;
  border-bottom-color: #111;
}

.nm-cat.is-active .nm-cat-icon {
  color: #111;
}

.nm-header.is-compact .nm-cat {
  flex-direction: row;
  gap: 0;
  min-width: 0;
  padding: 9px 14px 8px;
}

.nm-header.is-compact .nm-cat-icon {
  height: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

#categories,
#for-you {
  scroll-margin-top: 128px;
}

@media (min-width: 992px) {
  .nm-bar {
    grid-template-columns: auto minmax(160px, 220px) minmax(280px, 1fr) auto auto;
    grid-template-areas: "brand location search account cart";
    gap: 18px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px 8px;
  }

  .nm-logo {
    height: 38px;
  }

  .nm-location {
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .nm-location-copy {
    min-width: 0;
    overflow: hidden;
  }

  .nm-location small,
  .nm-location strong {
    display: block;
    max-width: 100%;
  }

  .nm-location small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nm-location strong {
    max-width: 15ch;
    font-size: 13px;
  }

  .nm-search {
    height: 42px;
    border-radius: 10px;
  }

  .nm-tool {
    flex-direction: row;
    gap: 8px;
    min-width: auto;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 4px;
  }

  .nm-tool span {
    display: inline;
  }

  .nm-cats {
    max-width: 1280px;
    margin: 0 auto;
    justify-content: space-between;
    overflow: visible;
    padding: 0 12px;
    gap: 8px;
  }

  .nm-cat {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 6px 8px;
  }

  .nm-header.is-compact .nm-cat {
    padding: 10px 8px 9px;
  }

  #categories,
  #for-you {
    scroll-margin-top: 150px;
  }
}

.nm-drawer {
  width: min(400px, 100vw);
  --nm-cart-green: #4f9138;
}

.nm-drawer .offcanvas-header {
  padding: 18px 20px;
  border-bottom: 1px solid #e8eee4;
  background: #fbfdf9;
}

.nm-drawer h2 {
  margin: 0;
  color: #6BB252;
  font-size: 1.15rem;
}

.nm-drawer-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--nm-cart-green, #4f9138);
  color: #fff;
  font-size: 0.78rem;
}

.nm-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0 4px;
  list-style: none;
}

.nm-drawer-list > li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  padding: 16px 2px;
  border-bottom: 1px solid #e9eee6;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.nm-drawer-list .nm-strip {
  width: 100%;
  margin-top: 8px;
}

.nm-drawer-list .nm-combo {
  margin-top: 6px;
  padding-top: 6px;
}

.nm-drawer-list .nm-combo li {
  display: block;
  padding: 2px 0;
  border: 0;
  color: #747474;
  font-size: 0.78rem;
  line-height: 1.35;
}

.nm-drawer-list li[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.nm-drawer-list > li > img {
  grid-row: span 2;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid #edf0ea;
  border-radius: 12px;
  background: #fafbf9;
}

.nm-drawer-placeholder {
  display: grid;
  grid-row: span 2;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid #edf0ea;
  border-radius: 12px;
  background: #fafbf9;
  font-size: 1.4rem;
}

.nm-drawer-item-info {
  min-width: 0;
}

.nm-drawer-list strong,
.nm-drawer-item-info > span {
  display: block;
}

.nm-drawer-list strong {
  color: #263526;
  font-size: 0.92rem;
  line-height: 1.35;
}

.nm-drawer-list span {
  color: #747e70;
  font-size: 0.8rem;
}

.nm-drawer-price {
  margin-top: 4px;
  color: #263526 !important;
  font-size: 0.9rem !important;
  font-weight: 700;
}

.nm-drawer-item-actions {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.nm-drawer-qty {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dce5d7;
  border-radius: 9px;
  background: #fff;
}

.nm-drawer-qty button {
  width: 34px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--nm-cart-green);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.nm-drawer-qty button:hover {
  background: #f1f7ed;
}

.nm-drawer .nm-drawer-remove {
  width: auto;
  height: 32px;
  padding: 0 6px;
  color: #8b5148;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.nm-drawer-qty button:focus-visible,
.nm-drawer-remove:focus-visible {
  outline: 2px solid #6BB252;
  outline-offset: 2px;
}

.nm-drawer-qty span {
  min-width: 28px;
  color: #263526;
  font-weight: 700;
  text-align: center;
}

.nm-drawer-total {
  display: flex;
  justify-content: space-between;
  margin: 20px 4px 14px;
  padding-top: 14px;
  border-top: 1px solid #e9eee6;
  color: #263526;
  font-size: 1rem;
}

.nm-drawer-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 10px;
  background: var(--nm-cart-green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(48, 96, 35, 0.16);
  transition: background-color 150ms ease, transform 150ms ease;
}

.nm-drawer-checkout:hover {
  background: #427d2e;
  color: #fff;
  transform: translateY(-1px);
}

.nm-drawer-feedback {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #a34a3d;
  font-size: 0.82rem;
}

.nm-drawer-empty {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  color: #263526;
  text-align: center;
}

.nm-drawer-empty > span {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #f2f7ef;
  font-size: 1.8rem;
}

.nm-drawer-empty strong {
  font-size: 1.05rem;
}

.nm-drawer-empty p {
  max-width: 230px;
  margin: 6px 0 16px;
  color: #747e70;
  font-size: 0.88rem;
}

.nm-drawer-empty a {
  padding: 9px 14px;
  border: 1px solid #cbdcc2;
  border-radius: 9px;
  color: var(--nm-cart-green);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.nm-drawer-empty a:hover {
  background: #f2f7ef;
}
