/* ==========================================================================
   Ecohardwood - site header (Figma design), used on ALL pages.
   Markup: templates/header_v4.php. Scoped under .nd / nd- classes so it
   cannot clash with the old /media/css/style.css.
   ========================================================================== */
@font-face { font-family: "ND Museo Sans"; font-weight: 300; font-display: swap;
  src: url("/media/fonts/MuseoSans-300.woff2") format("woff2"), url("/media/fonts/MuseoSans-300.woff") format("woff"); }
@font-face { font-family: "ND Museo Sans"; font-weight: 500; font-display: swap;
  src: url("/media/fonts/MuseoSans-500.woff2") format("woff2"), url("/media/fonts/MuseoSans-500.woff") format("woff"); }

.nd.nd-header-wrap {
  --primary-text: #202020; --secondary-text: #4d4d4d; --dark-grey: #4d4d4d; --light-grey: #c7c7c5; --green: #638a57; --white: #fff;
  --font: "ND Museo Sans", "Museo Sans 300", system-ui, sans-serif;
  --w-light: 300; --w-medium: 500; --page-max: 1440px; --gutter: 64px;
  /* sticky */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--white);
  font-family: var(--font);
  font-weight: var(--w-light);
  line-height: 1.5;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  transition: box-shadow .2s ease;
}
.nd.nd-header-wrap.is-scrolled { box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.nd.nd-header-wrap *, .nd.nd-header-wrap *::before, .nd.nd-header-wrap *::after { box-sizing: border-box; }
.nd.nd-header-wrap a { color: inherit; text-decoration: none; }
.nd.nd-header-wrap img { display: block; max-width: 100%; height: auto; border: 0; }
.nd.nd-header-wrap ul { margin: 0; padding: 0; list-style: none; }
.nd.nd-header-wrap [hidden] { display: none !important; }
.nd.nd-header-wrap .nd-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nd.nd-header-wrap .nd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 20px; font-size: 14px; line-height: 26px; font-weight: var(--w-medium);
  font-family: var(--font); white-space: nowrap; transition: background-color .2s ease;
}
.nd.nd-header-wrap .nd-btn--green { background: var(--green); color: var(--white); }
.nd.nd-header-wrap .nd-btn--green:hover { background: #557a4a; color: var(--white); }
.nd.nd-header-wrap .nd-btn--outline { background: var(--white); border: 1px solid var(--dark-grey); color: var(--dark-grey); padding: 6px 19px; }
.nd.nd-header-wrap .nd-btn--outline:hover { background: var(--dark-grey); color: var(--white); }

/* --- Header layout --- */

.nd .nd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px var(--gutter);
  background: var(--white);
}
.nd .nd-header__logo { position: relative; display: block; flex-shrink: 0; width: 139px; height: 70px; overflow: hidden; }
/* Figma crops the padded logo file inside a 139x70 frame */
.nd .nd-header__logo img { position: absolute; left: -10.76%; top: -28.75%; width: 121.82%; height: 156.25%; max-width: none; }
.nd .nd-header__right { display: flex; align-items: center; gap: 24px; }
.nd .nd-nav { display: flex; gap: 12px; }
.nd .nd-nav a { font-size: 14px; line-height: 26px; font-weight: var(--w-medium); color: var(--secondary-text); }
.nd .nd-nav a:hover { color: var(--green); }
.nd .nd-header__icons { display: flex; align-items: center; gap: 16px; }
.nd .nd-header .nd-icon-link { display: block; }
.nd .nd-header__icons .nd-icon-link img { width: 26px; height: 26px; }
.nd .nd-header__mobile { display: none; align-items: center; gap: 16px; }
.nd .nd-header__mobile img { width: 24px; height: 24px; }
.nd .nd-search { display: flex; gap: 12px; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter) 24px; }
.nd .nd-search[hidden] { display: none; }
.nd .nd-search input {
  flex: 1; min-width: 0; height: 40px; margin: 0; padding: 0 12px;
  border: 1px solid var(--light-grey); border-radius: 0; background: var(--white);
  font: var(--w-light) 16px var(--font); color: var(--primary-text);
}
.nd .nd-search .nd-btn { border: 0; cursor: pointer; }
@media (max-width: 1100px) {
  .nd .nd-header__right { display: none; }
  .nd .nd-header__mobile { display: flex; }
}
@media (max-width: 767px) {
  .nd .nd-header { height: 72px; padding: 0 var(--gutter); }
  .nd .nd-header__logo { width: 79px; height: 40px; }
  .nd .nd-header__logo img { left: -10.91%; top: -27.5%; width: 120.36%; height: 154.38%; }
}

/* --- Drop-down menus (same CMS items as the old header) --- */
.nd .nd-nav__item { position: relative; }
.nd .nd-nav__item > a { display: block; }
.nd .nd-nav__item--has-sub > a::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0 3px 6px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg);
}
.nd .nd-nav__sub {
  position: absolute; top: 100%; left: -16px; z-index: 10;
  min-width: 260px; padding: 12px 0 !important; margin-top: 12px !important;
  background: var(--white); box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.nd .nd-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge */
.nd .nd-nav__item:hover > .nd-nav__sub,
.nd .nd-nav__item:focus-within > .nd-nav__sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nd .nd-nav__sub li { display: block; }
.nd .nd-nav__sub a { display: block; padding: 6px 16px; font-size: 14px; line-height: 22px; font-weight: var(--w-light); color: var(--secondary-text); white-space: nowrap; }
.nd .nd-nav__sub a:hover { color: var(--green); background: #f6f4f2; }

/* --- Mobile / tablet menu (<=1100px): panel under the sticky header --- */
.nd .nd-menu-btn { position: relative; padding: 0; margin: 0; background: none; border: 0; cursor: pointer; }
.nd .nd-menu-btn[aria-expanded="true"] img { visibility: hidden; }
.nd .nd-menu-btn__close { display: none; }
.nd .nd-menu-btn[aria-expanded="true"] .nd-menu-btn__close { display: block; position: absolute; inset: 0; }
.nd .nd-menu-btn__close::before, .nd .nd-menu-btn__close::after {
  content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.5px; background: var(--primary-text);
}
.nd .nd-menu-btn__close::before { transform: rotate(45deg); }
.nd .nd-menu-btn__close::after { transform: rotate(-45deg); }
.nd .nd-mobile-menu {
  max-height: calc(100vh - 118px); max-height: calc(100dvh - 118px); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 var(--gutter) 32px; border-top: 1px solid #eee; background: var(--white);
}
@media (max-width: 767px) { .nd .nd-mobile-menu { max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); } }
@media (min-width: 1101px) { .nd .nd-mobile-menu { display: none !important; } }
html.nd-menu-open { overflow: hidden; }
.nd .nd-mobile-menu__item { border-bottom: 1px solid #eee; }
.nd .nd-mobile-menu__row { display: flex; align-items: center; justify-content: space-between; }
.nd .nd-mobile-menu__row a { flex: 1; padding: 14px 0; font-size: 18px; line-height: 26px; font-weight: var(--w-medium); color: var(--primary-text); }
.nd .nd-mobile-menu__toggle {
  flex: 0 0 48px; height: 48px; margin-right: -12px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--secondary-text);
}
.nd .nd-mobile-menu__toggle::after {
  content: ""; display: block; width: 9px; height: 9px; margin: -4px auto 0;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease;
}
.nd .nd-mobile-menu__toggle[aria-expanded="true"]::after { margin-top: 4px; transform: rotate(-135deg); }
.nd .nd-mobile-menu__sub { padding: 0 0 12px !important; }
.nd .nd-mobile-menu__sub a { display: block; padding: 7px 0 7px 16px; font-size: 15px; line-height: 22px; color: var(--secondary-text); }
.nd .nd-mobile-menu__sub a:hover, .nd .nd-mobile-menu__row a:hover { color: var(--green); }
.nd .nd-mobile-menu__footer { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 24px; }
.nd .nd-mobile-menu__footer .nd-btn { align-self: stretch; padding-block: 10px; font-size: 16px; }
.nd .nd-mobile-menu__contact { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 24px; color: var(--secondary-text); }
.nd .nd-mobile-menu__contact img { width: 22px; height: 22px; }
.nd .nd-mobile-menu__contact .nd-basket__count { position: static; display: inline-block; }

/* --- Samples / products basket icons --- */
.nd .nd-basket { position: relative; }
.nd .nd-basket svg { display: block; width: 26px; height: 26px; }
.nd .nd-header__mobile .nd-basket svg { width: 24px; height: 24px; }
.nd .nd-basket__count {
  position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--green); color: var(--white);
  font-size: 10px; line-height: 16px; font-weight: var(--w-medium); text-align: center;
}

@media (max-width: 1280px) { .nd.nd-header-wrap { --gutter: 40px; } }
@media (max-width: 767px)  { .nd.nd-header-wrap { --gutter: 24px; } }

/* Old floating "Free Samples / Get a Quote" badge (footer.php, inner pages): its buttons sit 80px
   above the anchor; move it below the taller sticky header (118px) on desktop. Mobile (<=800px) keeps the bottom bar. */
@media only screen and (min-width: 801px) { #website_badge_2 { top: 214px; } }

/* --- Cookie banner (TermsFeed, loaded from footer.php) restyled to the Figma "Cookies" window --- */
#termsfeed-com---nb.termsfeed-com---nb-simple {
  left: auto !important; right: 24px !important; bottom: 24px !important; top: auto !important;
  width: 570px !important; max-width: calc(100vw - 48px) !important; max-height: calc(100vh - 160px) !important;
  overflow-y: auto !important;
  background: #fff !important; border: 1px solid #c7c7c5 !important; border-radius: 0 !important;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .25) !important;
}
#termsfeed-com---nb .cc-nb-main-container { display: flex !important; flex-direction: column !important; gap: 10px !important; padding: 24px !important; }
#termsfeed-com---nb .cc-nb-title {
  margin: 0 !important; font: 500 20px/28px "ND Museo Sans", "Museo Sans 300", system-ui, sans-serif !important; color: #202020 !important;
}
#termsfeed-com---nb .cc-nb-text {
  margin: 0 !important; font: 300 12px/16px "ND Museo Sans", "Museo Sans 300", system-ui, sans-serif !important; color: #4d4d4d !important;
}
#termsfeed-com---nb .cc-nb-buttons-container { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin: 0 !important; }
#termsfeed-com---nb .cc-nb-buttons-container button {
  width: auto !important; margin: 0 !important; padding: 4px 12px !important; border-radius: 0 !important; box-shadow: none !important;
  font: 300 12px/16px "ND Museo Sans", "Museo Sans 300", system-ui, sans-serif !important; cursor: pointer;
}
#termsfeed-com---nb .cc-nb-okagree { background: #638a57 !important; border: 1px solid #638a57 !important; color: #fff !important; }
#termsfeed-com---nb .cc-nb-okagree:hover { background: #557a4a !important; }
#termsfeed-com---nb .cc-nb-reject { background: #fff !important; border: 1px solid #c7c7c5 !important; color: #4d4d4d !important; }
#termsfeed-com---nb .cc-nb-reject:hover { border-color: #4d4d4d !important; }
/* "Change my preferences": underlined text link on its own row */
#termsfeed-com---nb .cc-nb-buttons-container .cc-nb-changep {
  flex: 0 0 100% !important; text-align: left !important;
  padding: 4px !important; background: none !important; border: 0 !important; color: #4d4d4d !important;
  text-decoration: underline !important; text-underline-position: from-font;
}
#termsfeed-com---nb .cc-nb-buttons-container .cc-nb-changep:hover { color: #202020 !important; }
@media (max-width: 767px) {
  /* above the fixed "Order Samples / Visit Showroom" bar */
  #termsfeed-com---nb.termsfeed-com---nb-simple { right: 12px !important; left: 12px !important; bottom: 52px !important; width: auto !important; max-width: none !important; }
  #termsfeed-com---nb .cc-nb-main-container { padding: 20px !important; }
}
