body {
	font-family: '游ゴシック体', YuGothic, 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
	margin: 0px;
    overflow-x: hidden; /* メニューが開いたときに横スクロールバーが出ないようにする */
}

/* 非表示のチェックボックス */
.menu-toggle {
    display: none;
}

/* ハンバーガーメニューアイコンのスタイル (label要素) */
.hamburger-menu {
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    cursor: pointer;
    z-index: 1001; /* 他のコンテンツの上に表示 */
    position: fixed; /* 画面右上に固定 */
    top: 10px; /* site_title の高さやパディングに合わせて調整 */
    right: 20px; /* site_title のパディングに合わせて調整 */
    display: flex;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
}

/* サイドバーメニューのスタイル */
.sidebar-menu {
    height: 100%;
    width: 0; /* デフォルトでは非表示（幅0） */
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background-color: #333; /* メニューの背景色 */
    overflow-x: hidden; /* 横方向のスクロールを隠す */
    transition: 0.5s; /* 開閉時のスムーズなトランジション */
    padding-top: 60px; /* 閉じるボタンのためのスペース */
    color: white; /* メニュー内の文字色 */
}

/* チェックボックスがチェックされたときにサイドバーを表示 */
.menu-toggle:checked ~ .sidebar-menu {
    width: 250px; /* 開いたときの幅 */
}

/* 閉じるボタンのスタイル (label要素) */
.sidebar-menu .close-button {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    cursor: pointer;
    color: white;
}

.sidebar-menu .menu-content {
    padding: 15px;
}

.sidebar-menu .attribute_name {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 5px;
    color: #FF9900; /* メニュー内のタイトル色 */
}

.sidebar-menu .attribute a {
    color: white;
    text-decoration: none;
    display: block; /* 各リンクを新しい行に表示 */
    padding: 5px 0;
}

.sidebar-menu .attribute a:hover {
    color: #FF9900;
}

.sidebar-menu .attribute strong a {
    color: #FFDD00; /* 選択中のアイテムの色 */
}


div#site_title {
	font-family: 'Kosugi Maru', sans-serif;
	margin: 0px;
	padding: 10px 60px 10px 10px;
	background: #FF9900;
	color: #ffffff;
	font-size: 1.5em;
	font-weight: bold;
	text-align: left;
	letter-spacing: 0.08em;
    position: relative;
}

div#site_title a{
	color: #ffffff;
	/* width: 100%; と height: 100% は削除 */
	text-decoration: none;
}

div#site_title a:visited{
  color: #ffffff;
}


div#container {
	margin: 5px;
}


div#kiji_area {
	margin: 0 auto;
	padding: 0px;
	width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;

}

.article-header {
  display: flex;
  align-items: center; /* 縦方向の中央揃え */
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 5px 20px;
}

.article-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover; /* 画像が指定のサイズに合うようにトリミング */
  margin-right: 15px;
}

.article-info {
  flex-grow: 1; /* 残りのスペースを埋める */
}

.article-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: left;
}

.article-excerpt {
  font-size: 0.9em;
  color: #555;
  line-height: 1.4;
  text-align: left;
}


div#title_header {
	margin: 0px;
	padding: 0px;
	background: #ffffff;
	color: #333333;
	font-size: 13px;
	text-align: center;
}

.category-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 10px;
	margin-bottom: 10px;
}

.category-buttons button {
	background-color: #f0f0f0;
	border: 1px solid #cccccc;
	padding: 8px 12px;
	margin: 5px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap; /*ボタン内のテキストの折り返しを防ぐ*/
}

.category-buttons button a {
	text-decoration: none;
	color: #333333;
}

.category-buttons button:hover {
	background-color: #e0e0e0;
}

/* ページネーション */
.pagination {
  display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
    border-top: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
}

.pagination a {
    text-decoration: none;
    color: #007bff;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #007bff;
    border-radius: 3px;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}

.pagination span {
    margin: 0 10px;
  font-weight: bold;
    color: #333;
}


div#item_area {
	width: auto;
}

/* 従来のattribute_areaはデフォルトでは表示し、小さい画面で非表示にする */
div#attribute_area {
    display: block; /* デフォルトは表示 */
    width: 190px; /* 必要に応じて調整 */
    float: left;
    margin-right: 10px;
    background: #f9f9f9;
    padding: 10px;
    border: 1px solid #eeeeee;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* attribute_name と attribute の基本スタイル */
.attribute_name {
    font-size: 12px;
    font-weight: bold;
    padding: 5px;
    margin-top: 10px;
    border-bottom: 1px solid #cccccc;
}

.attribute {
    font-size: 12px;
    padding: 5px;
}

.attribute a {
    color: #555555;
    text-decoration: none;
}

.attribute a:hover {
    text-decoration: underline;
}

.attribute strong a {
    color: #000000;
}


/*アイテムグリッド*/
.item-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 最小200px, 最大1fr */
	grid-gap: 15px; /* アイテム間の余白 */
	padding: 5px;
	justify-content: center;
}

div#item_temp {
	display: grid;
	justify-content: center;

}

div.item {
	text-align: center;
	border: 1px solid #aaaaaa;
	margin: 2px;
	width: 200px;
	height: 200px;
	font-size: 13px;
	padding: 5px;
	line-height: 100%;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

div.item_title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 13px;
	text-align: left;
	height: 1.85em;
	margin-bottom: 5px;
}

div.item img.image {
	max-width: 100%;
	max-height: 120px; 
	object-fit: contain;
	display: block;
	margin: 0 auto; 
}

div.item a {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1; /* クリック可能な領域のため */
}

div.item_price {
	font-weight: bold;
	color: #CC0000;
	font-size: 14px;
	margin-top: 5px;
	z-index: 2; 
	position: relative; /* z-indexを有効にするため */
}

div.item_shopname {
	font-size: 11px;
	color: #666666;
	margin-top: 2px;
	z-index: 2;
	position: relative; /* z-indexを有効にするため */
}

div#footer {
	text-align: center;
	font-size: 11px;
	padding: 10px;
	background: #f0f0f0;
	color: #555555;
	margin-top: 20px;
}

/* 769px以上の画面でもSP向けと同じにした
@media screen and (min-width: 769px) {
    .hamburger-menu {
        display: flex; 
    }

} */

/* メディアクエリ（PCとSPの切り替え） */
@media screen and (max-width: 768px) {

    .hamburger-menu {
        display: flex;
    }

    div#item_area {
        margin-left: 0;
    }

	#container {
		display: flex;
		flex-direction: column;
	}


	#item_area {
		margin-left: 0;
	}

	.item-grid {
		grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
		grid-gap: 10px; /* アイテム間の余白 */
	}
}



/* メディアクエリ（400px以下でもう少し小さく、一般的スマホ向け) */
@media screen and (max-width: 400px) {
	div.item {
		text-align: center;
		border: 1px solid #aaaaaa;
		margin: 2px;
		width: 160px;
		height: 160px;
		font-size: 11px;
		padding: 5px;
		line-height: 100%;
		overflow: hidden;
		position: relative;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	div.item_title {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: 11px;
		text-align: left;
		height: 1.85em;
	}

    div.item img.image {
        max-height: 100px;
    }
}