.admin-bar .header-main {
  top: 32px;
}

.admin-bar .header-main .mega-menu {
  top: 112px;
}

@media (max-width: 782px) {
  .admin-bar .header-main {
    top: 46px;
  }
}
/* ===== ヘッダー ===== */
header {
  position: relative;
  height: 0;
  overflow: visible;
  line-height: 0;

.header-main {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;

  .logo {
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
    flex-shrink: 0;

    a {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
    }

    img {
      height: 44px;
      width: auto;
    }
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1001;
  }

  .search-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: opacity 0.3s;
    flex-shrink: 0;

    &:hover {
      opacity: 0.7;
    }

    svg {
      width: 20px;
      height: 20px;
    }

    path {
      stroke: var(--color-primary);
    }
  }

  .global-menu {
    line-height: 1.6;

    ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
  }

  .menu-link,
  .menu-toggle {
    text-decoration: none;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    font-family: var(--font-zen-kaku-gothic-new);
  }

  .menu-label-ja {
    font-family: var(--font-zen-kaku-gothic-new);
    font-size: 10px;
    color: var(--color-sub-text);
    letter-spacing: 0.05em;
    margin-top: 2px;
    display: block;
    order: 2;
  }

  .menu-label-en {
    font-family: var(--font-rokkitt);
    order: 1;
  }

  .sub-text {
    font-family: var(--font-zen-kaku-gothic-new);
    font-size: 10px;
    color: var(--color-sub-text);
    letter-spacing: 0.05em;
    margin-top: 2px;
    display: block;
  }

  .menu-trigger {
    display: none;
  }

  .global-menu {
    height: 100%;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
  }

  .menu-container {
    height: 100%;
  }

  .global-menu > .menu-container > ul {
    display: flex;
    height: 100%;
    gap: 0;
    justify-content: flex-end;
  }

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

  .menu-link,
  .menu-toggle {
    padding: 0 15px;
    height: 100%;
    font-size: 18px;
    letter-spacing: 0.1em;
    font-family: var(--font-rokkitt);
    font-weight: 700;
    font-style: normal;
    transition: color 0.3s;

    &:hover {
      color: var(--color-green);

      .sub-text,
      .menu-label-en,
      .menu-label-ja {
        color: var(--color-green);
      }
    }
  }

  /* === タブレット対応 === */
  @media (max-width: 1000px) and (min-width: 769px) {
    .menu-link,
    .menu-toggle {
      padding: 0 8px;
      font-size: 14px;
      letter-spacing: 0.05em;
    }

    .menu-label-ja {
      font-size: 8px;
    }
  }

  /* === PC メガメニュー === */
  .mega-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 990;
  }

  .menu-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .menu-item:hover .mega-menu::after {
    content: "";
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(180, 140, 80, 0.35);
    z-index: -1;
    pointer-events: none;
  }

  .mega-menu-inner {
    display: grid;
    grid-template-columns: 310px 1fr;
    align-items: center;
    gap: 0;
    padding: 40px 40px;
    min-height: 220px;
    max-width: 1100px;
    margin: 0 auto;
  }

  .mega-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 40px;
  }

  .mega-category-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  .menu-item-contact .mega-category-icon {
    width: 100px;
    height: 100px;
  }

  .menu-item-news .mega-links {
    grid-template-rows: repeat(3, auto);
  }

  .menu-item-contact .mega-links {
    grid-template-rows: repeat(4, auto);

    li:nth-child(-n+3) {
      grid-column: 1;
    }

    li:nth-child(n+4) {
      grid-column: 2;
    }
  }

  .mega-category-en {
    font-family: var(--font-rokkitt);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.1em;
    line-height: 1.2;
  }

  .mega-category-ja {
    font-family: var(--font-zen-kaku-gothic-new);
    font-size: 12px;
    color: var(--color-sub-text);
    margin-top: 2px;
  }

  .mega-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
    gap: 0 40px;
    padding-left: 40px;
    list-style: none;
    margin: 0;
    align-content: start;
  }

  .mega-links li {
    margin-bottom: 0;
  }

  .mega-links a {
    font-family: var(--font-zen-kaku-gothic-new);
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
    display: block;
    padding: 8px 0;
    transition: color 0.2s, padding-left 0.2s;
    line-height: 1.6;

    &:hover {
      color: var(--color-green);
      font-weight: bold;
      padding-left: 5px;
    }
  }

  /* PC: sub-menu非表示 / SP: mega-menu非表示 */
  .sub-menu {
    display: none;
  }

  .menu-toggle::after {
    content: none;
  }

  /* SP表示 */
  @media (max-width: 768px) {
    padding: 0 20px;

    .header-actions {
      gap: 15px;
    }

    .search-trigger {
      width: 35px;
      height: 35px;

      svg {
        width: 18px;
        height: 18px;
      }
    }

    .menu-trigger {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      width: 30px;
      height: 40px;
      z-index: 1001;

      span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-primary);
        transition: all 0.4s;
      }

      &.active span {
        &:nth-of-type(1) {
          transform: translateY(5px) rotate(45deg);
        }
        &:nth-of-type(2) {
          transform: translateY(-5px) rotate(-45deg);
        }
      }
    }

    .global-menu {
      display: block;
      flex: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background: rgba(255, 255, 255, 0.98);
      z-index: 999;
      opacity: 0;
      visibility: hidden;
      transition:
        opacity 0.4s,
        visibility 0.4s;
      overflow-y: auto;

      &.active {
        opacity: 1;
        visibility: visible;

        .menu-item {
          opacity: 1;
          transform: translateY(0);

          &:nth-child(1) {
            transition-delay: 0.1s;
          }
          &:nth-child(2) {
            transition-delay: 0.15s;
          }
          &:nth-child(3) {
            transition-delay: 0.2s;
          }
          &:nth-child(4) {
            transition-delay: 0.25s;
          }
          &:nth-child(5) {
            transition-delay: 0.3s;
          }
          &:nth-child(6) {
            transition-delay: 0.35s;
          }
          &:nth-child(7) {
            transition-delay: 0.4s;
          }
        }
      }
    }

    .menu-container {
      height: auto;
      max-width: 100%;
      margin: 80px 0 40px;
      padding: 0 0 60px;
      text-align: left;
    }

    .global-menu > .menu-container > ul {
      display: block;
      height: auto;
    }

    .menu-item {
      height: auto;
      border-bottom: 1px solid var(--color-border);
      opacity: 0;
      transform: translateY(20px);
      transition:
        opacity 0.4s,
        transform 0.4s;
      display: block;
    }

    .menu-link,
    .menu-toggle {
      height: auto;
      font-size: 18px;
      padding: 20px 10px 20px 30px;
      font-weight: 300;
      font-family: var(--font-zen-kaku-gothic-new);
      letter-spacing: normal;
      position: relative;
      flex-direction: row;
      align-items: baseline;
      justify-content: flex-start;
      gap: 8px;
    }

    .menu-label-ja {
      display: inline;
      font-family: var(--font-zen-kaku-gothic-new);
      font-size: 18px;
      order: unset;
      color: var(--color-primary);
      margin-top: 0;
    }

    .menu-label-en {
      font-family: var(--font-rokkitt);
      order: unset;
      font-size: 14px;
      color: var(--color-sub-text);
      font-weight: 400;
    }

    .menu-toggle {
      &::before,
      &::after {
        content: "";
        position: absolute;
        right: 30px;
        top: 50%;
        background: var(--color-primary);
        transition: transform 0.3s ease;
      }

      &::after {
        width: 16px;
        height: 1.5px;
        transform: translateY(-50%);
      }

      &::before {
        width: 1.5px;
        height: 16px;
        right: 37.25px;
        transform: translateY(-50%) scaleY(1);
      }

      &.open::before {
        transform: translateY(-50%) scaleY(0);
      }
    }

    .mega-menu {
      display: none;
    }

    .sub-menu {
      display: block;
      position: static;
      top: auto;
      left: auto;
      width: auto;
      height: 0 !important;
      background: var(--color-bg-warm);
      border-top: none;
      border-bottom: none;
      box-shadow: none;
      opacity: 1;
      visibility: visible;
      transform: none;
      pointer-events: auto;
      z-index: auto;
      overflow: hidden;
      transition: height 0.4s ease;
      text-align: left;

      &.is-open {
        height: auto !important;
        border-bottom: 1px solid var(--color-border);
      }

      .sub-menu-inner {
        padding: 0;
        display: block;
        grid-template-columns: none;
        gap: 0;
        max-width: none;
      }

      li {
        margin-bottom: 0;
        border-bottom: 1px solid #dbcaaa;
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.3s ease, transform 0.3s ease;

        &:last-child {
          border-bottom: none;
        }
      }

      &.is-open li {
        opacity: 1;
        transform: translateY(0);
      }

      &.is-open li:nth-child(1) { transition-delay: 0.05s; }
      &.is-open li:nth-child(2) { transition-delay: 0.08s; }
      &.is-open li:nth-child(3) { transition-delay: 0.11s; }
      &.is-open li:nth-child(4) { transition-delay: 0.14s; }
      &.is-open li:nth-child(5) { transition-delay: 0.17s; }
      &.is-open li:nth-child(6) { transition-delay: 0.20s; }
      &.is-open li:nth-child(7) { transition-delay: 0.23s; }
      &.is-open li:nth-child(8) { transition-delay: 0.26s; }
      &.is-open li:nth-child(9) { transition-delay: 0.29s; }

      a {
        display: block;
        padding: 15px 30px;
        font-family: var(--font-zen-kaku-gothic-new);
        font-size: 18px;
        color: var(--color-primary);
        text-decoration: none;
        transition: 0.2s;
      }
    }

    .menu-item:hover .sub-menu {
      opacity: 1;
      visibility: visible;
      transform: none;
    }

    .menu-item:hover .sub-menu::after {
      content: none;
    }

    /* SP メニュー下部 */
    .menu-bottom {
      padding: 30px 20px 0;
      opacity: 0;
      transform: translateY(15px);
      transition: opacity 0.4s ease 0.4s, transform 0.4s ease 0.4s;
    }

    .global-menu.active .menu-bottom {
      opacity: 1;
      transform: translateY(0);
    }

    .menu-search-form {
      display: flex;
      align-items: center;
      background: var(--color-bg-warm);
      border-radius: 8px;
      padding: 10px 15px;
      margin-bottom: 25px;
    }

    .menu-search-input {
      flex: 1;
      border: none;
      outline: none;
      background: transparent;
      font-size: 15px;
      font-family: var(--font-zen-kaku-gothic-new);
      color: var(--color-primary);
      padding: 5px 0;

      &::placeholder {
        color: var(--color-sub-text);
      }
    }

    .menu-search-btn {
      background: none;
      border: none;
      cursor: pointer;
      padding: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--color-primary);
    }

    .menu-social {
      margin-bottom: 20px;

      a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid var(--color-sub-text);
        border-radius: 50%;
        color: var(--color-primary);
        text-decoration: none;
        transition: opacity 0.3s;

        &:hover {
          opacity: 0.7;
        }
      }
    }

    .menu-footer-links {
      display: flex;
      flex-direction: column;
      gap: 10px;

      a {
        font-size: 13px;
        color: var(--color-primary);
        text-decoration: none;
        font-family: var(--font-zen-kaku-gothic-new);
      }
    }
  }
}
}
/* ===== 検索オーバーレイ ===== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;

  @media (max-width: 768px) {
    padding-top: 80px;
  }

  &.active {
    opacity: 1;
    visibility: visible;
  }

  .search-container {
    width: 100%;
    max-width: 800px;
    padding: 0 40px;

    @media (max-width: 768px) {
      padding: 0 20px;
    }
  }

  .search-form {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 15px;
  }

  .search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 24px;
    font-family: var(--font-zen-kaku-gothic-new);
    color: #66391f;
    background: transparent;
    padding: 0 20px 0 0;

    &::placeholder {
      color: var(--color-sub-text);
    }

    @media (max-width: 768px) {
      font-size: 18px;
    }
  }

  .search-submit,
  .search-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: opacity 0.3s;

    &:hover {
      opacity: 0.7;
    }

    svg {
      width: 24px;
      height: 24px;

      @media (max-width: 768px) {
        width: 20px;
        height: 20px;
      }
    }

    path {
      stroke: #66391f;
    }
  }

  .search-close {
    margin-right: 0;
  }
}
