@charset "utf-8";
/*
Theme Name: ARTISAN child
Theme URI:https://tcd-theme.com/tcd112
Description:WordPressテーマ「ARTISAN」の子テーマ
Template:artisan_tcd112
Author:TCD
Author URI:https://tcd-theme.com/
Version:1.0
*/

/*
  ここから下にCSSを追記してください。
*/

.c-thumbnail {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.c-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PC */
@media (min-width: 768px) {
  #gallery-container.p-top-gallery {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
}

/* スマホ */
@media (max-width: 767px){

  .p-top-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

}

/* タイトルなどを消す */
.p-gallery-cards-items {
  position: relative;
}

.p-gallery-cards-items > *:not(.p-gallery-cards-item__image) {
  display: none !important;
}

/* ==============================
   検索結果ページ専用 完全版
   PC8列・スマホ3列・透過・タイトル非表示
   ============================== */

/* 検索結果ページのグリッド */
body.search .p-archive.p-post-cards {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important; /* PC8列 */
  gap: 15px; /* カード間の余白 */
}

/* スマホは3列にする */
@media (max-width: 767px) {
  body.search .p-archive.p-post-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* サムネイルを正方形に */
body.search .c-thumbnail {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* サムネイル画像を枠いっぱいに */
body.search .c-thumbnail-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background: transparent !important;
}

/* タイトル・オーバーレイ・リンクを非表示 */
body.search .p-post-cards-item__link,
body.search .p-post-cards-item__title,
body.search .p-post-cards-item__title a,
body.search .p-gallery-cards__overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* --------------------
タグページ専用 8列/3列
-------------------- */

/* PC8列 */
body.archive.tax-gallery_category .p-archive.p-archive--gallery {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 15px;
}

/* スマホ3列 */
@media (max-width: 767px){
  body.archive.tax-gallery_category .p-archive.p-archive--gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* サムネイル正方形 */
body.archive.tax-gallery_category .c-thumbnail {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: transparent !important;
}

body.archive.tax-gallery_category .c-thumbnail-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background: transparent !important;
}

/* 前後素材ナビゲーションを完全非表示 */
.c-page-nav__gallery {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 前後素材スライダー */
.c-page-nav__gallery .c-thumbnail,
.c-page-nav__gallery .c-thumbnail-image {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover !important; /* 中央を切り抜いて見せる */
  background: transparent !important; /* 背景透過 */
}

/* 前後素材スライダーのサムネイル */
.c-page-nav__gallery .c-thumbnail,
.c-page-nav__gallery .c-thumbnail-image {
  width: 100% !important;
  height: auto !important; /* 高さを自動に */
  max-height: none !important;
  object-fit: cover !important;
  background: transparent !important;
}

/* 投稿詳細ページの関連素材を完全非表示 */
.p-single-gallery-bottom {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 画像の選択や長押しを許可 */
img {
  -webkit-user-select: auto !important; /* iOS Safari向け */
  -webkit-touch-callout: default !important; /* 長押しメニューを有効化 */
  user-select: auto !important;
  pointer-events: auto !important; /* クリック制御が無ければ不要 */
}