/* V13 — navigation, brand presence and compatibility exit refinement */
:root{
  --v13-brand:#438851;
  --v13-brand-deep:#245f36;
  --v13-lime:#8BC83D;
  --v13-ink:#243129;
  --v13-muted:#667168;
  --v13-line:#dfe5df;
  --v13-soft:#f7f9f6;
  --v13-shadow:0 18px 44px rgba(27,45,32,.14);
}
body.v13 .brand-logo{
  width:320px!important;
  max-width:100%;
  height:auto!important;
  object-fit:contain;
  object-position:left center;
  filter:none;
}
body.v13 .header-main{
  grid-template-columns:minmax(270px,330px) minmax(380px,1fr) auto!important;
  column-gap:24px!important;
}
body.v13 .desktop-header{padding-block:10px!important}
body.v13 .mobile-top .brand-logo{width:235px!important}
body.v13 .footer-brand img{width:250px!important;height:auto!important}
@media(max-width:1280px){
  body.v13 .brand-logo{width:275px!important}
  body.v13 .header-main{grid-template-columns:minmax(230px,285px) minmax(320px,1fr) auto!important;column-gap:16px!important}
}
@media(max-width:991.98px){
  body.v13 .mobile-top .brand-logo{width:225px!important}
}
@media(max-width:430px){
  body.v13 .mobile-top .brand-logo{width:205px!important}
}
@media(max-width:370px){
  body.v13 .mobile-top .brand-logo{width:185px!important}
}

/* Replace legacy mega panel with a commerce-style full-width desktop menu. */
body.v13 #megaMenu{display:none!important}
body.v13 .v13-desktop-mega{
  position:absolute;
  inset-inline:0;
  top:100%;
  z-index:1070;
  background:#fff;
  border-top:1px solid #edf0ed;
  border-bottom:1px solid var(--v13-line);
  box-shadow:0 20px 42px rgba(26,42,30,.12);
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
  pointer-events:none;
}
body.v13 .v13-desktop-mega.show{
  opacity:1;
  visibility:visible;
  transform:none;
  pointer-events:auto;
}
body.v13 .v13-mega-shell{
  width:min(1780px,calc(100% - 32px));
  margin:0 auto;
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  min-height:390px;
  max-height:min(640px,calc(100dvh - 150px));
  background:#fff;
}
body.v13 .v13-mega-rail{
  border-right:1px solid #e3e7e3;
  padding:14px 10px 18px 0;
  overflow:auto;
}
body.v13 .v13-mega-rail button{
  width:100%;
  border:0;
  background:transparent;
  color:#26322a;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  text-align:left;
  padding:12px 14px;
  border-radius:9px;
  font-size:14px;
  font-weight:700;
  transition:background .16s ease,color .16s ease;
}
body.v13 .v13-mega-rail button:hover,
body.v13 .v13-mega-rail button.active{
  background:#eff6ed;
  color:var(--v13-brand-deep);
}
body.v13 .v13-mega-rail button span:last-child{font-size:18px;font-weight:500;color:#91a096}
body.v13 .v13-mega-content{
  padding:22px 28px 30px;
  overflow:auto;
}
body.v13 .v13-mega-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding-bottom:15px;
  border-bottom:1px solid #ecefec;
  margin-bottom:18px;
}
body.v13 .v13-mega-head h3{margin:0;font-size:20px;font-weight:800;color:#233128}
body.v13 .v13-mega-head a{font-size:13px;font-weight:750;color:var(--v13-brand-deep);white-space:nowrap}
body.v13 .v13-mega-columns{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px 38px;
}
body.v13 .v13-mega-column{min-width:0}
body.v13 .v13-mega-column a{
  display:block;
  color:#263129;
  font-size:14px;
  line-height:1.35;
  padding:7px 0;
  border-bottom:1px solid transparent;
}
body.v13 .v13-mega-column a:hover{color:var(--v13-brand-deep);text-decoration:underline;text-underline-offset:3px}
body.v13 .v13-mega-empty{
  min-height:260px;
  display:grid;
  place-items:center;
  text-align:center;
  border:1px dashed #d8dfd8;
  background:#fafcf9;
}
body.v13 .v13-mega-empty strong{display:block;font-size:18px;margin-bottom:7px}
body.v13 .v13-mega-empty a{font-weight:750;color:var(--v13-brand-deep)}
body.v13 .category-bar{position:relative;z-index:1072}
body.v13 .category-inner>.cat-link,
body.v13 .category-inner>.all-cats{position:relative}
body.v13 .category-inner>.cat-link::after{
  content:'⌄';
  font-size:10px;
  margin-left:5px;
  color:#7c8a80;
}
body.v13 .category-inner>.cat-link.v13-active,
body.v13 .category-inner>.all-cats.v13-active{
  color:var(--v13-brand-deep)!important;
  background:#f3f7f2;
}
body.v13 .category-inner>.cat-link.v13-active::before{
  content:'';
  position:absolute;
  left:12px;right:12px;bottom:0;height:2px;
  background:var(--v13-brand);
}
@media(max-width:991.98px){body.v13 .v13-desktop-mega{display:none!important}}

/* Compatibility chooser: exit must be obvious and always reachable. */
body.v13 .v13-compat-closebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 12px;
  background:#f8faf7;
  border-bottom:1px solid #e3e8e3;
  flex:0 0 auto;
}
body.v13 .v13-compat-closebar button{
  border:0;
  background:transparent;
  color:#34423a;
  font-size:13px;
  font-weight:750;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:0 8px;
  border-radius:7px;
}
body.v13 .v13-compat-closebar button:hover{background:#edf3ec;color:#204f30}
body.v13 .v13-compat-closebar .v13-close-x{
  width:40px;height:40px;justify-content:center;border:1px solid #d8dfd9;background:#fff;font-size:24px;font-weight:400;line-height:1;
}
body.v13 .v12-compatible-selector .modal-header{display:none!important}
body.v13 .v12-compatible-selector .modal-content{display:flex;flex-direction:column}
body.v13 .v12-compatible-selector .compat-modal-layout{height:auto!important;flex:1 1 auto;min-height:0!important}
body.v13 .v12-compatible-selector .compat-results{scrollbar-width:thin}
body.v13 .v12-compatible-selector .v12-compat-cancel{
  font-size:12px!important;
  text-decoration:none!important;
  border:1px solid #d7ded8!important;
  background:#fff!important;
  border-radius:7px!important;
  padding:9px 12px!important;
}
@media(max-width:767.98px){
  body.v13 .v13-compat-closebar{position:sticky;top:0;z-index:20;min-height:58px;padding:8px 10px;background:#fff}
  body.v13 .v13-compat-closebar button:first-child{font-size:13px}
  body.v13 .v13-compat-closebar .v13-close-x{width:42px;height:42px}
  body.v13 .v12-compatible-selector .compat-modal-layout{height:calc(100dvh - 58px)!important}
}

/* Standalone compatible-products page: persistent, obvious return action. */
body.v13 .v13-compatible-page-back{
  position:fixed;
  right:18px;
  top:calc(var(--v11-header-height,120px) + 18px);
  z-index:1020;
  display:flex;
  align-items:center;
  gap:8px;
  height:44px;
  padding:0 15px;
  border-radius:9px;
  border:1px solid #cfd8d0;
  background:#fff;
  box-shadow:0 8px 24px rgba(25,45,31,.12);
  color:#28352d;
  font-size:13px;
  font-weight:800;
  text-decoration:none;
}
body.v13 .v13-compatible-page-back:hover{background:#f3f7f2;color:#174b2b}
@media(max-width:767.98px){
  body.v13 .v13-compatible-page-back{
    top:auto;
    right:12px;
    left:12px;
    bottom:calc(72px + env(safe-area-inset-bottom));
    height:48px;
    justify-content:center;
    background:#fff;
    border-color:#aebdaf;
    box-shadow:0 10px 30px rgba(20,45,29,.18);
  }
}
body.v13 .v13-compat-context{min-width:0;flex:1;text-align:center;display:grid;gap:1px}
body.v13 .v13-compat-context small{font-size:9px;letter-spacing:.09em;color:#758078;font-weight:750}
body.v13 .v13-compat-context strong{font-size:13px;color:#27342c;font-weight:800}
@media(max-width:767.98px){
  body.v13 .v13-compat-context{text-align:left}
  body.v13 .v13-compat-context small{display:none}
  body.v13 .v13-compat-context strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.v13 .v13-compat-closebar>button:first-child{padding-inline:4px;white-space:nowrap}
}
