/* =========================================================
   81 Sidebar
   83rd Warehouse Access Rail
========================================================= */

.l-soho-sidebar {
  --soho-sidebar-width: 150px;

  position: relative;
  z-index: 20;

  width: var(--soho-sidebar-width);
  min-width: var(--soho-sidebar-width);

  color: rgba(255, 255, 255, 0.86);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.01) 0,
      rgba(255, 255, 255, 0.01) 1px,
      transparent 1px,
      transparent 5px
    ),
    radial-gradient(
      circle at 22% 18%,
      rgba(255, 255, 255, 0.035),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      #151515 0%,
      #101010 52%,
      #080808 100%
    );

  border-right: 1px solid rgba(137, 29, 33, 0.38);
  box-shadow:
    inset -1px 0 0 rgba(0, 0, 0, 0.62),
    inset 1px 0 0 rgba(255, 255, 255, 0.035);
}

.l-soho-sidebar--right {
  border-right: 0;
  border-left: 1px solid rgba(137, 29, 33, 0.38);
  box-shadow:
    inset 1px 0 0 rgba(0, 0, 0, 0.62),
    inset -1px 0 0 rgba(255, 255, 255, 0.035);
}

.l-soho-sidebar--fixed {
  position: fixed;
  top: 0;
  bottom: 0;
}

.l-soho-sidebar--fixed.l-soho-sidebar--left {
  left: 0;
}

.l-soho-sidebar--fixed.l-soho-sidebar--right {
  right: 0;
}

.l-soho-sidebar--flow {
  position: relative;
  align-self: stretch;
}

.l-soho-sidebar__inner {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100%;
  min-height: 100%;
  padding: 26px 12px;

  overflow: hidden;
}

.l-soho-sidebar__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.035) 0%,
      transparent 36%,
      rgba(0, 0, 0, 0.24) 100%
    );
  opacity: 0.72;
}

.l-soho-sidebar__brand,
.l-soho-sidebar__nav,
.l-soho-sidebar__storeInfo {
  position: relative;
  z-index: 1;
}

/* =========================================================
   Brand
========================================================= */

.l-soho-sidebar__brand {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(137, 29, 33, 0.34);
  text-align: center;
}

.l-soho-sidebar__number {
  display: none;
}

.l-soho-sidebar__logo {
  display: flex;
  justify-content: center;

  margin: 0;
}

.l-soho-sidebar__logoLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;

  color: inherit;
  text-decoration: none;
  border: 0;
}

.l-soho-sidebar__logoImage {
  display: block;
  width: 100%;
  max-width: 104px;
  height: auto;
}

.l-soho-sidebar__logoText {
  display: block;

  font-family: var(--soho-font-en, serif);
  font-size: 26px;
  line-height: 0.95;
  letter-spacing: 0.06em;

  color: rgba(255, 255, 255, 0.9);
}

.l-soho-sidebar__sub {
  margin: 12px 0 0;

  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: none;

  color: var(--soho-red, #891d21);
  opacity: 0.92;
}

.l-soho-sidebar[data-lang="ja"] .l-soho-sidebar__sub {
  font-family: var(--soho-font-ja, serif);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.l-soho-sidebar[data-lang="en"] .l-soho-sidebar__sub {
  font-family: var(--soho-font-en, serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.l-soho-sidebar__caption {
  margin: 18px 0 0;

  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.04em;

  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

/* =========================================================
   Navigation
   wp_nav_menu 対応
========================================================= */

.l-soho-sidebar__nav {
  display: grid;
  gap: 0;

  margin-top: 24px;
}

.l-soho-sidebar__heading {
  appearance: none;

  display: block;

  margin: 0 0 14px;
  padding: 0;

  color: var(--soho-red, #891d21);
  background: transparent;
  border: 0;

  font-family: inherit;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-transform: none;

  opacity: 0.94;

  text-align: center;
  cursor: default;
  pointer-events: none;
}

.l-soho-sidebar[data-lang="en"] .l-soho-sidebar__heading {
  font-family: var(--soho-font-en, serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.l-soho-sidebar__menu,
.l-soho-sidebar__menu ul {
  margin: 0;
  padding: 0;

  list-style: none;
}

.l-soho-sidebar__menu {
  border-bottom: 1px solid rgba(137, 29, 33, 0.24);
}

.l-soho-sidebar__menu li {
  margin: 0;
  padding: 0;
}

.l-soho-sidebar__menu a {
  position: relative;

  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  align-items: center;

  min-width: 0;
  padding: 10px 0;

  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-top: 1px solid rgba(137, 29, 33, 0.24);

  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.04em;

  transition:
    color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.l-soho-sidebar__menu a::before {
  content: "◆";

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--soho-red, #891d21);
  font-family: var(--soho-font-en, serif);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0;

  opacity: 0.88;
}

.l-soho-sidebar[data-lang="en"] .l-soho-sidebar__menu a {
  font-family: var(--soho-font-en, serif);
  letter-spacing: 0.06em;
}

.l-soho-sidebar__menu a:hover,
.l-soho-sidebar__menu a:focus-visible,
.l-soho-sidebar__menu .current-menu-item > a,
.l-soho-sidebar__menu .current_page_item > a {
  color: #ffffff;
  opacity: 1;
  transform: translateX(3px);
}

.l-soho-sidebar--right .l-soho-sidebar__menu a:hover,
.l-soho-sidebar--right .l-soho-sidebar__menu a:focus-visible,
.l-soho-sidebar--right .l-soho-sidebar__menu .current-menu-item > a,
.l-soho-sidebar--right .l-soho-sidebar__menu .current_page_item > a {
  transform: translateX(-3px);
}

.l-soho-sidebar__menu .current-menu-item > a::before,
.l-soho-sidebar__menu .current_page_item > a::before {
  color: rgba(180, 141, 75, 0.95);
  opacity: 1;
}

/* =========================================================
   Sub Menu
========================================================= */

.l-soho-sidebar__menu .sub-menu {
  margin: 0;
  padding: 0 0 0 14px;
}

.l-soho-sidebar__menu .sub-menu a {
  grid-template-columns: 10px minmax(0, 1fr);

  padding: 8px 0;

  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.035em;

  border-top-color: rgba(137, 29, 33, 0.16);
}

.l-soho-sidebar__menu .sub-menu a::before {
  content: "・";

  font-size: 10px;
  color: rgba(137, 29, 33, 0.82);
}

/* =========================================================
   Legacy Navigation Support
   旧 navItem 構造が残っても崩さない
========================================================= */

.l-soho-sidebar__nav > a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: center;

  padding: 10px 0;

  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-top: 1px solid rgba(137, 29, 33, 0.24);

  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.04em;

  transition:
    color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.l-soho-sidebar__nav > a:last-child {
  border-bottom: 1px solid rgba(137, 29, 33, 0.24);
}

.l-soho-sidebar__nav > a:hover {
  color: #ffffff;
  opacity: 1;
  transform: translateX(3px);
}

.l-soho-sidebar--right .l-soho-sidebar__nav > a:hover {
  transform: translateX(-3px);
}

.l-soho-sidebar__nav > a span {
  font-family: var(--soho-font-en, serif);
  font-size: 9px;
  letter-spacing: 0.1em;

  color: var(--soho-red, #891d21);
  opacity: 0.9;
}

/* =========================================================
   Store Info
   Sidebar最下部の営業情報
========================================================= */

.l-soho-sidebar__storeInfo {
  margin-top: auto;
  padding-top: 22px;

  border-top: 1px solid rgba(137, 29, 33, 0.34);
}

.l-soho-sidebar__storeRow {
  padding: 10px 0;

  border-top: 1px solid rgba(137, 29, 33, 0.18);
}

.l-soho-sidebar__storeRow:first-of-type {
  border-top: 0;
}

.l-soho-sidebar__storeLabel {
  margin: 0 0 5px;

  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.08em;

  color: var(--soho-red, #891d21);
  opacity: 0.92;
}

.l-soho-sidebar__storeValue {
  margin: 0;

  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.035em;

  color: rgba(255, 255, 255, 0.72);
}

.l-soho-sidebar[data-lang="en"] .l-soho-sidebar__storeLabel,
.l-soho-sidebar[data-lang="en"] .l-soho-sidebar__storeValue {
  font-family: var(--soho-font-en, serif);
}

.l-soho-sidebar[data-lang="en"] .l-soho-sidebar__storeLabel {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* =========================================================
   Responsive
   SPではSidebarをSticky Headerとして使う
========================================================= */

@media screen and (max-width: 960px) {
  :root {
    --soho-sp-header-height: 96px;
  }

  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar {
    display: flex;
    flex-direction: column;
  }

  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar > .l-soho-sidebar {
    order: -10;
  }

  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar > .l-soho-content-area {
    order: 0;
  }

  .l-soho-sidebar,
  .l-soho-sidebar--fixed,
  .l-soho-sidebar--fixed.l-soho-sidebar--left,
  .l-soho-sidebar--fixed.l-soho-sidebar--right,
  .l-soho-sidebar--flow,
  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar > .l-soho-sidebar,
  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar > .l-soho-sidebar--fixed,
  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar > .l-soho-sidebar--fixed.l-soho-sidebar--left,
  .l-soho-main .l-soho-main-layout.l-soho-main-layout--with-sidebar > .l-soho-sidebar--fixed.l-soho-sidebar--right {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;

    z-index: 1000;

    width: 100%;
    min-width: 0;
    height: var(--soho-sp-header-height);
    align-self: stretch;

    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(137, 29, 33, 0.38);

    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.32),
      inset 0 -1px 0 rgba(255, 255, 255, 0.035);
  }

  .l-soho-sidebar__inner {
    display: grid;
    grid-template-columns: minmax(88px, 1fr) auto minmax(88px, 1fr);
    gap: 18px;
    align-items: center;

    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 0 28px;

    overflow: hidden;
  }

  .l-soho-sidebar__inner::before {
    opacity: 0.58;
  }

  .l-soho-sidebar__brand {
    display: contents;

    padding-bottom: 0;
    border-bottom: 0;
    text-align: center;
  }

  .l-soho-sidebar__logo {
    grid-column: 2;
    grid-row: 1;

    justify-content: center;
  }

  .l-soho-sidebar__logoImage {
    max-width: 116px;
  }

  .l-soho-sidebar__logoText {
    font-size: 28px;
  }

  .l-soho-sidebar__sub {
    grid-column: 1;
    grid-row: 1;

    margin: 0;

    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.08em;

    text-align: left;
    white-space: nowrap;
  }

  .l-soho-sidebar[data-lang="ja"] .l-soho-sidebar__sub {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .l-soho-sidebar__caption {
    display: none;
  }

  .l-soho-sidebar__nav {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;

    margin-top: 0;
    margin-right: -12px;
  }

  .l-soho-sidebar__heading {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 8px 15px 7px;

    border: 1px solid rgba(137, 29, 33, 0.42);
    border-radius: 999px;

    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: none;

    color: rgba(255, 255, 255, 0.82);
    background: rgba(0, 0, 0, 0.22);

    white-space: nowrap;

    cursor: pointer;
    pointer-events: none;
    opacity: 0.45;
  }

  body.is-soho-sidebar-stuck .l-soho-sidebar__heading {
    pointer-events: auto;
    opacity: 1;
  }

  .l-soho-sidebar__heading::after {
    content: "";
    display: inline-block;

    width: 5px;
    height: 5px;
    margin-left: 8px;

    border-right: 1px solid rgba(255, 255, 255, 0.68);
    border-bottom: 1px solid rgba(255, 255, 255, 0.68);

    transform: rotate(45deg) translateY(-2px);
  }

  body.is-soho-sidebar-open .l-soho-sidebar__heading::after {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  .l-soho-sidebar__menu,
  .l-soho-sidebar__storeInfo {
    display: none;
  }

  body.is-soho-sidebar-open .l-soho-sidebar__menu {
    position: fixed;
    top: var(--soho-sp-header-height);
    left: 0;
    right: 0;
    z-index: 999;

    display: block;

    margin: 0;
    padding: 14px 28px 18px;

    background:
      linear-gradient(
        180deg,
        #101010 0%,
        #080808 100%
      );

    border-bottom: 1px solid rgba(137, 29, 33, 0.38);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
  }

  body.is-soho-sidebar-open .l-soho-sidebar__menu a {
    padding: 12px 0;
  }

  body.is-soho-sidebar-open .l-soho-sidebar__menu .sub-menu a {
    padding: 9px 0;
  }
}
