/**/
.search {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search--sale {
  flex-direction: row;
  justify-content: center;
  gap: 60px;
  padding: 16px 0;
  border-top: 1px solid #b6a187;
  border-bottom: 1px solid #b6a187;
}
.search__title {
  font-size: 12px;
  color: var(--theme-black-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search__title::before {
  content: "";
  background: url(../img/icon/search.svg) no-repeat;
  width: 16px;
  height: 16px;
  background-size: cover;
  background-position: center;
}
.search__name {
  font-size: 12px;
}
.search__filter {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.search__filter--sale {
  flex-direction: column;
  gap: 8px;
}
.search__links {
  display: flex;
  gap: 32px;
}
.search__link:not(.search__link--sale) {
  font-size: 12px;
  padding: 8px 24px;
  color: var(--theme-black-dark);
  border: 1px solid;
  display: block;
  border-radius: 50px;
  transition: background-color 0.5s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}


.search__link:not(.search__link--sale)::before {
  content: "";
  background: var(--thema-yellow);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scale(0, 1);
  transform-origin: left top;
  transition: 0.2s cubic-bezier(0.45, 0, 0.55, 1);
  z-index: -1;
  transform: skewY(-20deg) scale(1, 0);
  height: 140px;
}
.search__link:not(.search__link--sale):hover {
  border-color: var(--thema-yellow);
}
.search__link:not(.search__link--sale):hover::before {
  transform: skewY(-10deg) scale(1, 1);
}
/* .search__link:hover {
  background: var(--thema-yellow);
  border-color: var(--thema-yellow);
} */
.search__link--sale {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--theme-black-dark);
}
.search__link--sale::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 1px solid var(--theme-black-dark);
  box-shadow: 0 0 0 0 transparent;
  transition-duration: 0.2s;
  transition-property: background-color, border, box-shadow, color;
}
.search__link--sale:hover::before{
  box-shadow: 0 0 0 4px rgba(224, 213, 52, 0.4);
}
.search__link--sale:hover {
  background: none;
  border-color: none;
}

.search__link.current {
  background: var(--thema-yellow);
  border-color: var(--thema-yellow);
}
.search__link--sale.current {
  background: none;
  border: none;
}

.search__link--sale.current::before {
  background: url(../img/icon/check.svg) var(--thema-yellow);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px;
  border: 1px solid var(--theme-yellow);
}

@media screen and (max-width: 768px) {
  .search--sale {
    flex-direction: column;
    gap: 16px;
  }
  .search__title.js-search-toggle {
    padding: 12px 24px;
    gap: 6px;
    justify-content: center;
    border: 1px solid var(--theme-black-dark);
    border-radius: 50px;
    color: var(--theme-black-dark);
    font-weight: bold;
    cursor: pointer;
  }

  .search__title.js-search-toggle {
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.search__title.js-search-toggle:not(.scrolled)::after {
  content: "";
  background: var(--theme-black-dark);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scale(0, 1);
  transform-origin: left top;
  transition: 0.2s cubic-bezier(0.45, 0, 0.55, 1);
  z-index: -1;
  transform: skewY(-20deg) scale(1, 0);
  height: 140px;
}
.search__title.js-search-toggle:not(.scrolled):hover {
  color: #fff;
}
.search__title.js-search-toggle:not(.scrolled):hover::after {
  transform: skewY(-10deg) scale(1, 1);
}
.search__title.js-search-toggle:not(.scrolled):hover::before {
  filter: var(--svg--white);
}
  /* .search__filter{
      display: none;
    } */
}
.search__header {
  display: none;
}

@media screen and (max-width: 768px) {
  /* モーダル背景 */
  .search__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
  }

  .search__overlay.active {
    display: flex;
    cursor: pointer;
  }
  .search__overlay.active .search__header {
    display: flex;
  }
  .search__overlay.active .search__title {
    color: var(--theme-black-dark);
    font-weight: bold;
  }
  .search__overlay.active .search__title::before {
    content: "";
    width: 24px;
    height: 24px;
    filter: var(--svg--black-dark);
  }
  /* 閉じるボタン */
  .search__btn.js-search-close {
    background: url(../img/icon/close.svg) no-repeat;
    background-size: cover;
    background-position: center;
    width: 24px;
    height: 24px;
    filter: var(--svg--black-dark);
  }
  /* モーダル本体 */
  .search__wrap--modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  }

  /* ヘッダー部分 */
  .search__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
  }
  .js-search-toggle.scrolled {
    position: fixed;
    top: 68px;
    width: 100%;
    border: none;
    left: 0;
    z-index: 2;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(255, 255, 255, 0.5) 100%
    );
    backdrop-filter: blur(8px);
  }

  /* モーダル内リンク */
  .search__filter--modal {
    padding: 24px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .search__link {
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
  }
  .search__link--sale {
    padding: 0 !important;
  }
  .search__link::after {
    content: "";
    background: url(../img/icon/chevron-right-light.svg);
    width: 16px;
    aspect-ratio: 1/1;
    background-position: center;
    background-size: cover;
    filter: var(--svg--black-dark);
  }
  .search__link--sale::after {
    content: none;
  }
}
