/* NFB header polish — desktop enhancements only; mobile/tablet keep theme system */

.nfb-site-header {
  --nfb-ink: #062334;
  --nfb-green: #0f5c3b;
  --nfb-green-soft: rgba(15, 92, 59, .1);
  --nfb-line: rgba(6, 35, 52, .08);
}

/* Top bar: light polish, keep original layout */
.nfb-site-header .tg-header__top {
  background: linear-gradient(90deg, #083d28 0%, #0f5c3b 60%, #127a4d 100%);
}

.nfb-site-header .tg-header__top-info li,
.nfb-site-header .tg-header__top-info li a,
.nfb-site-header .tg-header__top-social li {
  color: rgba(255, 255, 255, .9);
}

.nfb-site-header .tg-header__top .nice-select {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

.nfb-site-header .tg-header__top .nice-select .current {
  color: #fff;
}

/* Sticky main bar */
.nfb-site-header #sticky-header.tg-header__area {
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--nfb-line);
  box-shadow: 0 6px 22px rgba(6, 35, 52, .04);
}

.nfb-site-header #sticky-header.sticky-menu {
  box-shadow: 0 10px 30px rgba(6, 35, 52, .08);
}

/* ===== Desktop / XL only: compact modern nav ===== */
@media (min-width: 1200px) {
  .nfb-site-header .tgmenu__nav {
    align-items: center;
  }

  .nfb-site-header .tgmenu__nav .logo img {
    max-height: 48px;
    width: auto;
  }

  .nfb-site-header .tgmenu__main-menu .navigation {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 4px;
    background: rgba(6, 35, 52, .035);
    border: 1px solid var(--nfb-line);
    border-radius: 999px;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li {
    margin: 0 !important;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px !important;
    margin: 0 !important;
    border-radius: 999px;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--nfb-ink) !important;
    line-height: 1 !important;
    transition: background .2s ease, color .2s ease;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li > a::before {
    display: none !important;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li:hover > a,
  .nfb-site-header .tgmenu__main-menu .navigation > li.active > a {
    background: var(--nfb-green);
    color: #fff !important;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li .sub-menu {
    border-radius: 14px !important;
    border: 1px solid var(--nfb-line) !important;
    box-shadow: 0 16px 36px rgba(6, 35, 52, .12) !important;
    padding: 8px !important;
    min-width: 200px;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li .sub-menu li a {
    border-radius: 10px;
    font-size: 13px !important;
    font-weight: 600;
    padding: 10px 12px !important;
  }

  .nfb-site-header .tgmenu__main-menu .navigation > li .sub-menu li a:hover {
    background: var(--nfb-green-soft);
    color: var(--nfb-green) !important;
  }

  .nfb-site-header .tgmenu__action .cart-count {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--nfb-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
  }

  .nfb-site-header .tgmenu__search-form {
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--nfb-line);
    background: #f7fbf8;
  }
}

/* Large desktop: slightly tighter labels when many items */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .nfb-site-header .tgmenu__main-menu .navigation > li > a {
    padding: 0 10px !important;
    font-size: 12.5px !important;
  }
}

/* ===== Tablet & mobile: do NOT override theme menu mechanics ===== */
@media (max-width: 1199.98px) {
  /* Keep original Skillgro mobile drawer behavior.
     Only soft color accents — no width/position/overflow changes. */
  .nfb-site-header .tgmobile__menu .navigation li > a {
    font-weight: 700;
  }

  .nfb-site-header .tgmobile__menu .navigation li.active > a {
    color: var(--nfb-green);
  }

  .nfb-site-header .mobile_menu_login li a {
    color: var(--nfb-green);
    font-weight: 700;
  }

  .nfb-site-header .tgmobile__menu .close-btn:hover {
    color: var(--nfb-green);
  }
}

/* Small phones: top bar can stay as theme decides */
@media (max-width: 991.98px) {
  .nfb-site-header .tg-header__top-info li span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }
}

/* Website layout mode: fullwide (default) vs boxed — controlled from Site Themes */
.nfb-site-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

body.nfb-layout-fullwide .nfb-site-shell {
  max-width: none;
}

@media (min-width: 1200px) {
  body.nfb-layout-boxed {
    background:
      radial-gradient(ellipse 70% 40% at 50% 0%, rgba(15, 92, 59, 0.08), transparent 60%),
      #e8efeb;
  }

  body.nfb-layout-boxed .nfb-site-shell {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(6, 35, 52, 0.06), 0 18px 60px rgba(6, 35, 52, 0.1);
    overflow: clip;
  }

  /* Keep fixed sticky header aligned to the boxed shell */
  body.nfb-layout-boxed .nfb-site-header #sticky-header.sticky-menu {
    width: min(1400px, 100%);
    left: max(0px, calc((100vw - 1400px) / 2));
    right: auto;
  }
}

@media (max-width: 1199.98px) {
  /* Mobile/tablet always stay full width for usability */
  body.nfb-layout-boxed .nfb-site-shell {
    max-width: none;
    box-shadow: none;
  }
}
