/* Desktop mega navigation: fixed-position, sharp-edged presentation. Logo styles are intentionally untouched. */
@media (min-width: 992px) {
  #sp-header {
    position: relative;
    z-index: 1200;
    overflow: visible !important;
    background: #ffffff;
  border-bottom: 1px solid #d5e0d5;
  box-shadow: 0 4px 18px rgba(15, 41, 26, 0.08);
  }

  #sp-header .sp-megamenu-wrapper,
  #sp-header .sp-megamenu-parent {
    display: flex !important;
    align-items: center;
  }

  #sp-header .sp-megamenu-wrapper {
    margin-left: auto;
  }

  #sp-header .sp-megamenu-parent {
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    --awachiku-menu-ease: cubic-bezier(.22, 1, .36, 1);
  }

  #sp-header .sp-megamenu-parent > li {
    position: relative;
    list-style: none;
  }

  #sp-header .sp-megamenu-parent > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 74px;
    padding: 0 16px;
    color: #274836;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    line-height: 1;
    background: transparent;
    border-right: 1px solid #e4ebe3;
    border-bottom: 3px solid transparent;
    border-radius: 0 !important;
    text-decoration: none;
    transition: color 220ms var(--awachiku-menu-ease), background-color 220ms var(--awachiku-menu-ease), border-color 220ms var(--awachiku-menu-ease);
  }

  #sp-header .sp-megamenu-parent > li:last-child > a {
    border-right: 0;
  }

  #sp-header .sp-megamenu-parent > li:not(:first-child) > a::after {
    width: 7px;
    height: 7px;
    margin: -4px 0 0 9px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    content: "";
    transform: rotate(45deg);
    transition: transform 220ms var(--awachiku-menu-ease);
  }

  #sp-header .sp-megamenu-parent > li:hover > a,
  #sp-header .sp-megamenu-parent > li:focus-within > a,
  #sp-header .sp-megamenu-parent > li.active > a,
  #sp-header .sp-megamenu-parent > li.current-item > a {
    color: #1d5c38;
    background: #eff6ef;
    border-bottom-color: #2c8250;
    box-shadow: none;
  }

  #sp-header .sp-megamenu-parent > li:hover > a::after,
  #sp-header .sp-megamenu-parent > li:focus-within > a::after {
    transform: rotate(225deg);
  }

  /* Home is a direct link. Its legacy empty dropdown is removed at build time;
     this guard keeps it non-interactive if malformed source markup reappears. */
  #sp-header .sp-megamenu-parent > li:first-child > .sp-dropdown,
  #sp-header .sp-megamenu-parent > li:first-child > a::after {
    display: none !important;
  }

  #sp-header .sp-megamenu-parent > li > .sp-dropdown.sp-dropdown-main {
    position: absolute;
    top: 100% !important;
    z-index: 1300;
    display: block !important;
    min-width: 286px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    visibility: hidden !important;
    opacity: 0 !important;
    background: #fbfcf8;
    border: 1px solid #d5e2d7;
    border-top: 3px solid #122a1a;
    border-radius: 0 !important;
    box-shadow: 0 12px 26px rgba(15, 41, 26, 0.14);
    pointer-events: none;
    transform: translateY(-6px) !important;
    transition: opacity 230ms var(--awachiku-menu-ease), transform 230ms var(--awachiku-menu-ease), visibility 0s linear 230ms !important;
  }

  #sp-header .sp-megamenu-parent > li:hover > .sp-dropdown.sp-dropdown-main,
  #sp-header .sp-megamenu-parent > li:focus-within > .sp-dropdown.sp-dropdown-main {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
    transform: translateY(0) !important;
    transition: opacity 230ms var(--awachiku-menu-ease), transform 230ms var(--awachiku-menu-ease), visibility 0s linear 0s !important;
  }

  /* Keep the source menu's fixed anchor; do not animate horizontal placement. */
  #sp-header .sp-megamenu-parent > li > .sp-dropdown.sp-menu-center {
    left: -300px !important;
    right: auto !important;
    width: 600px !important;
  }

  #sp-header .sp-megamenu-parent > li > .sp-dropdown.sp-menu-left {
    right: 0 !important;
    left: auto !important;
    width: 740px !important;
  }

  #sp-header .sp-megamenu-parent > li > .sp-dropdown.sp-menu-right {
    right: 0 !important;
    left: auto !important;
    width: 310px !important;
  }

  #sp-header .sp-dropdown-inner {
    padding: 18px 20px 20px;
  }

  #sp-header .sp-dropdown .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
  }

  #sp-header .sp-dropdown.sp-menu-left .row {
    grid-template-columns: minmax(210px, 0.9fr) minmax(330px, 1.35fr);
  }

  #sp-header .sp-dropdown .row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
  }

  #sp-header .sp-mega-group,
  #sp-header .sp-dropdown-items {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #sp-header .sp-mega-group > li,
  #sp-header .sp-dropdown-items > li {
    margin: 0;
    list-style: none;
  }

  #sp-header .sp-dropdown .sp-mega-group > li > a,
  #sp-header .sp-dropdown .sp-dropdown-items > li > a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 11px 10px;
    color: #31503d;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.91rem;
    font-weight: 600;
    line-height: 1.45;
    background: #ffffff;
    border-bottom: 1px solid #e1e9e1;
    border-radius: 0 !important;
    text-decoration: none;
    transition: color 200ms var(--awachiku-menu-ease), background-color 200ms var(--awachiku-menu-ease), padding-left 220ms var(--awachiku-menu-ease);
  }

  #sp-header .sp-dropdown .sp-mega-group > li:last-child > a,
  #sp-header .sp-dropdown .sp-dropdown-items > li:last-child > a {
    border-bottom: 0;
  }

  #sp-header .sp-dropdown .sp-mega-group > li > a::before,
  #sp-header .sp-dropdown .sp-dropdown-items > li > a::before {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    margin-right: 10px;
    background: #2c8250;
    border-radius: 0;
    content: "";
  }

  #sp-header .sp-dropdown .sp-mega-group > li > a:hover,
  #sp-header .sp-dropdown .sp-mega-group > li > a:focus-visible,
  #sp-header .sp-dropdown .sp-dropdown-items > li > a:hover,
  #sp-header .sp-dropdown .sp-dropdown-items > li > a:focus-visible {
    padding-left: 15px;
    color: #1d5c38;
    background: #edf5ed;
    outline: none;
    transform: none;
  }

  #sp-header .sp-dropdown .sp-mega-group > li > a:hover::before,
  #sp-header .sp-dropdown .sp-mega-group > li > a:focus-visible::before,
  #sp-header .sp-dropdown .sp-dropdown-items > li > a:hover::before,
  #sp-header .sp-dropdown .sp-dropdown-items > li > a:focus-visible::before {
    background: #ffffff;
  }

  #sp-header .sp-dropdown .sp-module {
    height: 100%;
    padding: 16px 18px 18px;
    /* Use the same green as the main-menu hover underline.  The pale panel
       is its matching hover surface rather than the inherited blue tint. */
    background: #eff6ef !important;
    border-left: 4px solid #2c8250 !important;
    border-radius: 0 !important;
    box-shadow: none;
  }

  #sp-header .sp-dropdown .megamenu_ttl {
    margin: 0 0 12px;
    color: #1d5c38;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  #sp-header .sp-dropdown p.zero {
    margin: 6px 0 0;
  }

  #sp-header .sp-dropdown .button-48 {
    display: block;
    width: 100%;
    min-height: auto;
    padding: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0 !important;
  }

  #sp-header .sp-dropdown .button-48 a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 10px;
    color: #31503d;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    background: #f9fbf7;
    border: 1px solid #c8dccb;
    border-radius: 0 !important;
    text-decoration: none;
    transition: color 200ms var(--awachiku-menu-ease), background-color 200ms var(--awachiku-menu-ease), border-color 200ms var(--awachiku-menu-ease);
  }

  #sp-header .sp-dropdown .button-48 a::after {
    margin-left: auto;
    color: #2c8250;
    content: "→";
  }

  #sp-header .sp-dropdown .button-48 a:hover,
  #sp-header .sp-dropdown .button-48 a:focus-visible {
    color: #1d5c38;
    background: #ffffff;
    outline: none;
    transform: none;
  }

  #sp-header .sp-dropdown .button-48 a:hover::after,
  #sp-header .sp-dropdown .button-48 a:focus-visible::after {
    color: #2c8250;
  }

  /* Neutralise the inherited .button-48 animated overlay. Product links use
     a single restrained blue-green hover surface and retain square corners. */
  #sp-header .sp-dropdown .button-48::before,
  #sp-header .sp-dropdown .button-48::after {
    display: none !important;
    content: none !important;
    animation: none !important;
    clip-path: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  #sp-header .sp-dropdown .button-48:hover,
  #sp-header .sp-dropdown .button-48:focus-within {
    background: transparent !important;
  }

  #sp-header .sp-dropdown .button-48 a:hover,
  #sp-header .sp-dropdown .button-48 a:focus-visible {
    color: #1d5c38 !important;
    background: #e7f1e7;
    border-color: #8cb899;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sp-header .sp-megamenu-parent > li > a,
  #sp-header .sp-megamenu-parent > li > a::after,
  #sp-header .sp-megamenu-parent > li > .sp-dropdown.sp-dropdown-main,
  #sp-header .sp-dropdown a {
    transition: none !important;
  }
}
