@charset "utf-8";

/* Gallery responsive styles
--------------------------------------------------*/

/* Mobile-first (default: < 769px) */

/* Gallery index: CSS Grid instead of float */
.main_gallery ul.gallery,
.main_gallery ul.links.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main_gallery ul.gallery li {
  width: auto;
  height: auto;
  float: none;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.main_gallery ul.gallery li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category filter tabs */
ul.horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 15px;
  list-style: none;
}

ul.horizontal li a {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
}

/* MORE button */
p.btn_open {
  width: 100px;
  height: 100px;
  font-size: 14px;
  padding-top: 38px;
  margin: 25px auto 15px;
}

/* Gallery detail: Swiper gallery */
.gallery-swiper-wrap {
  width: 100%;
  margin: 0 auto;
  padding-bottom: 20px;
}

.gallery-main {
  width: 100%;
  margin-bottom: 10px;
}

.gallery-main .swiper-slide {
  position: relative;
}

.gallery-main .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  text-align: center;
  box-sizing: border-box;
}

.gallery-thumbs {
  width: 100%;
}

.gallery-thumbs .swiper-slide {
  width: 60px;
  height: 60px;
  opacity: 0.5;
  cursor: pointer;
}

.gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid #af774f;
}

.gallery-thumbs .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery navigation buttons */
.swiper-button-prev,
.swiper-button-next {
  color: #473e34;
}

/* Detail: prev/next/index buttons */
.section_gallery_btn {
  margin-top: 20px;
}

.section_gallery_btn ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  list-style: none;
  padding: 0;
}

.section_gallery_btn .btn {
  width: 240px;
  display: block;
  margin: 0;
}

.section_gallery_btn .btn.prev,
.section_gallery_btn .btn.next {
  margin: 0;
}

.section_gallery_btn .btn.index {
  position: static;
  margin: 0;
}

/* Category title */
.cat_tit {
  font-size: 17px;
  padding: 10px 0 8px;
  margin-bottom: 20px;
}

/* Gallery shop heading */
.gallery_shop {
  flex-direction: column;
  gap: 0.5em;
  margin: 0 15px 25px;
}

/* ---- PC (769px+) ---- */
@media screen and (min-width: 769px) {
  .main_gallery ul.gallery,
  .main_gallery ul.links.gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }

  .main_gallery ul.gallery li {
    aspect-ratio: auto;
    height: 232px;
  }

  ul.horizontal {
    padding: 0;
    gap: 0;
  }

  ul.horizontal li a {
    font-size: inherit;
    padding: 8px 15px;
  }

  p.btn_open {
    width: 120px;
    height: 120px;
    font-size: 16px;
    padding-top: 46px;
    margin: 35px auto 20px;
  }

  /* Gallery detail: Swiper */
  .gallery-swiper-wrap {
    width: 980px;
    padding-bottom: 30px;
  }

  .gallery-main .swiper-slide img {
    max-height: 600px;
    object-fit: contain;
  }

  .gallery-thumbs .swiper-slide {
    width: 76px;
    height: 76px;
  }

  .gallery-caption {
    font-size: 14px;
    padding: 10px 7px;
  }

  /* Detail: prev/next buttons */
  .section_gallery_btn {
    margin-top: 25px;
  }

  .section_gallery_btn ul {
    flex-direction: row;
    justify-content: center;
  }

  .section_gallery_btn .btn.prev {
    margin-right: 130px;
  }

  .section_gallery_btn .btn.next {
    margin-left: 130px;
  }

  .section_gallery_btn .btn.index {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -130px;
  }

  .cat_tit {
    font-size: 21px;
    padding: 14px 0 12px;
    margin-bottom: 30px;
  }

  .gallery_shop {
    flex-direction: row;
    gap: 1em;
    margin: 0 0 40px;
  }
}
