@charset "UTF-8";

/* ---------------

   ギャラリーページ

   --------------- */
/* .p-gallery
-------------------------------------------------- */
.category-buttons {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "all"
    "place";
  gap: clamp(16px, 0.793rem + 0.88vw, 24px);
  ;
}

#all-category {
  grid-area: all;
}

#place-category {
  grid-area: place;
}

#mood-category {
  grid-area: mood;
}

.category-group-title {
  font-weight: bold;
}

.category-group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 8px;
  margin-block-start: 8px;
}

.category-group-buttons button {
  margin: 0;
  padding: 6px 16px;
  border: none;
  border-radius: 24px;
  background-color: #f2f2f2;
  cursor: pointer;
  font-size: clamp(0.75rem, 0.698rem + 0.22vw, 0.875rem);
  white-space: nowrap;
}

.category-group-buttons button:hover {
  background: #ddd;
}

.category-group-buttons button.active {
  background: #3b486b;
  color: #fff;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: clamp(24px, 1.086rem + 1.77vw, 40px);
  ;
}

.gallery-item {
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 中央でトリミング */
  aspect-ratio: 3 / 2;
  /* ← アスペクト比を揃える（例: 4:3） */
}

/* ライトボックスのカテゴリラベル */
.pswp__custom-cat-labels {
  display: flex;
  gap: 6px;
}

.pswp__custom-cat-labels span {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.pswp__custom-cat-labels span:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* PhotoSwipe カテゴリーラベル */
.category-label {
  display: inline-block;
  background: #3b486b;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 4px;
  cursor: pointer;
}

.category-label:hover {
  background: #0056b3;
}

@media only screen and (min-width: 960px) {
  .category-buttons {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "all place";
  }
}

/*@media only screen and (min-width: 1280px) {
  .category-buttons {
    grid-template-columns: auto auto 1fr;
  }
}*/

@media only screen and (max-width: 1279px) {

  /* ボタン */
  .category-btn {
    position: fixed;
    bottom: 40px;
    left: 0;
    z-index: 998;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
  }

  /* オーバーレイ（初期は非表示） */
  .drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 999;
  }

  /* 表示時 */
  .drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* ドロワーメニュー（初期は下に隠す） */
  .category-drawer {
    position: fixed;
    left: 50%;
    bottom: -100%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 20px;
    transition: bottom 0.4s ease;
    z-index: 1000;
  }

  /* 表示時にスライドアップ */
  .category-drawer.active {
    bottom: 0;
  }

  /* 閉じるボタン */
  .drawer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
  }
}

@media only screen and (min-width: 1280px) {

  .category-btn,
  .drawer-close {
    display: none;
  }
}