/* ── NexCove site header ─────────────────────────────────────
   Scoped under .nxc-header-wrap. Hooked in via `avada_render_header`,
   replacing Avada's default header content only — wrapper markup,
   page-title bar and Fusion Builder plumbing are untouched.          */

.nxc-header-wrap {
  --nx-amber:   #ffb01f;
  --nx-pink:    #ff4880;
  --nx-magenta: #d022d4;
  --nx-gradient: linear-gradient(135deg, #ffb01f 0%, #ff4880 52%, #d022d4 100%);
  --nx-pink-ink: #e0206e;
  --nx-magenta-ink: #a614a9;
  --nx-navy: #241338;
  --nx-ink: #241338;
  --nx-muted: #6b5c78;
  --nx-line: #e7e1ec;
  --nx-bg-alt: #faf7fb;
  --nx-radius: 8px;
  --nx-shadow: 0 2px 10px rgba(36, 19, 56, .1);

  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--nx-ink);
  line-height: 1.3;
}

.nxc-header-wrap p { margin: 0; line-height: inherit; }

.nxc-header-wrap *,
.nxc-header-wrap *::before,
.nxc-header-wrap *::after { box-sizing: border-box; }

.nxc-header-wrap [hidden] { display: none !important; }
.nxc-header-wrap img { max-width: 100%; display: block; }
.nxc-header-wrap a { color: inherit; }
.nxc-header-wrap button { font: inherit; cursor: pointer; }
.nxc-header-wrap :focus-visible { outline: 3px solid var(--nx-magenta-ink); outline-offset: 2px; }

.nxc-header-wrap .visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.nxc-header-wrap .nxc-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ── Promo strip ──────────────────────────────────────────── */
.nxc-promo-strip {
  background: var(--nx-gradient); color: #fff; text-align: center;
  font-size: 13px; padding: 9px 16px; font-weight: 500;
}

/* ── Header ───────────────────────────────────────────────── */
.nxc-site-header { border-bottom: 1px solid var(--nx-line); background: #fff; }

.nxc-site-header > .nxc-header-inner {
  display: flex; align-items: center;
  padding: 5px 20px;
  gap: 100px;
}

.nxc-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  text-decoration: none; flex: none; line-height: 1;
}
.nxc-logo img { width: 40px; height: auto; }
.nxc-logo span {
  background: var(--nx-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--nx-magenta-ink);
}

.nxc-search { position: relative; flex: 1; max-width: 560px; }
.nxc-search input {
  width: 100%; padding: 13px 20px 13px 46px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 14px; line-height: 1.3; background: var(--nx-bg-alt);
  box-shadow: 0 1px 2px rgba(36, 19, 56, .06);
  transition: box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.nxc-search input:hover { background: #fff; box-shadow: 0 2px 6px rgba(36, 19, 56, .08); }
.nxc-search input:focus {
  background: #fff; border-color: var(--nx-magenta);
  box-shadow: 0 0 0 4px rgba(208, 34, 212, .14);
  outline: none;
}
.nxc-search input:focus-visible { outline: none; }
.nxc-search-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; fill: none; stroke: var(--nx-muted);
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}

.nxc-header-actions { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nxc-icon-btn {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; text-decoration: none; font-size: 11px;
  line-height: 1; color: var(--nx-navy); background: none; border: 0; padding: 0;
}
.nxc-icon-btn svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nxc-icon-btn[aria-pressed="true"] svg { fill: var(--nx-pink); stroke: var(--nx-pink); }
.nxc-bag-count {
  position: absolute; top: -4px; right: -8px; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--nx-gradient); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px;
}

/* ── Mobile nav toggle ────────────────────────────────────── */
.nxc-nav-toggle {
  display: none; flex: none; width: 36px; height: 36px; margin-right: 4px;
  border: 0; background: none; padding: 0; align-items: center; justify-content: center;
  color: var(--nx-navy);
}
.nxc-nav-toggle svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}

/* ── Main nav ─────────────────────────────────────────────── */
.nxc-main-nav { background: var(--nx-navy); }
.nxc-main-nav ul.nxc-wrap {
  display: flex; gap: 4px; list-style: none; margin: 0 auto;
  overflow-x: auto; scrollbar-width: none;
}
.nxc-main-nav ul.nxc-wrap::-webkit-scrollbar { display: none; }
.nxc-main-nav li { list-style: none; }
.nxc-main-nav a {
  position: relative; display: block; padding: 14px 16px; color: #fff;
  text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.nxc-main-nav a:hover,
.nxc-main-nav .current-menu-item > a,
.nxc-main-nav .current-menu-parent > a,
.nxc-main-nav .current-menu-ancestor > a { background: #33194d; }
.nxc-main-nav a:hover::after,
.nxc-main-nav .current-menu-item > a::after,
.nxc-main-nav .current-menu-parent > a::after,
.nxc-main-nav .current-menu-ancestor > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: var(--nx-gradient);
}
.nxc-main-nav .nxc-sale-item > a { background: var(--nx-gradient); }
.nxc-main-nav .nxc-sale-item > a::after { content: none; }
.nxc-main-nav .nxc-sale-item > a:hover { filter: brightness(1.08); }

.nxc-finance-banner {
  background: #f53f92; color: #fff; text-align: center;
  padding: 10px 16px; font-size: 13px;
}
.nxc-finance-banner p { margin: 0; }
.nxc-finance-banner span { opacity: .8; }

/* ── Live search results (Avada's avada-live-search.js) ───── */
.nxc-search .fusion-search-results-wrapper {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: #fff; border: 1px solid var(--nx-line); border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow); max-height: 420px; overflow-y: auto; display: none;
}
.nxc-search .fusion-search-results.suggestions-added { display: block; }
.nxc-search .fusion-search-result {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  text-decoration: none; color: var(--nx-ink); border-bottom: 1px solid var(--nx-line);
}
.nxc-search .fusion-search-result:last-child { border-bottom: 0; }
.nxc-search .fusion-search-result:hover { background: var(--nx-bg-alt); }
.nxc-search .fusion-search-image { flex: none; width: 40px; height: 40px; border-radius: 6px; overflow: hidden; }
.nxc-search .fusion-search-image img { width: 100%; height: 100%; object-fit: cover; }
.nxc-search .fusion-search-content { min-width: 0; }
.nxc-search .fusion-search-post-title {
  font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nxc-search .fusion-search-post-type { font-size: 11px; color: var(--nx-muted); }
.nxc-search .fusion-slider-loading {
  display: none; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px;
  margin-top: -8px; border: 2px solid var(--nx-line); border-top-color: var(--nx-magenta);
  border-radius: 50%; animation: nxc-spin .6s linear infinite;
}
.nxc-search .fusion-search-submit { position: absolute; width: 1px; height: 1px; overflow: hidden; }
@keyframes nxc-spin { to { transform: rotate(360deg); } }

/* ── Cart drawer ──────────────────────────────────────────── */
.nxc-drawer-overlay {
  position: fixed; inset: 0; z-index: 100001; background: rgba(36, 19, 56, .45);
  opacity: 0; transition: opacity .25s ease;
}
.nxc-drawer-overlay.is-visible { opacity: 1; }

.nxc-cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100002;
  width: min(420px, 100vw); background: #fff; box-shadow: var(--nx-shadow);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .3s ease;
}
.nxc-cart-drawer.is-open { transform: translateX(0); }

/* Avada's floating "back to top" button (#toTop) uses the same
   z-index:100000 our drawer used to; as a later DOM sibling it would win
   the tie and paint over the drawer. Hide it outright while the drawer's
   open — a scroll-to-top control behind a modal panel serves no purpose. */
body.nxc-drawer-open #toTop { display: none !important; }

/* The WP admin bar is position:fixed with z-index:99999, so on top of it
   our drawer needs both a higher z-index (above) and a top offset to clear
   it (otherwise the admin bar visually clips the drawer's own header). */
body.admin-bar .nxc-cart-drawer { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .nxc-cart-drawer { top: 46px; }
}

.nxc-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; flex: none;
  border-bottom: 3px solid; border-image: var(--nx-gradient) 1;
}
.nxc-drawer-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.nxc-drawer-close {
  width: 32px; height: 32px; border-radius: 999px; border: 0; background: var(--nx-bg-alt);
  display: grid; place-items: center;
}
.nxc-drawer-close svg { width: 18px; height: 18px; fill: none; stroke: var(--nx-ink); stroke-width: 2; stroke-linecap: round; }

/* flex column so a short item list doesn't leave a dead gap below the
   subtotal/buttons — the list itself absorbs the extra space and scrolls
   if there are many items, while the total/buttons stay pinned right
   after it instead of floating with empty space trailing beneath. */
.nxc-drawer-body { flex: 1; min-height: 0; padding: 8px 20px 20px; display: flex; flex-direction: column; }
.nxc-drawer-body .widget_shopping_cart_content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nxc-drawer-body .woocommerce-mini-cart__empty-message { font-size: 14px; color: var(--nx-muted); margin-top: 20px; }

.nxc-drawer-body ul.woocommerce-mini-cart {
  flex: 1; min-height: 0; overflow-y: auto;
  list-style: none; margin: 0; padding: 0;
}
.nxc-drawer-body .woocommerce-mini-cart-item {
  position: relative; padding: 16px 0; border-bottom: 1px solid var(--nx-line);
}
.nxc-drawer-body .woocommerce-mini-cart-item > a:not(.remove) {
  display: flex; align-items: center; gap: 12px; padding-right: 26px;
  font-size: 14px; font-weight: 600; line-height: 1.3;
  text-decoration: none; color: var(--nx-ink);
}
.nxc-drawer-body .woocommerce-mini-cart-item img {
  width: 56px; height: 56px; object-fit: cover; border-radius: var(--nx-radius);
  border: 1px solid var(--nx-line); flex: none;
}
.nxc-drawer-body .woocommerce-mini-cart-item .quantity {
  display: block; margin: 6px 0 0 68px; font-size: 13px; line-height: 1.3; color: var(--nx-muted);
}
.nxc-drawer-body .woocommerce-mini-cart-item .remove {
  position: absolute; top: 16px; right: 0; width: 24px; height: 24px; line-height: 22px;
  text-align: center; text-decoration: none; color: var(--nx-muted); font-size: 20px; font-weight: 300;
}
.nxc-drawer-body .woocommerce-mini-cart-item .remove:hover { color: var(--nx-pink); }

.nxc-drawer-body .woocommerce-mini-cart__total {
  display: flex; justify-content: space-between; font-size: 15px; font-weight: 700;
  padding: 16px 0; margin: 0;
}
.nxc-drawer-body .woocommerce-mini-cart__buttons {
  display: flex; gap: 10px; margin: 0;
}
.nxc-drawer-body .woocommerce-mini-cart__buttons a {
  /* Avada's generic ".buttons a" rule (WooCommerce's <p> here carries both
     .woocommerce-mini-cart__buttons AND .buttons) sets a fixed height:35px,
     float:left and text-indent:10px — none of which we declared, so they
     went through unchallenged and squeezed the text past the box. */
  flex: 1 !important; width: auto !important; float: none !important;
  height: auto !important; min-height: 48px; box-sizing: border-box !important;
  display: flex !important; align-items: center; justify-content: center;
  text-decoration: none; text-indent: 0 !important; padding: 14px 16px; line-height: 1.2 !important;
  border-radius: var(--nx-radius); font-size: 14px; font-weight: 700;
}
.nxc-drawer-body .woocommerce-mini-cart__buttons a::before { content: none !important; display: none !important; }
.nxc-drawer-body .woocommerce-mini-cart__buttons a.wc-forward:not(.checkout) {
  border: 1px solid var(--nx-line); color: var(--nx-ink);
}
.nxc-drawer-body .woocommerce-mini-cart__buttons a.checkout {
  background: var(--nx-gradient); color: #fff;
}

/* ── Toast ────────────────────────────────────────────────── */
.nxc-header-wrap .nxc-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--nx-navy); color: #fff; padding: 13px 20px;
  border-left: 4px solid var(--nx-pink);
  border-radius: var(--nx-radius); box-shadow: var(--nx-shadow);
  font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 100;
}
.nxc-header-wrap .nxc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Explicit 3-column grid — hamburger / centered logo / icons — so the
     desktop gap:100px never has a chance to blow the row out. Search
     drops to its own full-width row underneath. */
  .nxc-site-header > .nxc-header-inner {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
  }
  .nxc-nav-toggle { grid-row: 1; grid-column: 1; margin-right: 0; }
  .nxc-logo { grid-row: 1; grid-column: 2; justify-self: center; }
  .nxc-header-actions { grid-row: 1; grid-column: 3; justify-self: end; margin-left: 0; gap: 16px; }
  .nxc-search {
    grid-row: 2; grid-column: 1 / -1; order: initial; flex-basis: auto; max-width: none;
  }

  .nxc-nav-toggle { display: flex; }

  .nxc-main-nav { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .nxc-main-nav.is-open { max-height: 70vh; overflow-y: auto; }

  .nxc-main-nav ul.nxc-wrap {
    flex-direction: column; gap: 0; overflow-x: visible; padding: 6px 0;
  }
  .nxc-main-nav a { padding: 12px 20px; }
  .nxc-main-nav a::after,
  .nxc-main-nav .current-menu-item > a::after,
  .nxc-main-nav .current-menu-parent > a::after { display: none; }
  .nxc-main-nav .current-menu-item > a,
  .nxc-main-nav .current-menu-parent > a { border-left: 3px solid var(--nx-pink); }
  .nxc-main-nav .nxc-sale-item { margin: 0 20px 8px; border-radius: var(--nx-radius); overflow: hidden; }
  .nxc-main-nav .nxc-sale-item > a { padding: 10px 16px; }
}

@media (max-width: 640px) {
  .nxc-logo { font-size: 24px; }
  .nxc-icon-btn span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nxc-header-wrap * { transition: none !important; animation: none !important; }
}
