/*------------------------------
--------------------------------
 Gallery
--------------------------------
------------------------------*/
body {
  overflow: scroll;
}

body.fixed {
  overflow: hidden;
}

.gallery ul.anchorlink {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 8px;
  padding: 48px 0;
  flex-wrap: wrap;
}

.gallery ul.anchorlink li {
  background: var(--white);
  border: 1px solid var(--frame-line);
  width: 160px;
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--nav-black);
}

.gallery ul.anchorlink li:hover {
  color: var(--white);
  background: var(--midashi-brown);
  border: none;
}

.gallery .container > h2 {
  color: var(--midashi-brown);
  border-bottom: 1px solid #BD9B52;
  padding-bottom: 10px;
}

.gallery .title_box h2 {
  color: var(--midashi-brown);
}

.gallery .l_page_content_wrap p {
  color: var(--body);
}

.gallery_wrap {
  display: flex;
  justify-content: space-between;
  row-gap: 10px;
  padding: 48px 0;
  flex-wrap: wrap;
}

.gallery_wrap:before,
.gallery_wrap:after {
  content: '';
  display: block;
  width: 24.3%;
}

.gallery_wrap:before {
  order: 1;
}

.gallery_item {
  width: 24.3%;
  max-width: 248px;
  overflow: hidden;
  background: rgba(98, 64, 59, 0.10);
}

.gallery_item:hover {
  cursor: pointer;
}

.gallery_item:hover > a img {
  transform:scale(1.25,1.25);
}

.gallery_item a img {
  transition: all .3s ease;
}

.gallery_item a {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery .gallery_item a,
.hairgallery .gallery_item a {
  aspect-ratio: 236 / 354;
}

.gallery_item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/*Lightbox*/
#lightboxOverlay:after {
  display: block;
  position: absolute;
  content: '';
  background-image: url('../img/gallery_modal_btn.png');
  background-repeat: no-repeat;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  z-index: 10000;
  cursor: pointer;
}

#lightboxOverlay {
  position: fixed;
  background-color: #31241E;
  opacity: .9;
}

.lb-nav {
  position: fixed;
  top: calc(100% - 60px);
  width: 100%;
  height: 60px;
  background: #31241E;
  padding: 0 29%;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
  transform: scale(0.7, 0.7);
  width: 50%;
}

.lb-nav a.lb-prev-disable {
  display: block;
  position: absolute;
  top: 0;
  left: 12.3%;
  width: 100%;
  height: 100%;
  background-image: url('../img/prev_arrow.png');
  background-repeat: no-repeat;
  background-position: 25% 50%;
  display: none;
}

.lb-nav a.lb-next-disable {
  display: block;
  position: absolute;
  top: 0;
  right: 12.3%;
  width: 100%;
  height: 100%;
  background-image: url('../img/next_arrow.png');
  background-repeat: no-repeat;
  background-position: 75% 50%;
  display: none;
}

#lightbox {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -60px;
}

.lb-dataContainer {
  display: none!important;
}

#lightbox .lb-container {
  background: transparent;
  position: relative;
  height: 100%;
}

.lb-outerContainer {
  background: transparent;
}

#lightbox .lb-image {
  border: none;
  border-radius: 0;
  width: 640px;
}


@media screen and (max-width: 1024px) {
  .gallery_wrap:before {
    display: none;
  }

  .gallery_wrap:after {
    content: '';
    display: block;
    width: 32.5%;
  }

  .gallery_item {
    width: 32.5%;
    max-width: 307px;
  }
}

@media screen and (max-width: 960px) {
  .gallery ul.anchorlink li {
    width: 130px;
  }
}

@media screen and (max-width: 768px) {
  .gallery ul.anchorlink li {
    width: 110px;
  }

  .gallery_wrap {
    row-gap: 8px;
  }
}

@media screen and (max-width: 650px) {
  .gallery .l_page_content_wrap > .container,
  .hairgallery .l_page_content_wrap > .container {
    width: 79.4%;
  }

  .gallery ul.anchorlink {
    justify-content: flex-start;
    gap: 8px 8px;
    padding-bottom: 24px;
  }

  .gallery ul.anchorlink li {
    width: 92px;
    height: 35px;
  }

  .gallery .container > h2 {
    padding-bottom: 7px;
  }

  .gallery_wrap {
    row-gap: 8px;
    padding: 24px 0;
  }

  .gallery_wrap:after {
    display: none;
  }

  .gallery_item {
    width: 48.6%;
    max-width: none;
    min-width: 145px;
  }

  .gallery .gallery_item a,
  .hairgallery .gallery_item a {
    aspect-ratio: 145/220;
  }

  /*hairgallery*/
  .hairgallery h3.headline_txt {
    text-align: left;
  }

  /*lightbox*/
  .lb-nav {
    top: calc(100% - 40px);
    height: 40px;
    padding: 0;
  }

  .lb-nav a.lb-prev,
  .lb-nav a.lb-next {
    transform: scale(0.55, 0.55);
  }
}