.wrap-latest-cart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.latest-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* pushes price to right edge */
  gap: 8px;
  font-size: 14px;
  padding: 4px 0;
}

.latest-cart-thumb {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

.latest-cart-name {
  flex: 1;
  /* take available space */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-cart-price {
  font-weight: 600;
  color: #333;
  margin-left: 8px;
}

/* ========== Top nav: menu & dropdowns ========== */
.nt-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  /* larger hover area */
}

.has-sub > .nt-link:hover {
  transform: none;
}

/* avoid jiggle on trigger */

.nt-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  /* no gap */
  display: none;
  flex-direction: column;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

.nt-item:hover .nt-submenu,
.nt-item:focus-within .nt-submenu,
.nt-submenu:hover {
  display: flex;
}

.nt-subitem {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.nt-subitem:hover {
  background: #f7f7f7;
}

/* ========== Left cluster (logo + menu) ========== */
.nt-left {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}

.nt-logo {
  height: 40px;
  width: auto;
  display: block;
}

.nt-menu {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nt-link {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nt-link:hover {
  color: #000;
  transform: scale(1.05);
}

.nt-link:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.1);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========== Middle (centered search) ========== */
.nt-middle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.nt-search {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.nt-search-input {
  height: 100%;
  padding: 0 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  width: 220px;
  max-width: 30vw;
  background: #fff;
  transition: width 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nt-search-input:focus {
  width: 280px;
  border-color: #bdbdbd;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
  outline: none;
}

/* ========== Right cluster (socials, cart, login) ========== */
.nt-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-wrap {
  position: relative;
  display: inline-block;
}

.nt-cart {
  position: relative;
  /* anchor point for badge */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: #222;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    transform 0.2s ease;
}

.cart-widget {
  position: absolute;
  top: 110%;
  right: 0;
  width: 300px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 2000;
}

.cart-widget::before {
  content: "";
  position: absolute;
  top: -6px;
  /* overlap slightly with the widget */
  right: 14px;
  /* adjust to point near the cart */
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #ddd;
  border-top: 1px solid #ddd;
  transform: rotate(45deg);
  box-shadow: -2px -2px 3px rgba(0, 0, 0, 0.05);
  z-index: -1;
  /* keeps it behind the widget so border radius still works */
}

.drop-it-cart:hover .cart-widget {
  display: block;
}

.cart-widget ul {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.cart-widget li {
  font-size: 14px;
  margin: 4px 0;
}

.view-cart-btn {
  display: inline-block;
  background: #222;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
}

.view-cart-btn:hover {
  background: #444;
}

.cart-count {
  font-family: "MyFont-Light";

  position: absolute;
  top: -8px;
  right: -8px;
  background: black;
  color: rgb(255, 255, 255);
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  /* perfect circle */
  display: flex;
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* horizontal center */
  z-index: 10;
}

.nt-cart:hover {
  transform: scale(1.05);
}

.nt-cart:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.1);
  outline-offset: 2px;
  border-radius: 8px;
}

.nt-login {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nt-login:hover {
  color: #000;
  transform: scale(1.05);
}

.nt-login:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.1);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Account dropdown (default hidden; JS may portal to <body>) */
.user-wrap {
  position: relative;
  display: inline-flex;
  /* flex instead of inline-block */
  align-items: center;
  /* vertical centering */
  height: 50px;
}

.user-menu {
  position: absolute;
  top: 100%;
  width: 250px;
  display: none;
  /* hidden by default */
  flex-direction: column;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 2000;
}

.user-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  /* place above menu */
  right: 16px;
  /* adjust to align with username */
  width: 21px;
  height: 21px;
  background: #fff;
  border-left: 1px solid #e5e5e5;
  border-top: 1px solid #e5e5e5;
  transform: rotate(45deg);
  /* makes it a diamond */
  z-index: -1;
  /* keep behind menu border */
}

.drop-it-user:hover .user-menu {
  display: flex;
}

.um-item {
  display: block;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  color: #222;
  background: #fff;
  border: 0;
  outline: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.um-item:hover {
  background: #f7f7f7;
}

.um-item:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.08);
  outline-offset: -2px;
}

.um-item.danger {
  color: #b00;
}

.um-item.danger:hover {
  background: #f6ecec;
}

/* ========== Responsive controls (burger, search icon, drawer) ========== */
.nt-burger,
.nt-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #222;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.nt-burger:hover,
.nt-search-btn:hover {
  background: #f7f7f7;
  border-color: #e5e5e5;
  transform: scale(1.03);
}

/* Drawer */
.nt-drawer[hidden] {
  display: none !important;
}

.nt-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 2147483645;
  display: block;
}

.nt-drawer[aria-hidden="true"] {
  display: none;
}

.nt-drawer-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(88vw, 360px);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nt-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.nt-drawer-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.nt-drawer-search {
  display: flex;
}

.nt-drawer-input {
  flex: 1;
  height: 38px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 15px;
}

/* Drawer container */
.nt-drawer-nav {
  display: flex;
  flex-direction: column;
}

/* Section headers */
.nt-drawer-nav summary {
  display: block;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
  color: #222;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.nt-drawer-nav summary::-webkit-details-marker {
  display: none;
}

/* Submenu links (indented) */
.nt-drawer-nav details > a {
  display: block;
  padding: 10px 24px;
  /* indent for children only */
  font-size: 14px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #f1f1f1;
}

.nt-drawer-nav details > a:hover {
  background: #f7f7f7;
}

/* Top-level links (no left indent) */
.nt-toplink {
  display: block;
  padding: 12px 10px;
  /* same as summary, no indent */
  font-weight: 600;
  font-size: 15px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

.nt-toplink:hover {
  background: #f7f7f7;
}

/* For AFFILIATE / CONTACT top-links */
.nt-acc.top-link summary {
  cursor: default;
  /* no expand behavior */
  padding: 12px 16px;
}

.nt-acc.top-link summary a {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: #222;
  text-decoration: none;
}

.nt-acc.top-link summary a:hover {
  background: #f7f7f7;
}

.nt-acc {
  padding: 2px 0;
}

.nt-acc > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 6px;
}

.nt-acc > summary::-webkit-details-marker {
  display: none;
}

.nt-acc[open] > summary {
  background: #f7f7f7;
}

.nt-acc > a {
  margin-left: 10px;
}

/* Drawer socials (hidden by default; drawer is hidden on desktop anyway) */
.nt-drawer-social {
  display: none;
  /* will show on small screens */
  gap: 10px;
  padding: 6px 0 8px;
}

.user-text {
  position: relative;
  display: inline-block;
  /* default length */
  --user-ch: 12ch;
  max-width: var(--user-ch);
  padding-right: 1.2em;
  /* space for chevron */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

/* Show arrow only when .has-arrow is present */
.user-text.has-arrow::after {
  content: "▾";
  position: absolute;
  right: 0.2em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  color: #666;
  transition: transform 0.2s ease, color 0.2s ease;
  pointer-events: none;
}

.user-wrap[aria-expanded="true"] .user-text.has-arrow::after {
  transform: translateY(-50%) rotate(180deg);
  color: #000;
}

.nt-drawer .user-wrap {
  width: 100%;
  height: auto;
}

.nt-drawer .nt-login {
  width: 100%;
  padding: 12px 10px;
}

.nt-drawer .user-menu {
  position: static;
  box-shadow: none;
  border-radius: 0;
  border: 0;
}

/* ========== USER INSIDE DRAWER ========== */
.nt-drawer .user-wrap {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column; /* 🔑 stack children */
  align-items: stretch;
}

/* Username row */
.nt-drawer .nt-login {
  width: 100%;
  padding: 12px 10px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Disable hover dropdown in drawer */
.nt-drawer .drop-it-user:hover .user-menu {
  display: none;
}

/* Drawer-style menu (collapsed by default) */
.nt-drawer .user-menu {
  position: static;
  display: none;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  width: 100%;
}

/* Expanded state */
.nt-drawer .user-wrap.is-open .user-menu {
  display: flex;
  flex-direction: column;
}

/* Menu items look like drawer links */
.nt-drawer .um-item {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
}

/* Arrow rotation */
.nt-drawer .user-text.has-arrow::after {
  transition: transform 0.2s ease;
}

.nt-drawer .user-wrap.is-open .user-text.has-arrow::after {
  transform: rotate(180deg);
}

@media (max-width: 400px) {
  .nt-left {
    gap: 10px;
  }
  .cart-widget {
    width: 260px;
  }
}

/* <= 500px: move socials into drawer; hide them from top bar */
@media (max-width: 500px) {
  /* Hide socials in the main right cluster */
  .nt-right .nt-social {
    display: none;
  }

  /* Show socials in the drawer */
  .nt-drawer-social {
    display: flex;
  }

  /* Slightly larger tap target for drawer socials */
  .nt-drawer-social .nt-social {
    width: 34px;
    height: 34px;
  }
}

/* ========== Breakpoint: mobile switch ========== */
@media (max-width: 1024px) {
  .user-text {
    max-width: none; /* remove char limit */
    overflow: visible; /* allow full text */
    text-overflow: unset; /* remove ellipsis */
    white-space: normal; /* allow wrapping */
    padding-right: 0; /* optional: remove arrow spacing */
  }

  .user-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .user-text.has-arrow::after {
    content: none;
  }
  .user-menu::before {
    content: none; /* completely disables the arrow */
  }

  .user-text {
    padding-right: 0;
  }

  #user-desktop-slot {
    display: none;
  }
  .nt-burger,
  .nt-search-btn {
    display: inline-flex;
  }

  /* show icons */
  .nt-menu {
    display: none;
  }

  /* hide desktop nav */
  .nt-middle {
    display: none;
  }

  /* hide center search */
  .nt-right {
    gap: 8px;
  }

  /* tighter spacing */
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  .nt-link,
  .nt-cart,
  .nt-login,
  .nt-social,
  .nt-burger,
  .nt-search-btn {
    transition: none;
  }

  .nt-link:hover,
  .nt-cart:hover,
  .nt-login:hover,
  .nt-social:hover {
    transform: none;
  }
}
