﻿/* PCモーダルレイアウト修正 */
@media (min-width: 769px) {
  .modal-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    max-width: 960px;
    width: 90%;
    margin: 5% auto;
    position: relative;
    z-index: 1000;
  }

  .modal-image {
    flex: 0 0 400px;
    width: 400px;
    max-width: 400px;
    min-width: 400px;
  }

  .modal-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start;
    max-height: 600px;
    overflow-y: auto;
  }

  .modal-admin-comment {
    position: absolute;
    bottom: 20px;
    right: 40px;
    font-size: 0.85rem;
    color: #666;
    max-width: 450px;
    text-align: left;
    line-height: 1.5;
  }
}


.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  inset: 0;
  overflow: hidden; /* 背景スクロール防止 */
}

.modal:target {
  display: block;
}


.btn-flat-logo {
  position: relative;
  display: inline-block;
  font-weight: bold;
  padding: 0.25em 0.5em;
  text-decoration: none;
  color: #FFF;
  background: #363636;
  transition: .4s;
  padding: 3px;
  margin: 3px;
}

.btn-flat-logo:hover {
  background: #5D5D5D;
}


@media (min-width: 769px) {
  .modal-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    max-width: 960px;
    width: 90%;
    margin: 5% auto;
    position: relative;
    z-index: 1001;
  }
}


.modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* 背景色を追加 */
  z-index: 999; /* .modal-content より下に */

}


/* スナップ画像エリア */
@media (min-width: 769px) {
  .modal-image {
    flex: 0 0 400px;
    width: 400px;
    max-width: 400px;
    min-width: 400px;
    flex: 1;
    max-width: 400px;
  }

  .modal-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

/* アイテム一覧エリア（右側） */
@media (min-width: 769px) {
  .modal-items {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start;
  max-height: 600px;
    overflow-y: auto;
  }

  .modal-info {
    font-size: 0.9rem;
    color: #555;
    margin-top: 10px;
    text-align: center;
  }
}

/* アイテムの個別表示（画像＋テキスト横並び） */
@media (min-width: 769px) {
  .item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 120px;
  }

  .item-link img {
    width: 100px;
    height: auto;
    border-radius: 0;
  }

  .item-link p {
    font-size: 14px;
    font-family: "Helvetica", "Arial", sans-serif;
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
  }
}


.close {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 30px;
  color: #333;
  text-decoration: none;
}

@media (min-width: 769px) {
  .modal-comment {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
  }
}


/* モーダルのスマホ対応 */
@media (max-width: 768px) {
  .modal-content {
    background: #fff;
    border-radius: 8px;
    position: relative;
    z-index: 1001;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    width: 90%;
    margin: 5% auto;
    max-height: 90vh; /* 高さ制限をつけて */
    overflow-y: auto; /* 中だけスクロール可能に */
    -webkit-overflow-scrolling: touch; /* iOSでも快適に */
    scroll-behavior: smooth;
  }

  .modal-image {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .modal-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .modal-info {
    font-size: 0.85rem;
    color: #555;
    text-align: center;
    margin-top: 10px;
  }

  .modal-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    justify-items: center;
    width: 100%;
  }

  .modal-admin-comment {
    font-size: 0.8rem;
    color: #666;
    margin-top: 16px;
    text-align: left;
    line-height: 1.5;
  }

  .item-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    color: #333;
  }

  .item-link img {
    width: 80px;
    height: auto;
  }

  .item-link p {
    font-size: 13px;
    margin-top: 6px;
    text-align: center;
  }
}



/* 以下gallery部分 */


.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 40px 180px;
}

.gallery-item {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease;
  border-radius: 0;
  box-shadow: none; 
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /* 画像の縦横比を固定 */
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: none; 
}

.gallery-item .info {
  font-size: 0.85rem;
  color: #666;
  margin: 8px 0 12px;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px;
  }
}


/* ボタン */
.aboutSection_button, .featuresList_button, .itemSection_button, .itemSection_list_button, .stylesSection_button a {
	display: block;
	height: 50px;
	font-size: 14px;
	line-height: 50px;
	color: #fff;
	font-weight: 700;
	letter-spacing: .1em;
	text-align: center;
	cursor: pointer;
	transition: background-color .3s, color .3s
}
.aboutSection_button input, .aboutSection_button span, .featuresList_button input, .featuresList_button span, .itemSection_button input, .itemSection_button span, .itemSection_list_button input, .itemSection_list_button span, .stylesSection_button a input, .stylesSection_button a span {
	letter-spacing: .1em
}
.featuresList_button {
	background-color: #999
}

@media only screen and (min-width:767px) {
	.aboutSection_button, .itemSection_button, .itemSection_list_button, .stylesSection_button a {
		height: 60px;
		border: 2px solid #000;
		line-height: 60px
	}
}
.aboutSection_button, .itemSection_button, .itemSection_list_button, .stylesSection_button a {
	background-color: #000
}
	.aboutSection_button:hover, .itemSection_button:hover, .itemSection_list_button:hover, .stylesSection_button a:hover {
		background-color: #fff;
		color: #000
	}
	.itemSection_list_button {
		width: 300px;
		margin-top: 45px
	}
}
@media only screen and (max-width:767px) {
	.itemSection_list_button {
		width: 200px;
		margin-top: 45px
	}
	.itemSection_list_button {
		margin-top: 39px
	}
	.stylesSection_categoryList_node .itemSection_list_button{
		margin-top: 20px;
		background-color: #FFF;
		color: #000;
		border: solid 1px #000;
	}
	.stylesSection_categoryList_node .itemSection_list_button:hover{
		background-color: #000;
    	color: #FFF;
	}
	.stylesSection_categoryList_node .itemSection_list_button{
		margin-top: 20px;
		background-color: #FFF;
		color: #000;
		border: solid 1px #000;
	}
	.stylesSection_categoryList_node .itemSection_list_button:hover{
		background-color: #000;
    	color: #FFF;
	}
}