/* V14 — desktop navigation rebuilt from scratch. */
:root{
  --v14-brand:#438851;
  --v14-brand-deep:#245f36;
  --v14-lime:#8BC83D;
  --v14-ink:#243129;
  --v14-muted:#6c776f;
  --v14-line:#e2e7e2;
  --v14-soft:#f7f9f6;
  --v14-nav-h:52px;
  --v14-mega-top:150px;
}

/* The V14 navigation owns desktop category presentation completely. */
body.v14 #megaMenu,
body.v14 .v13-desktop-mega{display:none!important}
body.v14 .category-bar{
  position:relative!important;
  overflow:visible!important;
  z-index:1060!important;
  border-top:1px solid #eef1ee;
  border-bottom:1px solid #dfe5df;
  background:#fff;
  box-shadow:none!important;
}
body.v14 .category-bar .container-market{
  width:min(calc(100% - 28px),1860px)!important;
  max-width:none!important;
}
body.v14 .v14-nav-row{
  min-height:var(--v14-nav-h);
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:stretch;
  gap:8px;
  min-width:0;
}
body.v14 .v14-all,
body.v14 .v14-link,
body.v14 .v14-more{
  appearance:none;
  border:0;
  background:transparent;
  color:#354139;
  font:inherit;
  white-space:nowrap;
  cursor:pointer;
  text-decoration:none;
}
body.v14 .v14-all{
  min-width:158px;
  min-height:44px;
  margin:4px 0;
  padding:0 15px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  border-radius:9px;
  background:var(--v14-brand-deep);
  color:#fff;
  font-size:13px;
  font-weight:800;
}
body.v14 .v14-all svg{width:18px;height:18px;flex:0 0 auto}
body.v14 .v14-all:hover,
body.v14 .v14-all[aria-expanded="true"]{background:#174b2a}
body.v14 .v14-primary{
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  min-width:0;
  overflow:hidden;
}
body.v14 .v14-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:0 clamp(9px,.82vw,16px);
  height:var(--v14-nav-h);
  font-size:clamp(11px,.72vw,13px);
  font-weight:800;
  letter-spacing:.005em;
  flex:0 0 auto;
}
body.v14 .v14-link::after{
  content:'⌄';
  font-size:9px;
  color:#89938c;
  margin-top:-2px;
}
body.v14 .v14-link::before{
  content:'';
  position:absolute;
  left:12px;right:12px;bottom:0;
  height:3px;
  background:var(--v14-brand);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .16s ease;
}
body.v14 .v14-link:hover,
body.v14 .v14-link.is-active{color:var(--v14-brand-deep)}
body.v14 .v14-link:hover::before,
body.v14 .v14-link.is-active::before{transform:scaleX(1)}
body.v14 .v14-link[hidden]{display:none!important}
body.v14 .v14-more-wrap{position:relative;display:flex;align-items:stretch}
body.v14 .v14-more-wrap[hidden]{display:none!important}
body.v14 .v14-more{
  height:var(--v14-nav-h);
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:850;
}
body.v14 .v14-more:hover,
body.v14 .v14-more[aria-expanded="true"]{color:var(--v14-brand-deep);background:#f7f9f6}
body.v14 .v14-more-menu{
  position:absolute;
  top:calc(100% + 1px);
  right:0;
  width:270px;
  padding:8px;
  background:#fff;
  border:1px solid var(--v14-line);
  border-radius:0 0 10px 10px;
  box-shadow:0 16px 36px rgba(28,44,32,.14);
  opacity:0;
  visibility:hidden;
  transform:translateY(-5px);
  pointer-events:none;
  transition:opacity .15s ease,transform .15s ease,visibility .15s;
  z-index:1085;
}
body.v14 .v14-more-wrap.is-open .v14-more-menu{
  opacity:1;visibility:visible;transform:none;pointer-events:auto;
}
body.v14 .v14-more-menu button{
  width:100%;
  min-height:40px;
  border:0;
  border-radius:7px;
  background:#fff;
  color:#304038;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  text-align:left;
  font-size:12.5px;
  font-weight:750;
}
body.v14 .v14-more-menu button:hover{background:#f1f6ef;color:var(--v14-brand-deep)}

/* Full viewport-safe desktop mega panel. */
body.v14 .v14-mega{
  position:fixed;
  z-index:1058;
  left:0;right:0;
  top:var(--v14-mega-top);
  bottom:0;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .14s ease,visibility .14s;
}
body.v14 .v14-mega.is-open{pointer-events:auto;opacity:1;visibility:visible}
body.v14 .v14-mega-hitarea{position:absolute;inset:0;background:rgba(28,38,31,.08)}
body.v14 .v14-mega-panel{
  position:relative;
  width:min(calc(100% - 28px),1860px);
  max-height:calc(100dvh - var(--v14-mega-top) - 10px);
  margin:0 auto;
  background:#fff;
  border:1px solid var(--v14-line);
  border-top:0;
  box-shadow:0 22px 46px rgba(28,44,32,.15);
  display:grid;
  grid-template-columns:225px minmax(0,1fr);
  overflow:hidden;
  transform:translateY(-5px);
  transition:transform .16s ease;
}
body.v14 .v14-mega.is-open .v14-mega-panel{transform:none}
body.v14 .v14-mega-sidebar{
  min-height:360px;
  max-height:inherit;
  overflow:auto;
  padding:12px 10px 16px;
  border-right:1px solid var(--v14-line);
  background:#fbfcfb;
  scrollbar-width:thin;
}
body.v14 .v14-sidebar-title{
  padding:5px 10px 10px;
  color:#7a847d;
  font-size:10px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
body.v14 .v14-side-button{
  width:100%;
  min-height:42px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#28362e;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  padding:8px 10px;
  text-align:left;
  font-size:12.5px;
  font-weight:750;
  cursor:pointer;
}
body.v14 .v14-side-button span:last-child{font-size:18px;color:#9aa49d;font-weight:400}
body.v14 .v14-side-button:hover,
body.v14 .v14-side-button.is-active{background:#eef5ec;color:var(--v14-brand-deep)}
body.v14 .v14-mega-main{
  min-width:0;
  max-height:inherit;
  overflow:auto;
  padding:20px 26px 26px;
  scrollbar-width:thin;
}
body.v14 .v14-mega-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding-bottom:14px;
  border-bottom:1px solid #edf0ed;
  margin-bottom:17px;
}
body.v14 .v14-mega-head h2{
  margin:0;
  color:#213028;
  font-size:19px;
  line-height:1.2;
  font-weight:850;
}
body.v14 .v14-mega-head a{
  color:var(--v14-brand-deep);
  font-size:12.5px;
  font-weight:800;
  white-space:nowrap;
}
body.v14 .v14-mega-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:2px 34px;
  align-items:start;
}
body.v14 .v14-mega-column{min-width:0}
body.v14 .v14-mega-column a{
  display:block;
  padding:7px 0;
  color:#2d3932;
  font-size:13px;
  line-height:1.32;
  text-decoration:none;
}
body.v14 .v14-mega-column a:hover{color:var(--v14-brand-deep);text-decoration:underline;text-underline-offset:3px}
body.v14 .v14-mega-empty{
  min-height:260px;
  display:grid;
  place-items:center;
  border:1px dashed #d8dfd8;
  background:#fafcf9;
  text-align:center;
  padding:24px;
}
body.v14 .v14-mega-empty strong{display:block;font-size:18px;color:#243129;margin-bottom:6px}
body.v14 .v14-mega-empty p{margin:0 0 12px;color:#6f7972;font-size:13px}
body.v14 .v14-mega-empty a{font-weight:800;color:var(--v14-brand-deep)}

/* Header stays usable right down to the desktop/mobile crossover. */
@media (max-width:1399.98px){
  body.v14 .header-main{grid-template-columns:minmax(220px,255px) minmax(300px,1fr) auto!important;gap:14px!important}
  body.v14 .desktop-header .brand-logo{width:245px!important}
  body.v14 .header-actions{gap:2px}
  body.v14 .header-action{padding-inline:6px;min-width:66px}
  body.v14 .header-action .action-label small{font-size:10px}
  body.v14 .header-action .action-label strong{font-size:12px}
  body.v14 .v14-all{min-width:148px;padding-inline:12px;font-size:12.5px}
  body.v14 .v14-mega-panel{grid-template-columns:210px minmax(0,1fr)}
  body.v14 .v14-mega-main{padding-inline:22px}
  body.v14 .v14-mega-grid{gap-inline:26px;grid-template-columns:repeat(auto-fit,minmax(165px,1fr))}
}

/* 1024/1100 class screens use the dedicated mobile/tablet header; no squeezed desktop menu. */
@media (max-width:1199.98px){
  body.v14 .utility,
  body.v14 .desktop-header,
  body.v14 .category-bar{display:none!important}
  body.v14 .mobile-header{display:block!important;background:#fff;border-bottom:1px solid #e3e8e4}
  body.v14 .v14-mega{display:none!important}
  body.v14 .market-header{position:sticky;top:0;z-index:1030}
  body.v14 .mobile-header .container-market{width:min(calc(100% - 24px),1180px)!important}
}
@media (min-width:1200px){
  body.v14 .desktop-header,
  body.v14 .category-bar{display:block!important}
  body.v14 .mobile-header{display:none!important}
}

/* prevent body scroll while mega is open without horizontal shift */
html.v14-menu-open,html.v14-menu-open body{overflow:hidden}

@media (prefers-reduced-motion:reduce){
  body.v14 .v14-mega,body.v14 .v14-mega-panel,body.v14 .v14-more-menu,body.v14 .v14-link::before{transition:none!important}
}

/* Tablet header rules are explicit because the legacy mobile rules started at 992px. */
@media (min-width:992px) and (max-width:1199.98px){
  body.v14 .mobile-header{padding:9px 0 10px!important}
  body.v14 .mobile-top{display:flex!important;align-items:center;justify-content:space-between;gap:16px;min-height:54px}
  body.v14 .mobile-top>a:first-child{display:flex;align-items:center;min-width:0}
  body.v14 .mobile-top .brand-logo{width:245px!important;max-height:46px;object-fit:contain}
  body.v14 .mobile-actions{display:flex!important;align-items:center;gap:7px}
  body.v14 .mobile-icon-btn,
  body.v14 .v5-mobile-menu-trigger{width:44px;height:44px;border:1px solid #dfe5df;background:#fff;border-radius:9px;display:grid;place-items:center;position:relative;color:#314037}
  body.v14 .mobile-search{margin-top:8px;padding-bottom:0!important}
  body.v14 .mobile-search .search-box{height:48px!important;background:#f8faf8;border-radius:10px}
  body.v14 .mobile-search .search-cta{height:40px;width:46px}
}
