/* Lowcover responsive header */
:root {
  --lc-navy: #0d2b4d;
  --lc-green: #168a4a;
  --lc-green-hover: #116c3a;
  --lc-border: #e1e8ef;
  --lc-muted: #637386;
  --lc-header-height: 82px;
}

.lc-site-header,
.lc-site-header * { box-sizing: border-box; }

.lc-site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  color: var(--lc-navy);
  background: #fff;
  border-bottom: 1px solid var(--lc-border);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lc-header-inner {
  width: min(100% - 48px, 1280px);
  min-height: var(--lc-header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.lc-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.lc-brand img {
  display: block;
  width: clamp(150px, 16vw, 220px);
  height: auto;
  max-height: 64px;
  object-fit: contain;
}

.lc-desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  flex: 1 1 auto;
  min-width: 0;
  height: var(--lc-header-height);
}

.lc-desktop-nav > a,
.lc-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  color: var(--lc-navy);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.lc-desktop-nav > a:hover,
.lc-nav-trigger:hover,
.lc-desktop-nav > a:focus-visible,
.lc-nav-trigger:focus-visible { color: var(--lc-green); }

.lc-chevron,
.lc-mobile-chevron {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.lc-nav-trigger[aria-expanded="true"] .lc-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.lc-nav-item { height: 100%; display: flex; align-items: center; }
.lc-nav-has-menu { position: relative; }

.lc-mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  width: 320px;
  max-width: min(90vw, 920px);
  padding: 20px 22px;
  background: #fff;
  border-top: 1px solid var(--lc-border);
  border-bottom: 1px solid var(--lc-border);
  box-shadow: 0 18px 35px rgba(13, 43, 77, .14);
  max-height: min(75vh, 760px);
  overflow-y: auto;
}

.lc-nav-has-menu.is-open .lc-mega-menu { display: block; }

.lc-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
}

.lc-mega-group { min-width: 0; }
.lc-mega-group h2 {
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--lc-green);
  font-size: 1rem;
  line-height: 1.35;
}
.lc-mega-group h2 a { color: var(--lc-navy); text-decoration: none; }
.lc-mega-group h2 a:hover { color: var(--lc-green); }

.lc-mega-group > a {
  display: block;
  padding: 5px 0;
  color: #40536a;
  font-size: .86rem;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.lc-mega-group > a:hover,
.lc-mega-group > a:focus-visible { color: var(--lc-green); text-decoration: underline; }

.lc-mega-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--lc-border);
}
.lc-mega-footer a {
  color: var(--lc-navy);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}
.lc-mega-footer a:hover { color: var(--lc-green); }

.lc-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.lc-desktop-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 8px;
  color: #fff;
  background: var(--lc-green);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.lc-desktop-account:hover { background: var(--lc-green-hover); }

.lc-mobile-action { display: none !important; }

.lc-search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 18px 24px;
  background: #fff;
  border-top: 1px solid var(--lc-border);
  box-shadow: 0 12px 24px rgba(13, 43, 77, .12);
}
.lc-search-form {
  display: flex;
  gap: 10px;
  width: min(100%, 760px);
  margin: 0 auto;
}
.lc-search-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  color: var(--lc-navy);
  background: #fff;
  font: inherit;
}
.lc-search-form input:focus { outline: 3px solid rgba(22, 138, 74, .2); border-color: var(--lc-green); }
.lc-search-form button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--lc-green);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.lc-search-form button:hover { background: var(--lc-green-hover); }

.lc-mobile-menu,
.lc-menu-backdrop { display: none; }
.lc-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Tablet and mobile: show Menu, Search and Login controls */
@media (max-width: 1024px) {
  :root { --lc-header-height: 74px; }
  .lc-header-inner {
    width: min(100% - 32px, 1280px);
    gap: 16px;
  }
  .lc-desktop-nav,
  .lc-desktop-account { display: none; }
  .lc-header-actions { margin-left: auto; gap: clamp(8px, 2vw, 18px); }
  .lc-mobile-action {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 44px;
    min-height: 54px;
    padding: 4px 2px;
    border: 0;
    color: var(--lc-navy);
    background: transparent;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
  }
  .lc-mobile-action svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .lc-action-label { font-size: .68rem; font-weight: 750; line-height: 1.1; }
  .lc-mobile-action:hover,
  .lc-mobile-action:focus-visible { color: var(--lc-green); }
  .lc-site-header.lc-menu-open .lc-menu-symbol { display: none; }
  .lc-site-header.lc-menu-open #lc-menu-toggle::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background:
      linear-gradient(45deg, transparent 47%, currentColor 47%, currentColor 53%, transparent 53%),
      linear-gradient(-45deg, transparent 47%, currentColor 47%, currentColor 53%, transparent 53%);
  }

  .lc-mobile-menu {
    display: block;
    position: fixed;
    top: var(--lc-header-height);
    left: 0;
    bottom: 0;
    width: min(460px, 100%);
    z-index: 1002;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 22px 30px;
    background: #fff;
    box-shadow: 12px 0 32px rgba(13, 43, 77, .14);
  }
  .lc-mobile-menu[hidden],
  .lc-search-panel[hidden],
  .lc-menu-backdrop[hidden] { display: none !important; }

  .lc-mobile-menu-top {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    margin: 0 -22px;
    padding: 0 22px;
    color: var(--lc-navy);
    background: #fff;
    border-bottom: 1px solid var(--lc-border);
    font-size: 1.05rem;
    font-weight: 800;
  }
  .lc-close-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    color: var(--lc-navy);
    background: #f2f7fb;
    cursor: pointer;
  }
  .lc-close-menu:hover { color: #fff; background: var(--lc-green); }
  .lc-close-menu svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .lc-mobile-nav { padding-top: 8px; }
  .lc-mobile-category { border-bottom: 1px solid var(--lc-border); }
  .lc-mobile-category summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 13px 2px;
    color: var(--lc-navy);
    font-size: .98rem;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
  }
  .lc-mobile-category summary::-webkit-details-marker { display: none; }
  .lc-mobile-category[open] > summary { color: var(--lc-green); }
  .lc-mobile-category[open] .lc-mobile-chevron { transform: rotate(225deg) translate(-1px, -1px); }
  .lc-mobile-submenu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 13px 12px;
  }
  .lc-mobile-submenu a {
    display: block;
    padding: 10px 6px;
    color: #40536a;
    font-size: .9rem;
    line-height: 1.45;
    text-decoration: none;
    border-left: 2px solid #e5f5eb;
  }
  .lc-mobile-submenu a:hover,
  .lc-mobile-submenu a:focus-visible {
    color: var(--lc-green);
    border-left-color: var(--lc-green);
    background: #f7fbf8;
  }
  .lc-mobile-primary-link {
    display: block;
    padding: 16px 2px;
    color: var(--lc-navy);
    border-bottom: 1px solid var(--lc-border);
    font-size: .98rem;
    font-weight: 800;
    text-decoration: none;
  }
  .lc-mobile-primary-link:hover { color: var(--lc-green); }

  .lc-menu-backdrop {
    display: block;
    position: fixed;
    inset: var(--lc-header-height) 0 0;
    z-index: 1001;
    width: 100%;
    border: 0;
    background: rgba(13, 43, 77, .42);
  }
  .lc-search-panel { z-index: 1003; }
}

@media (max-width: 420px) {
  .lc-header-inner { width: calc(100% - 24px); gap: 8px; }
  .lc-brand img { width: 138px; }
  .lc-header-actions { gap: 5px; }
  .lc-mobile-action { min-width: 40px; }
  .lc-action-label { font-size: .64rem; }
  .lc-search-panel { padding: 14px 12px; }
  .lc-search-form { gap: 7px; }
  .lc-search-form button { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-chevron,
  .lc-mobile-chevron { transition: none; }
}


/* Desktop search icon: sits immediately before My account */
.lc-desktop-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--lc-border);
  border-radius: 8px;
  color: var(--lc-navy);
  background: #fff;
  cursor: pointer;
}
.lc-desktop-search svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lc-desktop-search:hover,
.lc-desktop-search:focus-visible,
.lc-desktop-search[aria-expanded="true"] {
  color: var(--lc-green);
  border-color: var(--lc-green);
}
.lc-desktop-search:focus-visible {
  outline: 3px solid rgba(22, 138, 74, .22);
  outline-offset: 2px;
}

/* Desktop category navigation: categories are direct links with hover/click dropdowns */
@media (min-width: 1025px) {
  .lc-desktop-nav > .lc-nav-item > a,
  .lc-desktop-nav > a {
    position: relative;
  }
  .lc-desktop-nav > .lc-nav-item > a::after,
  .lc-desktop-nav > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    background: var(--lc-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
  }
  .lc-desktop-nav > .lc-nav-item > a:hover::after,
  .lc-desktop-nav > .lc-nav-item > a:focus-visible::after,
  .lc-desktop-nav > a:hover::after,
  .lc-desktop-nav > a:focus-visible::after {
    transform: scaleX(1);
  }
}

@media (min-width: 1025px) {
  .lc-desktop-nav { gap: clamp(8px, 1.1vw, 18px); }
  .lc-desktop-nav > a,
  .lc-nav-link { font-size: clamp(.76rem, .9vw, .88rem); }
  .lc-nav-link { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 0; color: var(--lc-navy); background: transparent; border: 0; font: inherit; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; }
  .lc-nav-link:hover,
  .lc-nav-link:focus-visible,
  .lc-nav-has-menu.is-open > .lc-nav-link { color: var(--lc-green); }
  .lc-nav-has-menu .lc-mega-menu { display: none; }
  .lc-nav-has-menu.is-open .lc-mega-menu { display: block; }
  .lc-mega-menu {
    top: calc(100% - 1px);
    width: 320px;
    max-width: min(90vw, 920px);
    max-height: min(65vh, 520px);
    padding: 18px 20px;
    border: 1px solid var(--lc-border);
    border-radius: 0 0 10px 10px;
    overflow-y: auto;
  }
  .lc-nav-item:first-child .lc-mega-menu { width: 320px; }
  .lc-nav-item:first-child .lc-mega-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lc-nav-item:not(:first-child) .lc-mega-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lc-nav-item:not(:first-child) .lc-mega-footer { margin-top: 16px; padding-top: 12px; }
  .lc-desktop-search { margin-left: 0; }
}
@media (max-width: 1024px) {
  .lc-desktop-search { display: none; }
}


/* ---- Menu update: 10 categories, long dropdowns ---- */
@media (min-width: 1025px) {
  .lc-header-inner { gap: 16px; }
  .lc-desktop-nav { gap: clamp(6px, .8vw, 14px); }
  .lc-desktop-nav > a,
  .lc-nav-link { font-size: clamp(.74rem, .85vw, .88rem); }

  .lc-nav-has-menu .lc-mega-menu { width: 300px; max-height: min(70vh, 560px); }

  /* long lists (more than 10 items) open as two columns */
  .lc-nav-has-menu .lc-mega-menu.lc-mega-wide { width: 580px; }
  .lc-mega-wide .lc-mega-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    align-content: start;
  }
  .lc-mega-wide .lc-mega-group h2 { grid-column: 1 / -1; }

  /* last categories open towards the left so they never leave the screen */
  .lc-nav-has-menu.lc-menu-right .lc-mega-menu { left: auto; right: 0; }
}
